.task-board-state {
  margin-bottom: .75rem;
}

.task-board-state__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .55rem .75rem;
  border: 1px solid rgba(180, 83, 9, .25);
  border-radius: .65rem;
  background: #fff7ed;
  color: #9a3412;
}

.task-desk__skeleton {
  min-height: 4.5rem;
  margin: .35rem;
  border-radius: .6rem;
  color: transparent !important;
  background: linear-gradient(100deg, #eef1f4 30%, #f8fafc 50%, #eef1f4 70%);
  background-size: 220% 100%;
  animation: task-board-skeleton 1.25s ease-in-out infinite;
}

@keyframes task-board-skeleton {
  to { background-position-x: -220%; }
}

.task-desk__column-empty {
  min-height: 5rem;
  margin: .35rem;
  padding: 1rem .5rem;
  border: 1px dashed rgba(71, 85, 105, .35);
  border-radius: .65rem;
  color: #64748b;
  text-align: center;
  pointer-events: none;
}

.task-desk__column-empty span {
  font-size: .75rem;
}

.task-card.is-pending {
  opacity: .65;
  pointer-events: none;
}

.task-card__tag .tag-remove {
  display: inline-grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  margin-left: .15rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
}

.task-card__tag .tag-remove:focus-visible,
.dropdown-menu[role="menu"] [role="menuitem"]:focus-visible {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}
/* --- App shell: B2B tokens (CRM / agency) --- */
/*
 * Палитра бренда — для смены достаточно переопределить:
 *   --brand-primary       (акцент, сейчас #2254E1)
 *   --brand-primary-rgb   (34, 84, 225)
 *   --brand-neutral       (доп. нейтральный, сейчас #373737)
 *   --brand-neutral-rgb   (55, 55, 55)
 * Производные (--brand-primary-dark, --brand-neutral-light и т.д.) пересчитаются автоматически.
 */
:root {
  --brand-neutral: #373737;
  --brand-neutral-rgb: 55, 55, 55;
  --brand-neutral-light: color-mix(in srgb, var(--brand-neutral) 72%, #ffffff);
  --brand-neutral-muted: color-mix(in srgb, var(--brand-neutral) 45%, #ffffff);
  --brand-neutral-soft-bg: color-mix(in srgb, var(--brand-neutral) 8%, #ffffff);
  --brand-neutral-border: rgb(var(--brand-neutral-rgb) / 0.12);
  --brand-neutral-ink: var(--brand-neutral);

  --brand-primary: #2254e1;
  --brand-primary-rgb: 34, 84, 225;
  --brand-primary-dark: color-mix(in srgb, var(--brand-primary) 78%, var(--brand-neutral));
  --brand-primary-darker: color-mix(in srgb, var(--brand-primary) 58%, var(--brand-neutral));
  --brand-primary-light: color-mix(in srgb, var(--brand-primary) 24%, #ffffff);
  --brand-primary-soft-bg: color-mix(in srgb, var(--brand-primary) 11%, #ffffff);
  --brand-primary-ink: color-mix(in srgb, var(--brand-primary) 88%, var(--brand-neutral));

  --app-bg: #f1f5f9;
  --app-surface: #ffffff;
  --app-border: #e2e8f0;
  --app-nav-bg: var(--brand-neutral);
  --app-nav-fg: #f8fafc;
  --app-accent: var(--brand-primary);
  --app-accent-dark: var(--brand-primary-dark);
  --app-accent-darker: var(--brand-primary-darker);
  --app-text: var(--brand-neutral);
  --app-text-muted: var(--brand-neutral-muted);
  --radius-sm: 0.375rem;
  --shadow-sm: 0 1px 2px rgb(var(--brand-neutral-rgb) / 0.06);
  --primary-color: var(--app-accent);
  --bs-primary: var(--app-accent);
  --bs-primary-rgb: var(--brand-primary-rgb);
  --secondary-color: var(--brand-neutral-muted);
  --success-color: var(--brand-primary-dark);
  --danger-color: #be123c;
  --warning-color: #d97706;
  --info-color: #0369a1;
  --app-surface-soft: rgba(255, 255, 255, 0.86);
  --app-border-soft: rgb(var(--brand-neutral-rgb) / 0.08);
  --app-elev-1: 0 4px 16px rgb(var(--brand-neutral-rgb) / 0.06);
  --app-elev-2: 0 10px 26px rgb(var(--brand-neutral-rgb) / 0.1);
  --app-ring: 0 0 0 3px rgb(var(--brand-primary-rgb) / 0.28);
  --app-radius-xl: 1rem;
  --app-radius-lg: 0.85rem;
  --app-radius-md: 0.65rem;
  --app-grid-gap: 0.9rem;
}

/* --- Time off matrix --- */
.time-off-page,
.time-off-toolbar {
  container-type: inline-size;
}

.time-off-page__header {
  align-items: flex-end;
}

.time-off-page__kicker {
  margin: 0 0 0.2rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-primary);
}

.time-off-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.time-off-inbox {
  margin: 0 0 0.9rem;
  padding: 0.85rem 1rem;
  border: 1px dashed rgb(var(--brand-neutral-rgb) / 0.18);
  border-radius: var(--app-radius-lg);
  background: color-mix(in srgb, var(--app-surface) 88%, #f8fafc);
}

.time-off-inbox.is-live {
  border-style: solid;
  border-color: color-mix(in srgb, #d97706 38%, #e2e8f0);
  background: linear-gradient(180deg, #fffbeb 0%, #fff 42%);
}

.time-off-inbox__head,
.time-off-desk__head,
.time-off-calendar-block__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.time-off-inbox__title,
.time-off-desk__title,
.time-off-calendar-block__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.time-off-inbox__hint,
.time-off-desk__hint,
.time-off-desk__muted,
.time-off-desk__empty {
  margin: 0.15rem 0 0;
  color: var(--app-text-muted);
  font-size: 0.8rem;
}

.time-off-count {
  min-width: 1.7rem;
  height: 1.7rem;
  padding: 0 0.45rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.78rem;
  font-weight: 800;
}

.time-off-count--warn { background: #fef3c7; color: #92400e; }
.time-off-count--quiet {
  background: var(--brand-neutral-soft-bg);
  color: var(--app-text-muted);
}

.time-off-ticket-list,
.time-off-desk__list,
.time-off-people {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.time-off-ticket {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: start;
  padding: 0.75rem 0.85rem;
  border-radius: 0.85rem;
  background: #fff;
  border: 1px solid rgb(var(--brand-neutral-rgb) / 0.1);
}

.time-off-ticket__who,
.time-off-ticket__meta,
.time-off-desk__item-main,
.time-off-person__body {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.time-off-ticket__who span,
.time-off-person__role {
  color: var(--app-text-muted);
  font-size: 0.78rem;
}

.time-off-ticket__reason,
.time-off-ticket__sub {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
}

.time-off-ticket__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.time-off-avatar {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.7rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--brand-primary-soft-bg);
  color: var(--brand-primary-ink);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.time-off-kind {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.time-off-type-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.time-off-type-pick__item {
  margin: 0;
  cursor: pointer;
}

.time-off-type-pick__item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.time-off-type-pick__item .time-off-kind {
  display: inline-flex;
  min-height: 2.1rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid transparent;
  font-size: 0.78rem;
}

.time-off-type-pick__item input:checked + .time-off-kind {
  box-shadow: var(--app-ring);
  border-color: rgb(var(--brand-primary-rgb) / 0.45);
}

.time-off-type-pick__item input:focus-visible + .time-off-kind {
  box-shadow: var(--app-ring);
}

.time-off-desk {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 0.85rem;
  margin: 0 0 1.1rem;
}

.time-off-desk__card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-lg);
  box-shadow: var(--app-elev-1);
  padding: 1rem 1.05rem 1.1rem;
  min-height: 11rem;
}

.time-off-desk__sub {
  margin: 0.7rem 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.time-off-desk__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.55rem;
  padding: 0.55rem 0.6rem;
  border-radius: 0.75rem;
  background: var(--brand-neutral-soft-bg);
}

.time-off-desk__item-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.time-off-chip {
  flex: 0 0 auto;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
}

.time-off-chip--pending { background: #fef3c7; color: #92400e; }
.time-off-chip--planned { background: #e2e8f0; color: #334155; }
.time-off-chip--ok { background: #dcfce7; color: #166534; }
.time-off-chip--no { background: #fee2e2; color: #991b1b; }

.time-off-people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0.55rem;
}

.time-off-person {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
  padding: 0.65rem 0.7rem;
  border-radius: 0.8rem;
  background: var(--brand-neutral-soft-bg);
}

.time-off-person__cover {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  font-weight: 650;
}

.time-off-empty {
  display: grid;
  justify-items: start;
  gap: 0.35rem;
  margin-top: 0.85rem;
  color: var(--app-text-muted);
  font-size: 0.86rem;
}

.time-off-empty i {
  font-size: 1.25rem;
  color: var(--brand-primary);
}

.time-off-empty p {
  margin: 0;
}

.time-off-calendar-block {
  scroll-margin-top: 5.5rem;
}

.time-off-calendar-block__head {
  margin: 0 0 0.7rem;
}

.time-off-bulk-panel.is-picking {
  position: sticky;
  bottom: 0.75rem;
  z-index: 30;
  box-shadow: var(--app-elev-2);
  border: 1px solid rgb(var(--brand-primary-rgb) / 0.28) !important;
}

.time-off-current-user-row--pulse td.time-off-sticky--name {
  animation: time-off-row-pulse 1.4s ease;
}

@keyframes time-off-row-pulse {
  0%, 100% { background: var(--app-surface); }
  35% { background: var(--brand-primary-soft-bg); }
}

@media (max-width: 991.98px) {
  .time-off-desk,
  .time-off-ticket {
    grid-template-columns: 1fr;
  }

  .time-off-ticket__actions {
    justify-content: flex-start;
  }
}

.time-off-toolbar .form-label {
  margin-bottom: 0.25rem;
  font-weight: 700;
}

.time-off-toolbar .btn {
  white-space: nowrap;
}

.time-off-month-nav .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.time-off-filter-actions .btn {
  min-width: 0;
}

.time-off-filter-extra {
  margin-top: 0.15rem;
  grid-column: 1 / -1;
}

.time-off-filter-grid {
  display: grid !important;
  grid-template-columns: minmax(9.5rem, 0.65fr) minmax(16rem, 1.6fr) minmax(13rem, 1.2fr) minmax(9rem, auto);
  align-items: end;
}

.time-off-filter-grid > [class*="col-"] {
  width: auto;
  max-width: none;
}

.time-off-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.time-off-summary__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  align-items: center;
  flex: 1 1 28rem;
}

.time-off-view-switch {
  display: inline-flex;
  align-items: center;
  align-self: center;
  padding: 0.2rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.9);
  gap: 0.15rem;
}

.time-off-view-switch__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.time-off-view-switch__item:hover {
  color: var(--brand-primary-dark);
  background: rgba(255, 255, 255, 0.85);
}

.time-off-view-switch__item.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-primary-dark), var(--brand-primary-light));
  box-shadow: 0 4px 12px rgb(var(--brand-primary-rgb) / 0.28);
}

.time-off-summary__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  align-self: center;
}

.time-off-period-nav {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 0.35rem;
  min-height: 2.125rem;
  padding: 0.2rem 0.35rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: #fff;
}

.time-off-period-nav .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  min-height: 1.75rem;
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
}

.time-off-period-nav__label {
  display: inline-flex;
  align-items: center;
  min-width: 6.5rem;
  min-height: 1.75rem;
  padding: 0 0.35rem;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.2;
  color: #334155;
  text-align: center;
  white-space: nowrap;
}

.time-off-period-nav__today {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  font-size: 0.78rem;
  line-height: 1.2;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
  text-decoration: none;
}

.time-off-calendar-shell {
  position: relative;
}

.time-off-calendar-rail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.time-off-month-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  flex: 1 1 auto;
}

.time-off-month-chip {
  min-width: 2.15rem;
  padding: 0.22rem 0.45rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  transition: border-color 0.12s ease, background-color 0.12s ease, color 0.12s ease, transform 0.12s ease;
}

.time-off-month-chip:hover {
  border-color: rgb(var(--brand-primary-rgb) / 0.45);
  color: var(--brand-primary-dark);
  transform: translateY(-1px);
}

.time-off-month-chip.is-current {
  border-color: rgba(14, 165, 233, 0.55);
  background: #e0f2fe;
  color: #0369a1;
}

.time-off-month-chip.is-active {
  border-color: rgb(var(--brand-primary-rgb) / 0.55);
  background: #ccfbf1;
  color: var(--brand-primary-darker);
  box-shadow: inset 0 0 0 1px rgb(var(--brand-primary-rgb) / 0.18);
}

.time-off-table-scroll-wrap {
  position: relative;
}

.time-off-scroll-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1.75rem;
  pointer-events: none;
  z-index: 110;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.time-off-scroll-fade.is-visible {
  opacity: 1;
}

.time-off-scroll-fade--left {
  left: var(--time-off-pinned-width);
  background: linear-gradient(90deg, rgb(var(--brand-neutral-rgb) / 0.12), rgb(var(--brand-neutral-rgb) / 0));
}

.time-off-scroll-fade--right {
  right: var(--time-off-summary-width, 0);
  background: linear-gradient(270deg, rgb(var(--brand-neutral-rgb) / 0.12), rgb(var(--brand-neutral-rgb) / 0));
}

.time-off-page:not(.time-off-page--year) .time-off-scroll-fade--right {
  right: 0;
}

.time-off-day-head--today,
.time-off-day-head--today .time-off-day-toggle {
  box-shadow: inset 0 -3px 0 var(--brand-primary);
}

.time-off-day-head--today {
  background: var(--brand-primary-ink) !important;
  color: #ecfeff !important;
}

.time-off-cell--today {
  box-shadow: inset 0 0 0 2px rgb(var(--brand-primary-rgb) / 0.55);
}

.time-off-sticky--summary-vacation {
  background: linear-gradient(180deg, var(--brand-primary-soft-bg) 0%, var(--brand-primary-light) 100%) !important;
}

.time-off-sticky--summary-dayoff {
  background: linear-gradient(180deg, #eff6ff 0%, #f0f9ff 100%) !important;
}

.time-off-table thead .time-off-sticky--summary-vacation,
.time-off-table thead .time-off-sticky--summary-dayoff {
  background: #1e3a5f !important;
  background-color: #1e3a5f !important;
  color: #f8fafc;
}

.time-off-legend__mark--today {
  background: #fff;
  border-color: var(--brand-primary);
  box-shadow: inset 0 -2px 0 var(--brand-primary);
}

.time-off-scroll-today:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.org-structure-tree-stats {
  padding: 0.35rem 0.5rem;
  border-radius: 0.5rem;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.org-structure-builder__panel-head-text {
  min-width: 0;
}

.org-structure-builder__pool-collapsed-label {
  display: none;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  margin: 0.5rem auto 0;
  letter-spacing: 0.02em;
  user-select: none;
}

.org-structure-builder.is-pool-collapsed .org-structure-builder__pool-hint,
.org-structure-builder.is-pool-collapsed .org-structure-builder__pool-body {
  display: none !important;
}

.org-structure-builder.is-pool-collapsed .org-structure-builder__panel-head-text {
  display: none;
}

.org-structure-builder.is-pool-collapsed .org-structure-builder__panel-head {
  margin-bottom: 0 !important;
  justify-content: center;
}

.org-structure-builder.is-pool-collapsed .org-structure-builder__panel--pool {
  padding: 0.65rem 0.35rem;
  min-height: min(70vh, 40rem);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.org-structure-builder.is-pool-collapsed .org-structure-builder__pool-collapsed-label {
  display: block;
  flex: 1;
  text-align: center;
}

@media (min-width: 992px) {
  .org-structure-builder.is-pool-collapsed .org-structure-builder__pool-col {
    flex: 0 0 3.25rem;
    width: 3.25rem;
    max-width: 3.25rem;
  }

  .org-structure-builder.is-pool-collapsed .org-structure-builder__canvas-col {
    flex: 1 1 0;
    width: auto;
    max-width: calc(100% - 3.25rem - 0.75rem);
  }
}

.org-structure-builder__panel {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: var(--app-radius-lg);
  background: #fff;
  padding: 0.85rem;
  min-height: 12rem;
}

.org-structure-builder__panel--canvas {
  min-height: min(70vh, 40rem);
  max-height: min(70vh, 40rem);
  overflow: auto;
}

.org-structure-card-pool {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.55rem;
  max-height: min(70vh, 40rem);
  overflow: auto;
  padding-right: 0.15rem;
  border-radius: 0.65rem;
  transition: box-shadow 0.12s ease, background-color 0.12s ease;
}

.org-structure-card-pool.is-drop-target {
  background: rgb(var(--brand-primary-rgb) / 0.06);
  box-shadow: inset 0 0 0 2px rgb(var(--brand-primary-rgb) / 0.35);
}

.org-structure-employee-card {
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 0.65rem;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  padding: 0.55rem 0.6rem;
  box-shadow: var(--app-shadow-sm);
  transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease, opacity 0.12s ease;
}

.org-structure-employee-card--pool {
  cursor: grab;
}

.org-structure-employee-card--tree {
  min-width: 10.5rem;
  max-width: 14rem;
}

.org-structure-employee-card.is-draggable {
  cursor: grab;
}

.org-structure-employee-card.is-dragging {
  opacity: 0.55;
  transform: scale(0.98);
}

.org-structure-employee-card.is-drop-target {
  border-color: rgb(var(--brand-primary-rgb) / 0.65);
  box-shadow: 0 0 0 3px rgb(var(--brand-primary-rgb) / 0.18);
}

.org-structure-employee-card.is-draft {
  border-color: rgba(217, 119, 6, 0.45);
  background: linear-gradient(180deg, #fffaf0 0%, #fff 100%);
}

.org-structure-employee-card.is-dimmed,
.org-chart-card.is-dimmed {
  opacity: 0.35;
}

.org-structure-employee-card__body {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.org-structure-employee-card__avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #e2e8f0;
}

.org-structure-employee-card__avatar--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 1.1rem;
}

.org-structure-employee-card__text {
  min-width: 0;
  flex: 1;
}

.org-structure-employee-card__name {
  font-size: 0.84rem;
  line-height: 1.2;
}

.positions-sheet {
  display: flex;
  align-items: stretch;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 0.75rem;
  background: #fff;
}

.positions-sheet__lead {
  flex: 1 1 28rem;
  min-width: 18rem;
}

.position-time-off-approvers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  max-width: 16rem;
}

.position-time-off-approvers__chip {
  font-weight: 600;
  font-size: 0.72rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

#positionTimeOffApprovers + .ts-wrapper {
  margin-bottom: 0;
}

.positions-sheet__lead .table,
.positions-sheet__tail .table {
  margin-bottom: 0;
}

.positions-sheet__tail {
  flex: 0 0 auto;
}

.positions-sheet__rates-col {
  position: relative;
  display: grid;
  grid-template-columns: 1.7rem minmax(0, 1fr) 1.7rem;
  flex: 0 0 calc(3 * 7.75rem + 3.4rem);
  width: calc(3 * 7.75rem + 3.4rem);
  max-width: calc(3 * 7.75rem + 3.4rem);
  align-items: stretch;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--brand-primary) 7%, #fff), #f7f8fb 2.75rem);
  border-left: 1px solid rgba(148, 163, 184, 0.4);
  border-right: 1px solid rgba(148, 163, 184, 0.4);
}

.positions-rate-nav {
  display: contents;
}

.positions-rate-nav__btn {
  position: sticky;
  top: 4.2rem;
  z-index: 6;
  align-self: start;
  width: 1.45rem;
  height: 1.45rem;
  margin-top: 0.7rem;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(var(--brand-neutral-rgb) / 0.14);
  border-radius: 999px;
  background: #fff;
  color: var(--brand-neutral);
  box-shadow: 0 4px 12px rgb(var(--brand-neutral-rgb) / 0.1);
}

.positions-rate-nav__btn[data-rate-scroll="-1"] {
  grid-column: 1;
  grid-row: 1;
}

.positions-rate-nav__btn[data-rate-scroll="1"] {
  grid-column: 3;
  grid-row: 1;
}

.positions-rate-nav__btn:hover:not(:disabled) {
  color: var(--brand-primary);
  border-color: rgb(var(--brand-primary-rgb) / 0.35);
}

.positions-rate-nav__btn:disabled {
  opacity: 0.35;
  box-shadow: none;
}

.positions-sheet__rates {
  grid-column: 2;
  grid-row: 1;
  width: calc(3 * 7.75rem);
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.position-rate-head__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.15rem 0.25rem;
  min-width: 0;
}

.positions-rate-save {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
}

.positions-rate-save__idle {
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--brand-neutral-muted);
}

.positions-rate-save.is-dirty .positions-rate-save__idle {
  display: none;
}

.positions-rate-save:not(.is-dirty) #savePositionRates {
  display: none;
}

.position-rate-head__row:has(.positions-rate-save.is-dirty) .position-rate-head__role {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.positions-rate-save.is-dirty #savePositionRates.btn {
  min-height: 0;
  padding: 0.02rem 0.35rem;
  font-size: 0.68rem;
  line-height: 1.15;
  white-space: nowrap;
  box-shadow: 0 0 0 2px rgb(var(--brand-primary-rgb) / 0.18);
}

.position-rate-money.is-dirty,
.position-rate-head.is-dirty .position-rate-head__pick {
  background: color-mix(in srgb, var(--brand-primary) 16%, #fff);
  box-shadow: inset 0 0 0 1px rgb(var(--brand-primary-rgb) / 0.45);
  border-radius: 0.4rem;
}

.position-rate-money.is-invalid-rate,
.position-rate-head.is-invalid-rate .position-rate-head__pick {
  background: color-mix(in srgb, #dc3545 16%, #fff);
  box-shadow: inset 0 0 0 1px #dc3545;
  border-radius: 0.4rem;
}

.positions-rates-table {
  width: max-content;
  margin-bottom: 0;
  --bs-table-bg: transparent;
}

.positions-rates-table .position-rate-col {
  width: 7.75rem;
  min-width: 7.75rem;
  max-width: 7.75rem;
  box-sizing: border-box;
  vertical-align: middle;
  background: transparent;
  padding: 0.35rem 0.45rem;
}

.position-rate-head {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.position-rate-head__role {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-neutral-muted);
  line-height: 1.2;
}

.position-rate-head__date {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.position-rate-head__pick {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  font-size: 0.84rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--brand-neutral);
  line-height: 1.2;
}

button.position-rate-head__pick {
  cursor: pointer;
}

button.position-rate-head__pick:hover {
  color: var(--brand-primary);
}

.position-rate-head__pick.is-empty {
  font-weight: 600;
  color: var(--brand-neutral-muted);
}

.position-rate-col--current {
  background: color-mix(in srgb, var(--brand-primary) 9%, #fff);
}

.position-rate-col--current .position-rate-head__role {
  color: var(--brand-primary);
}

.position-rate-col--previous {
  background: rgb(var(--brand-neutral-rgb) / 0.035);
}

.position-rate-col--draft .position-rate-head__role {
  color: #0f766e;
}

.position-rate-money {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin: 0;
  min-height: 1.85rem;
  padding: 0.1rem 0.45rem;
  border: 1px solid rgb(var(--brand-neutral-rgb) / 0.12);
  border-radius: 0.5rem;
  background: #fff;
}

.position-rate-col--draft .position-rate-money {
  border-style: dashed;
  background: rgb(255 255 255 / 0.72);
}

.position-rate-money:focus-within {
  border-style: solid;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgb(var(--brand-primary-rgb) / 0.14);
}

.position-rate-money__input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--brand-neutral);
  outline: none;
  -moz-appearance: textfield;
  appearance: textfield;
}

.position-rate-money__input::-webkit-outer-spin-button,
.position-rate-money__input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.position-rate-money__input::placeholder {
  color: rgb(var(--brand-neutral-rgb) / 0.28);
  font-weight: 500;
}

.position-rate-money__unit,
.position-rate-money__value {
  font-variant-numeric: tabular-nums;
}

.position-rate-money__value {
  margin-left: auto;
  font-weight: 700;
  color: var(--brand-neutral);
}

.position-rate-money__unit {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--brand-neutral-muted);
}

.position-rate-money--read {
  border-color: transparent;
  background: transparent;
  justify-content: flex-end;
}

.position-rate-money__empty {
  display: block;
  text-align: right;
  color: rgb(var(--brand-neutral-rgb) / 0.28);
}

.positions-rates-table [data-rate-role="current"] .position-rate-head__date,
.positions-rates-table [data-rate-role="current"] .position-rate-col__label {
  color: var(--brand-primary-dark);
}

.position-rate-editor {
  padding: 1rem 1.1rem 1.15rem;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(241, 245, 249, 0.88));
}

.position-rate-editor__intro {
  margin-bottom: 0.9rem;
}

.position-rate-editor__title {
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--app-text);
  margin-bottom: 0.25rem;
}

.position-rate-editor__hint {
  max-width: 52rem;
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.4;
}

.position-rate-editor__list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.position-rate-card {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.9rem;
  background: #fff;
  padding: 0.75rem 0.9rem;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.position-rate-card.is-default {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: inset 3px 0 0 #2563eb, 0 1px 0 rgba(15, 23, 42, 0.03);
}

.position-rate-card__view {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
}

.position-rate-card__main {
  min-width: 0;
  flex: 1 1 14rem;
}

.position-rate-card__label {
  font-weight: 600;
  font-size: 0.92rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

.position-rate-card__amount {
  margin-top: 0.15rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--app-text);
}

.position-rate-card__unit {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
}

.position-rate-card__meta {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: #94a3b8;
}

.position-rate-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.position-rate-card__edit {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(148, 163, 184, 0.35);
}

.position-rate-editor__empty {
  border: 1px dashed rgba(148, 163, 184, 0.45);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.7);
  padding: 1.1rem 1rem;
  text-align: center;
}

.position-rate-editor__empty-icon {
  width: 2.4rem;
  height: 2.4rem;
  margin: 0 auto 0.55rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  font-size: 1.15rem;
}

.position-rate-editor__add {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 0.9rem;
  background: #fff;
  padding: 0.85rem 0.95rem;
}

.position-rate-editor__add-title {
  font-size: 0.82rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 0.65rem;
}

.position-rate-editor__archived summary {
  cursor: pointer;
}

.position-rate-editor__archived-list {
  padding-left: 1.1rem;
  color: #64748b;
}

.user-profile-photo__preview {
  flex-shrink: 0;
}

.user-profile-photo__img,
.user-profile-photo__placeholder {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  object-fit: cover;
}

.user-profile-photo__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #64748b;
  font-size: 2.25rem;
}

.user-vacation-breakdown__dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 0.75rem;
  font-size: 0.875rem;
}

.user-vacation-breakdown__dl dt {
  margin: 0;
  color: #64748b;
  font-weight: 500;
}

.user-vacation-breakdown__dl dd {
  margin: 0;
  text-align: right;
}

.user-vacation-breakdown__carryover {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  max-width: 100%;
}

.user-vacation-breakdown__carryover-view {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.15rem;
}

.user-vacation-breakdown__carryover-btn {
  line-height: 1;
  color: #64748b;
}

.user-vacation-breakdown__carryover-btn:hover,
.user-vacation-breakdown__carryover-btn:focus-visible {
  color: var(--bs-primary);
}

.user-vacation-breakdown__carryover-form {
  display: grid;
  grid-template-columns: minmax(4.5rem, 6rem) auto auto;
  gap: 0.35rem;
  align-items: center;
  justify-items: end;
  width: min(100%, 16rem);
}

.user-vacation-breakdown__carryover-form .form-label,
.user-vacation-breakdown__carryover-form .form-text,
.user-vacation-breakdown__carryover-form [data-carryover-error] {
  grid-column: 1 / -1;
}

.user-vacation-breakdown__carryover-input {
  width: 100%;
  text-align: right;
}

.user-vacation-breakdown__formula {
  display: block;
  font-size: 0.78rem;
  color: #64748b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.user-vacation-breakdown__value--alert {
  color: #b45309;
  font-weight: 600;
}

.user-vacation-breakdown__steps {
  padding-left: 1.15rem;
  margin-bottom: 0;
}

.user-vacation-breakdown__step--carryover {
  color: var(--brand-primary-dark);
}

.user-vacation-breakdown__step--accrued {
  color: var(--brand-primary-ink);
}

.app-page.user-card-page {
  --user-card-nav-offset: 4rem;
  --user-card-sticky-bg: #eef2f8;
}

.user-card__header-sentinel {
  height: 1px;
  margin: 0;
  pointer-events: none;
  visibility: hidden;
}

.user-card__header {
  position: sticky;
  top: var(--user-card-nav-offset);
  z-index: 41;
  margin-left: -0.35rem;
  margin-right: -0.35rem;
  margin-bottom: 1rem;
  padding: 0.55rem 0.35rem 0.85rem;
  background: var(--user-card-sticky-bg);
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  transition: padding 0.18s ease, box-shadow 0.18s ease, gap 0.18s ease;
}

.user-card__eyebrow {
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.user-card__header .app-page__header-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.user-card__header.is-compact {
  padding-top: 0.35rem;
  padding-bottom: 0.4rem;
  align-items: center;
  box-shadow: 0 0.35rem 0.9rem -0.55rem rgba(15, 23, 42, 0.35);
}

.user-card__header.is-compact .user-card__eyebrow,
.user-card__header.is-compact .app-page__subtitle {
  display: none;
}

.user-card__header.is-compact .app-page__title {
  margin-bottom: 0;
  font-size: 0.98rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-card__header.is-compact .app-page__header-actions {
  flex-wrap: nowrap;
  gap: 0.35rem;
}

.user-card__header.is-compact .app-page__action-label {
  display: none !important;
}

.user-card__header.is-compact .app-page__header-actions .btn {
  flex: 0 0 auto;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  justify-content: center;
  border-radius: 999px;
  font-size: 1rem;
  line-height: 1;
}

.user-card__hero-photo .user-profile-photo__img,
.user-card__hero-photo .user-profile-photo__placeholder {
  width: 4.75rem;
  height: 4.75rem;
}

.user-card__employment--dismissed {
  border: 1px solid rgba(100, 116, 139, 0.35);
  background: #f8fafc;
}

.user-card__aside .user-card__employment--dismissed .card-body {
  background: transparent;
}

.user-card__stat {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.85rem;
  background: rgba(248, 250, 252, 0.9);
  padding: 0.75rem 0.85rem;
  height: 100%;
}

.user-card__stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.user-card__stat-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--app-text);
  line-height: 1.25;
  word-break: break-word;
}

.user-card__stat-hint {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: #94a3b8;
}

.user-card__google .user-card__meta-dl dd {
  font-weight: 500;
}

.user-card__meta-dl {
  display: grid;
  gap: 0.65rem 0;
  margin: 0;
}

.user-card__meta-dl > div {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0.5rem;
  align-items: baseline;
}

.user-card__meta-dl dt {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
}

.user-card__meta-dl dd {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--app-text);
  word-break: break-word;
}

.user-card__vacation-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.user-card__vacation-kpi {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.85rem;
  background: rgba(248, 250, 252, 0.92);
  padding: 0.7rem 0.8rem;
}

.user-card__vacation-kpi-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 0.2rem;
}

.user-card__vacation-kpi-value {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
}

.user-card__activity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.user-card__person-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.9rem;
}

.user-card__person-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgb(var(--brand-primary-rgb) / 0.08);
  color: var(--brand-primary-dark);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
}

.user-card__workspace {
  overflow: hidden;
}

.user-card__hub {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.7rem 1rem 0.65rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(248, 250, 252, 0.92);
}

.user-card__hub-tab {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0.36rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgb(var(--brand-neutral-rgb) / 0.05);
  color: var(--brand-neutral);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.user-card__hub-tab:hover {
  background: rgb(var(--brand-primary-rgb) / 0.12);
  color: var(--brand-primary-dark);
}

.user-card__hub-tab[aria-selected="true"] {
  background: rgb(var(--brand-primary-rgb) / 0.16);
  border-color: rgb(var(--brand-primary-rgb) / 0.35);
  color: var(--brand-primary-dark);
}

.user-card-intake-files {
  padding: 1rem 1rem 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.85rem;
  background: rgba(248, 250, 252, 0.72);
}

.user-card-intake-files__title {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--brand-neutral);
}

.user-card-intake-files__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr));
  gap: 0.75rem;
}

.user-card-intake-files__group {
  padding: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0.7rem;
  background: #fff;
}

.user-card-intake-files__group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.user-card-intake-files__group-label {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--brand-neutral);
}

.user-card-intake-files__count {
  min-width: 1.35rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: rgb(var(--brand-primary-rgb) / 0.12);
  color: var(--brand-primary-dark);
  font-size: 0.72rem;
  font-weight: 650;
  text-align: center;
}

.user-card-intake-files__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
}

.user-card-intake-files__item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.45rem 0.5rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(248, 250, 252, 0.9);
  color: inherit;
  text-decoration: none;
}

.user-card-intake-files__item:hover {
  border-color: rgb(var(--brand-primary-rgb) / 0.35);
  background: rgb(var(--brand-primary-rgb) / 0.06);
  color: inherit;
}

.user-card-intake-files__icon {
  flex: 0 0 auto;
  font-size: 1.15rem;
  color: var(--brand-primary-dark);
}

.user-card-intake-files__meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}

.user-card-intake-files__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.84rem;
  font-weight: 600;
}

.user-card-intake-files__size {
  font-size: 0.72rem;
  color: var(--bs-secondary-color, #6c757d);
}

.user-card-intake-files__action {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex: 0 0 auto;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.user-card-intake-files__empty {
  margin: 0;
  color: var(--bs-secondary-color, #6c757d);
  font-size: 0.875rem;
}

.user-card-intake-files--standalone {
  padding: 0;
  border: 0;
  background: transparent;
}

.user-card-onboarding__steps {
  display: grid;
  gap: 0.45rem;
}

.user-card-onboarding__step {
  display: flex;
  align-items: flex-start;
  gap: 0.15rem;
  font-size: 0.9rem;
}

.user-card-onboarding__step.is-done {
  color: var(--brand-neutral);
}

.user-card__pane[hidden] {
  display: none !important;
}

.user-card-gender {
  display: block;
}

.user-card-gender__track {
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  max-width: 20rem;
  padding: 0.18rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgb(var(--brand-neutral-rgb) / 0.07);
}

.user-card-gender__track::before {
  content: "";
  position: absolute;
  top: 0.18rem;
  bottom: 0.18rem;
  left: 0.18rem;
  width: calc(50% - 0.18rem);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 4px rgb(15 23 42 / 0.12);
  opacity: 0;
  transform: translateX(0);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.user-card-gender__track[data-state="female"]::before,
.user-card-gender__track[data-state="male"]::before {
  opacity: 1;
}

.user-card-gender__track[data-state="male"]::before {
  transform: translateX(100%);
}

.user-card-gender__opt {
  position: relative;
  z-index: 1;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0.48rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  color: #64748b;
  cursor: pointer;
}

.user-card-gender__opt[aria-pressed="true"] {
  color: var(--brand-primary-dark);
}

.user-card-gender__opt:focus-visible {
  outline: none;
  box-shadow: var(--app-ring);
  border-radius: 999px;
}

.user-card-gender.is-disabled {
  opacity: 0.65;
  pointer-events: none;
}

.user-card__perm-list {
  max-height: 20rem;
  overflow: auto;
}

.user-card__perm-group + .user-card__perm-group {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
}

.user-card__perm-group-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.35rem;
}

@media (max-width: 575.98px) {
  .user-card__vacation-summary,
  .user-card__activity-grid {
    grid-template-columns: 1fr;
  }

  .user-card__meta-dl > div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

.user-vacation-breakdown__details summary {
  cursor: pointer;
  color: #475569;
}

.org-structure-employee-card__position,
.org-structure-employee-card__dept,
.org-structure-employee-card__manager {
  line-height: 1.25;
}

.org-structure-employee-card__unlink {
  position: absolute;
  top: 0.1rem;
  right: 0.1rem;
  padding: 0.1rem 0.25rem;
  line-height: 1;
}

/* ——— База знаний ——— */
.kb-page__header {
  margin-bottom: 0.75rem;
}

.kb-layout {
  display: grid;
  grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
  min-height: min(78vh, 52rem);
  overflow: hidden;
}

.kb-layout__sidebar {
  border-right: 1px solid rgba(148, 163, 184, 0.25);
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.kb-sidebar__toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.85rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.kb-sidebar__count {
  align-self: flex-start;
}

.kb-tree {
  flex: 1;
  overflow: auto;
  padding: 0.5rem 0.45rem 0.85rem;
}

.kb-tree__expand-actions .btn {
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
}

.kb-tree__group {
  margin-bottom: 0.15rem;
}

.kb-tree__group + .kb-tree__group {
  margin-top: 0.2rem;
}

.kb-tree__group-head {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.15rem 0.2rem;
  border-radius: 0.5rem;
}

.kb-tree__group-head:hover {
  background: rgb(var(--brand-primary-rgb) / 0.05);
}

.kb-tree__chevron-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 0;
  background: transparent;
  border-radius: 0.35rem;
  color: #94a3b8;
  padding: 0;
}

.kb-tree__chevron-btn:hover {
  background: rgb(var(--brand-primary-rgb) / 0.1);
  color: var(--brand-primary-dark);
}

.kb-tree__chevron {
  font-size: 0.72rem;
  transition: transform 0.15s ease;
}

.kb-tree__group.is-expanded > .kb-tree__group-head .kb-tree__chevron {
  transform: rotate(90deg);
  color: var(--brand-primary-dark);
}

.kb-tree__toggle-label-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
}

.kb-tree__folder-icon {
  flex-shrink: 0;
  font-size: 0.95rem;
  color: #64748b;
}

.kb-tree__group.is-expanded > .kb-tree__group-head .kb-tree__folder-icon {
  color: var(--brand-primary-dark);
}

.kb-tree__toggle-label {
  flex: 1;
  min-width: 0;
  line-height: 1.25;
  white-space: normal;
}

.kb-tree__branch-actions {
  display: flex;
  flex-shrink: 0;
  gap: 0;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.kb-tree__group-head:hover .kb-tree__branch-actions,
.kb-tree__group-head:focus-within .kb-tree__branch-actions {
  opacity: 1;
}

.kb-tree__branch-btn {
  padding: 0.1rem 0.25rem;
  line-height: 1;
}

.kb-tree__groups {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.kb-tree__drag-handle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.35rem;
  margin-top: 0.2rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #94a3b8;
  cursor: grab;
  border-radius: 0.25rem;
  user-select: none;
}

.kb-tree__drag-handle:active {
  cursor: grabbing;
}

.kb-tree__group.is-dragging {
  opacity: 0.45;
}

.kb-tree__group.is-drag-over > .kb-tree__group-head {
  background: rgb(var(--brand-primary-rgb) / 0.12);
  border-radius: 0.5rem;
  box-shadow: inset 0 0 0 1px rgb(var(--brand-primary-rgb) / 0.35);
}

.kb-tree__count {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 500;
}

.kb-tree__list {
  list-style: none;
  margin: 0.1rem 0 0.35rem 1.15rem;
  padding: 0.15rem 0 0.15rem 0.65rem;
  border-left: 1px solid rgba(148, 163, 184, 0.45);
  display: none;
}

.kb-tree__group.is-expanded > .kb-tree__list {
  display: block;
}

.kb-tree__item {
  display: flex;
  align-items: flex-start;
  gap: 0.05rem;
}

.kb-tree__item .kb-tree__link {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}

.kb-tree__item.is-dragging {
  opacity: 0.45;
}

.kb-tree__item.is-drag-before {
  box-shadow: inset 0 2px 0 var(--brand-primary);
}

.kb-tree__group.is-article-target > .kb-tree__group-head,
.kb-tree__list.is-article-target {
  background: rgb(var(--brand-primary-rgb) / 0.08);
  border-radius: 0.45rem;
}

.kb-tree__item + .kb-tree__item {
  margin-top: 0.1rem;
}

.kb-tree__item--empty {
  padding: 0.25rem 0.45rem 0.35rem 0.35rem;
}

.kb-tree__link {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 0.45rem;
  padding: 0.38rem 0.45rem 0.38rem 0.35rem;
  font-size: 0.84rem;
  color: #1e293b;
  transition: background 0.12s ease, color 0.12s ease;
}

.kb-tree__doc-icon {
  flex-shrink: 0;
  margin-top: 0.12rem;
  font-size: 0.9rem;
  color: #94a3b8;
}

.kb-tree__link:hover {
  background: rgb(var(--brand-primary-rgb) / 0.08);
}

.kb-tree__link:hover .kb-tree__doc-icon {
  color: var(--brand-primary-dark);
}

.kb-tree__link.is-active {
  background: rgb(var(--brand-primary-rgb) / 0.14);
  color: var(--brand-primary-dark);
  font-weight: 600;
}

.kb-tree__link.is-active .kb-tree__doc-icon {
  color: var(--brand-primary-dark);
}

.kb-tree__link-text {
  line-height: 1.35;
  min-width: 0;
}

.kb-tree__empty {
  padding: 0.5rem;
}

.kb-layout__main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.kb-browse {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 1rem 1.15rem 1.25rem;
  gap: 1rem;
}

.kb-browse__search .card-body {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.kb-browse__results {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.kb-browse__hint {
  padding: 0.25rem 0.15rem;
}

.kb-browse__list {
  border-radius: 0.65rem;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.kb-browse__item {
  border-left: 0;
  border-right: 0;
}

.kb-browse__item:first-child {
  border-top: 0;
}

.kb-browse__item:last-child {
  border-bottom: 0;
}

.kb-doc {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 1rem 1.15rem 1.25rem;
}

.kb-doc__toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.kb-doc__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.kb-doc__title {
  margin-bottom: 0.35rem;
}

.kb-doc__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.kb-edit-source {
  flex: 1 1 auto;
  min-height: 22rem;
  height: 100%;
  resize: none;
  border: 0;
  border-radius: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  background: transparent;
}

.kb-md {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.75rem;
  background: #fff;
  overflow: hidden;
}

.kb-md__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  background: #f8fafc;
}

.kb-md__group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  align-items: center;
}

.kb-md__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 0;
  background: transparent;
  color: #334155;
  border-radius: 0.4rem;
  padding: 0.28rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
}

.kb-md__btn:hover,
.kb-md__btn.is-active {
  background: #e2e8f0;
  color: #0f172a;
}

.kb-md__btn--accent {
  background: rgb(var(--brand-primary-rgb) / 0.1);
  color: rgb(var(--brand-primary-rgb));
}

.kb-md__btn--accent:hover {
  background: rgb(var(--brand-primary-rgb) / 0.18);
}

.kb-md__workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 24rem;
}

.kb-md__workspace[data-kb-md-view="write"] {
  grid-template-columns: 1fr;
}

.kb-md__workspace[data-kb-md-view="write"] .kb-md__preview {
  display: none;
}

.kb-md__workspace[data-kb-md-view="preview"] {
  grid-template-columns: 1fr;
}

.kb-md__workspace[data-kb-md-view="preview"] .kb-md__source-wrap {
  display: none;
}

.kb-md__source-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 24rem;
  border-right: 1px solid rgba(148, 163, 184, 0.2);
}

.kb-md__workspace[data-kb-md-view="write"] .kb-md__source-wrap,
.kb-md__workspace[data-kb-md-view="preview"] .kb-md__preview {
  border-right: 0;
}

.kb-md__source-wrap.is-dragover .kb-md__drop-hint {
  display: flex;
}

.kb-md__drop-hint {
  position: absolute;
  inset: 0.5rem;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
  border: 2px dashed rgb(var(--brand-primary-rgb) / 0.55);
  border-radius: 0.5rem;
  background: rgb(255 255 255 / 0.92);
  color: rgb(var(--brand-primary-rgb));
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 2;
}

.kb-md__preview {
  min-width: 0;
  padding: 0.85rem 1rem;
  overflow: auto;
  background: #fff;
}

.kb-md__status {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem 0.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: #f8fafc;
  color: #64748b;
  font-size: 0.75rem;
}

.kb-md__upload-status {
  color: rgb(var(--brand-primary-rgb));
  font-weight: 600;
}

@media (max-width: 991.98px) {
  .kb-md__btn span {
    display: none;
  }

  .kb-md__workspace[data-kb-md-view="split"] {
    grid-template-columns: 1fr;
  }

  .kb-md__workspace[data-kb-md-view="split"] .kb-md__preview {
    display: none;
  }

  .kb-md__source-wrap {
    border-right: 0;
  }
}

.kb-markdown {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #1e293b;
  overflow-wrap: anywhere;
}

.kb-markdown h1,
.kb-markdown h2,
.kb-markdown h3,
.kb-markdown h4 {
  margin-top: 1.25rem;
  margin-bottom: 0.65rem;
  font-weight: 700;
  line-height: 1.25;
}

.kb-markdown h1 { font-size: 1.55rem; }
.kb-markdown h2 { font-size: 1.3rem; }
.kb-markdown h3 { font-size: 1.1rem; }

.kb-markdown p,
.kb-markdown ul,
.kb-markdown ol,
.kb-markdown pre,
.kb-markdown table,
.kb-markdown blockquote {
  margin-bottom: 0.85rem;
}

.kb-markdown ul,
.kb-markdown ol {
  padding-left: 1.35rem;
}

.kb-markdown blockquote {
  border-left: 3px solid rgb(var(--brand-primary-rgb) / 0.45);
  padding-left: 0.85rem;
  color: #475569;
}

.kb-markdown pre {
  background: var(--brand-neutral);
  color: #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
  overflow: auto;
  font-size: 0.84rem;
}

.kb-markdown code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}

.kb-markdown :not(pre) > code {
  background: #f1f5f9;
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
}

.kb-markdown table {
  width: 100%;
  border-collapse: collapse;
}

.kb-markdown th,
.kb-markdown td {
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 0.45rem 0.6rem;
}

.kb-markdown img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

.ah-md {
  position: relative;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.5rem;
  overflow: hidden;
  background: #fff;
}

.ah-md__split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 22rem;
}

.ah-md__input {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  min-height: 22rem;
  resize: vertical;
}

.ah-md__preview {
  border-left: 1px solid var(--bs-border-color, #dee2e6);
  margin: 0;
  max-height: 36rem;
  overflow: auto;
  padding: 0.85rem 1rem;
}

.ah-md .project-passport__emoji-panel {
  top: 2.6rem;
}

@media (max-width: 900px) {
  .ah-md__split {
    grid-template-columns: 1fr;
  }

  .ah-md__preview {
    border-left: 0;
    border-top: 1px solid var(--bs-border-color, #dee2e6);
  }
}

#ahOutline {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.ah-outline-bar {
  padding: 1rem 1rem 0.85rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.ah-outline-bar__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.ah-outline-bar__label span:last-child {
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.78rem;
  color: #334155;
}

.ah-outline-bar .input-group-text,
.ah-outline-bar .form-control {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.08);
}

.ah-outline-bar .form-control:focus {
  box-shadow: 0 0 0 3px rgb(var(--brand-primary-rgb) / 0.12);
}

#ahTree.kb-tree {
  padding: 0.65rem 0.7rem 1rem;
}

.ah-outline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ah-outline--nested {
  margin: 0.15rem 0 0.35rem 1.15rem;
  padding-left: 0.7rem;
  border-left: 1px solid rgba(15, 23, 42, 0.08);
}

.ah-outline__item + .ah-outline__item {
  margin-top: 0.2rem;
}

.ah-outline__row {
  display: flex;
  align-items: stretch;
  gap: 0.15rem;
  border-radius: 0.7rem;
  transition: background 0.15s ease;
}

.ah-outline__row:hover,
.ah-outline__row:focus-within {
  background: rgb(var(--brand-primary-rgb) / 0.06);
}

.ah-outline__row.is-active {
  background: #fff;
  box-shadow: inset 2px 0 0 var(--brand-primary), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ah-outline__chevron {
  flex: 0 0 1.35rem;
  align-self: center;
  width: 1.35rem;
  height: 1.35rem;
  margin-left: 0.25rem;
  border: 0;
  background: transparent;
  color: #64748b;
  border-radius: 0.4rem;
  padding: 0;
}

button.ah-outline__chevron:hover {
  background: rgb(var(--brand-primary-rgb) / 0.1);
  color: var(--brand-primary-dark);
}

.ah-outline__open {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0.55rem 0.35rem 0.55rem 0.15rem;
  border-radius: 0.7rem;
  color: #0f172a;
}

.ah-outline__index {
  flex: 0 0 1.4rem;
  margin-top: 0.12rem;
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: #94a3b8;
}

.ah-outline--nested .ah-outline__index {
  flex-basis: 2rem;
}

.ah-outline__row.is-active .ah-outline__index {
  color: var(--brand-primary);
}

.ah-outline__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ah-outline__title {
  font-size: 0.92rem;
  line-height: 1.3;
  font-weight: 600;
}

.ah-outline__summary {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.75rem;
  line-height: 1.35;
  font-weight: 400;
  color: #64748b;
}

.ah-outline__move {
  display: grid;
  grid-template-columns: 1.2rem 1.2rem;
  align-content: center;
  opacity: 0;
  padding-right: 0.25rem;
  transition: opacity 0.15s ease;
}

.ah-outline__row:hover .ah-outline__move,
.ah-outline__row:focus-within .ah-outline__move {
  opacity: 1;
}

.ah-outline__move button {
  width: 1.35rem;
  height: 1.15rem;
  border: 0;
  background: transparent;
  color: #64748b;
  border-radius: 0.35rem;
  padding: 0;
  line-height: 1;
}

.ah-outline__move button:hover {
  background: rgb(var(--brand-primary-rgb) / 0.12);
  color: var(--brand-primary-dark);
}

.ah-outline__move button:disabled {
  opacity: 0.28;
  pointer-events: none;
}

.ah-outline__empty {
  margin: 0.4rem 0.5rem;
  color: #64748b;
  font-size: 0.84rem;
}

.ah-reading:has(.ah-toc:not(.d-none)) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem 1.25rem;
  align-items: start;
}

.ah-toc {
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.7rem;
  background: #f8fafc;
  padding: 0.75rem 0.85rem;
}

.ah-toc__title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.4rem;
}

.ah-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ah-toc__item a {
  display: block;
  color: inherit;
  text-decoration: none;
  font-size: 0.84rem;
  line-height: 1.35;
}

.ah-toc__item a:hover {
  color: var(--brand-primary-dark, #0b5ed7);
}

.ah-toc__item--sub a {
  padding-left: 0.75rem;
  color: #64748b;
  font-size: 0.8rem;
}

.kb-markdown h2,
.kb-markdown h3 {
  scroll-margin-top: 1rem;
}

.ah-rev-preview {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.7rem;
  background: #fff;
  max-height: 24rem;
  overflow: auto;
}

.ah-fill {
  position: fixed;
  z-index: 1080;
  right: 1rem;
  bottom: 1rem;
  width: min(22rem, calc(100vw - 2rem));
  padding: 0.9rem 1rem;
  border-radius: 0.8rem;
  background: #fff;
  border: 1px solid var(--bs-border-color, #dee2e6);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
}

.ah-picker {
  position: fixed;
  z-index: 1080;
  right: 1rem;
  bottom: 1rem;
  width: min(24rem, calc(100vw - 2rem));
  max-height: min(26rem, calc(100vh - 2rem));
  display: flex;
  flex-direction: column;
  padding: 0.9rem 1rem;
  border-radius: 0.8rem;
  background: #fff;
  border: 1px solid var(--bs-border-color, #dee2e6);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
}

.ah-picker__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.ah-picker__close {
  border: 0;
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
  color: #64748b;
}

.ah-picker__query {
  margin: 0 0 0.5rem;
  color: #64748b;
  font-size: 0.8rem;
}

.ah-picker__list {
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ah-picker__list a {
  display: block;
  padding: 0.4rem 0.55rem;
  border-radius: 0.5rem;
  text-decoration: none;
  color: inherit;
  background: #f8fafc;
}

.ah-picker__list a:hover {
  background: rgb(var(--brand-primary-rgb) / 0.08);
}

@media (min-width: 992px) {
  .ah-reading:has(.ah-toc:not(.d-none)) {
    grid-template-columns: 13rem minmax(0, 1fr);
  }

  .ah-toc {
    position: sticky;
    top: 1rem;
  }
}

@media (hover: none) {
  .ah-outline__move {
    opacity: 1;
  }
}

@media (max-width: 991.98px) {
  .kb-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .kb-layout__sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    max-height: 16rem;
  }
}

.org-structure-hierarchy-drop-root {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
  padding: 0.55rem 0.75rem;
  border: 1px dashed rgba(148, 163, 184, 0.55);
  border-radius: 0.65rem;
  background: rgba(248, 250, 252, 0.9);
  color: #64748b;
  font-size: 0.8rem;
  text-align: center;
}

.org-structure-hierarchy-drop-root.is-drop-target {
  border-color: rgb(var(--brand-primary-rgb) / 0.55);
  background: var(--brand-primary-soft-bg);
  color: var(--brand-primary-dark);
}

.org-structure-hierarchy {
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.org-structure-hierarchy__roots {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1.25rem 1.5rem;
  width: max-content;
  min-width: 100%;
}

.org-structure-hierarchy__node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  width: max-content;
  max-width: 100%;
}

.org-structure-hierarchy__branch {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.85rem 1rem;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  padding-top: 0.65rem;
  border-top: 2px solid rgba(148, 163, 184, 0.35);
  position: relative;
}

@media (max-width: 767.98px) {
  .org-structure-hierarchy__roots,
  .org-structure-hierarchy__branch {
    flex-wrap: wrap;
  }
}

.org-structure-hierarchy__branch::before {
  content: "";
  position: absolute;
  top: -0.65rem;
  left: 50%;
  width: 2px;
  height: 0.65rem;
  background: rgba(148, 163, 184, 0.45);
  transform: translateX(-50%);
}

.org-chart-page {
  background: transparent;
  box-shadow: none;
}

.org-chart-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.15rem;
}

.org-chart-header__text {
  min-width: 0;
  flex: 1 1 16rem;
}

.org-chart-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 0.65rem;
}

.org-chart-title {
  margin: 0;
  font-size: 2.125rem;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: #141414;
}

.org-chart-lead,
.org-chart-offchart,
.org-chart-editor-lead {
  max-width: 46rem;
  margin: 0.4rem 0 0;
  color: #6b7280;
  font-size: 0.95rem;
  line-height: 1.45;
}

.org-chart-offchart,
.org-chart-editor-lead {
  font-size: 0.875rem;
}

.org-chart-quiet {
  border: 0;
  background: transparent;
  color: #6b7280;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.3;
  padding: 0.35rem 0.2rem;
  border-radius: 0.45rem;
  cursor: pointer;
}

.org-chart-quiet:hover {
  color: #141414;
  background: rgb(15 23 42 / 0.04);
}

.org-chart-quiet:focus-visible {
  outline: 2px solid #94a3b8;
  outline-offset: 2px;
}

.org-chart-chrome {
  margin-bottom: 1.15rem;
}

.org-chart-search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: min(100%, 34rem);
  max-width: 34rem;
  margin: 0;
  padding: 0.5rem 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
  color: #94a3b8;
  cursor: text;
}

.org-chart-search:focus-within {
  border-color: #cbd5e1;
  box-shadow: 0 0 0 3px rgb(15 23 42 / 0.05);
}

.org-chart-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: none;
  box-shadow: none;
  background: transparent;
  padding: 0;
  margin: 0;
  color: #141414;
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.4;
}

.org-chart-search input:focus {
  outline: none;
  box-shadow: none;
}

.org-chart-search input::placeholder {
  color: #9aa3b2;
}

.org-chart-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.org-chart-tags:empty {
  display: none;
}

.org-chart-tag {
  border: 0;
  border-radius: 999px;
  background: #e7e9ee;
  padding: 0.18rem 0.65rem;
  color: #4b5563;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.35;
  cursor: pointer;
}

.org-chart-tag:hover {
  background: #dde0e6;
}

.org-chart-tag[aria-pressed="true"] {
  background: #2a2a2a;
  color: #fff;
}

.org-chart-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.15rem;
  margin-top: 0.85rem;
  padding: 0;
  border: 0;
  background: transparent;
}

.org-chart-legend:empty {
  display: none;
}

.org-chart-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  background: transparent;
  color: #4b5563;
  font-size: 0.8125rem;
  line-height: 1.3;
}

.org-chart-legend__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--org-chart-branch, #2254e1);
  flex-shrink: 0;
}

.org-chart-branch-0 { --org-chart-branch: #2254E1; }
.org-chart-branch-1 { --org-chart-branch: #15803D; }
.org-chart-branch-2 { --org-chart-branch: #EA580C; }
.org-chart-branch-3 { --org-chart-branch: #7C3AED; }
.org-chart-branch-4 { --org-chart-branch: #0F766E; }
.org-chart-branch-5 { --org-chart-branch: #DB2777; }

.org-chart-stage {
  position: relative;
  display: flex;
  align-items: stretch;
  height: min(70vh, 40rem);
  min-height: min(70vh, 40rem);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.org-chart-stage__main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  transition: opacity 0.18s ease;
}

.org-chart-canvas {
  height: 100%;
  overflow-x: auto;
  overflow-y: auto;
  padding: 1.7rem 0.35rem 1.5rem;
}

.org-chart-canvas:has(> .org-chart-message) {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0;
}

.org-chart__roots {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 2.75rem;
  width: max-content;
  min-height: 100%;
}

.org-chart__node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: max-content;
}

.org-chart__expand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  margin-top: 0.45rem;
  min-width: 2.4rem;
  padding: 0.18rem 0.55rem;
  border: 1px solid color-mix(in srgb, var(--org-chart-branch, #2254e1) 40%, #fff);
  border-radius: 999px;
  background: #fff;
  color: var(--org-chart-branch, #2254e1);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.org-chart__expand:hover {
  background: color-mix(in srgb, var(--org-chart-branch, #2254e1) 12%, #fff);
}

.org-chart__expand:focus-visible {
  outline: 2px solid var(--org-chart-branch, #2254e1);
  outline-offset: 2px;
}

.org-chart__expand.is-expanded {
  background: color-mix(in srgb, var(--org-chart-branch, #2254e1) 16%, #fff);
}

.org-chart__expand .bi {
  font-size: 0.75rem;
}

.org-chart__root-label {
  position: absolute;
  top: 0;
  left: 50%;
  width: max-content;
  max-width: 16rem;
  margin: 0;
  color: var(--org-chart-branch, #2254e1);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  transform: translate(-50%, calc(-100% - 0.35rem));
}

.org-chart__branch {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-start;
  width: max-content;
  margin-top: 0;
  padding-top: 1.35rem;
  position: relative;
}

.org-chart__branch::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 1.35rem;
  background: var(--org-chart-branch, #2254e1);
  transform: translateX(-50%);
}

.org-chart__branch > .org-chart__node {
  padding: 1.15rem 0.7rem 0;
}

.org-chart__branch > .org-chart__node::before,
.org-chart__branch > .org-chart__node::after {
  content: "";
  position: absolute;
  top: 0;
  width: 50%;
  height: 1.15rem;
  border-top: 1px solid var(--org-chart-branch, #2254e1);
}

.org-chart__branch > .org-chart__node::before {
  right: 50%;
}

.org-chart__branch > .org-chart__node::after {
  left: 50%;
  border-left: 1px solid var(--org-chart-branch, #2254e1);
}

.org-chart__branch > .org-chart__node:first-child::before {
  border-top: 0;
}

.org-chart__branch > .org-chart__node:last-child::after {
  border-top: 0;
}

.org-chart__branch > .org-chart__node:only-child::before {
  border: 0;
}

.org-chart__branch > .org-chart__node:only-child::after {
  border-top: 0;
  border-left: 1px solid var(--org-chart-branch, #2254e1);
}

.org-chart-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
  width: 15rem;
  margin: 0;
  padding: 0.95rem 1rem;
  border: 1px solid var(--org-chart-branch, #2254e1);
  border-radius: 16px;
  background: #fff;
  color: #141414;
  font: inherit;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 8px 22px rgb(15 23 42 / 0.07);
  appearance: none;
}

.org-chart-card:hover {
  box-shadow: 0 12px 28px rgb(15 23 42 / 0.1);
}

.org-chart-card:focus-visible {
  outline: 2px solid var(--org-chart-branch, #2254e1);
  outline-offset: 3px;
}

.org-chart-card--person .org-chart-card__name {
  font-size: 1rem;
  font-weight: 700;
}

.org-chart-card--department {
  align-items: stretch;
  width: 19rem;
  text-align: left;
  gap: 0.35rem;
}

.org-chart-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem;
  width: 100%;
}

.org-chart-card--department .org-chart-card__title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
}

.org-chart-card--department .org-chart-card__head {
  font-size: 0.875rem;
  font-weight: 600;
  text-align: left;
}

.org-chart-card__name,
.org-chart-card__title,
.org-chart-card__head,
.org-chart-card__position {
  overflow-wrap: anywhere;
}

.org-chart-card__position {
  color: #6b7280;
  font-size: 0.8125rem;
  font-weight: 400;
}

.org-chart-card__pill {
  display: inline-block;
  flex-shrink: 0;
  margin: 0;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--org-chart-branch, #2254e1) 14%, #fff);
  color: var(--org-chart-branch, #2254e1);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}

.org-chart-message {
  margin: 0;
  padding: 0 1rem;
  color: #6b7280;
  font-size: 0.95rem;
  text-align: center;
}

.org-chart-editor {
  margin-top: 0.25rem;
}

.org-chart-detail {
  display: none;
  background: #fff;
}

.org-chart-detail__head {
  position: relative;
  display: flex;
  align-items: flex-start;
  margin: 0 0 0.85rem;
  padding-right: 2rem;
}

.app-main h3.org-chart-detail__title,
.org-chart-detail__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #141414;
}

.org-chart-detail__close {
  position: absolute;
  top: 0.1rem;
  right: 0;
}

.org-chart-detail__note,
.org-chart-detail__empty {
  margin: 0 0 0.7rem;
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.4;
}

.org-chart-detail__pill {
  display: inline-block;
  margin: 0 0 0.9rem;
  padding: 0.16rem 0.65rem;
  border-radius: 999px;
  background: #eef1f6;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 600;
}

.org-chart-detail__list {
  margin: 0.15rem 0 0;
  padding: 0;
  list-style: none;
}

.org-chart-detail__row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.4rem;
  border: 0;
  border-radius: 0.7rem;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.org-chart-detail__row:hover {
  background: #f4f6f8;
}

.org-chart-detail__row:focus-visible {
  outline: 2px solid #94a3b8;
  outline-offset: 1px;
}

.org-chart-detail__name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #141414;
}

.org-chart-detail__position {
  color: #6b7280;
  font-size: 0.8125rem;
  font-weight: 400;
}

.org-chart-detail__heading {
  margin: 1.05rem 0 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #94a3b8;
}

@media (min-width: 992px) {
  .org-chart-stage.is-detail-open .org-chart-stage__main {
    opacity: 0.62;
  }

  .org-chart-stage.is-detail-open .org-chart-detail {
    display: flex;
    flex-direction: column;
    flex: 0 0 22rem;
    width: 22rem;
    padding: 1.15rem 1.2rem 1.35rem;
    overflow: auto;
    background: #fff;
    box-shadow: -16px 0 36px rgb(15 23 42 / 0.1);
  }
}

@media (max-width: 991.98px) {
  .org-chart-stage.is-detail-open .org-chart-stage__main {
    opacity: 0.62;
  }

  .org-chart-stage.is-detail-open .org-chart-detail {
    display: flex;
    flex-direction: column;
    position: absolute;
    inset: 0;
    width: 100%;
    z-index: 2;
    padding: 1.15rem 1.1rem 1.35rem;
    overflow: auto;
    background: #fff;
    box-shadow: none;
  }
}

.time-off-bulk-panel .btn.active {
  box-shadow: var(--app-ring);
}

.time-off-bulk-panel .vr {
  min-height: 1.8rem;
}

.time-off-table-wrap {
  --time-off-index-col: 2.75rem;
  --time-off-name-col: 13rem;
  --time-off-position-col: 13rem;
  --time-off-day-col: 2.05rem;
  --time-off-calendar-width: 63.55rem;
  --time-off-summary-col: 3.25rem;
  --time-off-summary-count: 3;
  --time-off-summary-width: calc(var(--time-off-summary-col) * var(--time-off-summary-count));
  --time-off-name-left: var(--time-off-index-col);
  --time-off-position-left: calc(var(--time-off-index-col) + var(--time-off-name-col));
  --time-off-pinned-width: calc(var(--time-off-index-col) + var(--time-off-name-col) + var(--time-off-position-col));
  --time-off-sticky-bg: var(--app-surface);
  --time-off-sticky-shadow: 1px 0 0 rgb(var(--brand-neutral-rgb) / 0.08), 12px 0 22px -18px rgb(var(--brand-neutral-rgb) / 0.8);
  width: 100%;
  max-width: 100%;
  max-height: calc(100vh - 18rem);
  overflow: auto;
  border-radius: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0) 2.5rem),
    var(--app-surface);
  scrollbar-gutter: stable both-edges;
  isolation: isolate;
}

.time-off-table-wrap--year {
  --time-off-day-col: 1.22rem;
  --time-off-name-col: 11.5rem;
  --time-off-position-col: 9.5rem;
  --time-off-calendar-width: calc(var(--time-off-day-col) * 366);
  max-height: calc(100vh - 16rem);
}

.time-off-table--year {
  width: calc(var(--time-off-pinned-width) + var(--time-off-calendar-width) + var(--time-off-summary-width));
  min-width: calc(var(--time-off-pinned-width) + var(--time-off-calendar-width) + var(--time-off-summary-width));
}

.time-off-year-month-row th {
  position: sticky;
  top: 0;
  z-index: 12;
  background: #1e293b;
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.12);
  font-size: 0.68rem;
  text-align: center;
  padding: 0.35rem 0.15rem;
}

.time-off-year-month-head {
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.time-off-table--year thead tr:last-child th {
  top: 1.85rem;
  z-index: 11;
}

.time-off-day-head--year {
  width: var(--time-off-day-col);
  min-width: var(--time-off-day-col);
  padding: 0.15rem 0;
  font-size: 0.62rem;
}

.time-off-day-head--year .time-off-day-toggle,
.time-off-day-head--year div {
  font-size: 0.62rem;
  line-height: 1.1;
}

.time-off-day-head--month-start {
  border-left: 2px solid rgba(255, 255, 255, 0.28);
}

.time-off-table--year .time-off-cell {
  width: calc(var(--time-off-day-col) - 0.15rem);
  height: calc(var(--time-off-day-col) - 0.05rem);
  min-width: calc(var(--time-off-day-col) - 0.15rem);
  font-size: 0.58rem;
  padding: 0;
}

.time-off-sticky--summary {
  position: sticky;
  z-index: 40;
  width: var(--time-off-summary-col);
  min-width: var(--time-off-summary-col);
  max-width: var(--time-off-summary-col);
  background: #f8fafc;
  background-color: #f8fafc !important;
  box-shadow: -8px 0 16px -18px rgb(var(--brand-neutral-rgb) / 0.75), inset 1px 0 0 rgb(var(--brand-neutral-rgb) / 0.08);
  font-size: 0.68rem;
  vertical-align: middle;
}

.time-off-table thead .time-off-sticky--summary {
  background: #334155 !important;
  color: #f8fafc;
  z-index: 96 !important;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08), -8px 0 16px -18px rgb(var(--brand-neutral-rgb) / 0.75);
}

.time-off-sticky--summary-1 { right: 0; }
.time-off-sticky--summary-2 { right: calc(var(--time-off-summary-col) * 1); }
.time-off-sticky--summary-3 { right: calc(var(--time-off-summary-col) * 2); }

.time-off-year-month-row .time-off-sticky--summary-1 { right: 0; }
.time-off-year-month-row .time-off-sticky--summary-2 { right: calc(var(--time-off-summary-col) * 1); }
.time-off-year-month-row .time-off-sticky--summary-3 { right: calc(var(--time-off-summary-col) * 2); }

.time-off-table tbody tr:hover .time-off-sticky--summary {
  background: #f1f5f9 !important;
}

.time-off-current-user-row .time-off-sticky--summary {
  background: #fffaf0 !important;
}

.time-off-page--year .time-off-table-card {
  display: block;
}

.time-off-page--year .time-off-mobile-list {
  display: none;
}

.time-off-table {
  width: 100%;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  position: relative;
}

.time-off-table.time-off-table--year {
  width: calc(var(--time-off-pinned-width) + var(--time-off-calendar-width) + var(--time-off-summary-width));
  min-width: calc(var(--time-off-pinned-width) + var(--time-off-calendar-width) + var(--time-off-summary-width));
}

.time-off-col--index { width: var(--time-off-index-col); }
.time-off-col--name { width: var(--time-off-name-col); }
.time-off-col--position { width: var(--time-off-position-col); }
.time-off-col--day { width: auto; }
.time-off-col--summary { width: var(--time-off-summary-col); }

.time-off-table-wrap--year .time-off-col--day {
  width: var(--time-off-day-col);
}

.time-off-table td,
.time-off-table th {
  border-color: rgba(148, 163, 184, 0.22);
  box-sizing: border-box;
}

.time-off-table tbody td:not(.time-off-sticky) {
  vertical-align: middle;
  text-align: center;
  padding-top: 0.2rem !important;
  padding-bottom: 0.2rem !important;
  padding-inline: 0.05rem;
  line-height: 0;
  font-size: 0;
}

.time-off-table tbody td:not(.time-off-sticky) .time-off-cell {
  line-height: 1;
  font-size: 0.7rem;
  vertical-align: middle;
}

.time-off-table--year tbody td:not(.time-off-sticky) .time-off-cell {
  font-size: 0.58rem;
}

.time-off-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #263447;
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.14);
  font-size: 0.72rem;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgb(var(--brand-neutral-rgb) / 0.14);
  background-clip: padding-box;
}

.time-off-sticky {
  position: sticky;
  z-index: 25;
  --bs-table-bg: var(--time-off-sticky-bg);
  --bs-table-accent-bg: transparent;
  background: var(--time-off-sticky-bg);
  background-color: var(--time-off-sticky-bg) !important;
  background-clip: padding-box;
  box-shadow: inset 0 0 0 9999px var(--time-off-sticky-bg), 1px 0 0 rgb(var(--brand-neutral-rgb) / 0.08), 8px 0 16px -18px rgb(var(--brand-neutral-rgb) / 0.7);
}

.time-off-table thead .time-off-sticky {
  --bs-table-bg: #334155;
  --time-off-sticky-bg: #334155;
  z-index: 90 !important;
  background: #334155;
  background-color: #334155 !important;
}

.time-off-sticky--index {
  left: 0;
  width: var(--time-off-index-col);
  min-width: var(--time-off-index-col);
  max-width: var(--time-off-index-col);
  z-index: 35;
}

.time-off-sticky--name {
  left: var(--time-off-name-left);
  width: var(--time-off-name-col);
  min-width: var(--time-off-name-col);
  max-width: var(--time-off-name-col);
  z-index: 35;
}

.time-off-sticky--position {
  left: var(--time-off-position-left);
  width: var(--time-off-position-col);
  min-width: var(--time-off-position-col);
  max-width: var(--time-off-position-col);
  z-index: 34;
  box-shadow: inset 0 0 0 9999px var(--time-off-sticky-bg), var(--time-off-sticky-shadow);
}

.time-off-table thead .time-off-sticky--index,
.time-off-table thead .time-off-sticky--name {
  z-index: 100 !important;
}

.time-off-table thead .time-off-sticky--position {
  z-index: 95 !important;
}

.time-off-day-head {
  width: auto;
  min-width: var(--time-off-day-col);
  padding: 0.25rem 0.15rem !important;
}

.time-off-day-toggle {
  display: grid;
  gap: 1px;
  width: 100%;
  min-height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 1.05;
}

.time-off-day-toggle:hover {
  color: #ffffff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.time-off-day-head small {
  display: block;
  font-size: 0.58rem;
  font-weight: 600;
  opacity: 0.72;
}

.time-off-day-head--weekend {
  background: #1f2937 !important;
  color: #e2e8f0;
}

.time-off-day-head--override {
  box-shadow: inset 0 -2px 0 rgba(14, 165, 233, 0.65);
}

.time-off-department-row .time-off-department-pinned {
  --time-off-sticky-bg: #64748b;
  --bs-table-bg: #64748b;
  --bs-table-accent-bg: transparent;
  background: linear-gradient(90deg, #64748b, #738398) !important;
  background-color: #64748b !important;
  background-clip: padding-box;
  color: #fff;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), var(--time-off-sticky-shadow);
  vertical-align: middle;
  padding-top: 0.35rem !important;
  padding-bottom: 0.35rem !important;
}

.time-off-department-pinned--group {
  left: var(--time-off-index-col);
  width: calc(var(--time-off-name-col) + var(--time-off-position-col));
  min-width: calc(var(--time-off-name-col) + var(--time-off-position-col));
  max-width: calc(var(--time-off-name-col) + var(--time-off-position-col));
  z-index: 36;
  box-shadow: inset 0 0 0 9999px var(--time-off-sticky-bg), var(--time-off-sticky-shadow);
}

.time-off-department-row .time-off-sticky--index.time-off-department-pinned {
  z-index: 37;
}

.time-off-department-row__fill {
  --bs-table-bg: #64748b;
  background: linear-gradient(90deg, #738398, #94a3b8) !important;
  background-color: #64748b !important;
  padding: 0 !important;
  border-color: rgba(255, 255, 255, 0.12);
}

.time-off-department-toggle {
  width: 100%;
  min-width: 0;
  max-width: none;
  border: 0;
  padding: 0.15rem 0.75rem 0.15rem 0;
  background: transparent;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-align: left;
  text-transform: inherit;
  letter-spacing: inherit;
}

.time-off-department-toggle__icon {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.16);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.time-off-department-toggle.is-collapsed .time-off-department-toggle__icon {
  transform: rotate(-90deg);
  background: rgba(255, 255, 255, 0.1);
}

.time-off-table tbody tr:not(.time-off-department-row):not(.time-off-current-user-row):hover td,
.time-off-table tbody tr:not(.time-off-department-row):not(.time-off-current-user-row):hover .time-off-sticky {
  --time-off-sticky-bg: #f8fafc;
  --bs-table-bg: #f8fafc;
  background-color: #f8fafc;
}

.time-off-cell {
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid rgb(var(--brand-neutral-rgb) / 0.12);
  border-radius: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.time-off-table:not(.time-off-table--year) tbody td:not(.time-off-sticky) .time-off-cell {
  width: calc(100% - 0.16rem);
  min-width: 0;
  max-width: none;
  height: 1.85rem;
}

.time-off-cell:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgb(var(--brand-neutral-rgb) / 0.16);
  border-color: rgb(var(--brand-primary-rgb) / 0.45);
}

.time-off-cell:focus-visible {
  outline: none;
  box-shadow: var(--app-ring);
}

.time-off-cell--empty {
  background: #fff;
  color: transparent;
}

.time-off-cell--weekend {
  background: repeating-linear-gradient(
    -45deg,
    #cbd5e1,
    #cbd5e1 5px,
    #e2e8f0 5px,
    #e2e8f0 10px
  );
  color: #475569;
}

.time-off-cell--vacation {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.time-off-cell--dayoff {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.time-off-cell--unpaid {
  background: #f3e8ff;
  color: #6b21a8;
  border-color: #d8b4fe;
}

.time-off-cell--pending {
  border-style: dashed;
  background-image: linear-gradient(135deg, rgba(255, 247, 237, 0.72), rgba(255, 255, 255, 0));
  box-shadow: inset 0 0 0 2px rgba(217, 119, 6, 0.22);
}

.time-off-cell--planned {
  border-style: dotted;
  box-shadow: inset 0 0 0 2px rgba(71, 85, 105, 0.28);
}

.time-off-cell:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  filter: grayscale(0.35);
}

.time-off-cell:disabled.time-off-cell--empty {
  background: #f8fafc;
  border-style: dashed;
}

.time-off-cell:disabled.time-off-cell--empty::after {
  content: "";
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 999px;
  background: #cbd5e1;
}

/* Кольцо внутри кнопки: outline+offset срезается overflow таблицы, hover/focus перебивали тень. */
.time-off-cell.time-off-cell--selected,
.time-off-cell.time-off-cell--selected:not(:disabled):hover,
.time-off-cell.time-off-cell--selected:focus-visible,
.time-off-cell.time-off-cell--selected.time-off-cell--today {
  outline: none;
  transform: none;
  border-color: rgb(var(--brand-primary-rgb) / 0.95);
  box-shadow:
    inset 0 0 0 2px #fff,
    inset 0 0 0 4px rgb(var(--brand-primary-rgb) / 0.95);
}

.time-off-cell--empty.time-off-cell--selected:not(.time-off-cell--weekend) {
  background: rgb(var(--brand-primary-rgb) / 0.24);
}

.time-off-cell--weekend.time-off-cell--selected {
  background-image:
    linear-gradient(rgb(var(--brand-primary-rgb) / 0.28), rgb(var(--brand-primary-rgb) / 0.28)),
    repeating-linear-gradient(
      -45deg,
      #cbd5e1,
      #cbd5e1 5px,
      #e2e8f0 5px,
      #e2e8f0 10px
    );
}

body.time-off-bulk-mode .time-off-cell:not(:disabled) {
  cursor: cell;
}

.time-off-current-user-row td,
.time-off-current-user-row .time-off-sticky {
  --time-off-sticky-bg: #fffaf0;
  --bs-table-bg: #fffaf0;
  background-color: #fffaf0;
}

.time-off-current-user-row .time-off-sticky--name {
  box-shadow: inset 0 0 0 9999px var(--time-off-sticky-bg), inset 3px 0 0 rgba(217, 119, 6, 0.6), 1px 0 0 rgb(var(--brand-neutral-rgb) / 0.08);
}

.time-off-balance-wrap {
  overflow: auto;
  border-radius: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: var(--app-surface);
}

.time-off-balance-table {
  min-width: 58rem;
}

.time-off-balance-table thead th {
  background: #263447;
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.14);
  font-size: 0.76rem;
  white-space: nowrap;
}

.time-off-balance-department-row td {
  background: linear-gradient(90deg, #64748b, #94a3b8) !important;
  color: #fff;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.time-off-balance-department-toggle {
  width: 100%;
  min-width: 0;
}

.time-off-balance-row--vacation-alert td {
  --bs-table-bg: #fff7ed;
  background-color: #fff7ed;
}

.time-off-balance-row--dayoff-alert td {
  --bs-table-bg: #eff6ff;
  background-color: #eff6ff;
}

.time-off-balance-row--vacation-alert.time-off-balance-row--dayoff-alert td {
  --bs-table-bg: #fefce8;
  background-color: #fefce8;
}

.time-off-balance-mobile-list {
  display: none;
}

.time-off-balance-card {
  padding: 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: var(--app-radius-lg);
  background: #fff;
  box-shadow: var(--app-shadow-sm);
}

.time-off-balance-card.has-vacation-alert {
  border-color: rgba(249, 115, 22, 0.32);
  background: #fff7ed;
}

.time-off-balance-card.has-dayoff-alert {
  border-color: rgba(59, 130, 246, 0.32);
  background: #eff6ff;
}

.time-off-balance-card.has-vacation-alert.has-dayoff-alert {
  border-color: rgba(234, 179, 8, 0.42);
  background: #fefce8;
}

.time-off-balance-card__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.time-off-balance-card__grid > div {
  padding: 0.55rem;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.time-off-balance-card__grid span {
  display: block;
  font-size: 0.7rem;
  color: #64748b;
}

.time-off-balance-card__grid strong {
  font-size: 1rem;
}

.time-off-legend__mark {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 0.25rem;
  margin-right: 0.35rem;
  vertical-align: -0.15rem;
  border: 1px solid rgb(var(--brand-neutral-rgb) / 0.14);
}

.time-off-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.18rem 0.45rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #475569;
}

.time-off-legend__mark--weekend {
  background: repeating-linear-gradient(-45deg, #cbd5e1, #cbd5e1 4px, #e2e8f0 4px, #e2e8f0 8px);
}

.time-off-legend__mark--vacation {
  background: #bbf7d0;
}

.time-off-legend__mark--dayoff {
  background: #bfdbfe;
}

.time-off-legend__mark--unpaid {
  background: #e9d5ff;
}

.time-off-legend__mark--pending {
  background: #fef3c7;
  border-style: dashed;
  border-color: #d97706;
}

.time-off-legend__mark--planned {
  background: #e2e8f0;
  border-style: dotted;
  border-color: #475569;
}

.time-off-state-card {
  padding: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: var(--app-radius-lg);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.time-off-state-card__mark {
  width: 2rem;
  height: 2rem;
  border: 1px solid rgb(var(--brand-neutral-rgb) / 0.12);
  border-radius: 0.55rem;
  background: #fff;
}

.time-off-state-card__mark.is-weekend {
  background: repeating-linear-gradient(-45deg, #cbd5e1, #cbd5e1 5px, #e2e8f0 5px, #e2e8f0 10px);
}

.time-off-state-card__mark.is-vacation {
  background: #dcfce7;
  border-color: #86efac;
}

.time-off-state-card__mark.is-dayoff {
  background: #dbeafe;
  border-color: #93c5fd;
}

.time-off-state-card__mark.is-unpaid {
  background: #f3e8ff;
  border-color: #d8b4fe;
}

.time-off-state-card__mark.is-pending {
  border-style: dashed;
  box-shadow: inset 0 0 0 2px rgba(217, 119, 6, 0.22);
}

.time-off-state-card__mark.is-planned {
  border-style: dotted;
}

.time-off-mobile-list {
  display: none;
}

.time-off-mobile-group {
  display: grid;
  gap: 0.75rem;
}

.time-off-mobile-group + .time-off-mobile-group {
  margin-top: 1rem;
}

.time-off-mobile-group__title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--app-radius-md);
  background: #475569;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.time-off-mobile-group__title code {
  color: #fee2e2;
}

.time-off-mobile-card {
  padding: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: var(--app-radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--app-elev-1);
}

.time-off-mobile-card.is-current-user {
  border-color: rgba(217, 119, 6, 0.35);
  background: #fffaf0;
}

.time-off-mobile-card__head {
  display: flex;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}

.time-off-mobile-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}

.time-off-mobile-day {
  width: 100%;
  height: 2.55rem;
  flex-direction: column;
  gap: 0.1rem;
  border-radius: 0.55rem;
}

.time-off-mobile-day__num {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  color: currentColor;
  opacity: 0.78;
}

.time-off-mobile-day__mark {
  min-height: 0.85rem;
  font-size: 0.72rem;
  line-height: 1;
}

.time-off-mobile-day.time-off-cell--empty {
  color: #64748b;
}

.time-off-mobile-day.time-off-cell--empty .time-off-mobile-day__mark {
  color: transparent;
}

@media (max-width: 991.98px) {
  .time-off-table-wrap {
    --time-off-name-col: 11rem;
    --time-off-position-col: 10rem;
    max-height: calc(100vh - 15rem);
  }
}

@media (max-width: 575.98px) {
  .time-off-page .app-page__header {
    align-items: stretch;
  }

  .time-off-month-nav {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .time-off-month-nav .btn {
    white-space: normal;
  }

  .time-off-month-nav .btn:nth-child(2) {
    order: 3;
    grid-column: 1 / -1;
  }

  .time-off-toolbar .card-body {
    padding: 0.85rem;
  }

  .time-off-filter-actions .btn {
    flex: 1 1 0;
  }

  .time-off-bulk-panel .btn {
    flex: 1 1 calc(50% - 0.35rem);
  }

  .time-off-summary,
  .time-off-summary__controls,
  .time-off-summary__meta,
  .time-off-legend {
    width: 100%;
  }

  .time-off-view-switch {
    width: 100%;
    justify-content: stretch;
  }

  .time-off-view-switch__item {
    flex: 1 1 0;
    justify-content: center;
    padding-inline: 0.45rem;
  }

  .time-off-period-nav {
    width: 100%;
    justify-content: center;
  }

  .time-off-period-nav__today {
    margin-left: auto;
  }

  .time-off-calendar-rail {
    flex-direction: column;
    align-items: stretch;
  }

  .time-off-legend span {
    flex: 1 1 calc(50% - 0.35rem);
    justify-content: center;
  }

  .time-off-table-wrap {
    --time-off-index-col: 2.25rem;
    --time-off-name-col: 10rem;
    --time-off-position-col: 8.5rem;
    --time-off-day-col: 1.8rem;
    --time-off-calendar-width: 55.8rem;
  }

  .time-off-cell {
    width: 1.6rem;
    height: 1.6rem;
  }

  .time-off-table-card {
    display: none;
  }

  .time-off-page--year .time-off-table-card {
    display: block;
  }

  .time-off-page--year .time-off-mobile-list {
    display: none;
  }

  .time-off-mobile-list,
  .time-off-balance-mobile-list {
    display: block;
  }

  .time-off-mobile-day.time-off-cell {
    width: 100%;
    height: 2.55rem;
  }
}

@container (max-width: 720px) {
  .time-off-filter-grid {
    grid-template-columns: 1fr 1fr;
  }

  .time-off-filter-grid > [class*="col-"] {
    grid-column: 1 / -1;
  }

  .time-off-filter-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
  }

  .time-off-filter-actions .btn {
    width: 100%;
  }
}

@container (max-width: 520px) {
  .time-off-month-nav {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .time-off-month-nav .btn {
    white-space: normal;
  }

  .time-off-month-nav .btn:nth-child(2) {
    order: 3;
    grid-column: 1 / -1;
  }

  .time-off-summary,
  .time-off-summary__controls,
  .time-off-summary__meta,
  .time-off-legend {
    width: 100%;
  }

  .time-off-view-switch__item {
    font-size: 0.76rem;
  }

  .time-off-period-nav__label {
    min-width: 0;
    font-size: 0.78rem;
  }

  .time-off-legend span {
    flex: 1 1 calc(50% - 0.35rem);
    justify-content: center;
  }

  .time-off-table-card {
    display: none;
  }

  .time-off-page--year .time-off-table-card {
    display: block;
  }

  .time-off-page--year .time-off-mobile-list {
    display: none;
  }

  .time-off-mobile-list,
  .time-off-balance-mobile-list {
    display: block;
  }

  .time-off-mobile-day.time-off-cell {
    width: 100%;
    height: 2.55rem;
  }
}

/* --- Auth / login (guest) --- */
.app-main:has(.auth-page) {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 1.5rem);
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  background: radial-gradient(circle at 5% 0%, #f7fafc 0%, transparent 40%),
    radial-gradient(circle at 95% 5%, var(--brand-primary-soft-bg) 0%, transparent 28%),
    linear-gradient(165deg, #e8edf5 0%, #f3f6fb 45%, #e9eef6 100%);
}

.auth-page {
  width: 100%;
  max-width: 26rem;
  margin: 0 auto;
}

.auth-page__card {
  border-radius: var(--app-radius-xl);
  background: var(--app-surface);
  box-shadow: var(--app-elev-2);
  border: 1px solid var(--app-border-soft) !important;
}

.auth-page__body {
  padding: 2rem 1.75rem 1.75rem;
}

.auth-page__logo {
  display: flex;
  justify-content: center;
  margin: 0 auto 1.75rem;
  text-decoration: none;
  line-height: 0;
  width: fit-content;
  padding: 0.55rem 0.85rem;
  border-radius: var(--app-radius-md);
  background: #0c0e4b;
}

.auth-page__logo:focus-visible {
  outline: none;
  border-radius: var(--app-radius-md);
  box-shadow: var(--app-ring);
}

.app-brand-logo {
  display: block;
  width: auto;
  height: 1.75rem;
  max-width: 100%;
}

.app-brand-logo--auth {
  height: 2.75rem;
}

.app-navbar .app-brand-logo {
  height: 1.75rem;
}

.auth-page__form {
  margin-top: 0;
}

.auth-page__form .form-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--app-text-muted);
}

.auth-page__form .form-control {
  border-color: var(--app-border);
  border-radius: var(--app-radius-md);
}

.auth-page__form .form-control:focus {
  border-color: var(--app-accent);
  box-shadow: var(--app-ring);
}

.auth-page__form .btn-primary {
  font-weight: 700;
  border-radius: var(--app-radius-md);
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.auth-page__credentials {
  margin-bottom: 0;
}

.auth-page__notice {
  margin-top: 1.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--app-border-soft);
  font-size: 0.8125rem;
  color: var(--app-text-muted);
}

.auth-page__notice-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #64748b;
  margin: 0 0 0.5rem;
}

.auth-page__notice-title .bi-info-circle {
  font-size: 1rem;
  flex-shrink: 0;
}

.auth-page__notice-text {
  margin: 0 0 0.45rem;
  line-height: 1.45;
}

.auth-page__notice-text:last-child {
  margin-bottom: 0;
}

/* --- Unified CRM UI layer (Task-desk driven) --- */
.app-body,
.app-main,
.app-main button,
.app-main input,
.app-main select,
.app-main textarea {
  font-family: "Manrope", "Segoe UI", "Helvetica Neue", sans-serif;
}

.app-body {
  min-height: 100vh;
  background-color: var(--app-bg);
  color: var(--app-text);
}

.app-main {
  max-width: 100%;
}

/* Фон «рабочей зоны» для авторизованных пользователей (как таск-деск) */
.app-main--workspace {
  background: radial-gradient(circle at 5% 0%, #f7fafc 0%, transparent 40%),
    radial-gradient(circle at 95% 5%, var(--brand-primary-soft-bg) 0%, transparent 28%),
    linear-gradient(165deg, #e8edf5 0%, #f3f6fb 45%, #e9eef6 100%);
  min-height: calc(100vh - 3.5rem);
}

/* Общая оболочка страниц списков / форм */
.app-page {
  max-width: 100%;
}

.app-page__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
  padding: 0.25rem 0.1rem 0.6rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}

.app-page__title-block {
  flex: 1 1 12rem;
  min-width: 0;
}

.app-page__title {
  font-size: clamp(1.05rem, 1rem + 0.45vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
  color: var(--app-text);
}

.app-page__subtitle {
  max-width: 42rem;
  line-height: 1.4;
  margin-top: 0.25rem;
}

.app-page__header-actions {
  flex: 0 1 auto;
}

.app-page__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.app-page__filters {
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.app-page__filters .form-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--app-text-muted);
}

.task-desk__guide,
.project-passport__quick-nav,
.project-passport__hub-tabs {
  border-radius: var(--app-radius-xl);
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.82));
}

.app-page--project-passport {
  /* fallback; JS синхронизирует с фактической высотой .app-navbar */
  --project-passport-nav-offset: 4rem;
  --project-passport-header-sticky-h: 5.5rem;
  --project-passport-hub-sticky-h: 8.5rem;
  --project-passport-sticky-bg: #eef2f8;
}

/* A12: якоря не прячутся под sticky header + hub-tabs */
.app-page--project-passport [id^="projectPassport"],
.app-page--project-passport #projectContacts {
  scroll-margin-top: calc(
    var(--project-passport-nav-offset) + var(--project-passport-hub-sticky-h) + 0.75rem
  );
}

.project-passport__page-header-sentinel,
.project-passport__hub-tabs-sentinel,
.project-passport__quick-nav-sentinel {
  height: 1px;
  margin: 0;
  pointer-events: none;
  visibility: hidden;
}

.project-passport__page-header-slot,
.project-passport__hub-tabs-slot {
  /* резерв высоты потока при compact/fixed — без скачка scrollY */
  display: block;
}

.project-passport__page-header {
  position: sticky;
  top: var(--project-passport-nav-offset);
  z-index: 41;
  margin-left: -0.35rem;
  margin-right: -0.35rem;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
  /* непрозрачный фон — иначе контент просвечивает при sticky */
  background: var(--project-passport-sticky-bg);
  transition: box-shadow 0.18s ease;
}

/* Compact: fixed на весь скролл + одна строка (название · KPI · CTA) */
.project-passport__page-header.is-compact {
  position: fixed;
  top: var(--project-passport-nav-offset);
  left: var(--project-passport-fixed-left, 0);
  width: var(--project-passport-fixed-width, 100%);
  max-width: var(--project-passport-fixed-width, 100%);
  z-index: 41;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0;
  padding: 0.4rem 0.65rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 0.35rem 0.9rem -0.55rem rgba(15, 23, 42, 0.35);
  box-sizing: border-box;
}

.project-passport__page-header.is-compact .app-page__subtitle,
.project-passport__page-header.is-compact .project-passport__page-header-meta,
.project-passport__page-header.is-compact > .project-passport__risks {
  display: none !important;
}

.project-passport__page-header.is-compact .app-page__title-block {
  order: 1;
  flex: 1 1 8rem;
  min-width: 0;
}

.project-passport__page-header.is-compact .app-page__title-block > .d-flex {
  flex-wrap: nowrap;
  min-width: 0;
}

.project-passport__page-header.is-compact .app-page__title {
  font-size: 0.98rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-passport__share-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: var(--bs-secondary-color, #64748b);
  line-height: 1;
  font-size: 1.15rem;
  cursor: pointer;
}

.project-passport__share-link:hover,
.project-passport__share-link:focus-visible {
  color: var(--bs-primary);
  background: rgba(37, 99, 235, 0.08);
}

.project-passport__share-link.is-copied {
  color: var(--bs-success, #198754);
}

.project-passport__page-header.is-compact #passportHeaderStatusBadge {
  flex: 0 0 auto;
  font-size: 0.68rem;
  padding: 0.2em 0.45em;
}

.project-passport__page-header.is-compact .project-passport__kpi-strip {
  order: 2;
  display: flex !important;
  flex: 0 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.3rem;
  width: auto;
  max-width: 42%;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.project-passport__page-header.is-compact .project-passport__kpi-strip::-webkit-scrollbar {
  display: none;
}

.project-passport__page-header.is-compact .project-passport__kpi-slot {
  flex: 0 0 auto;
  min-width: 0;
  max-width: none;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}

.project-passport__page-header.is-compact .project-passport__kpi-slot-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.project-passport__page-header.is-compact .project-passport__kpi-slot-value {
  display: inline;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
}

.project-passport__page-header.is-compact .project-passport__kpi-slot-meta {
  display: inline;
  margin-left: 0.35rem;
  font-size: 0.65rem;
  font-weight: 500;
}

.project-passport__page-header.is-compact .app-page__header-actions {
  order: 3;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 0.35rem;
}

.project-passport__page-header.is-compact .app-page__header-actions .btn {
  white-space: nowrap;
}

/* Риски в шапке: полная строка под title/actions/KPI, без ломки flex-ряда */
.project-passport__page-header > .project-passport__risks {
  flex: 1 1 100%;
  width: 100%;
  order: 20;
  margin: 0.15rem 0 0;
  align-self: stretch;
}

.project-passport__page-header > .project-passport__risks .project-passport__risks-list {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
}

.project-passport__hub-tabs,
.project-passport__quick-nav {
  position: sticky;
  top: calc(var(--project-passport-nav-offset) + var(--project-passport-header-sticky-h));
  z-index: 40;
  /* перекрываем полупрозрачный .card / gradient — иначе текст листается «сквозь» вкладки */
  background: var(--project-passport-sticky-bg) !important;
  transition: box-shadow 0.18s ease;
}

.project-passport__hub-tabs .card-body,
.project-passport__quick-nav .card-body {
  transition: padding 0.18s ease;
}

.project-passport__hub-tabs.is-compact,
.project-passport__quick-nav.is-compact {
  position: fixed;
  top: calc(var(--project-passport-nav-offset) + var(--project-passport-header-sticky-h));
  left: var(--project-passport-fixed-left, 0);
  width: var(--project-passport-fixed-width, 100%);
  max-width: var(--project-passport-fixed-width, 100%);
  z-index: 40;
  margin-bottom: 0 !important;
  box-sizing: border-box;
  box-shadow: 0 0.35rem 0.9rem -0.55rem rgba(15, 23, 42, 0.35);
  background: var(--project-passport-sticky-bg) !important;
}

.project-passport__hub-tabs.is-compact .card-body,
.project-passport__quick-nav.is-compact .card-body {
  padding-top: 0.4rem !important;
  padding-bottom: 0.4rem !important;
}

.project-passport__quick-nav.is-compact .project-passport__quick-nav-title {
  display: none;
}

.project-passport__hub-tabs.is-compact .project-passport__hub-tabs-list,
.project-passport__quick-nav.is-compact .project-passport__quick-nav-links {
  gap: 0.3rem;
}

.project-passport__hub-tabs.is-compact .project-passport__hub-tab,
.project-passport__quick-nav.is-compact .project-passport__quick-nav-links a {
  padding: 0.22rem 0.55rem;
  font-size: 0.78rem;
}

.project-passport__quick-nav.is-compact .project-passport__quick-nav-group {
  font-size: 0.62rem;
}

.project-passport__quick-nav.is-compact .project-passport__quick-nav-divider {
  height: 0.9rem;
}

.project-passport__hub-tabs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.project-passport__hub-tab {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0.36rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgb(var(--brand-neutral-rgb) / 0.05);
  color: var(--brand-neutral);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.project-passport__hub-tab:hover {
  background: rgb(var(--brand-primary-rgb) / 0.12);
  color: var(--brand-primary-dark);
}

.project-passport__hub-tab[aria-selected="true"] {
  background: rgb(var(--brand-primary-rgb) / 0.16);
  border-color: rgb(var(--brand-primary-rgb) / 0.35);
  color: var(--brand-primary-dark);
}

.project-passport__hub-pane[hidden],
.client-profile__hub-pane[hidden],
.project-passport__kpi-strip.hidden,
.project-passport__kpi-strip[hidden] {
  display: none !important;
}

/* Task form hub shell (TCUX_01) — sticky stack + BEM task-form__hub-* */
.task-card-page {
  --task-card-nav-offset: 4rem;
  --task-card-header-sticky-h: 5.25rem;
  --task-card-hub-sticky-h: 8.5rem;
  --task-card-sticky-bg: #eef2f8;
}

.task-card-page [id="title"],
.task-card-page [id="taskHoursForm"],
.task-card-page [id="commentsList"],
.task-card-page [id="checklistWrap"],
.task-card-page [id="refLinksWrap"],
.task-card-page [id="sumHoursStat"],
.task-card-page [id="taskPlacementPicker"] {
  scroll-margin-top: calc(
    var(--task-card-nav-offset) + var(--task-card-hub-sticky-h) + 0.75rem
  );
}

.task-form__hub-tabs {
  border-radius: var(--app-radius-xl);
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: var(--task-card-sticky-bg) !important;
  background-color: var(--task-card-sticky-bg) !important;
  --bs-card-bg: var(--task-card-sticky-bg);
  position: sticky;
  top: calc(var(--task-card-nav-offset) + var(--task-card-header-sticky-h));
  z-index: 40;
  transition: box-shadow 0.18s ease, top 0.18s ease;
}

.task-form__hub-tabs-sentinel {
  height: 1px;
  margin: 0;
  pointer-events: none;
  visibility: hidden;
}

.task-form__hub-tabs .card-body {
  transition: padding 0.18s ease;
}

.task-form__hub-tabs.is-compact {
  position: fixed;
  top: calc(var(--task-card-nav-offset, 4rem) + var(--task-card-header-sticky-h, 5.25rem));
  left: var(--task-card-fixed-left, 0);
  width: var(--task-card-fixed-width, 100%);
  max-width: var(--task-card-fixed-width, 100%);
  z-index: 40;
  margin-bottom: 0 !important;
  box-sizing: border-box;
  box-shadow: 0 0.35rem 0.9rem -0.55rem rgba(15, 23, 42, 0.35);
  background: var(--task-card-sticky-bg, #eef2f8);
}

.task-form__hub-tabs.is-compact .card-body {
  padding-top: 0.45rem !important;
  padding-bottom: 0.45rem !important;
}

.task-form__hub-tabs.is-compact .task-form__hub-tabs-list {
  gap: 0.3rem;
}

.task-form__hub-tabs.is-compact .task-form__hub-tab {
  padding: 0.22rem 0.55rem;
  font-size: 0.78rem;
}

.task-form__hub-tabs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.task-form__hub-tab {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0.36rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgb(var(--brand-neutral-rgb) / 0.05);
  color: var(--brand-neutral);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.task-form__hub-tab:hover {
  background: rgb(var(--brand-primary-rgb) / 0.12);
  color: var(--brand-primary-dark);
}

.task-form__hub-tab[aria-selected="true"] {
  background: rgb(var(--brand-primary-rgb) / 0.16);
  border-color: rgb(var(--brand-primary-rgb) / 0.35);
  color: var(--brand-primary-dark);
}

.task-form__hub-pane[hidden] {
  display: none !important;
}

.task-form__hub-pane:not([hidden]) {
  width: 100%;
}

.task-form__hub-pane > .card + .card {
  margin-top: 1rem;
}

/* Card hub: полотно / вкладки (общий preference) */
.card-hub-view-toggle {
  flex-shrink: 0;
}

.card-hub-view-toggle__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  padding: 0.28rem 0.45rem;
  line-height: 1;
  color: var(--brand-neutral);
  background: #fff;
  border-color: rgba(148, 163, 184, 0.45);
}

.card-hub-view-toggle__btn .bi {
  font-size: 1rem;
}

.card-hub-view-toggle__btn:hover {
  color: var(--brand-primary-dark);
  background: rgb(var(--brand-primary-rgb) / 0.08);
  border-color: rgb(var(--brand-primary-rgb) / 0.35);
}

.card-hub-view-toggle > .btn.card-hub-view-toggle__btn.active,
.card-hub-view-toggle > .btn.card-hub-view-toggle__btn[aria-pressed="true"],
.card-hub-view-toggle > .btn.card-hub-view-toggle__btn.active:hover,
.card-hub-view-toggle > .btn.card-hub-view-toggle__btn[aria-pressed="true"]:hover,
.card-hub-view-toggle > .btn.card-hub-view-toggle__btn.active:focus-visible,
.card-hub-view-toggle > .btn.card-hub-view-toggle__btn[aria-pressed="true"]:focus-visible {
  color: #fff;
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  box-shadow: none;
  z-index: 2;
}

.card-hub-canvas-heading {
  display: none;
  margin: 0 0 0.85rem;
  padding: 0 0 0.45rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--brand-neutral);
}

[data-card-hub-view="canvas"] .card-hub-canvas-heading {
  display: block;
}

[data-card-hub-view="canvas"] .task-form__hub-panels,
[data-card-hub-view="canvas"] .project-passport__hub-panels,
[data-card-hub-view="canvas"] .client-profile__hub-panels {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

[data-card-hub-view="canvas"] .task-form__hub-pane,
[data-card-hub-view="canvas"] .project-passport__hub-pane,
[data-card-hub-view="canvas"] .client-profile__hub-pane {
  display: block !important;
  width: 100%;
}

[data-card-hub-view="canvas"] .task-form__hub-pane[hidden],
[data-card-hub-view="canvas"] .project-passport__hub-pane[hidden],
[data-card-hub-view="canvas"] .client-profile__hub-pane[hidden] {
  display: block !important;
}

.app-page__header-actions .card-hub-view-toggle,
.tender-page__header-actions .card-hub-view-toggle {
  margin-left: 0.15rem;
  flex: 0 0 auto;
  width: auto;
}

.task-card-page__header.is-compact .card-hub-view-toggle,
.project-passport__page-header.is-compact .card-hub-view-toggle,
.client-profile__header.is-compact .card-hub-view-toggle,
.tender-page__header.is-compact .card-hub-view-toggle {
  flex: 0 0 auto;
  width: auto;
}

.task-card-page__header.is-compact .card-hub-view-toggle .btn {
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
}

.task-brief-context [data-task-brief-label] {
  font-weight: 600;
}

.task-brief-essentials {
  display: grid;
  gap: 1.1rem;
}

.task-brief-essentials__intro {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
}

.task-brief-essentials__hint {
  color: var(--bs-secondary-color, #64748b);
  font-size: 0.875rem;
}

.task-brief-essentials__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12.5rem, 15.5rem);
  gap: 0.9rem 1rem;
  align-items: stretch;
}

.task-brief-essentials__primary {
  display: grid;
  gap: 0.9rem;
  min-width: 0;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: var(--app-radius-lg, 0.65rem);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.88));
}

.task-brief-essentials__field .form-label {
  margin-bottom: 0.35rem;
}

.task-brief-essentials__title-input {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.task-brief-essentials__title-input:focus,
.task-brief-essentials__description:focus {
  border-color: rgb(var(--brand-primary-rgb) / 0.45);
  box-shadow: 0 0 0 0.2rem rgb(var(--brand-primary-rgb) / 0.12);
}

.task-brief-essentials__description {
  min-height: 6.5rem;
  resize: vertical;
  line-height: 1.45;
}

.task-brief-md__editor.project-passport__md-editor {
  min-height: 0;
  margin-top: 0.35rem;
}

.task-brief-md #taskDescriptionView.d-none {
  display: none !important;
}

.task-brief-md__editor .project-passport__md-textarea {
  min-height: 8.5rem;
}

.task-brief-md__editor .project-passport__md-preview {
  min-height: 8.5rem;
  padding: 0.75rem 0.9rem;
}

.task-brief-md__rendered {
  min-height: 4rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.5rem;
  background: #fff;
}

.task-brief-md__rendered input[type="checkbox"],
.project-passport__md-preview input[type="checkbox"] {
  margin-right: 0.4rem;
  pointer-events: none;
}

.task-brief-essentials__meta {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
  height: 100%;
  padding: 1rem 0.95rem;
  border-radius: var(--app-radius-lg, 0.65rem);
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.task-brief-essentials__meta-field .form-label {
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--bs-secondary-color, #64748b);
}

@media (max-width: 991.98px) {
  .task-brief-essentials__body {
    grid-template-columns: 1fr;
  }

  .task-brief-essentials__meta {
    flex-direction: row;
    flex-wrap: wrap;
    height: auto;
  }

  .task-brief-essentials__meta-field {
    flex: 1 1 10rem;
  }
}

@media (max-width: 575.98px) {
  .task-brief-essentials__primary {
    padding: 0.85rem 0.9rem;
  }

  .task-brief-essentials__meta {
    flex-direction: column;
    padding: 0.75rem 0.85rem;
  }
}

.task-card-page__context-trail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin: 0.55rem 0 0.15rem;
  max-width: 52rem;
}

.task-card-page__context-item {
  display: inline-flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  max-width: 16rem;
}

.task-card-page__context-item--action {
  justify-content: flex-end;
  align-self: flex-end;
}

.task-card-page__context-k {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bs-secondary-color, #64748b);
  line-height: 1.2;
}

.task-card-page__context-v {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.55rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--bs-body-color);
  line-height: 1.3;
}

.task-card-page__context-v [data-task-brief-label] {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 14rem;
}

.task-card-page__context-open,
.task-card-page__context-board {
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.task-card-page__context-open:hover,
.task-card-page__context-board:hover {
  text-decoration: underline;
}

.task-brief-materials__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.task-brief-materials__lead {
  color: var(--bs-secondary-color, #64748b);
  font-size: 0.875rem;
  max-width: 40rem;
}

.task-brief-materials__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.task-brief-materials__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin-bottom: 0.85rem;
}

.task-brief-materials__search,
.task-brief-materials__kind {
  position: relative;
}

.task-brief-materials__search {
  flex: 1 1 14rem;
  min-width: 12rem;
}

.task-brief-materials__kind {
  flex: 0 1 9.5rem;
}

.task-brief-materials__search > .bi {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  font-size: 0.88rem;
  z-index: 1;
}

.task-brief-materials__search .form-control {
  padding-left: 2.05rem;
}

.task-brief-materials__chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.task-brief-materials__empty,
.task-brief-materials__group-empty {
  color: var(--bs-secondary-color, #64748b);
  font-size: 0.875rem;
  padding: 0.75rem 0.9rem;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  border-radius: var(--app-radius-lg, 0.65rem);
  background: rgba(248, 250, 252, 0.7);
}

.task-brief-materials__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: start;
}

.task-brief-materials__grid--single {
  grid-template-columns: 1fr;
}

.task-brief-materials__group {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  max-height: min(22rem, 52vh);
  padding: 0.65rem 0.7rem 0.7rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--app-radius-lg, 0.65rem);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.88));
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.task-brief-materials__group-title {
  position: sticky;
  top: 0;
  z-index: 1;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
  padding-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #475569;
  background: linear-gradient(180deg, #fff 70%, rgba(255, 255, 255, 0));
}

.task-brief-materials__group-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.2rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: rgba(34, 84, 225, 0.1);
  color: var(--app-accent, #2254E1);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0;
}

.task-brief-materials__list {
  list-style: none;
  margin: 0;
  padding: 0 0.15rem 0.1rem 0;
  display: grid;
  gap: 0.3rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 0;
  flex: 1 1 auto;
  scrollbar-gutter: stable;
}

.task-brief-materials__table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  margin: 0 -0.15rem;
  padding: 0 0.15rem 0.1rem;
  scrollbar-gutter: stable;
}

.task-brief-materials__table {
  --bs-table-bg: transparent;
  width: 100%;
  table-layout: fixed;
}

.task-brief-materials__table > :not(caption) > * > * {
  padding: 0.35rem 0.4rem;
  border-bottom-color: rgba(15, 23, 42, 0.06);
  vertical-align: middle;
}

.task-brief-materials__table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
  white-space: nowrap;
}

.task-brief-materials__th--preview,
.task-brief-materials__td--preview {
  width: 2.6rem;
  padding-left: 0.2rem !important;
  padding-right: 0.2rem !important;
}

.task-brief-materials__th--who,
.task-brief-materials__td--who {
  width: 22%;
}

.task-brief-materials__th--when,
.task-brief-materials__td--when {
  width: 7.5rem;
}

.task-brief-materials__th--actions,
.task-brief-materials__td--actions {
  width: 5.5rem;
  text-align: right;
}

.task-brief-materials__td--who,
.task-brief-materials__td--when {
  font-size: 0.75rem;
  color: var(--bs-secondary-color, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-brief-materials__name-link {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.82rem;
  line-height: 1.25;
  color: #0f172a;
  text-decoration: none;
}

.task-brief-materials__name-link:hover {
  color: var(--app-accent, #2254E1);
  text-decoration: underline;
}

.task-brief-materials__item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.task-brief-materials__card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1 1 auto;
  padding: 0.28rem 0.4rem 0.28rem 0.28rem;
  border-radius: 0.55rem;
  color: inherit;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid transparent;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.task-brief-materials__card:hover {
  color: inherit;
  text-decoration: none;
  border-color: color-mix(in srgb, var(--app-accent, #2254E1) 28%, transparent);
  background: #fff;
}

.task-brief-materials__preview {
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  border-radius: 0.45rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.55rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-decoration: none;
}

a.task-brief-materials__preview:hover {
  text-decoration: none;
  color: #e2e8f0;
  opacity: 0.92;
}

.task-brief-materials__preview--link {
  background: #1e3a5f;
  color: #bfdbfe;
}

.task-brief-materials__preview--media,
.task-brief-materials__preview img {
  background: #0b1220;
}

.task-brief-materials__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.task-brief-materials__copy {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.task-brief-materials__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.82rem;
  line-height: 1.25;
  color: #0f172a;
}

.task-brief-materials__meta {
  font-size: 0.7rem;
  line-height: 1.2;
  color: var(--bs-secondary-color, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-brief-materials__actions-inline {
  flex: 0 0 auto;
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.1rem;
}

.task-brief-materials__group-empty {
  flex: 1 1 auto;
  margin: 0;
  padding: 0.55rem 0.65rem;
}

@media (max-width: 991.98px) {
  .task-brief-materials__th--who,
  .task-brief-materials__td--who {
    width: 28%;
  }

  .task-brief-materials__th--when,
  .task-brief-materials__td--when {
    width: 6.5rem;
  }
}

.task-brief-materials__pin {
  white-space: nowrap;
}

.task-brief-materials__action-btn {
  line-height: 1;
  font-size: 0.95rem;
  color: var(--bs-secondary-color, #64748b);
  text-decoration: none !important;
}

.task-brief-materials__action-btn:hover,
.task-brief-materials__action-btn:focus-visible {
  color: var(--bs-primary);
}

.tender-chat__message--flash {
  outline: 2px solid rgba(37, 99, 235, 0.55);
  outline-offset: 2px;
  background: rgba(219, 234, 254, 0.55);
  transition: background 0.4s ease, outline-color 0.4s ease;
}

@media (max-width: 767.98px) {
  .task-brief-materials__grid {
    grid-template-columns: 1fr;
  }

  .task-brief-materials__kind,
  .task-brief-materials__search {
    flex: 1 1 100%;
  }

  .task-brief-materials__chips {
    width: 100%;
  }

  .task-card-page__context-v [data-task-brief-label] {
    max-width: 11rem;
  }
}

.project-passport__kpi-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 1 1 100%;
  width: 100%;
  margin-top: 0.15rem;
}

.project-passport__kpi-slot {
  flex: 1 1 6.5rem;
  min-width: 5.5rem;
  max-width: 12rem;
  margin: 0;
  padding: 0.45rem 0.65rem;
  text-align: left;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: var(--app-radius-lg, 0.65rem);
  background: rgba(248, 250, 252, 0.95);
  color: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.project-passport__kpi-slot:hover {
  background: rgb(var(--brand-primary-rgb) / 0.08);
  border-color: rgb(var(--brand-primary-rgb) / 0.35);
}

.project-passport__kpi-slot[hidden] {
  display: none !important;
}

.project-passport__kpi-slot-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #64748b;
  line-height: 1.2;
}

.project-passport__kpi-slot-value {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
  color: #0f172a;
}

.project-passport__kpi-slot-meta {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.2;
  color: #64748b;
}

.project-passport__kpi-slot-meta[hidden] {
  display: none;
}

.project-passport__facts {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.project-passport__fact {
  margin: 0;
}

.project-passport__fact dt {
  margin: 0 0 0.1rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--app-text-muted, #64748b);
}

.project-passport__fact dd {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--app-text, #0f172a);
  word-break: break-word;
}

.project-passport__main-contacts .project-passport__list-item {
  padding-left: 0;
  padding-right: 0;
}

.project-passport__main-contacts .project-passport__control-stack {
  gap: 0.5rem;
  overflow: visible;
  position: relative;
  z-index: 6;
}

.project-passport__description-card .card-body {
  min-height: 18rem;
}

.project-passport__docs-table-wrap {
  margin-top: 0.25rem;
}

.project-passport__docs-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bs-secondary-color, #64748b);
  font-weight: 600;
  white-space: nowrap;
}

.project-passport__docs-table td {
  vertical-align: top;
}

.project-passport__md-view,
.project-passport__md-editor {
  position: relative;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-height: 14rem;
}

.project-passport__md-editor {
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.5rem;
  overflow: hidden;
  background: #fff;
}

.project-passport__md-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  border-bottom: 1px solid var(--bs-border-color, #dee2e6);
  background: var(--bs-tertiary-bg, #f8f9fa);
  padding: 0.45rem 0.55rem;
}

.project-passport__md-textarea {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  min-height: 14rem;
  resize: vertical;
  line-height: 1.5;
  font-size: 0.92rem;
}

.project-passport__md-preview,
.project-passport__md-rendered {
  line-height: 1.55;
  min-height: 14rem;
  word-break: break-word;
  padding: 0.85rem 1rem;
}

.project-passport__md-preview {
  background: #fff;
}

.project-passport__md-rendered p,
.project-passport__md-preview p {
  margin-bottom: 0.65rem;
}

.project-passport__md-rendered ul,
.project-passport__md-rendered ol,
.project-passport__md-preview ul,
.project-passport__md-preview ol {
  margin-bottom: 0.65rem;
  padding-left: 1.25rem;
}

.project-passport__md-rendered a,
.project-passport__md-preview a {
  word-break: break-all;
}

.project-passport__emoji-panel {
  position: absolute;
  z-index: 5;
  top: 2.75rem;
  right: 0.5rem;
  display: grid;
  grid-template-columns: repeat(5, 1.75rem);
  gap: 0.25rem;
  padding: 0.5rem;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 0.5rem 1.25rem rgba(15, 23, 42, 0.12);
}

.project-passport__emoji-item {
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  border-radius: 0.3rem;
  background: transparent;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
}

.project-passport__emoji-item:hover {
  background: var(--bs-tertiary-bg, #f1f3f5);
}

/* FAB + правый drawer активности (¼ экрана) */
.project-passport__activity-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1045;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--bs-primary, #0d6efd);
  color: #fff;
  box-shadow:
    0 0.35rem 1rem rgba(15, 23, 42, 0.22),
    0 0.1rem 0.35rem rgba(15, 23, 42, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.project-passport__activity-fab:hover,
.project-passport__activity-fab:focus-visible {
  background: color-mix(in srgb, var(--bs-primary, #0d6efd) 88%, #000);
  box-shadow:
    0 0.5rem 1.25rem rgba(15, 23, 42, 0.28),
    0 0.15rem 0.45rem rgba(15, 23, 42, 0.2);
  transform: translateY(-1px);
  outline: none;
}

.project-passport__activity-fab:focus-visible {
  box-shadow:
    0 0 0 0.2rem rgba(13, 110, 253, 0.35),
    0 0.5rem 1.25rem rgba(15, 23, 42, 0.28);
}

.project-passport__activity-fab-icon {
  display: block;
  width: 1.55rem;
  height: 1.55rem;
  /* SVG с currentColor → белая иконка на синем FAB */
  filter: brightness(0) invert(1);
  pointer-events: none;
}

.project-passport__activity-drawer.offcanvas-end {
  /* +1/3 к прежним 25vw / 26rem */
  width: min(33.333vw, 34.5rem);
  min-width: 20rem;
  border-left: 1px solid rgba(148, 163, 184, 0.28);
  --bs-offcanvas-width: min(33.333vw, 34.5rem);
  background: #f3f5f8;
}

@media (max-width: 991.98px) {
  .project-passport__activity-drawer.offcanvas-end {
    width: min(94vw, 28rem);
    min-width: 0;
    --bs-offcanvas-width: min(94vw, 28rem);
  }
}

.project-passport__activity-drawer-head {
  flex-shrink: 0;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  background: #fff;
}

.project-passport__activity-drawer-sub {
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 600;
}

.project-passport__activity-drawer-body {
  min-height: 0;
  padding: 0;
  background:
    radial-gradient(ellipse at top left, rgba(59, 130, 246, 0.06), transparent 42%),
    radial-gradient(ellipse at bottom right, rgba(14, 165, 233, 0.05), transparent 40%),
    #f3f5f8;
}

.project-passport__activity-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  flex-shrink: 0;
  padding: 0.65rem 0.85rem;
  overflow-x: auto;
  scrollbar-width: thin;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  -webkit-overflow-scrolling: touch;
}

.project-passport__activity-chip {
  flex: 0 0 auto;
  padding: 0.28rem 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.project-passport__activity-chip:hover {
  border-color: rgba(37, 99, 235, 0.4);
  color: #1d4ed8;
}

.project-passport__activity-chip.active {
  color: #fff;
  background: #334155;
  border-color: #334155;
}

.project-passport__activity-filters--content {
  padding-top: 0.15rem;
  border-top: 0;
}

.project-passport__activity-attach-search {
  flex: 0 0 auto;
  padding: 0.15rem 0.85rem 0.55rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
}

.project-chat-dropzone {
  position: relative;
}

.project-chat-dropzone__hint {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.75rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e3a8a;
  background: rgba(219, 234, 254, 0.92);
  border: 2px dashed rgba(37, 99, 235, 0.45);
  border-radius: 0.75rem;
  pointer-events: none;
}

.project-chat-dropzone--active .project-chat-dropzone__hint {
  display: flex;
}

.project-chat-dropzone--active {
  outline: none;
}

.project-chat-docs-picker__list {
  max-height: min(50vh, 22rem);
  overflow: auto;
}

.project-passport__activity-search {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 0.35rem 0 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.project-passport__activity-search:focus-within {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.project-passport__activity-search-icon {
  flex: 0 0 auto;
  margin-right: 0.35rem;
  color: #94a3b8;
  font-size: 0.85rem;
  line-height: 1;
  pointer-events: none;
}

.project-passport__activity-search-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 1.9rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #334155;
  font-size: 0.8125rem;
  line-height: 1.2;
  outline: none;
  box-shadow: none;
}

.project-passport__activity-search-input::placeholder {
  color: #94a3b8;
}

.project-passport__activity-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.project-passport__activity-search-clear {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  margin-left: 0.15rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #94a3b8;
  font-size: 0.7rem;
  line-height: 1;
  cursor: pointer;
}

.project-passport__activity-search-clear:hover,
.project-passport__activity-search-clear:focus-visible {
  background: rgba(148, 163, 184, 0.16);
  color: #475569;
  outline: none;
}

.project-passport__activity-search-meta {
  margin: 0.35rem 0.35rem 0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.project-passport__activity-search-meta.is-empty {
  color: #b45309;
}

.project-passport__activity-feed.tender-chat {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  height: auto;
  max-height: none;
  min-height: 0;
  flex: 1 1 auto;
  padding: 0.85rem 0.85rem 1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: transparent;
  border: 0;
}

.project-passport__activity-msg.tender-chat__message {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

/* Свои сообщения: аватар справа, пузырь справа (как в мессенджерах) */
.project-passport__activity-msg--mine {
  flex-direction: row-reverse;
  align-self: flex-end;
  max-width: 92%;
  margin-left: auto;
}

.project-passport__activity-avatar {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-top: 0.15rem;
  border-radius: 999px;
  background: hsl(var(--avatar-h, 210) 42% 46%);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  user-select: none;
  overflow: hidden;
}

.project-passport__activity-avatar img,
.wl-load-card__avatar img,
.project-economics-plan__avatar img,
.app-nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-passport__activity-avatar--photo,
.wl-load-card__avatar--photo,
.project-economics-plan__avatar--photo {
  padding: 0;
  background: #cbd5e1;
  color: transparent;
}

.app-nav-avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
  background: #cbd5e1;
}

.project-passport__activity-bubble {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.55rem 0.7rem 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.25rem 1rem 1rem 1rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.project-passport__activity-msg--mine .project-passport__activity-bubble {
  flex: 0 1 auto;
  border-radius: 1rem 0.25rem 1rem 1rem;
  background: #e8f1ff;
  border-color: rgba(37, 99, 235, 0.28);
}

.project-passport__activity-msg--mine .tender-chat__meta {
  flex-direction: row-reverse;
}

.project-passport__activity-msg--mine .tender-chat__meta-main {
  justify-content: flex-end;
  text-align: right;
}

.project-passport__activity-msg--mine .project-passport__activity-text {
  text-align: left;
}

.project-passport__activity-msg--mine .tender-chat__attachments {
  justify-content: flex-end;
}

.project-passport__activity-msg.tender-chat__message--pinned .project-passport__activity-bubble {
  border-color: rgba(245, 158, 11, 0.45);
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.95), #fff 55%);
}

.project-passport__activity-msg--mine.tender-chat__message--pinned .project-passport__activity-bubble {
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.95), #e8f1ff 55%);
  border-color: rgba(245, 158, 11, 0.45);
}

.project-passport__activity-drawer .tender-chat__meta {
  margin-bottom: 0.25rem;
}

.project-passport__activity-drawer .tender-chat__meta-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.55rem;
}

.project-passport__activity-drawer .tender-chat__meta strong {
  font-size: 0.78rem;
}

.project-passport__activity-drawer .tender-chat__meta time {
  font-size: 0.7rem;
  font-weight: 600;
}

.project-passport__activity-text {
  color: #1e293b;
  font-size: 0.875rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-autolink,
.project-passport__activity-text a,
.tender-chat__message p a.chat-autolink {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 0.12em;
  word-break: break-all;
}

.chat-autolink:hover,
.project-passport__activity-text a:hover {
  color: #1e40af;
}

.project-passport__activity-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 10rem;
  margin: auto 0;
  padding: 1.5rem 1rem;
  color: #64748b;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.project-passport__activity-empty .bi {
  font-size: 1.75rem;
  color: #94a3b8;
}

.project-passport__activity-composer {
  flex-shrink: 0;
  margin: 0;
  padding: 0.65rem 0.75rem 0.85rem;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  background: #fff;
}

.project-passport__activity-readonly {
  flex-shrink: 0;
  margin: 0;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  background: #f8fafc;
  color: var(--bs-secondary-color, #64748b);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.project-passport__activity-composer-row {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
}

.project-passport__activity-tool {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #334155;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.project-passport__activity-tool[hidden] {
  display: none;
}

.project-passport__activity-tool:hover {
  background: rgba(148, 163, 184, 0.16);
  color: #1d4ed8;
}

.project-passport__activity-tool[aria-expanded="true"] {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.project-passport__activity-input.form-control {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 2.15rem;
  max-height: 16rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 1.15rem;
  background: #f8fafc;
  resize: none;
  overflow-x: hidden;
  overflow-y: auto;
  font-size: 0.875rem;
  line-height: 1.35;
  box-shadow: none;
}

.project-passport__activity-input.form-control:focus {
  border-color: rgba(37, 99, 235, 0.45);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.project-passport__activity-send {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}

.project-passport__activity-send:hover {
  background: #1d4ed8;
}

.project-passport__activity-send:active {
  transform: scale(0.94);
}

.project-passport__activity-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

body:has(.project-passport__activity-drawer.show) .project-passport__activity-fab {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85);
}

.project-passport__risks {
  padding: 0.75rem 1rem;
  border-radius: var(--app-radius-lg, 0.65rem);
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.95), rgba(254, 243, 199, 0.45));
}

.project-passport__risks[hidden] {
  display: none !important;
}

.project-passport__risks-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.project-passport__risks-head {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #92400e;
  margin: 0;
}

.project-passport__risks-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: #92400e;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.project-passport__risks-dismiss:hover,
.project-passport__risks-dismiss:focus-visible {
  background: rgba(146, 64, 14, 0.12);
  outline: none;
}

.project-passport__risks-dismiss:focus-visible {
  box-shadow: 0 0 0 0.15rem rgba(245, 158, 11, 0.45);
}

.project-passport__risks-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.project-passport__risks-item {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  width: 100%;
  margin: 0;
  padding: 0.35rem 0.25rem;
  border: 0;
  background: transparent;
  text-align: left;
  color: #78350f;
  font-size: 0.9rem;
  line-height: 1.35;
  cursor: pointer;
  border-radius: 0.35rem;
}

.project-passport__risks-item:hover {
  background: rgba(245, 158, 11, 0.12);
}

.project-passport__risks-item .bi {
  color: #d97706;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

@media (max-width: 991.98px) {
  .app-page--project-passport {
    --project-passport-nav-offset: 3.5rem;
  }
}

.project-passport__ops-map {
  border-radius: var(--app-radius-xl);
  border: 1px solid rgba(59, 130, 246, 0.25);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(248, 250, 252, 0.9));
  color: #1e3a5f;
}

.project-passport__ops-map strong {
  color: #1e40af;
}

.task-desk__guide-title,
.project-passport__quick-nav-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
  margin-bottom: 0.55rem;
}

.task-desk__guide-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.9rem;
  color: #334155;
}

.task-desk__guide-list span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.event-detail__breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.875rem;
}

.app-page.event-detail-page {
  --event-detail-nav-offset: 4rem;
  --event-detail-sticky-bg: #eef2f8;
}

.event-detail__header-sentinel {
  height: 1px;
  margin: 0;
  pointer-events: none;
  visibility: hidden;
}

.event-detail__header {
  position: sticky;
  top: var(--event-detail-nav-offset);
  z-index: 41;
  margin-left: -0.35rem;
  margin-right: -0.35rem;
  padding: 0.55rem 0.35rem 0.85rem;
  background: var(--event-detail-sticky-bg);
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  transition: padding 0.18s ease, box-shadow 0.18s ease;
}

.event-detail__header .app-page__header-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.event-detail__header.is-compact {
  padding-top: 0.35rem;
  padding-bottom: 0.4rem;
  align-items: center;
  box-shadow: 0 0.35rem 0.9rem -0.55rem rgba(15, 23, 42, 0.35);
}

.event-detail__header.is-compact .app-page__subtitle {
  display: none;
}

.event-detail__header.is-compact .app-page__title {
  margin-bottom: 0;
  font-size: 0.98rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-detail__header.is-compact .app-page__header-actions {
  flex-wrap: nowrap;
  gap: 0.35rem;
}

.event-detail__header.is-compact .app-page__action-label {
  display: none !important;
}

.event-detail__header.is-compact .app-page__header-actions .btn {
  flex: 0 0 auto;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  justify-content: center;
  border-radius: 999px;
  font-size: 1rem;
  line-height: 1;
}

.event-detail__md-card .card-body {
  position: relative;
}

.event-detail__md-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  min-height: 1.75rem;
}

.event-detail__md-edit-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--bs-secondary-color, #64748b);
  line-height: 1;
  font-size: 1rem;
  cursor: pointer;
}

.event-detail__md-edit-btn:hover,
.event-detail__md-edit-btn:focus-visible {
  color: var(--bs-primary);
  background: rgba(37, 99, 235, 0.08);
}

.event-detail__md-card.is-editing .event-detail__md-edit-btn {
  display: none;
}

.event-detail__md-rendered {
  min-height: 1.5rem;
}

.event-detail__md-toolbar {
  margin-bottom: 0.5rem;
}

.event-detail__md-preview {
  min-height: 8rem;
  margin-bottom: 0;
}

.event-detail__breadcrumb-link {
  color: #64748b;
  text-decoration: none;
  font-weight: 600;
}

.event-detail__breadcrumb-link:hover {
  color: var(--brand-primary-dark);
}

.event-detail__breadcrumb-sep {
  color: #94a3b8;
}

.calendar-modal-hint {
  margin-bottom: 0.9rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.8rem;
  background: rgb(var(--brand-primary-rgb) / 0.08);
  border: 1px solid rgb(var(--brand-primary-rgb) / 0.14);
  color: var(--brand-primary-dark);
  font-size: 0.9rem;
  line-height: 1.45;
}

/* Модалка события в календаре — шире, секции, меньше вертикальной простыни */
.calendar-event-modal__dialog {
  --calendar-event-modal-max-h: min(92vh, 920px);
  max-width: min(1100px, calc(100vw - 1.5rem));
}

.calendar-event-modal {
  max-height: var(--calendar-event-modal-max-h);
  border: 0;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

.calendar-event-modal__header {
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.1rem 1.35rem 0.95rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(255, 255, 255, 0.98));
}

.calendar-event-modal__lead {
  margin-top: 0.3rem;
  max-width: 42rem;
  font-size: 0.86rem;
  line-height: 1.4;
  color: #64748b;
}

.calendar-event-modal__form {
  min-height: 0;
}

.calendar-event-modal__body {
  padding: 1rem 1.35rem 1.15rem;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(14, 165, 233, 0.05), transparent 55%),
    #fff;
}

.calendar-event-modal__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 1rem 1.25rem;
  align-items: start;
}

.calendar-event-modal__section {
  padding: 1rem 1.05rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.9rem;
  background: rgba(248, 250, 252, 0.72);
}

.calendar-event-modal__section--main {
  grid-column: 1;
  grid-row: 1 / span 2;
  min-height: 100%;
  background: #fff;
}

.calendar-event-modal__section--side {
  grid-column: 2;
  grid-row: 1;
}

.calendar-event-modal__section--team {
  grid-column: 1 / -1;
  grid-row: 3;
}

.calendar-event-modal__section--look {
  grid-column: 2;
  grid-row: 2;
}

.calendar-event-modal__section-title {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.calendar-event-modal__section-hint {
  margin: -0.35rem 0 0;
  font-size: 0.84rem;
  line-height: 1.4;
  color: #64748b;
}

.calendar-event-modal__section .form-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: #334155;
}

.calendar-event-modal__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  padding: 0.85rem 1.35rem;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
  background: #f8fafc;
}

@media (max-width: 991.98px) {
  .calendar-event-modal__grid {
    grid-template-columns: 1fr;
  }

  .calendar-event-modal__section--main,
  .calendar-event-modal__section--side,
  .calendar-event-modal__section--team,
  .calendar-event-modal__section--look {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 575.98px) {
  .calendar-event-modal__dialog {
    margin: 0.5rem;
    max-width: calc(100vw - 1rem);
  }

  .calendar-event-modal__header,
  .calendar-event-modal__body,
  .calendar-event-modal__footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .calendar-event-modal__footer-end {
    width: 100%;
  }

  .calendar-event-modal__footer-end .btn {
    flex: 1 1 auto;
  }
}

.app-page > .card:not(.task-form__hub-tabs):not(.project-passport__hub-tabs),
.app-page .row .card,
.app-page > .row > [class*="col"] > .card {
  border-radius: var(--app-radius-xl);
  border: 1px solid var(--app-border-soft);
  box-shadow: var(--app-elev-1);
  background: var(--app-surface-soft);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.app-page .card .card-title {
  font-weight: 650;
  letter-spacing: -0.01em;
}

.app-main .row {
  --bs-gutter-x: var(--app-grid-gap);
  --bs-gutter-y: var(--app-grid-gap);
}

.app-main .card-header {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.app-main .card-footer {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.app-main h3 {
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--app-text);
}

.app-main .text-muted {
  color: var(--app-text-muted) !important;
}

.app-main .table thead th {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--app-text-muted);
  border-bottom-color: var(--app-border);
}

.navbar.app-navbar {
  --bs-navbar-color: var(--app-nav-fg);
  --bs-navbar-hover-color: #fff;
  --bs-navbar-active-color: #fff;
  --bs-navbar-brand-color: var(--app-nav-fg);
  --bs-navbar-toggler-border-color: rgba(248, 250, 252, 0.35);
  background-color: var(--app-nav-bg) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.navbar.app-navbar .navbar-brand-text {
  color: var(--app-nav-fg);
  letter-spacing: 0.02em;
  font-weight: 600;
  font-size: 0.95rem;
}

.navbar.app-navbar .nav-link,
.navbar.app-navbar button.nav-link {
  border-radius: var(--radius-sm);
  color: var(--bs-navbar-color);
}

.navbar.app-navbar button.nav-link.dropdown-toggle::after {
  vertical-align: 0.15em;
}

.navbar.app-navbar .nav-link:hover,
.navbar.app-navbar .nav-link:focus-visible {
  background-color: rgba(248, 250, 252, 0.08);
}

.navbar.app-navbar .nav-link.active,
.navbar.app-navbar .dropdown-item.active {
  font-weight: 600;
}

.navbar.app-navbar .dropdown-item.active {
  background-color: rgb(var(--brand-primary-rgb) / 0.15);
  color: var(--app-text);
}

.navbar.app-navbar .dropdown-menu {
  --bs-dropdown-link-active-bg: rgb(var(--brand-primary-rgb) / 0.12);
  --bs-dropdown-link-active-color: var(--app-text);
  border: 1px solid var(--app-border);
  border-radius: 0.75rem;
  box-shadow: 0 16px 30px rgb(var(--brand-neutral-rgb) / 0.16);
}

@media (max-width: 991.98px) {
  .navbar.app-navbar {
    --bs-offcanvas-width: min(20rem, 88vw);
  }

  .navbar.app-navbar .container-fluid {
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .navbar.app-navbar .offcanvas {
    background-color: var(--app-nav-bg);
    color: var(--app-nav-fg);
    border-right: 1px solid rgba(148, 163, 184, 0.2);
  }

  .navbar.app-navbar .offcanvas .dropdown-menu {
    position: static !important;
    transform: none !important;
    float: none;
    width: 100%;
    margin: 0;
    padding: 0 0 0.35rem 0.75rem;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  .navbar.app-navbar .offcanvas .dropdown-item {
    color: rgba(248, 250, 252, 0.9);
    border-radius: var(--radius-sm);
  }

  .navbar.app-navbar .offcanvas .dropdown-item:hover,
  .navbar.app-navbar .offcanvas .dropdown-item:focus {
    background-color: rgba(248, 250, 252, 0.08);
    color: #fff;
  }

  .navbar.app-navbar .offcanvas .dropdown-item.active {
    background-color: rgb(var(--brand-primary-rgb) / 0.22);
    color: #fff;
  }

  .navbar.app-navbar .offcanvas .dropdown-divider {
    border-color: rgba(148, 163, 184, 0.25);
  }

  .navbar.app-navbar .offcanvas .dropdown-header {
    color: rgba(248, 250, 252, 0.55);
  }

  .navbar.app-navbar .offcanvas .nav-item.dropdown > .nav-link.dropdown-toggle {
    display: flex;
    align-items: center;
    width: 100%;
  }

  .navbar.app-navbar .offcanvas .nav-item.dropdown > .nav-link.dropdown-toggle::after {
    margin-left: auto;
  }

  .navbar.app-navbar .app-navbar__drawer-body {
    padding: 0.5rem 0.75rem 1rem !important;
    overflow-y: auto;
  }

  .navbar.app-navbar .app-navbar__drawer-body > .navbar-nav:last-child {
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
  }
}

@media (min-width: 992px) {
  .navbar.app-navbar .offcanvas-lg .offcanvas-body {
    overflow-y: visible;
  }
}

.table {
  --bs-table-cell-padding-y: 0.45rem;
  --bs-table-cell-padding-x: 0.65rem;
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgb(var(--brand-neutral-rgb) / 0.03);
  --bs-table-hover-bg: rgb(var(--brand-primary-rgb) / 0.06);
  border-color: rgba(148, 163, 184, 0.35);
}

.table-responsive {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.65);
}

.app-main .form-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.app-main .form-control,
.app-main .form-select,
.app-main .form-control-color,
.app-main .input-group-text,
.app-main .ts-control {
  border-radius: var(--app-radius-md);
  border-color: rgba(148, 163, 184, 0.5);
  background-color: rgba(255, 255, 255, 0.94);
}

.app-main .form-control,
.app-main .form-select,
.app-main .input-group-text,
.app-main .btn {
  min-height: 2.25rem;
}

.app-main .form-control:focus,
.app-main .form-select:focus,
.app-main .ts-control.focus {
  border-color: color-mix(in srgb, var(--app-accent) 55%, #ffffff);
  box-shadow: var(--app-ring);
}

.app-main .btn {
  border-radius: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-width: 1px;
}

.app-main .btn-primary {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
  border-color: var(--brand-primary-dark);
}

.app-main .btn-primary:hover,
.app-main .btn-primary:focus-visible {
  background: linear-gradient(135deg, var(--brand-primary-dark) 0%, var(--brand-primary-darker) 100%);
  border-color: var(--brand-primary-darker);
}

.app-main .btn-outline-primary {
  color: var(--brand-primary-dark);
  border-color: color-mix(in srgb, var(--app-accent) 45%, #cbd5e1);
}

.app-main .btn-outline-primary:hover {
  color: #fff;
  background-color: var(--brand-primary-dark);
  border-color: var(--brand-primary-dark);
}

.app-main .btn-outline-secondary {
  border-color: rgba(100, 116, 139, 0.36);
  color: #475569;
}

.app-main .badge {
  border-radius: 999px;
  padding: 0.34rem 0.52rem;
  font-weight: 600;
}

.modal-content {
  border-radius: 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.34);
  box-shadow: var(--app-elev-2);
  overflow: hidden;
}

.modal-header {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.dropdown-menu {
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.dropdown-item {
  border-radius: 0.45rem;
  margin: 0.1rem 0.25rem;
  width: auto;
}

.alert {
  border-radius: 0.8rem;
  border-width: 1px;
}

.app-main .list-group-item {
  border-color: rgba(148, 163, 184, 0.3);
}

a:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible,
.dropdown-toggle:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.form-check-input:focus-visible {
  outline: 2px solid var(--app-accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--app-accent) 35%, transparent);
}

.btn:focus:not(:focus-visible),
.form-control:focus:not(:focus-visible),
.form-select:focus:not(:focus-visible) {
  box-shadow: none;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--app-border);
}

.page-header h1,
.page-header .h1 {
  margin: 0;
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  font-weight: 600;
  color: var(--app-text);
  letter-spacing: -0.02em;
}

.page-header .text-muted {
  color: var(--app-text-muted) !important;
}

.card {
  border-color: var(--app-border);
  box-shadow: var(--shadow-sm);
}

.card:hover {
  box-shadow: var(--app-elev-2);
}

/* Custom styles (legacy file name) */

/* Calendar Grid Styles */
.calendar-month-grid,
.calendar-week-grid,
.calendar-4days-grid,
.calendar-day-grid {
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  overflow: hidden;
  background: white;
}

/* Month View Styles */
.calendar-month-view {
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  overflow: hidden;
  background: white;
  width: 100%;
  box-sizing: border-box;
  /* Одна высота для всех 6 недель → все 42 ячейки одинаковой высоты */
  --cal-month-row-h: 7.5rem;
}

.calendar-month-view .calendar-month-header {
  display: grid;
  /* minmax(0,1fr) — равная ширина колонок, ячейки не разъезжаются из‑за длинного контента */
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-month-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.calendar-month-header .calendar-day-header {
  padding: 0.75rem 0.5rem;
  text-align: center;
  font-weight: 600;
  color: #6c757d;
  border-right: 1px solid #dee2e6;
}

.calendar-month-header .calendar-day-header:last-child {
  border-right: none;
}

.calendar-month-grid {
  display: grid;
  /* 1fr растягивал 6 недель на всю высоту контейнера — ячейки становились огромными */
  grid-template-rows: repeat(6, auto);
  align-content: start;
}

.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  min-height: 120px;
}

.calendar-day {
  border-right: 1px solid #dee2e6;
  border-bottom: 1px solid #dee2e6;
  padding: 8px;
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s ease;
  min-height: 120px;
}

.calendar-day:last-child {
  border-right: none;
}

.calendar-day:hover {
  background-color: #f8f9fa;
}

.calendar-day.today {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border: 2px solid var(--primary-color);
  box-shadow: 0 0 10px rgba(0, 123, 255, 0.2);
}

.calendar-day.other-month {
  background-color: #f8f9fa;
  color: #6c757d;
}

.day-number {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.calendar-day.today .day-number {
  color: var(--primary-color);
  font-weight: 700;
}

/* Месячный вид: несколько событий в ячейке — столбик + прокрутка; ячейка тянется на высоту строки сетки */
.calendar-month-view .calendar-day {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  cursor: pointer;
  min-width: 0;
  height: 100%;
  min-height: 0;
  padding: 3px 5px;
  overflow: hidden;
  position: relative;
}

.calendar-month-view .calendar-day .day-number {
  flex-shrink: 0;
}

.calendar-month-view .calendar-events {
  position: static;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
  overflow-x: hidden;
  pointer-events: auto;
  padding: 1px 2px 2px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgb(var(--brand-neutral-rgb) / 0.25) transparent;
}

.calendar-month-view .calendar-events.calendar-events--overflow {
  box-shadow: inset 0 -10px 10px -10px rgb(var(--brand-neutral-rgb) / 0.18);
}

.calendar-month-view .calendar-events::-webkit-scrollbar {
  width: 5px;
}

.calendar-month-view .calendar-events::-webkit-scrollbar-thumb {
  background: rgb(var(--brand-neutral-rgb) / 0.22);
  border-radius: 4px;
}

.calendar-month-view .calendar-event.calendar-event--month {
  position: static;
  margin: 0;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  padding: 0;
  max-height: none;
  flex-shrink: 0;
  display: block;
  overflow: hidden;
  white-space: normal;
  text-overflow: clip;
  box-shadow: 0 1px 2px rgb(var(--brand-neutral-rgb) / 0.12);
  border-radius: 6px;
}

.calendar-month-view .calendar-event.calendar-event--month:hover,
.calendar-month-view .calendar-event.calendar-event--month:focus-within {
  overflow: visible;
}

.calendar-month-view .calendar-event.calendar-event--month:hover {
  transform: none;
  box-shadow: 0 2px 8px rgb(var(--brand-neutral-rgb) / 0.2);
  z-index: 3;
}

.event-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 3px 6px;
  border-radius: 6px;
  width: 100%;
  min-width: 0;
  color: inherit;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.event-chip__remind {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.event-chip__time {
  flex: 0 0 auto;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.22);
  white-space: nowrap;
  line-height: 1.2;
}

.event-chip__time--none {
  opacity: 0.65;
  font-weight: 500;
}

.event-chip__title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-chip__actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.calendar-month-view .calendar-event--month:hover .event-chip__actions,
.calendar-month-view .calendar-event--month:focus-within .event-chip__actions {
  opacity: 1;
}

.calendar-month-view .event-chip__time {
  font-size: 0.6rem;
  padding: 1px 4px;
}

.calendar-month-view .event-chip__time--compact {
  max-width: 2.4rem;
  padding: 1px 3px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.calendar-month-view .event-chip__title {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.event-chip__actions .btn {
  line-height: 1;
  min-height: 1.35rem;
  opacity: 0.95;
}

/* 4 Days View Styles */
.calendar-4days-grid .calendar-days-header {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.calendar-4days-grid .calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

/* Day View Styles */
.calendar-day-grid .calendar-days-header {
  display: grid;
  grid-template-columns: 1fr;
}

.calendar-day-grid .calendar-days-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.calendar-day-grid .calendar-day-column {
  min-height: 600px;
}

#workloadCalendarContainer .calendar-date-only .calendar-grid {
  min-height: 0;
}

#workloadCalendarContainer .calendar-date-only .calendar-time-column {
  display: none;
}

#workloadCalendarContainer .calendar-date-only .calendar-day-column {
  min-height: 10rem;
  padding: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

#workloadCalendarContainer .calendar-date-only .calendar-events {
  position: static;
  inset: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 7.5rem;
  pointer-events: auto;
}

#workloadCalendarContainer .calendar-date-only .calendar-event {
  position: static;
  min-height: 0;
  padding: 0;
  margin: 0;
  display: block;
  box-shadow: 0 1px 2px rgb(var(--brand-neutral-rgb) / 0.12);
}

#workloadCalendarContainer .calendar-date-only .workload-planned-block {
  position: static;
  inset: auto;
  width: 100%;
  height: auto !important;
}

#workloadCalendarContainer .workload-deadline-chip {
  background: #fff7ed;
  border: 1px solid rgba(249, 115, 22, 0.28);
  color: #9a3412;
  text-shadow: none;
}

#workloadCalendarContainer .workload-deadline-marker {
  border: 1px solid rgba(249, 115, 22, 0.22);
}

.calendar-header {
  display: flex;
  border-bottom: 1px solid #dee2e6;
  background-color: #f8f9fa;
}

.calendar-time-column {
  width: 60px;
  background-color: #f8f9fa;
  border-right: 1px solid #dee2e6;
  flex-shrink: 0;
}

.calendar-days-header {
  display: flex;
  flex: 1;
}

.calendar-day-header {
  flex: 1;
  padding: 0.75rem 0.5rem;
  text-align: center;
  border-right: 1px solid #dee2e6;
  background-color: #f8f9fa;
}

.calendar-day-header:last-child {
  border-right: none;
}

.calendar-day-header.today {
  background-color: #e3f2fd;
  color: var(--primary-color);
}

.day-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #6c757d;
  margin-bottom: 0.25rem;
}

.day-number {
  font-size: 1.25rem;
  font-weight: 700;
  color: #212529;
}

.calendar-grid {
  display: flex;
  min-height: 600px;
}

.calendar-days-grid {
  display: flex;
  flex: 1;
}

.calendar-day-column {
  flex: 1;
  position: relative;
  border-right: 1px solid #dee2e6;
  min-height: 600px;
}

.calendar-day-column:last-child {
  border-right: none;
}

.calendar-day-column.other-month {
  background-color: #f8f9fa;
  color: #6c757d;
}

.calendar-day-column.today {
  background-color: #fff3cd;
}

.time-slot {
  height: 40px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  font-size: 0.75rem;
  color: #6c757d;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.time-slot:hover {
  background-color: #f8f9fa;
}

.calendar-events {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.calendar-event {
  position: absolute;
  left: 3px;
  right: 3px;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  pointer-events: auto;
  border: none;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  min-height: 50px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.calendar-event:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  z-index: 10;
}

.calendar-event:hover {
  transform: scale(1.02);
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.event-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.event-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.event-time {
  font-weight: 700;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.event-title {
  font-weight: 600;
  font-size: 0.85rem;
  margin: 2px 0;
  line-height: 1.2;
  flex-grow: 1;
}

.event-author {
  font-size: 0.7rem;
  opacity: 0.9;
  font-weight: 500;
  margin-top: auto;
}

.reminder-indicator {
  width: 8px;
  height: 8px;
  background: #ffd700;
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(255, 215, 0, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* Event color gradients */
.event-primary {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.event-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.event-success {
  background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.event-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.event-warning {
  background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
}

.event-info {
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.event-light {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: #212529 !important;
  text-shadow: none !important;
}

.event-dark {
  background: linear-gradient(135deg, #343a40 0%, #23272b 100%);
}

/* Default event color */
.calendar-event:not([class*="event-"]) {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

/* Legacy calendar styles for compatibility */
.calendar-day {
  min-height: 120px;
  border: 1px solid #dee2e6;
  padding: 8px;
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.calendar-day:hover {
  background-color: #f8f9fa;
}

.calendar-day.drag-over {
  background-color: #e3f2fd !important;
  border: 2px solid var(--primary-color) !important;
  box-shadow: 0 0 15px rgba(13, 110, 253, 0.3);
  transform: scale(1.02);
  transition: all 0.2s ease;
  position: relative;
}

.calendar-day-column.drag-over {
  background-color: #e3f2fd !important;
  border: 2px solid var(--primary-color) !important;
  box-shadow: 0 0 15px rgba(13, 110, 253, 0.3);
  position: relative;
}

.calendar-day.today {
  background-color: #e3f2fd;
  border-color: var(--primary-color);
}

.calendar-day.other-month {
  background-color: #f8f9fa;
  color: #6c757d;
}

/* Месячная сетка: строки одной высоты, ячейки заполняют строку (ровная сетка 7×6) */
.calendar-month-view .calendar-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  width: 100%;
  height: 100%;
  min-height: 0;
  align-items: stretch;
}

.calendar-month-view .calendar-month-grid {
  width: 100%;
  grid-template-rows: repeat(6, var(--cal-month-row-h));
  align-content: stretch;
}

.calendar-month-view .calendar-day--has-overflow .calendar-events {
  padding-bottom: 1.35rem;
}

.calendar-month-view .calendar-day__more-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  color: var(--app-text-muted);
  padding: 5px 4px 3px;
  margin: 0;
  background: linear-gradient(to top, rgba(241, 245, 249, 0.98) 35%, rgba(241, 245, 249, 0));
  border-top: 1px solid rgba(226, 232, 240, 0.65);
  user-select: none;
  pointer-events: none;
}

.calendar-month-view .calendar-month-header .calendar-day-header {
  min-width: 0;
  padding: 0.4rem 0.35rem;
  font-size: 0.8125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-month-view .day-number {
  margin-bottom: 2px;
  font-size: 0.8125rem;
}

.calendar-month-view .event-chip {
  min-height: 21px;
  padding: 2px 4px;
  gap: 3px;
}

.calendar-event {
  font-size: 0.8rem;
  padding: 4px 6px;
  margin: 1px 0;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.calendar-event:hover {
  opacity: 0.8;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calendar-event:active {
  transform: translateY(0);
}

.calendar-event.dragging {
  opacity: 0.6;
  transform: rotate(3deg) scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  cursor: grabbing !important;
}

.calendar-event.filtered-out {
  opacity: 0.1;
  transition: opacity 0.3s ease;
}

.calendar-event.filtered-match {
  opacity: 1;
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.3);
  transition: all 0.3s ease;
}

/* Event colors */
.event-primary { background-color: var(--primary-color); color: white; }
.event-success { background-color: var(--success-color); color: white; }
.event-warning { background-color: var(--warning-color); color: black; }
.event-danger { background-color: var(--danger-color); color: white; }
.event-info { background-color: var(--info-color); color: white; }
.event-secondary { background-color: var(--secondary-color); color: white; }

/* Responsive calendar */
@media (max-width: 1024px) {
  .calendar-day {
    min-height: 100px;
  }

  .calendar-month-view {
    --cal-month-row-h: 6.75rem;
  }
  
  .calendar-event {
    font-size: 0.75rem;
    padding: 3px 5px;
  }
}

@media (max-width: 768px) {
  .calendar-day {
    min-height: 80px;
    padding: 4px;
  }
  
  .calendar-event {
    font-size: 0.7rem;
    padding: 2px 4px;
  }
  
  /* Упрощенная навигация на мобильных */
  .btn-group {
    flex-wrap: wrap;
  }
  
  .btn-group .btn {
    flex: 1;
    min-width: 0;
    font-size: 0.8rem;
    padding: 0.375rem 0.5rem;
  }
  
  /* Адаптируем панель поиска на маленьких экранах */
  .search-panel .row {
    flex-direction: column;
  }
  
  .search-panel .col-md-3,
  .search-panel .col-md-6,
  .search-panel .col-md-3 {
    margin-bottom: 1rem;
  }
  
  #authorFilter {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  
  #authorFilter .btn {
    margin: 1px;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
  }
  
  /* Адаптируем календарную сетку */
  .calendar-time-column {
    width: 50px;
  }
  
  .time-slot {
    height: 30px;
    font-size: 0.7rem;
    padding: 0 0.25rem;
  }
  
  .calendar-day-header {
    padding: 0.5rem 0.25rem;
  }
  
  .day-name {
    font-size: 0.75rem;
  }
  
  .day-number {
    font-size: 1rem;
  }
  
  .calendar-grid {
    min-height: 400px;
  }
  
  .calendar-day-column {
    min-height: 400px;
  }
  
  .calendar-event {
    font-size: 0.7rem;
    padding: 1px 2px;
  }
  
  .event-time {
    font-size: 0.65rem;
  }
  
  .event-title {
    font-size: 0.7rem;
  }
  
  .event-description {
    font-size: 0.6rem;
  }
  
  /* Адаптируем месячное представление */
  .calendar-month-header .calendar-day-header {
    padding: 0.5rem 0.25rem;
    font-size: 0.8rem;
  }
  
  .calendar-week {
    min-height: 80px;
  }
  
  .calendar-day {
    min-height: 80px;
    padding: 4px;
  }
  
  .day-number {
    font-size: 0.8rem;
  }
  
  .calendar-month-view .calendar-event--month .event-chip__title {
    font-size: 0.66rem;
  }

  .calendar-month-view .calendar-event--month .event-chip__time {
    font-size: 0.6rem;
    padding: 1px 4px;
  }

  .calendar-month-view {
    --cal-month-row-h: 6rem;
  }
  
  .event-time {
    font-size: 0.65rem;
    padding: 1px 4px;
  }
  
  .event-title {
    font-size: 0.7rem;
  }
  
  .event-author {
    font-size: 0.6rem;
  }
  
  .reminder-indicator {
    width: 6px;
    height: 6px;
  }
  
  /* Адаптируем 4-дневное представление */
  .calendar-4days-grid .calendar-days-header {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .calendar-4days-grid .calendar-days-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Адаптируем дневное представление */
  .calendar-day-grid .calendar-day-column {
    min-height: 400px;
  }
  
  /* Упрощаем заголовки */
  h1, h3 {
    font-size: 1.5rem;
  }
  
  /* Адаптируем модальные окна */
  .modal-dialog {
    margin: 0.5rem;
  }
  
  /* Улучшаем кнопки навигации */
  .d-flex.gap-2 {
    gap: 0.5rem !important;
  }
  
  .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .calendar-day {
    min-height: 60px;
    padding: 2px;
  }

  .calendar-month-view {
    --cal-month-row-h: 5.25rem;
  }
  
  .calendar-event {
    font-size: 0.65rem;
    padding: 1px 3px;
  }
  
  /* Еще более компактная навигация */
  .btn-group .btn {
    font-size: 0.7rem;
    padding: 0.25rem 0.375rem;
  }
  
  /* Упрощаем заголовки */
  h1 {
    font-size: 1.25rem;
  }
  
  h3 {
    font-size: 1.125rem;
  }
  
  /* Компактные карточки */
  .card-body {
    padding: 0.75rem;
  }
  
  /* Адаптируем форму */
  .form-control, .form-select {
    font-size: 0.875rem;
  }
}

@media (max-width: 360px) {
  .calendar-day {
    min-height: 50px;
    padding: 1px;
  }

  .calendar-month-view {
    --cal-month-row-h: 4.75rem;
  }
  
  .calendar-event {
    font-size: 0.6rem;
    padding: 1px 2px;
  }
  
  /* Минимальные размеры для очень маленьких экранов */
  .btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
  }
  
  .modal-dialog {
    margin: 0.25rem;
  }
}

/* Loading animation */
.app-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.calendar-loading-state {
  min-height: 12rem;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.35rem;
  color: #64748b;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Custom button styles */
.btn-view {
  border-radius: 0.375rem;
  transition: all 0.2s ease-in-out;
}

.btn-view.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* Modal enhancements */
.modal-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

/* Form enhancements */
.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Navigation enhancements */
.navbar-brand {
  font-weight: 600;
}

/* Card enhancements */
.card {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  border: 1px solid rgba(0, 0, 0, 0.125);
}

.card:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  transition: box-shadow 0.15s ease-in-out;
}

/* Search and filter panel */
.search-panel {
  background-color: #f8f9fa;
  border-radius: 0.375rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.search-panel .form-label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
}

.search-panel .form-control:focus,
.search-panel .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.search-panel .btn {
  font-weight: 500;
}

/* Author filter buttons */
#authorFilter {
  min-height: 38px;
  align-items: center;
}

#authorFilter .btn {
  margin: 2px;
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

#authorFilter .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#authorFilter .btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

#authorFilter .btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

#authorFilter .btn-outline-primary:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* Filter buttons */
.filter-buttons .btn {
  min-width: 120px;
}

/* Animations and transitions */
.calendar-day {
  transition: all 0.3s ease;
}

.calendar-day:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.calendar-month-view .calendar-day:hover {
  transform: none;
  box-shadow: none;
}

.calendar-event {
  transition: all 0.2s ease;
}

.calendar-event:hover {
  transform: scale(1.02);
  z-index: 10;
  position: relative;
}

/* View transitions */
.calendar-container {
  transition: opacity 0.3s ease;
}

#calendarContainer.calendar-is-loading,
#workloadCalendarContainer.calendar-is-loading,
.calendar-container.calendar-is-loading {
  opacity: 0.5;
}

/* Button animations */
.btn {
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:active {
  transform: translateY(0);
}

/* Modal animations */
.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out;
  transform: translate(0, -50px);
}

.modal.show .modal-dialog {
  transform: none;
}

/* Стили для колорпикера */
.color-picker-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-control-color {
    width: 60px;
    height: 40px;
    padding: 0;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control-color:hover {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-control-color:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.color-presets {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.color-presets .color-preset {
    appearance: none;
    -webkit-appearance: none;
    padding: 0;
    margin: 0;
}

.color-preset {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid rgba(15, 23, 42, 0.12);
    background-color: var(--preset-color, #94a3b8);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    position: relative;
    flex: 0 0 auto;
}

.color-preset:hover {
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

.color-preset.active {
    border-color: #0f172a;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.2);
}

.color-preset::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.2);
    transition: opacity 0.15s ease;
}

.color-preset.active::after {
    opacity: 1;
}

/* Tooltips (панель календаря и др.) — перенос длинного текста, без обрезки одной строкой */
.tooltip-trigger {
  position: relative;
  cursor: help;
}

.btn.tooltip-trigger {
  cursor: pointer;
}

.tooltip-trigger::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #1e293b;
  color: #f8fafc;
  padding: 0.45rem 0.65rem;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.35;
  white-space: normal;
  max-width: min(16rem, calc(100vw - 2rem));
  width: max-content;
  text-align: center;
  word-wrap: break-word;
  box-shadow: 0 6px 20px rgb(var(--brand-neutral-rgb) / 0.18);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 1080;
  margin-bottom: 0.5rem;
  pointer-events: none;
}

.tooltip-trigger::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1e293b;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 1080;
  margin-bottom: -5px;
  pointer-events: none;
}

.tooltip-trigger:hover::after,
.tooltip-trigger:hover::before {
  opacity: 1;
  visibility: visible;
}

/* Поповер события календаря: заголовок + структурированное тело */
.popover.cal-event-popover {
  max-width: min(20rem, calc(100vw - 1.25rem));
  border: 1px solid rgb(var(--brand-neutral-rgb) / 0.1);
  border-radius: 0.5rem;
  box-shadow: 0 12px 32px rgb(var(--brand-neutral-rgb) / 0.14);
  z-index: 1070;
}

.cal-event-popover .popover-header {
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--brand-neutral);
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid rgb(var(--brand-neutral-rgb) / 0.08);
  border-radius: 0.5rem 0.5rem 0 0;
}

.cal-event-popover .popover-body {
  padding: 0.4rem 0.65rem 0.6rem;
  font-size: 0.8125rem;
  color: #334155;
}

.cal-popover__row {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.28rem 0;
  line-height: 1.38;
}

.cal-popover__row + .cal-popover__row {
  border-top: 1px solid rgb(var(--brand-neutral-rgb) / 0.06);
}

.cal-popover__icon {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.2;
  margin-top: 0.08rem;
}

.cal-popover__text {
  flex: 1;
  min-width: 0;
  word-wrap: break-word;
}

.cal-popover__text--flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.cal-popover__badge {
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1.2;
}

.cal-popover__block {
  margin-top: 0.35rem;
  padding-top: 0.45rem;
  border-top: 1px dashed rgb(var(--brand-neutral-rgb) / 0.12);
}

.cal-popover__label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 0.28rem;
}

.cal-popover__desc {
  white-space: pre-wrap;
  color: #475569;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.cal-popover__empty {
  padding: 0.2rem 0;
}

/* Success/Error animations */
.alert {
  animation: slideInDown 0.5s ease;
}

@keyframes slideInDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ——— Таск-деск: канбан в духе «доски», карточки и колонки в сетке платформы ——— */
.task-desk {
  --td-glass: rgba(255, 255, 255, 0.72);
  --td-glass-border: rgb(var(--brand-neutral-rgb) / 0.08);
  --bd-radius: 1rem;
}

.task-desk__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.task-desk__subtitle {
  max-width: 42rem;
  line-height: 1.4;
}

.task-desk__space-controls {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  min-width: min(100%, 24rem);
}

.task-desk__space-add {
  display: flex;
  flex: 1 1 18rem;
  align-items: center;
  gap: 0.5rem;
  min-width: 12rem;
}

.task-desk__space-add .form-label {
  margin: 0 !important;
  white-space: nowrap;
}

.task-desk__space-add .form-select {
  min-width: 0;
}

.task-desk__space-add .form-select.is-loading {
  visibility: hidden;
}

.task-desk__space-create {
  white-space: nowrap;
}

.task-desk__pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

.task-desk__pill--muted {
  background: rgb(var(--brand-neutral-rgb) / 0.06);
  color: #64748b;
}

.task-desk__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

@media (min-width: 768px) {
  .task-desk__toolbar-main {
    flex-wrap: nowrap;
  }
}

.task-desk__chips-label {
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.task-desk__search-wrap {
  position: relative;
  min-width: 12rem;
}

.task-desk__search-icon {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: #94a3b8;
  pointer-events: none;
}

.task-desk__search {
  padding-left: 2.1rem;
  border-radius: 999px;
  border: 1px solid rgb(var(--brand-neutral-rgb) / 0.12);
  background: rgba(255, 255, 255, 0.9);
}

.task-desk__filters-panel {
  position: relative;
  z-index: 40;
  overflow: visible;
  border: 1px solid #dfe1e6;
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 4px 14px rgb(9 30 66 / 0.08);
}

.task-desk__filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid #ebecf0;
  background: #fafbfc;
}

.task-desk__filters-title {
  color: #172b4d;
  font-size: 0.82rem;
  font-weight: 700;
}

.task-desk__filters-summary {
  max-width: min(70vw, 60rem);
  margin-top: 0.08rem;
  overflow: hidden;
  color: #6b778c;
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-desk__filters-clear {
  flex: 0 0 auto;
  color: #44546f;
  text-decoration: none;
}

.task-desk__filters-clear:disabled {
  color: #a5adba;
  pointer-events: none;
}

.task-desk__filters-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(10rem, 1fr));
  gap: 0.65rem;
  padding: 0.75rem 0.8rem 0.85rem;
}

.task-desk__filter-field {
  position: relative;
  min-width: 0;
}

.task-desk__filter-field .form-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.3rem;
  color: #5e6c84;
  font-size: 0.68rem;
  font-weight: 700;
}

.task-desk__filter-field .form-label i {
  color: #0d6efd;
}

.task-desk__filter-field .form-select {
  border-color: #b3bac5;
  border-radius: 0.35rem;
  color: #172b4d;
}

.task-filter-native-select {
  display: none;
}

.task-filter-combobox {
  position: relative;
}

.task-filter-combobox__control {
  position: relative;
}

.task-filter-combobox__control > .bi-search {
  position: absolute;
  top: 50%;
  left: 0.65rem;
  z-index: 1;
  color: #6b778c;
  font-size: 0.75rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.task-filter-combobox__control .form-control {
  padding-right: 2rem;
  padding-left: 1.85rem;
  border-color: #b3bac5;
  border-radius: 0.35rem;
  color: #172b4d;
  cursor: pointer;
}

.task-filter-combobox__control .form-control:focus {
  cursor: text;
}

.task-filter-combobox__clear {
  position: absolute;
  top: 50%;
  right: 0.3rem;
  width: 1.5rem;
  height: 1.5rem;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  color: #6b778c;
  font-size: 0.65rem;
  transform: translateY(-50%);
}

.task-filter-combobox__clear.is-visible {
  display: inline-flex;
}

.task-filter-combobox__clear:hover {
  background: #f1f2f4;
  color: #172b4d;
}

.task-filter-combobox__menu {
  position: absolute;
  top: calc(100% + 0.25rem);
  right: 0;
  left: 0;
  z-index: 1055;
  max-height: 16rem;
  overflow-y: auto;
  padding: 0.3rem;
  border: 1px solid #dfe1e6;
  border-radius: 0.4rem;
  background: #fff;
  box-shadow: 0 8px 24px rgb(9 30 66 / 0.2);
}

.task-filter-combobox.is-open .task-filter-combobox__menu {
  display: block !important;
}

#tasksFilters {
  position: relative;
  z-index: 40;
}

.task-filter-combobox__option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.42rem 0.5rem;
  border: 0;
  border-radius: 0.3rem;
  background: transparent;
  color: #172b4d;
  font-size: 0.75rem;
  text-align: left;
}

.task-filter-combobox__option:hover,
.task-filter-combobox__option.is-active {
  background: #f1f2f4;
}

.task-filter-combobox__option.is-selected {
  color: #0c66e4;
  font-weight: 600;
}

.task-filter-combobox__empty {
  padding: 0.7rem 0.5rem;
  color: #6b778c;
  font-size: 0.72rem;
  text-align: center;
}

.task-desk__filters-toggle.is-active {
  border-color: #0d6efd;
  background: #e9f2ff;
  color: #0c66e4;
}

.task-desk__filters-count {
  min-width: 1.15rem;
  margin-left: 0.35rem;
  padding: 0.04rem 0.3rem;
  border-radius: 999px;
  background: #0d6efd;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

@media (max-width: 991.98px) {
  .task-desk__filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .task-desk__header {
    align-items: stretch;
  }

  .task-desk__space-controls,
  .task-desk__space-add {
    width: 100%;
    min-width: 0;
  }

  .task-desk__space-controls {
    flex-wrap: wrap;
  }

  .task-desk__space-create {
    flex: 1 1 auto;
    justify-content: center;
  }

  .task-desk__toolbar,
  .task-desk__toolbar-main,
  .task-desk__chips {
    min-width: 0;
    width: 100%;
  }

  .task-desk__chips {
    flex: 1 1 100% !important;
    flex-shrink: 1 !important;
  }

  .task-desk__chips-label {
    flex: 1 0 100%;
  }

  .task-desk__toolbar-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .task-desk__space-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .task-desk__space-actions {
    width: 100%;
  }

  .task-desk__filters-grid {
    grid-template-columns: 1fr;
  }

  .task-desk__filters-summary {
    max-width: 15rem;
  }
}

.task-desk__guide-list i {
  color: var(--brand-primary-dark);
}

.task-desk__personal-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.65rem 1.25rem;
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgb(var(--brand-neutral-rgb) / 0.1);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.72);
}

.task-desk__personal-bar.d-none {
  display: none !important;
}

.personal-task-meta {
  display: grid;
  grid-template-columns: minmax(9rem, 12rem) minmax(0, 1fr);
  gap: 0.75rem;
}

.personal-task-tags__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.personal-task-tags__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.personal-task-tags__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(13, 110, 253, 0.12);
  color: #0b5ed7;
  font-size: 0.75rem;
}

.personal-task-tags__x {
  border: 0;
  background: transparent;
  color: inherit;
  line-height: 1;
  padding: 0 0.1rem;
}

.personal-task-tags__row .form-control {
  width: auto;
  min-width: 8rem;
  flex: 1 1 8rem;
}

.task-card__tag {
  cursor: pointer;
}

@media (max-width: 575.98px) {
  .personal-task-meta {
    grid-template-columns: 1fr;
  }
}

.btn-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  font-size: 0.8rem;
  border: 1px solid rgb(var(--brand-neutral-rgb) / 0.12);
  background: rgba(255, 255, 255, 0.85);
  color: #475569;
}

.btn-chip:hover {
  background: rgb(var(--brand-neutral-rgb) / 0.04);
  color: var(--brand-neutral);
}

.btn-chip.active {
  border-color: rgba(13, 110, 253, 0.45);
  background: rgba(13, 110, 253, 0.12);
  color: #0b5ed7;
  font-weight: 600;
}

.btn-chip__count {
  min-width: 1.5rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: rgb(var(--brand-neutral-rgb) / 0.07);
  color: inherit;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
}

.task-space-preview {
  padding: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0.9rem;
  background: rgba(248, 250, 252, 0.72);
}

.task-space-preview__title {
  margin-bottom: 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.task-space-preview__grid {
  display: grid;
  gap: 0.55rem;
}

.task-space-preview__item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.8);
}

.task-space-preview__item-order {
  width: 1.9rem;
  height: 1.9rem;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgb(var(--brand-primary-rgb) / 0.12);
  color: var(--brand-primary-dark);
  font-size: 0.8rem;
  font-weight: 700;
}

.task-space-preview__item-main {
  min-width: 0;
}

.task-space-preview__item-title {
  font-weight: 700;
  color: var(--brand-neutral);
}

.task-space-preview__item-meta,
.task-space-preview__empty {
  font-size: 0.84rem;
  color: #64748b;
}

.task-space-builder {
  display: grid;
  gap: 0.75rem;
}

.task-space-boards-list {
  display: grid;
  gap: 0.45rem;
}

.task-space-boards-list__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.75rem;
  background: rgba(248, 250, 252, 0.85);
  padding: 0.65rem 0.85rem;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.task-space-boards-list__item:hover {
  border-color: rgba(37, 99, 235, 0.35);
  background: #fff;
}

.task-space-boards-list__item.is-active {
  border-color: rgba(37, 99, 235, 0.55);
  background: rgba(239, 246, 255, 0.95);
  box-shadow: inset 3px 0 0 rgba(37, 99, 235, 0.75);
}

.task-space-boards-list__name {
  font-weight: 600;
  font-size: 0.95rem;
}

.task-space-boards-list__meta {
  font-size: 0.78rem;
  color: #64748b;
}

.task-space-boards-list__item--sortable {
  flex-direction: row;
  align-items: center;
  gap: 0.15rem;
  padding-left: 0.25rem;
}

.task-space-boards-list__grip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.4rem;
  color: #94a3b8;
  cursor: grab;
  user-select: none;
}

.task-space-boards-list__grip:active {
  cursor: grabbing;
}

.task-space-boards-list__select {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: auto;
  min-width: 0;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.15rem 0.5rem 0.15rem 0.25rem;
  color: inherit;
}

.task-space-boards-list__item.is-dragging {
  opacity: 0.55;
}

.task-space-boards-list__item.is-drop-target {
  outline: 2px dashed rgba(37, 99, 235, 0.55);
  outline-offset: 1px;
}

.task-space-board-meta .form-control-plaintext {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 0.375rem;
}

.task-space-board-portal {
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.72);
}

.task-space-board-portal__title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--brand-neutral);
  margin-bottom: 0.15rem;
}

.task-space-builder__block {
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(248, 250, 252, 0.72);
  overflow: hidden;
}

.task-space-builder__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: start;
  padding: 0.85rem;
}

.task-space-builder__acl {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.55);
}

.task-space-builder__acl-summary {
  cursor: pointer;
  padding: 0.55rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--brand-neutral);
  list-style-position: inside;
}

.task-space-builder__acl-summary::-webkit-details-marker {
  margin-right: 0.35rem;
}

.task-space-builder__acl-body {
  padding: 0 0.85rem 0.85rem;
}

.space-acl-role-grid--compact {
  gap: 0.35rem 0.5rem;
}

.space-acl-role--sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

.space-acl-chip--xs {
  padding: 0.25rem 0.4rem 0.25rem 0.3rem;
}

.space-acl-chip--xs .task-card__avatar {
  width: 1.55rem;
  height: 1.55rem;
  font-size: 0.58rem;
}

.space-acl-chip--xs .space-acl-chip__name {
  font-size: 0.78rem;
  max-width: 160px;
}

.space-acl-chip--xs .space-acl-chip__meta {
  font-size: 0.68rem;
}

.task-space-builder__order {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(13, 110, 253, 0.1);
  color: #0d6efd;
  font-weight: 700;
}

.task-space-builder__fields {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 140px;
  gap: 0.75rem;
}

.task-space-builder__field {
  min-width: 0;
}

.task-space-builder__field .form-label {
  margin-bottom: 0.3rem;
  font-size: 0.74rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.task-space-builder__actions {
  display: inline-flex;
  gap: 0.35rem;
}

.task-space-builder__empty,
.task-space-advanced {
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  border: 1px dashed rgba(148, 163, 184, 0.4);
  background: rgba(248, 250, 252, 0.72);
  color: #64748b;
}

.task-space-advanced summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--brand-neutral);
}

/* Task Desk — ACL пространства (должности + пользователи) */
.space-acl-role-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  max-height: 14rem;
  overflow: auto;
  padding: 0.15rem;
}

#spaceAdminModal .ts-wrapper,
#spaceAdminBuilder .ts-wrapper {
  width: 100%;
}

#spaceAdminModal .ts-control {
  min-height: 2.5rem;
  border-radius: 0.5rem;
}

/* dropdownParent: body — список вне .modal, иначе оказывается под оверлеем */
body > .ts-dropdown {
  z-index: 2005 !important;
}

body > .ts-dropdown .ts-dropdown-content {
  max-height: min(320px, 45vh);
}

.space-acl-pos-optgroup {
  font-weight: 650;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-neutral);
  opacity: 0.75;
  padding: 0.35rem 0.5rem 0.15rem;
}

.space-acl-pos-option {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.25;
}

.space-acl-pos-option__title {
  font-weight: 500;
}

.space-acl-pos-option__meta {
  font-size: 0.78rem;
  color: var(--bs-secondary-color, #6c757d);
}

.ts-dropdown .optgroup .optgroup-header {
  background: transparent;
  border: 0;
}

.space-acl-role {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(248, 250, 252, 0.9);
  cursor: pointer;
  margin: 0;
  font-size: 0.88rem;
}

.space-acl-role:has(.form-check-input:checked),
.space-acl-role.space-acl-role--on {
  border-color: rgb(var(--brand-primary-rgb) / 0.45);
  background: rgba(240, 253, 250, 0.85);
}

.space-acl-role .form-check-input {
  margin: 0;
  flex-shrink: 0;
}

.space-acl-role__label {
  user-select: none;
  color: var(--brand-neutral);
  font-weight: 500;
}

.space-acl-user-picker__selected {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 2.25rem;
  margin-bottom: 0.5rem;
}

.space-acl-user-picker__empty {
  font-size: 0.84rem;
  color: #64748b;
  align-self: center;
}

.space-acl-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.5rem 0.35rem 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.95);
  max-width: 100%;
}

.space-acl-chip .task-card__avatar {
  width: 1.85rem;
  height: 1.85rem;
  font-size: 0.65rem;
  flex-shrink: 0;
}

.space-acl-chip__main {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.space-acl-chip__name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--brand-neutral);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.space-acl-chip__meta {
  font-size: 0.72rem;
  color: #64748b;
}

.space-acl-chip__remove {
  flex-shrink: 0;
  line-height: 1;
}

.space-acl-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 1080;
  max-height: min(280px, 42vh);
  overflow: auto;
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
  box-shadow: 0 12px 32px rgb(var(--brand-neutral-rgb) / 0.12);
}

.space-acl-suggest__item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-bottom: 1px solid rgba(241, 245, 249, 0.95);
  background: transparent;
  cursor: pointer;
}

.space-acl-suggest__item:last-child {
  border-bottom: 0;
}

.space-acl-suggest__item:hover {
  background: rgb(var(--brand-primary-rgb) / 0.08);
}

.space-acl-suggest__item .task-card__avatar {
  width: 2rem;
  height: 2rem;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.space-acl-suggest__text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.space-acl-suggest__name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--brand-neutral);
}

.space-acl-suggest__meta {
  font-size: 0.75rem;
  color: #64748b;
}

.space-acl-suggest__empty {
  margin: 0;
}

.task-desk__spaces {
  margin-top: 0.25rem;
}

.task-desk__canvas {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
  position: relative;
}

/* Холст: пространства идут вертикально, горизонтальный скролл живёт внутри пространства. */
.task-desk__canvas--boards {
  flex-direction: column;
  align-items: stretch;
  overflow: visible;
}

.task-desk__canvas--row {
  flex-direction: row;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 1.25rem;
  padding-bottom: 0.65rem;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

.task-desk__canvas--row > .task-desk__panel,
.task-desk__canvas--row > .task-desk__dock {
  flex: 0 0 auto;
  width: max-content;
  min-width: min(100%, 28rem);
  scroll-snap-align: start;
}

.task-desk__canvas--boards > .task-desk__placeholder {
  flex: 1 1 auto;
  min-width: 18rem;
}

.task-desk__space {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dfe1e6;
  border-radius: 0.35rem;
  background: #fff;
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.task-desk__space--focused {
  border-color: rgba(13, 110, 253, 0.58);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.12), 0 12px 36px rgb(15 23 42 / 0.08);
}

.task-desk__space-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid #dfe1e6;
  background: #fafbfc;
}

.task-desk__space-heading {
  min-width: 0;
}

.task-desk__space-kicker {
  display: block;
  margin-bottom: 0;
  color: #94a3b8;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.task-desk__space-title {
  margin: 0;
  color: var(--brand-neutral, #1e293b);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.task-desk__space-count {
  flex: 0 0 auto;
  padding: 0.22rem 0.55rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.9);
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
}

.task-desk__space-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.35rem;
}

.task-desk__space-boards {
  display: flex;
  align-items: stretch;
  gap: 0.6rem;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.55rem;
  scroll-snap-type: x proximity;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.task-desk__space-boards > .task-desk__panel {
  flex: 0 0 auto;
  width: max-content;
  min-width: min(100%, 28rem);
  scroll-snap-align: start;
}

.task-desk__dock {
  display: flex;
  gap: 1.25rem;
  min-width: 0;
  flex: 0 0 auto;
}

.task-desk__dock--stack {
  flex-direction: column;
  width: max-content;
}

.task-desk__dock--row {
  flex-direction: row;
  align-items: stretch;
  /* Горизонтальный scroll — на #taskDeskCanvas; dock-row не режет столбцы rem-cap */
  padding-bottom: 0.25rem;
  width: max-content;
}

.task-desk__dock--row > .task-desk__panel,
.task-desk__dock--row > .task-desk__dock {
  flex: 0 0 auto;
  width: max-content;
  min-width: min(100%, 28rem);
}

.task-desk__panel {
  min-width: 0;
  position: relative;
  background: #fff;
  border: 1px solid #dfe1e6;
  border-radius: 3px;
  padding: 3px;
  box-shadow: none;
}

.task-desk__panel.task-desk__panel--collapsed {
  align-self: flex-start;
  width: var(--task-board-expanded-width, 28rem);
  min-width: var(--task-board-expanded-width, 28rem);
  max-width: var(--task-board-expanded-width, 28rem);
}

.task-desk__panel--collapsed .task-desk__panel-head {
  flex-wrap: nowrap;
  margin: 0;
}

.task-desk__panel--collapsed .task-desk__panel-board,
.task-desk__panel--collapsed .task-desk__panel-load,
.task-desk__panel--collapsed .task-desk__placeholder {
  display: none;
}

.task-desk__panel-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

.task-desk__panel-view-switch .btn {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.45rem;
}

.task-desk__panel-view-switch .btn.active {
  color: #fff;
  background: #2563eb;
  border-color: #2563eb;
}

body.task-desk--board-load-open {
  overflow: hidden;
}

.task-desk__panel--load-view {
  position: fixed;
  inset: 0.75rem;
  z-index: 1080;
  display: flex;
  flex-direction: column;
  width: auto !important;
  max-width: none !important;
  height: calc(100vh - 1.5rem);
  max-height: calc(100dvh - 1.5rem);
  min-height: 0;
  overflow: hidden;
  padding: 0.85rem 1rem 1rem;
  border-radius: 1rem;
  background: #f8fafc;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
}

/* Модалка планирования выше fullscreen-панели «Загрузка» (z-index 1080) */
body.task-desk--board-load-open #boardLoadBlockModal {
  z-index: 1200;
}

body.task-desk--board-load-open .modal-backdrop.show {
  z-index: 1190;
}

.task-desk__panel--load-view .task-desk__panel-head {
  flex: 0 0 auto;
  margin-bottom: 0.65rem;
}

.task-desk__panel--load-view .task-desk__panel-load {
  display: grid !important;
  grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 0.75rem;
  flex: 1 1 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

.task-desk__panel--load-view .task-desk__panel-load > * {
  min-height: 0;
  min-width: 0;
  max-height: 100%;
  height: 100%;
  align-self: stretch;
}

.task-desk__load-cards {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.85rem;
  background: #fff;
  overflow: hidden;
}

.task-desk__load-cards-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex: 0 0 auto;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.task-desk__load-cards-count {
  min-width: 1.4rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #0f172a;
  text-align: center;
}

.task-desk__load-cards-list {
  flex: 1 1 0%;
  min-height: 0;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.task-desk__load-col-group {
  flex: 0 0 auto;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.7rem;
  background: #f8fafc;
  overflow: visible;
}

.task-desk__load-col-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
}

.task-desk__load-col-summary::-webkit-details-marker {
  display: none;
}

.task-desk__load-col-summary-main {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.task-desk__load-col-chev {
  font-size: 0.75rem;
  color: #64748b;
  transition: transform 0.15s ease;
}

.task-desk__load-col-group:not([open]) .task-desk__load-col-chev {
  transform: rotate(-90deg);
}

.task-desk__load-col-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-desk__load-col-status-icon {
  flex: 0 0 auto;
  font-size: 0.85rem;
  line-height: 1;
}

.task-desk__load-col-group--inactive {
  background: #f1f5f9;
  border-color: rgba(148, 163, 184, 0.32);
}

.task-desk__load-col-group--done .task-desk__load-col-status-icon {
  color: #16a34a;
}

.task-desk__load-col-group--blocked .task-desk__load-col-status-icon {
  color: #b45309;
}

.task-desk__load-col-group--inactive .task-desk__load-col-title,
.task-desk__load-col-group--inactive .task-desk__load-col-count {
  color: #64748b;
}

.task-desk__load-cards-list .task-card.wl-load-card--inactive,
.task-desk__load-cards-list .task-card.task-desk__load-queue-card--inactive {
  cursor: default;
  opacity: 0.42;
  filter: grayscale(0.2);
}

.task-desk__load-cards-list .task-card.wl-load-card--inactive:active,
.task-desk__load-cards-list .task-card.wl-load-card--inactive.dragging,
.task-desk__load-cards-list .task-card.wl-load-card--inactive.is-dragging {
  cursor: default;
  opacity: 0.42;
}

.task-desk__load-col-count {
  min-width: 1.35rem;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

.task-desk__load-col-cards {
  padding: 0 0.45rem 0.45rem;
}

.task-desk__load-cards-list .task-card {
  cursor: grab;
  margin-bottom: 0.45rem;
  user-select: none;
}

.task-desk__load-cards-list .task-card:last-child {
  margin-bottom: 0;
}

.task-desk__load-cards-list .task-card:active,
.task-desk__load-cards-list .task-card.dragging,
.task-desk__load-cards-list .task-card.is-dragging {
  cursor: grabbing;
  opacity: 0.7;
}

.task-desk__load-gantt {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.85rem;
  background: #fff;
  overflow: hidden;
}

.task-desk__load-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.task-desk__load-toolbar-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
  min-width: 0;
  flex: 1 1 auto;
}

.task-desk__load-events-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.task-desk__load-user-search {
  flex: 0 1 17rem;
  width: min(17rem, 100%);
  margin-left: auto;
}

.task-desk__load-user-search .form-control {
  border-radius: 999px;
  border-color: rgba(148, 163, 184, 0.45);
  background: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.task-desk__load-user-search .form-control:focus {
  background: #fff;
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.task-desk__load-user-search .task-filter-combobox__menu {
  border-radius: 0.75rem;
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.task-desk__load-user-search .task-filter-combobox__option {
  border-radius: 0.5rem;
  font-size: 0.8rem;
}

.task-desk__load-user-search .task-filter-combobox__option small {
  display: block;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 500;
}

.task-desk__load-grid .workload-gantt__row.is-user-filter-hit {
  background: rgba(37, 99, 235, 0.06);
}

.task-desk__load-grid .workload-gantt__row.is-user-filter-hit .workload-gantt__name {
  background: #dbeafe;
  color: #1d4ed8;
}

.task-desk__load-grid .workload-gantt__name.is-user-filter-flash {
  animation: task-desk-load-user-flash 1.1s ease;
}

@keyframes task-desk-load-user-flash {
  0%, 100% { box-shadow: none; }
  30% { box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.55); }
}

.task-desk__load-period {
  font-size: 0.95rem;
  text-transform: capitalize;
}

.task-desk__load-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.task-desk__load-grid .workload-day-gantt,
.task-desk__load-grid .workload-team-gantt {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.task-desk__load-grid .workload-gantt__scroll {
  flex: 1 1 auto;
  max-height: none;
  height: 100%;
  border: none;
  border-radius: 0;
}

.task-desk__load-grid .workload-gantt__row.is-drop-target {
  background: rgba(37, 99, 235, 0.08);
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: -2px;
}

.task-desk__load-grid .workload-gantt__row.is-drop-target .workload-gantt__name {
  background: #dbeafe;
  color: #1d4ed8;
}

.task-desk__load-grid .workload-gantt__row.is-assigning {
  opacity: 0.65;
  pointer-events: none;
}

.task-desk__load-drop-marker {
  position: absolute;
  top: 4px;
  bottom: 4px;
  z-index: 6;
  pointer-events: none;
  border-radius: 0.35rem;
  background: rgb(var(--brand-primary-rgb) / 0.22);
  border: 1.5px dashed rgb(var(--brand-primary-rgb) / 0.85);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.55) inset;
}

.task-desk__load-drop-chip {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 4px);
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #1d4ed8;
  color: #fff;
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.2);
}

.task-desk__load-heatmap {
  --load-name-w: 11rem;
  min-height: 100%;
}

.task-desk__load-heatmap-scroll {
  min-width: max(100%, calc(var(--load-name-w) + var(--load-day-cols, 30) * 2.1rem));
}

.task-desk__load-heatmap-header,
.task-desk__load-row {
  display: grid;
  grid-template-columns: var(--load-name-w) minmax(0, 1fr);
  align-items: stretch;
}

.task-desk__load-heatmap-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.task-desk__load-corner,
.task-desk__load-name {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  border-right: 1px solid rgba(148, 163, 184, 0.2);
}

.task-desk__load-name {
  display: flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-desk__load-days,
.task-desk__load-cells {
  display: grid;
  grid-template-columns: repeat(var(--load-day-cols, 30), minmax(2.1rem, 1fr));
}

.task-desk__load-day {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  border-right: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
}

.task-desk__load-day.is-weekend {
  background: rgba(148, 163, 184, 0.1);
}

.task-desk__load-row {
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  transition: background 0.12s ease, outline-color 0.12s ease;
}

.task-desk__load-row.is-drop-target {
  background: rgba(37, 99, 235, 0.08);
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: -2px;
}

.task-desk__load-row.is-drop-target .task-desk__load-name {
  background: #dbeafe;
  color: #1d4ed8;
}

.task-desk__load-row.is-assigning {
  opacity: 0.65;
  pointer-events: none;
}

.task-desk__load-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  border-right: 1px solid rgba(148, 163, 184, 0.1);
  font-size: 0.7rem;
  font-weight: 700;
}

.task-desk__load-cell--l0 { background: #f8fafc; color: #94a3b8; }
.task-desk__load-cell--l1 { background: #dbeafe; color: #1e3a8a; }
.task-desk__load-cell--l2 { background: #93c5fd; color: #1e3a8a; }
.task-desk__load-cell--l3 { background: #3b82f6; color: #fff; }
.task-desk__load-cell--l4 { background: #1d4ed8; color: #fff; }
.task-desk__load-cell--l5 { background: #1e3a8a; color: #fff; }
.task-desk__load-cell.is-time-off {
  background: repeating-linear-gradient(
    -45deg,
    #f1f5f9,
    #f1f5f9 4px,
    #e2e8f0 4px,
    #e2e8f0 8px
  );
  color: #94a3b8;
}

@media (max-width: 991.98px) {
  .task-desk__panel--load-view {
    inset: 0;
    border-radius: 0;
    height: 100vh;
    max-height: 100dvh;
  }

  .task-desk__panel--load-view .task-desk__panel-load {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(12rem, 35%) minmax(0, 1fr);
  }
}

.task-desk__panel-heading {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  flex: 1 1 auto;
}

.task-desk__panel-eyebrow {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  line-height: 1.2;
}

.task-desk__panel-drag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  flex: 0 0 auto;
  color: #94a3b8;
  cursor: grab;
  border-radius: 0.35rem;
  user-select: none;
  -webkit-user-select: none;
}

.task-desk__panel-drag:hover {
  color: #64748b;
  background: rgba(148, 163, 184, 0.15);
}

.task-desk__panel-drag:active,
.task-desk__panel-drag.is-dragging {
  cursor: grabbing;
  color: #475569;
}

.task-desk__panel-title-line {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  max-width: 100%;
}

.task-desk__panel-title {
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: -0.02em;
  color: var(--brand-neutral, #1e293b);
  margin: 0;
  min-width: 0;
}

.task-desk__panel-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

/* Snap overlays (visual only — layout model remains flex tree) */
.task-desk__panel.task-desk__snap-active::after,
.task-desk__canvas.task-desk__snap-active::before {
  content: '';
  pointer-events: none;
  position: absolute;
  z-index: 4;
  border-radius: 0.35rem;
  background: rgba(13, 110, 253, 0.18);
  border: 2px solid rgba(13, 110, 253, 0.55);
}

.task-desk__panel.task-desk__snap-active[data-snap-zone="left"]::after {
  inset: 0 auto 0 0;
  width: 50%;
}

.task-desk__panel.task-desk__snap-active[data-snap-zone="right"]::after {
  inset: 0 0 0 auto;
  width: 50%;
}

.task-desk__panel.task-desk__snap-active[data-snap-zone="bottom"]::after {
  inset: auto 0 0 0;
  height: 28%;
}

.task-desk__canvas.task-desk__snap--edge-start::before {
  inset: 0 0 auto 0;
  height: 0.55rem;
}

.task-desk__canvas.task-desk__snap--edge-end::before {
  inset: auto 0 0 0;
  height: 0.55rem;
}

.task-desk__canvas.task-desk__canvas--row.task-desk__snap--edge-start::before {
  inset: 0 auto 0 0;
  width: 0.55rem;
  height: auto;
}

.task-desk__canvas.task-desk__canvas--row.task-desk__snap--edge-end::before {
  inset: 0 0 0 auto;
  width: 0.55rem;
  height: auto;
}

.task-desk__placeholder {
  border: 1px dashed rgb(var(--brand-neutral-rgb) / 0.28);
  border-radius: var(--bd-radius, 0.75rem);
  background: rgba(148, 163, 184, 0.08);
  padding: 1.5rem 1rem;
  text-align: center;
  color: #64748b;
}

.task-desk__placeholder-title {
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.25rem;
}

.task-desk__board,
.task-desk__panel-board {
  display: flex;
  gap: 0.45rem;
  align-items: stretch;
  width: max-content;
  max-width: none;
  padding-bottom: 0.5rem;
}

.task-desk__col {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 13.5rem;
  min-width: 13.5rem;
  max-width: 13.5rem;
  max-height: var(--task-col-max-h, max(16rem, calc(100dvh - 14.5rem)));
  background: #f4f5f7;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid #ebecf0;
  border-radius: 0.25rem;
  padding: 0.45rem;
  box-shadow: none;
}

.task-desk__col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  margin-bottom: 0.5rem;
  padding: 0 0.15rem;
}

.task-desk__col-title {
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: -0.02em;
}

.task-desk__col-meta {
  font-variant-numeric: tabular-nums;
}

.task-desk__col-add {
  width: 100%;
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 0.25rem;
  padding: 0.35rem 0.4rem;
  margin-bottom: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.task-desk__col-add:hover {
  background: rgba(13, 110, 253, 0.08);
  border-color: rgba(13, 110, 253, 0.35);
  color: #0d6efd;
}

.kanban-column {
  flex: 1 1 auto;
  min-height: 3.25rem;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.kanban-column::-webkit-scrollbar {
  width: 0.45rem;
}

.kanban-column::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.7);
  border-radius: 999px;
}

.task-desk--compact .task-card {
  margin-bottom: 0.22rem;
}

.task-desk--compact .task-card__inner {
  padding: 0.28rem 0.4rem 0.32rem;
}

.task-desk--compact .task-card__context,
.task-desk--compact .task-card__att-previews,
.task-desk--compact .task-card__meta,
.task-desk--compact .task-card__tags {
  display: none;
}

.task-desk--compact .task-card__open {
  font-size: 0.82rem;
  line-height: 1.25;
}

#taskDeskDensityBtn[aria-pressed="true"] {
  color: #fff;
  background: #2563eb;
  border-color: #2563eb;
}

.task-desk__empty,
.task-desk__loading {
  font-size: 0.8rem;
  color: #94a3b8;
  padding: 0.5rem 0.25rem;
  text-align: center;
}

.task-desk__column-empty {
  border: 0;
  border-radius: 0;
  padding: 0.45rem 0.25rem;
  margin: 0.15rem 0;
}

.task-desk__empty {
  padding: 0.45rem 0.25rem 0.2rem;
}

.task-desk__empty-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.2rem;
}

.task-desk__empty-text {
  margin-bottom: 0.55rem;
}

.task-desk__empty-action {
  min-width: 0;
}

/* Карточка задачи */
.task-card {
  max-width: 100%;
  overflow: hidden;
  border-radius: 0.25rem;
  margin-bottom: 0.4rem;
  border: 1px solid #dfe1e6;
  border-top-width: 3px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(9 30 66 / 0.16);
  transition: box-shadow 0.15s ease, transform 0.12s ease, border-color 0.15s ease;
  cursor: pointer;
  position: relative;
}

.task-card--interactive:focus-visible {
  outline: none;
  box-shadow: var(--app-ring);
}

.task-card:hover {
  box-shadow: 0 4px 12px rgb(9 30 66 / 0.22);
  border-color: #4c9aff;
  border-top-color: #2684ff;
}

.task-card.dragging {
  opacity: 0.85;
  transform: scale(1.01);
}

.task-card--pri-high {
  background: #fff;
  border-top-color: #dc3545;
}

.task-card--pri-normal {
  background: #fff;
  border-top-color: #0d6efd;
}

.task-card--pri-low {
  background: #fff;
  border-top-color: #94a3b8;
}

.task-card--done {
  opacity: 0.78;
}

.task-card--done .task-card__open {
  text-decoration: line-through;
  color: #6b778c;
}

.task-card__inner {
  display: block;
  padding: 0.45rem 0.5rem 0.5rem;
  min-width: 0;
}

.task-card__check {
  flex-shrink: 0;
  min-width: 1.15rem;
  min-height: 1.15rem;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.08rem;
  border-radius: 0.22rem;
  border: 1px solid #b3bac5;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: transparent;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.task-card__check .bi-check-lg {
  font-size: 0.68rem;
  line-height: 1;
}

.task-card__check:hover {
  border-color: #0d6efd;
  color: rgba(13, 110, 253, 0.5);
}

.task-card__check.is-checked {
  background: #198754;
  border-color: #198754;
  color: #fff;
}

.task-card__body {
  flex: 1 1 auto;
  min-width: 0;
}

.task-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.3rem;
}

.task-card__title,
.task-card__open {
  font-weight: 650;
  font-size: 0.82rem;
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: anywhere;
  color: #172b4d;
  min-width: 0;
  flex: 1 1 auto;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.task-card__open:hover {
  color: var(--brand-primary-dark);
  text-decoration: underline;
}

.task-card__menu {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 0.2rem;
  color: #64748b;
  opacity: 0.55;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.task-card:hover .task-card__menu,
.task-card:focus-within .task-card__menu {
  opacity: 1;
}

@media (hover: none) {
  .task-card__menu {
    opacity: 1;
  }
}

.task-card__menu:hover {
  background: rgb(var(--brand-neutral-rgb) / 0.1);
  color: var(--brand-neutral);
}

.task-card__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.task-card__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  border: none;
  line-height: 1.2;
  white-space: nowrap;
  max-width: 100%;
}

.task-card__pill i {
  font-size: 0.75rem;
  opacity: 0.85;
}

.task-card__pill--related {
  background: #eef1f6;
  color: #44546f;
}

.task-card__pill--deadline {
  padding: 0.15rem 0.35rem;
  border-radius: 0.25rem;
  background: #f1f2f4;
  color: #44546f;
}

.task-card__pill--deadline.is-overdue {
  background: #ffebe6;
  color: #ae2a19;
}

.task-card__pill--ghost {
  color: #94a3b8;
  font-weight: 500;
}

.task-card__pill--priority {
  cursor: pointer;
  color: #fff;
}

.task-card__pill--p-high {
  background: linear-gradient(135deg, #dc3545, #b02a37);
}

.task-card__pill--p-normal {
  background: linear-gradient(135deg, #0d6efd, #0a58ca);
}

.task-card__pill--p-low {
  background: linear-gradient(135deg, #6c757d, #565e64);
}

.task-card__priority {
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 0.25rem;
  color: #fff;
  font-size: 0.68rem;
}

.task-card__context {
  font-size: 0.68rem;
  min-width: 0;
  margin-bottom: 0.3rem;
  color: #5e6c84;
}

.task-card__context > div + div {
  margin-top: 0.15rem;
}

.task-card__ctx-link {
  color: #0d6efd;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  border-radius: 0.25rem;
  transition: color 0.12s ease, background-color 0.12s ease, text-decoration-color 0.12s ease;
}

.task-card__ctx-link:hover {
  color: #084298;
  text-decoration: underline;
  text-underline-offset: 0.12em;
  background: rgba(13, 110, 253, 0.08);
}

.task-card__ctx-link:focus-visible {
  outline: none;
  box-shadow: var(--app-ring);
  background: rgba(13, 110, 253, 0.1);
}

.task-card__ctx-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-card__project-code {
  flex-shrink: 0;
  padding: 0.05rem 0.35rem;
  border-radius: 0.3rem;
  color: #475569;
  background: #f1f5f9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.task-card__ctx-link:hover .task-card__project-code {
  color: #1e293b;
  background: #e2e8f0;
}

.task-card__project-name {
  min-width: 0;
}

.task-card__ctx {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
}

.task-card__desc {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.4rem;
}

.task-card__meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 1rem;
  margin-bottom: 0.3rem;
  color: #5e6c84;
  font-size: 0.68rem;
}

.task-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
}

.task-card__att-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin: 0 0 0.35rem;
}

.task-card__att-thumb,
.task-card__att-file {
  display: block;
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 0.35rem;
  background: #eef2f7;
  color: #64748b;
  text-decoration: none;
}

.task-card__att-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.task-card__att-file {
  display: grid;
  place-items: center;
  font-size: 1rem;
}

.task-card__att-more {
  display: grid;
  place-items: center;
  min-width: 2.35rem;
  height: 2.35rem;
  padding: 0 0.3rem;
  border-radius: 0.35rem;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 600;
}

.personal-task-modal-dialog {
  width: 75vw;
  max-width: 75vw;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 575.98px) {
  .personal-task-modal-dialog {
    width: calc(100% - 1rem);
    max-width: calc(100% - 1rem);
  }
}

.personal-task-md.project-passport__md-editor {
  min-height: 0;
}

.personal-task-md .project-passport__md-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.personal-task-md .project-passport__md-textarea,
.personal-task-md .project-passport__md-preview,
.personal-task-md__preview {
  min-height: 8.5rem;
}

.personal-task-md__preview {
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.375rem;
  background: #fff;
  word-break: break-word;
}

.personal-task-md__preview a {
  word-break: break-all;
}

.personal-task-atts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.personal-task-atts__item {
  position: relative;
  width: 5.5rem;
}

.personal-task-atts__open {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem;
  color: inherit;
  text-decoration: none;
}

.personal-task-atts__open img {
  width: 5.5rem;
  height: 4rem;
  object-fit: cover;
  border-radius: 0.4rem;
  background: #eef2f7;
}

.personal-task-atts__icon {
  display: grid;
  place-items: center;
  width: 5.5rem;
  height: 4rem;
  border-radius: 0.4rem;
  background: #eef2f7;
  font-size: 1.35rem;
  color: #64748b;
}

.personal-task-atts__open span {
  font-size: 0.68rem;
  line-height: 1.2;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-task-atts__remove {
  position: absolute;
  top: 0.15rem;
  right: 0.15rem;
  width: 0.7rem;
  height: 0.7rem;
  padding: 0.45rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
}

.task-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-top: 0.35rem;
  min-width: 0;
}

.task-card__footer-meta {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}

.task-card__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
  flex: 1 1 auto;
  min-height: 0;
}

.task-card__tag {
  font-size: 0.62rem;
  padding: 0.12rem 0.32rem;
  border-radius: 0.25rem;
  background: #dfe1e6;
  color: #172b4d;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  max-width: 100%;
}

.task-card__tag--tone-1 {
  background: #d9eaff;
  color: #0052cc;
}

.task-card__tag--tone-2 {
  background: #e3fcef;
  color: #006644;
}

.task-card__tag--tone-3 {
  background: #fff0b3;
  color: #7a5d00;
}

.task-card__tag--tone-4 {
  background: #ffebe6;
  color: #ae2a19;
}

.task-card__tag--tone-5 {
  background: #eae6ff;
  color: #403294;
}

.task-card__tag .tag-remove {
  font-size: 0.6rem;
  opacity: 0.6;
  cursor: pointer;
}

.task-card__add-tag {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  border: none;
  background: none;
  color: #6b778c;
  padding: 0;
  font-weight: 600;
  opacity: 0;
}

.task-card:hover .task-card__add-tag,
.task-card:focus-within .task-card__add-tag {
  opacity: 1;
}

.task-card__avatars {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  cursor: pointer;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
}

.task-card__avatar {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  font-size: 0.67rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: hsl(var(--avatar-h, 200), 42%, 42%);
  border: 2px solid #fff;
  margin-right: -0.52rem;
  line-height: 1;
  overflow: hidden;
  flex-shrink: 0;
}

.task-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.task-card__avatar--photo {
  padding: 0;
  background: #cbd5e1;
}

.task-card__avatar--more {
  background: #64748b;
  font-size: 0.58rem;
}

.task-card__avatars--empty {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  border: 1px dashed #cbd5e1;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0;
}

.task-card:hover .task-card__avatars--empty,
.task-card:focus-within .task-card__avatars--empty {
  opacity: 1;
}

.dropdown-menu.task-assignee-popover {
  display: flex;
  flex-direction: column;
  max-height: min(430px, calc(100vh - 24px));
  padding: 0;
  overflow: hidden;
  border: 1px solid #dfe1e6;
  border-radius: 0.5rem;
  box-shadow: 0 12px 32px rgb(9 30 66 / 0.24);
}

.task-assignee-popover__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.85rem 0.6rem;
  border-bottom: 1px solid #ebecf0;
}

.task-assignee-popover__title {
  color: #172b4d;
  font-size: 0.9rem;
  font-weight: 700;
}

.task-assignee-popover__count {
  margin-top: 0.08rem;
  color: #6b778c;
  font-size: 0.7rem;
}

.task-assignee-popover__search {
  position: relative;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid #ebecf0;
  background: #fafbfc;
}

.task-assignee-popover__search > i {
  position: absolute;
  top: 50%;
  left: 1.35rem;
  z-index: 1;
  color: #6b778c;
  transform: translateY(-50%);
  pointer-events: none;
}

.task-assignee-popover__search .form-control {
  padding-left: 2rem;
  border-color: #b3bac5;
}

.task-assignee-popover__list {
  flex: 0 1 280px;
  min-height: 0;
  max-height: 280px;
  overflow-y: auto;
  padding: 0.3rem;
}

.task-assignee-popover__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.5rem;
  border-radius: 0.35rem;
  cursor: pointer;
}

.task-assignee-popover__item:hover {
  background: #f1f2f4;
}

.task-assignee-popover__item .task-card__avatar {
  width: 1.8rem;
  height: 1.8rem;
  margin: 0;
  font-size: 0.62rem;
}

.task-assignee-popover__person {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.task-assignee-popover__name {
  overflow: hidden;
  color: #172b4d;
  font-size: 0.78rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-assignee-popover__role {
  overflow: hidden;
  color: #6b778c;
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-assignee-popover__item .form-check-input {
  margin: 0;
}

.task-assignee-popover__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  padding: 0.55rem 0.7rem;
  border-top: 1px solid #ebecf0;
  background: #fafbfc;
}

@media (hover: none) {
  .task-card__avatars--empty {
    opacity: 1;
  }
}

/* Карточка события: участники как на таск-деске */
.event-detail__avatar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.75rem;
}
.task-position-plans {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.task-position-plans__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 7.5rem auto;
  gap: 0.5rem;
  align-items: center;
}
.task-position-plans__remove {
  width: 2rem;
  padding-left: 0;
  padding-right: 0;
}
.task-position-people {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.task-position-people__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.task-position-people__title {
  font-weight: 600;
  font-size: 0.92rem;
}
.task-position-people__add {
  position: relative;
}
.task-position-people__menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.25rem);
  left: 0;
  width: min(18rem, 70vw);
  max-height: 16rem;
  overflow: auto;
  padding: 0.4rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.12);
}
.event-detail__participant-chip {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
}
.event-detail__participant-chip .task-card__avatar {
  margin-right: 0;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
}
.event-detail__participant-chip .task-card__avatar:focus {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}
.event-detail__participant-remove {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  width: 1.1rem;
  height: 1.1rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  font-size: 0.65rem;
  line-height: 1;
  background: var(--bs-danger);
  color: #fff;
  cursor: pointer;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px #fff;
}
.event-detail__participant-remove:hover {
  filter: brightness(1.08);
}
.event-google-sync__table th {
  font-weight: 600;
  color: var(--bs-secondary-color);
}
.event-google-guests {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-height: 1.5rem;
}
.event-google-guest-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--bs-secondary-bg);
  font-size: 0.8125rem;
}
.event-google-guest-chip__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.event-google-guest-chip__remove {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  font-size: 0.65rem;
  line-height: 1;
  background: var(--bs-danger);
  color: #fff;
  cursor: pointer;
}
.ev-participant-search-wrap {
  position: relative;
  z-index: 12;
}

.ev-participant-suggest {
  z-index: 30;
  max-height: 240px;
  overflow-y: auto;
}

.event-hour-staff-picker {
  position: relative;
}
.event-hour-staff-picker__trigger {
  border: 1px solid #ced4da;
  border-radius: 0.5rem;
  padding: 0.45rem 0.75rem;
  min-height: 2.375rem;
  background: #fff;
}
.event-hour-staff-picker__trigger:disabled {
  background: #e9ecef;
}
.event-hour-staff-picker .task-card__avatar {
  margin-right: 0;
  flex-shrink: 0;
  border-width: 0;
}
.event-hour-staff-picker__menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  max-height: 290px;
  overflow: auto;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 0.6rem;
  padding: 0.35rem;
  z-index: 30;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.12);
}
.event-hour-staff-picker__item {
  width: 100%;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.5rem;
  text-align: left;
}
.event-hour-staff-picker__item:hover {
  background: rgba(13, 110, 253, 0.08);
}
.event-hour-staff-picker__item.is-active {
  background: rgba(13, 110, 253, 0.14);
}
.event-hour-staff-picker__item-text,
.event-hour-staff-picker__selected-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.event-hour-staff-picker__name {
  font-weight: 600;
  line-height: 1.1;
}
.event-hour-staff-picker__meta {
  color: #6c757d;
  font-size: 0.78rem;
  line-height: 1.1;
}
.event-hour-staff-picker__selected {
  display: flex;
  align-items: center;
  min-width: 0;
}
.event-hour-staff-picker__empty {
  color: #6c757d;
  font-size: 0.88rem;
  padding: 0.5rem;
}

/* Unified labor cards: project/task/event */
.labor-card__kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}
/* TCUX_05: Hours KPI — списано · план · % + cost */
.labor-card__kpis--hours {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}
.labor-card__kpis--hours .labor-card__kpi {
  padding: 0.4rem 0.5rem;
}
.labor-card__kpi {
  border: 1px solid rgba(13, 110, 253, 0.14);
  border-radius: 0.65rem;
  padding: 0.45rem 0.6rem;
  background: rgba(13, 110, 253, 0.04);
}
.labor-card__kpi-label {
  display: block;
  font-size: 0.68rem;
  line-height: 1.15;
  color: #6c757d;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.labor-card__kpi-value {
  font-size: 1rem;
  line-height: 1.1;
  font-weight: 700;
}
.labor-card__quick {
  margin-bottom: 0.75rem;
}
.labor-card__quick .btn {
  min-width: 3.25rem;
}
.labor-card__history-wrap {
  max-height: 280px;
  overflow: auto;
}
.labor-card__history-note {
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Task Hours pane — compact compose + glance */
.task-hours-desk {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 18rem);
  gap: 1.25rem 1.5rem;
  align-items: start;
}
.task-hours-desk__compose {
  display: grid;
  gap: 1rem;
  min-width: 0;
}
.task-hours-desk__head p {
  max-width: 36rem;
}
.task-hours-desk__glance {
  display: grid;
  gap: 0.85rem;
  padding: 0.85rem;
  border: 1px solid rgba(13, 110, 253, 0.12);
  border-radius: 0.85rem;
  background:
    linear-gradient(180deg, rgba(13, 110, 253, 0.06), rgba(255, 255, 255, 0.92)),
    #fff;
}
.task-hours-desk__feed {
  grid-column: 1 / -1;
  padding-top: 0.25rem;
  border-top: 1px solid rgba(33, 37, 41, 0.08);
}
.task-hours-form {
  display: grid;
  gap: 0.85rem;
}
.task-hours-form__row {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
}
.task-hours-stepper {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) 2.25rem;
  gap: 0.35rem;
  align-items: center;
}
.task-hours-stepper__btn {
  height: 2rem;
  padding: 0;
  line-height: 1;
  font-size: 1.1rem;
  font-weight: 600;
}
.task-hours-stepper__input {
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.task-hours-form__submit .btn {
  min-width: 7.5rem;
  height: 2rem;
  padding-inline: 1rem;
}
.task-hours-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0;
}
.task-hours-quick__label {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6c757d;
  margin-right: 0.15rem;
}
.task-hours-quick__chip {
  min-width: 3.5rem;
  border: 1px solid rgba(13, 110, 253, 0.28);
  background: #fff;
  color: #0d6efd;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.task-hours-quick__chip:hover:not(:disabled) {
  background: #0d6efd;
  color: #fff;
  border-color: #0d6efd;
  transform: translateY(-1px);
}
.task-hours-quick__chip:disabled {
  opacity: 0.45;
}
.task-hours-kpis {
  margin-bottom: 0;
  grid-template-columns: 1fr 1fr;
}
.task-hours-kpis .labor-card__kpi {
  background: rgba(255, 255, 255, 0.72);
}
.task-hours-progress .labor-project-summary__bar {
  height: 0.5rem;
}
.task-hours-progress .labor-project-summary__bar > span.is-warn {
  background: linear-gradient(90deg, #fd7e14, #ffc107);
}
.task-hours-progress .labor-project-summary__bar > span.is-over {
  background: linear-gradient(90deg, #dc3545, #fd7e14);
}
.task-hours-history__empty {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  border: 1px dashed rgba(108, 117, 125, 0.35);
  border-radius: 0.75rem;
  background: rgba(248, 249, 250, 0.8);
  color: #495057;
}
.task-hours-history__empty > i {
  font-size: 1.35rem;
  color: #0d6efd;
  opacity: 0.75;
  margin-top: 0.1rem;
}
.task-hours-history__table tbody tr:hover {
  background: rgba(13, 110, 253, 0.04);
}
.task-hours-history__col-actions {
  width: 1%;
  text-align: right;
}
.task-hours-history__table [data-hour-log-hours] {
  max-width: 5.5rem;
}

/* Event detail sidebar: stack compose → KPI → history */
.task-hours-desk--event {
  grid-template-columns: 1fr;
}
.task-hours-desk--event .task-hours-desk__glance {
  position: static;
  order: 2;
}
.task-hours-desk--event .task-hours-desk__compose {
  order: 1;
}
.task-hours-desk--event .task-hours-desk__feed {
  order: 3;
}
.task-hours-kpis--event {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.task-hours-form__row--event {
  grid-template-columns: 8.5rem minmax(0, 1fr) auto;
}

@media (max-width: 991.98px) {
  .task-hours-desk {
    grid-template-columns: 1fr;
  }
  .task-hours-desk__glance {
    position: static;
  }
  .task-hours-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .task-hours-form__row {
    grid-template-columns: 1fr;
  }
  .task-hours-form__submit .btn {
    width: 100%;
  }
}

@media (max-width: 1199.98px) {
  .task-hours-form__row--event {
    grid-template-columns: 1fr;
  }
  .task-hours-form__row--event .task-hours-form__submit .btn {
    width: 100%;
  }
  .task-hours-kpis--event {
    grid-template-columns: 1fr 1fr;
  }
  .task-hours-kpis--event .labor-card__kpi:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 575.98px) {
  .task-hours-kpis {
    grid-template-columns: 1fr 1fr;
  }
}
.labor-project-summary__kpis {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}
.labor-project-summary__kpis .labor-card__kpi {
  min-width: 0;
}
.labor-project-summary__bar {
  height: 0.4rem;
  border-radius: 999px;
  background: #e9ecef;
  overflow: hidden;
}
.labor-project-summary__bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0d6efd, #20c997);
}

.project-passport__quick-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.project-passport__quick-nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.36rem 0.72rem;
  border-radius: 999px;
  background: rgb(var(--brand-neutral-rgb) / 0.05);
  color: var(--brand-neutral);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.project-passport__quick-nav-links a:hover {
  background: rgb(var(--brand-primary-rgb) / 0.12);
  color: var(--brand-primary-dark);
}

.project-passport__quick-nav-divider {
  width: 1px;
  height: 1.1rem;
  background: rgba(148, 163, 184, 0.35);
  align-self: center;
}

.project-passport__quick-nav-group {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  align-self: center;
  padding: 0 0.15rem;
}

.project-passport__section-group {
  margin-top: 1.5rem;
}

.project-passport__section-group-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94a3b8;
  margin: 0 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.project-passport__section-group .card-title {
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.project-passport__loading {
  padding: 0.75rem 0.25rem;
  font-size: 0.85rem;
  color: #94a3b8;
  animation: project-passport-pulse 1.4s ease-in-out infinite;
}

@keyframes project-passport-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.project-passport__summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.project-passport__summary-grid--unified {
  margin-bottom: 0.15rem;
}

#passportPane-money > .project-passport__finance-summary {
  margin-bottom: 0.15rem;
}

.project-economics__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
}

.project-economics__grid--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-economics__metric {
  padding: 0.85rem 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.82);
}

.project-economics__metric-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.project-economics__metric-value {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--brand-neutral);
}

.project-economics__metric-meta {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 0.35rem;
  line-height: 1.4;
}

.project-economics__metric--delta {
  border-color: rgba(148, 163, 184, 0.28);
}

.project-economics__delta--warn {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.35);
}

.project-economics-plan__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin: -0.25rem -0.25rem 1rem;
  padding: 0.75rem 0.25rem 0.85rem;
  position: sticky;
  top: calc(var(--project-passport-nav-offset) + var(--project-passport-hub-sticky-h));
  z-index: 35;
  background: #fff;
  background-clip: padding-box;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 10px 18px -16px rgba(15, 23, 42, 0.45);
}

#projectPassportEconomicsPlan.is-dirty .project-economics-plan__head {
  border-bottom-color: rgb(var(--brand-primary-rgb) / 0.35);
  box-shadow: 0 12px 22px -14px rgb(var(--brand-primary-rgb) / 0.35);
}

#projectPassportEconomicsPlan.is-dirty #economicsPlanSaveBtn:not(:disabled) {
  box-shadow: 0 0 0 3px rgb(var(--brand-primary-rgb) / 0.16);
}

.project-economics-plan__grant .ts-wrapper,
.project-economics-plan__grant .form-select {
  min-width: 16rem;
  flex: 1 1 16rem;
  max-width: 32rem;
}

.project-economics-plan__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem 1.5rem;
}

.project-economics-plan__meta > #projectRateAsOfWrap,
.project-economics-plan__meta > #economicsPlanTenderTypeWrap {
  flex: 1 1 18rem;
  min-width: 16rem;
  max-width: 32rem;
}

.project-economics-plan__meta .form-select {
  max-width: 16rem;
}

.project-economics-plan__head-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}

.project-economics-plan__head-add {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.project-economics-plan__status:empty {
  display: none;
}

.project-economics-plan__block {
  margin-bottom: 1rem;
}

.project-economics-plan__block:last-of-type {
  margin-bottom: 0.85rem;
}

.project-economics-plan__block-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
}

.project-economics-plan__block-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  min-width: 0;
}

.project-economics-plan__block-label {
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--brand-neutral);
  letter-spacing: -0.01em;
}

.project-economics-plan__block-sub {
  font-size: 0.78rem;
  color: #64748b;
}

.project-economics-plan__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--brand-primary-ink);
  background: var(--brand-primary-soft-bg);
  border: 1px solid rgb(var(--brand-primary-rgb) / 0.14);
}

.project-economics-plan__count[hidden] {
  display: none !important;
}

.project-economics-plan__shell {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.85rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92));
  overflow: hidden;
}

.project-economics-plan__table {
  --pep-row-pad-y: 0.55rem;
  --pep-row-pad-x: 0.75rem;
  margin-bottom: 0;
}

.project-economics-plan__table > :not(caption) > * > * {
  padding: var(--pep-row-pad-y) var(--pep-row-pad-x);
  border-bottom-color: rgba(148, 163, 184, 0.16);
}

.project-economics-plan__table thead th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.045em;
  color: #64748b;
  font-weight: 650;
  white-space: nowrap;
  background: rgba(248, 250, 252, 0.95);
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  vertical-align: middle;
}

.project-economics-plan__table tbody tr:last-child > * {
  border-bottom: 0;
}

.project-economics-plan__table tbody tr[data-plan-labor-index]:hover,
.project-economics-plan__table tbody tr[data-plan-contractor-index]:hover {
  background: rgba(34, 84, 225, 0.035);
}

.project-economics-plan__col-main {
  min-width: 14rem;
  width: 42%;
}

.project-economics-plan__col-work {
  min-width: 11rem;
}

.project-economics-plan__col-num {
  width: 7.25rem;
  min-width: 6.5rem;
}

.project-economics-plan__col-sum {
  width: 8.5rem;
  min-width: 7.5rem;
}

.project-economics-plan__col-actions {
  width: 2.75rem;
  min-width: 2.75rem;
  padding-left: 0.25rem !important;
  padding-right: 0.55rem !important;
}

.project-economics-plan__table--ledger .project-economics-plan__col-main {
  width: 34%;
  min-width: 12.5rem;
}

.project-economics-plan__col-pair {
  width: 16.5rem;
  min-width: 15.5rem;
}

.project-economics-plan__col-delta {
  width: 7.25rem;
  min-width: 6.5rem;
}

.project-economics-plan__row--parent > * {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: rgba(148, 163, 184, 0.16) !important;
  vertical-align: top;
  padding-top: 0.7rem !important;
  padding-bottom: 0.65rem !important;
}

.project-economics-plan__row--child > * {
  background: linear-gradient(90deg, rgba(241, 245, 249, 0.95) 0%, rgba(248, 250, 252, 0.6) 100%);
  border-bottom-color: rgba(148, 163, 184, 0.08) !important;
  font-size: 0.84rem;
  padding-top: 0.38rem !important;
  padding-bottom: 0.38rem !important;
}

.project-economics-plan__row--child td:first-child {
  padding-left: 1.65rem !important;
}

.project-economics-plan__row--hint > * {
  background: transparent;
  border-bottom-color: rgba(148, 163, 184, 0.1) !important;
  padding-top: 0.2rem !important;
  padding-bottom: 0.55rem !important;
}

.project-economics-plan__hint {
  display: inline-block;
  padding-left: 1.65rem;
  font-size: 0.78rem;
  color: #94a3b8;
}

.project-economics-plan__row--offplan > * {
  background: rgba(255, 247, 237, 0.55);
}

.project-economics-plan__offplan-hint {
  font-size: 0.75rem;
  color: #9a3412;
  margin-top: 0.15rem;
}

.project-economics-plan__row-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.project-economics-plan__cta {
  font-size: 0.72rem;
  padding: 0.1rem 0.45rem;
  line-height: 1.3;
}

.project-economics-plan__main-cell {
  display: flex;
  align-items: flex-start;
  gap: 0.3rem;
}

.project-economics-plan__main-cell-body {
  flex: 1 1 auto;
  min-width: 0;
}

.project-economics-plan__drag {
  flex: 0 0 auto;
  margin-top: 0.15rem;
  padding: 0.15rem 0.1rem;
  border: 0;
  background: transparent;
  color: #94a3b8;
  cursor: grab;
  line-height: 1;
  touch-action: none;
  user-select: none;
}

.project-economics-plan__drag:hover {
  color: #64748b;
}

.project-economics-plan__drag:active {
  cursor: grabbing;
}

.project-economics-plan__row--parent.is-dragging {
  opacity: 0.42;
}

.project-economics-plan__row--parent.is-drop-before > * {
  box-shadow: inset 0 2px 0 0 rgb(var(--brand-primary-rgb) / 0.85);
}

.project-economics-plan__row--parent.is-drop-after > * {
  box-shadow: inset 0 -2px 0 0 rgb(var(--brand-primary-rgb) / 0.85);
}

.project-economics-plan__pair {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.08rem;
}

.project-economics-plan__pair-hours {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--brand-neutral);
}

.project-economics-plan__pair-money {
  font-size: 0.78rem;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.project-economics-plan__delta {
  font-size: 0.82rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: #64748b;
}

.project-economics-plan__delta.is-over {
  color: #b45309;
}

.project-economics-plan__delta.is-under {
  color: #0f766e;
}

.project-economics-plan__track {
  height: 3px;
  margin-top: 0.4rem;
  border-radius: 99px;
  background: #e2e8f0;
  overflow: hidden;
}

.project-economics-plan__track-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand-primary, #2254e1);
}

.project-economics-plan__track-fill.is-over {
  background: #d97706;
}

.project-economics-plan__person {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.project-economics-plan__person-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-economics-plan__avatar {
  flex: 0 0 1.4rem;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #334155;
  background: #e2e8f0;
  overflow: hidden;
}

.project-economics-plan__expense-dot {
  flex: 0 0 0.45rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 99px;
  background: #94a3b8;
}

.project-economics-plan__status-pill {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 0.08rem 0.4rem;
}

.project-economics-plan__edit-plan {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.2rem 0.45rem;
}

.project-economics-plan__edit-plan > .project-economics-plan__pair-money {
  flex: 1 0 100%;
}

.project-economics-plan__edit-plan-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.project-economics-plan__edit-plan-row .form-control {
  width: 5.5rem;
}

.project-economics-plan__edit-suffix {
  font-size: 0.72rem;
  color: #94a3b8;
  min-width: 1.6rem;
}

.project-economics-plan__total-chip .project-economics-plan__total-value {
  font-size: 0.88rem;
}

.project-economics-plan__table .form-select,
.project-economics-plan__table .form-control {
  font-size: 0.875rem;
  border-radius: 0.55rem;
  border-color: rgba(148, 163, 184, 0.35);
  background-clip: padding-box;
}

.project-economics-plan__table .ts-wrapper {
  width: 100%;
}

.project-economics-plan__table .ts-wrapper.form-select,
.project-economics-plan__table .ts-wrapper.single .ts-control {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.project-economics-plan__table .ts-control {
  min-height: 2rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.875rem;
  line-height: 1.35;
  border-radius: 0.55rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
  box-shadow: none;
}

.project-economics-plan__table .ts-wrapper.focus .ts-control {
  border-color: rgb(var(--brand-primary-rgb) / 0.55);
  box-shadow: 0 0 0 0.2rem rgb(var(--brand-primary-rgb) / 0.12);
}

.project-economics-plan__table .ts-control input {
  font-size: 0.875rem !important;
}

.project-economics-plan__option {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
}

.project-economics-plan__option-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-economics-plan__option-meta {
  flex: 0 0 auto;
  font-size: 0.78rem;
  color: #64748b;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.project-economics-plan__option--create {
  color: var(--brand-primary-ink);
  font-weight: 600;
}

.project-economics-plan__option--empty {
  color: #94a3b8;
}

body > .ts-dropdown .project-economics-plan__option {
  padding: 0.05rem 0;
}

.project-economics-plan__table .form-select:focus,
.project-economics-plan__table .form-control:focus {
  border-color: rgb(var(--brand-primary-rgb) / 0.55);
  box-shadow: 0 0 0 0.2rem rgb(var(--brand-primary-rgb) / 0.12);
}

.project-economics-plan__table .form-control.text-end,
.project-economics-plan__num-input {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
}

.project-economics-plan__num-input.is-readonly {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: calc(1.5em + 0.5rem + 2px);
  padding: 0.25rem 0.5rem;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  pointer-events: none;
  user-select: none;
}

.project-economics-plan__sum {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  color: var(--brand-neutral);
  white-space: nowrap;
}

.project-economics-plan__readonly-title {
  font-weight: 550;
  color: var(--brand-neutral);
  line-height: 1.35;
}

.project-economics-plan__readonly-meta {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.15rem;
}

.project-economics-plan__create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.project-economics-plan__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: 0;
  border-radius: 0.5rem;
  color: #94a3b8;
  background: transparent;
  transition: color 0.15s ease, background 0.15s ease;
}

.project-economics-plan__remove:hover,
.project-economics-plan__remove:focus-visible {
  color: #b91c1c;
  background: rgba(185, 28, 28, 0.08);
}

.project-economics-plan__empty,
.project-economics-plan__loading td,
.project-economics-plan__error td {
  text-align: center;
  vertical-align: middle;
}

.project-economics-plan__empty-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1.15rem 1rem;
  color: #64748b;
}

.project-economics-plan__empty-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #475569;
}

.project-economics-plan__empty-hint {
  font-size: 0.8rem;
  max-width: 28rem;
  line-height: 1.4;
}

.project-economics-plan__loading td,
.project-economics-plan__error td {
  padding: 1.15rem 1rem !important;
  font-size: 0.85rem;
  color: #64748b;
}

.project-economics-plan__error td {
  color: #b91c1c;
}

.project-economics-plan__totals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.project-economics-plan__total-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  padding: 0.45rem 0.7rem;
  border-radius: 0.7rem;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.22);
  min-width: 7.5rem;
}

.project-economics-plan__total-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  font-weight: 650;
}

.project-economics-plan__total-value {
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--brand-neutral);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 767.98px) {
  .project-economics-plan__col-num,
  .project-economics-plan__col-sum {
    width: 6.25rem;
    min-width: 5.75rem;
  }

  .project-economics-plan__table > :not(caption) > * > * {
    padding: 0.5rem 0.55rem;
  }

  .project-economics-plan__create {
    grid-template-columns: 1fr;
  }
}

.tender-passport__fact-economics .project-economics__metric {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

@media (max-width: 991.98px) {
  .project-economics__grid,
  .project-economics__grid--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .project-economics__grid,
  .project-economics__grid--compact {
    grid-template-columns: 1fr;
  }
}

.project-passport__finance-panel {
  display: grid;
  gap: 0.85rem;
}

.project-passport__section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.project-passport__section-head h5 {
  margin-bottom: 0.15rem;
}

.project-passport__section-caption {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.45;
}

.project-passport__finance-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-passport__finance-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgb(var(--brand-neutral-rgb) / 0.05);
  color: #334155;
}

.project-passport__finance-chip strong {
  color: var(--brand-neutral);
}

.project-passport__finance-chip--warn {
  background: rgba(245, 158, 11, 0.14);
}

.project-passport__finance-chip--ok {
  background: rgba(34, 197, 94, 0.12);
}

.project-passport__finance-list {
  display: grid;
  gap: 0.65rem;
}

.project-passport__finance-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.82);
}

.project-passport__finance-main {
  min-width: 0;
  display: grid;
  gap: 0.35rem;
}

.project-passport__finance-amount {
  font-weight: 800;
  color: var(--brand-neutral);
}

.project-passport__finance-meta {
  color: #64748b;
  line-height: 1.45;
}

.project-passport__finance-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.project-passport__invoice-table {
  font-size: 0.875rem;
}

.project-passport__invoice-table th {
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
}

.project-passport__invoice-file a {
  display: inline-block;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.project-passport__finance-links a {
  color: var(--brand-primary-dark);
}

.project-passport__summary-card {
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgb(var(--brand-neutral-rgb) / 0.05);
}

.project-passport__summary-card--incoming {
  border-color: rgba(22, 163, 74, 0.22);
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.94), rgba(255, 255, 255, 0.86));
}

.project-passport__summary-card--outgoing {
  border-color: rgba(244, 63, 94, 0.2);
  background: linear-gradient(180deg, rgba(255, 241, 242, 0.94), rgba(255, 255, 255, 0.86));
}

.project-passport__summary-card--balance {
  border-color: rgb(var(--brand-primary-rgb) / 0.2);
  background: linear-gradient(180deg, rgba(240, 253, 250, 0.94), rgba(255, 255, 255, 0.86));
}

.project-passport__summary-value--positive {
  color: #15803d;
}

.project-passport__summary-value--negative {
  color: #be123c;
}

.project-passport__control-stack {
  display: grid;
  gap: 0.55rem;
}

.project-passport__inline-help {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.45;
}

.project-passport__summary-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.project-passport__summary-value {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--brand-neutral);
}

.project-passport__summary-meta {
  margin-top: 0.35rem;
  font-size: 0.84rem;
  color: #64748b;
}

.project-passport__state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  background: rgba(248, 250, 252, 0.72);
}

.project-passport__state-icon {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgb(var(--brand-primary-rgb) / 0.12);
  color: var(--brand-primary-dark);
  font-size: 1rem;
}

.project-passport__state-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--brand-neutral);
}

.project-passport__state-text {
  font-size: 0.9rem;
  line-height: 1.45;
  color: #64748b;
}

.project-passport__list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.project-passport__list-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.8rem 0.9rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  color: inherit;
}

.project-passport__list-item:hover {
  border-color: rgb(var(--brand-primary-rgb) / 0.24);
  box-shadow: 0 6px 18px rgb(var(--brand-neutral-rgb) / 0.06);
}

.project-passport__list-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  margin-top: 0.38rem;
  flex: 0 0 auto;
}

.project-passport__list-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.project-passport__list-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-neutral);
}

.project-passport__list-meta {
  font-size: 0.84rem;
  color: #64748b;
  line-height: 1.4;
}

.project-passport__list-item--row {
  align-items: center;
  justify-content: space-between;
}

.project-passport__contact-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.45rem 1rem;
  margin-top: 0.55rem;
}

.project-passport__contact-details > div {
  min-width: 0;
}

.project-passport__contact-details dt {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #94a3b8;
}

.project-passport__contact-details dd {
  margin: 0.1rem 0 0;
  font-size: 0.9rem;
  color: var(--brand-neutral);
  word-break: break-word;
}

.project-passport__contact-value {
  color: inherit;
  text-decoration: none;
}

.project-passport__contact-value:hover,
.project-passport__contact-value:focus-visible {
  color: var(--brand-primary-dark);
  text-decoration: underline;
}

.project-passport__contact-empty {
  color: #94a3b8;
}

/* Задачи проекта: поиск / фильтры / cards|table */
.project-tasks-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.75rem;
  margin-bottom: 0.9rem;
  padding: 0.7rem 0.8rem;
  border-radius: var(--app-radius-lg, 0.9rem);
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(248, 250, 252, 0.85);
}

.project-tasks-toolbar__search {
  position: relative;
  flex: 1 1 14rem;
  min-width: 12rem;
}

.project-tasks-toolbar__search > i {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.85rem;
  pointer-events: none;
}

.project-tasks-toolbar__search .form-control {
  padding-left: 2rem;
}

.project-tasks-toolbar__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.project-tasks-chip {
  margin: 0;
  padding: 0.28rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgb(var(--brand-neutral-rgb) / 0.05);
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.project-tasks-chip:hover {
  background: rgb(var(--brand-primary-rgb) / 0.1);
  color: var(--brand-primary-dark, #1d4ed8);
}

.project-tasks-chip.active {
  background: rgb(var(--brand-primary-rgb) / 0.14);
  border-color: rgb(var(--brand-primary-rgb) / 0.28);
  color: var(--brand-primary-dark, #1d4ed8);
}

.project-tasks-toolbar__aside {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}

.project-tasks-toolbar__aside .form-select {
  width: auto;
  min-width: 8.5rem;
}

.project-tasks-desk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.65rem;
  align-items: start;
}

.project-tasks-desk-grid .task-card {
  margin-bottom: 0;
}

.project-tasks-desk-grid .task-card__check {
  pointer-events: none;
}

.project-tasks-desk-grid .task-card__priority {
  pointer-events: none;
}

.project-tasks-desk-grid .task-card.is-overdue {
  border-color: rgba(220, 53, 69, 0.35);
}

.project-tasks-desk-grid .task-card__avatars {
  pointer-events: none;
}

.project-tasks-card {
  position: relative;
  padding-right: 1.6rem;
}

.project-tasks-card.is-overdue {
  border-color: rgba(220, 53, 69, 0.28);
  background: rgba(254, 242, 242, 0.55);
}

.project-tasks-card.is-past {
  opacity: 0.88;
}

.project-tasks-card__chevron {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.85rem;
}

.project-tasks-table-wrap {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--app-radius-lg, 0.9rem);
  overflow: hidden;
  background: #fff;
}

.project-tasks-table {
  margin: 0;
}

.project-tasks-table thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  background: rgba(248, 250, 252, 0.95);
  white-space: nowrap;
  border-bottom-width: 1px;
}

.project-tasks-table__title {
  font-weight: 650;
  text-decoration: none;
  color: var(--brand-neutral);
}

.project-tasks-table__title:hover {
  text-decoration: underline;
  color: var(--brand-primary-dark, #1d4ed8);
}

.project-tasks-count {
  min-height: 1.2rem;
}

@media (max-width: 767.98px) {
  .project-tasks-toolbar__aside {
    margin-left: 0;
    width: 100%;
  }
}

.project-passport__workflow-summary {
  cursor: pointer;
  list-style: none;
}

.project-passport__workflow-summary::-webkit-details-marker {
  display: none;
}

.project-passport__workflow-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #334155;
}

.project-passport__workflow-grid {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 768px) {
  .project-passport__workflow-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.project-passport__workflow-step {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.45;
}

.project-passport__workflow-num {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgb(var(--brand-primary-rgb) / 0.12);
  color: var(--brand-primary-dark);
  font-size: 0.78rem;
  font-weight: 700;
}

.project-passport__team-panel {
  padding: 0.85rem 1rem;
  border-radius: var(--app-radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(248, 250, 252, 0.65);
}

.project-passport__team-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.project-passport__team-panel-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
}

@media (max-width: 575px) {
  .labor-card__kpis,
  .labor-card__kpis--hours {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .labor-project-summary__kpis {
    gap: 0.4rem;
  }
  .labor-project-summary__kpis .labor-card__kpi {
    padding: 0.35rem 0.45rem;
  }
  .labor-project-summary__kpis .labor-card__kpi-label {
    font-size: 0.62rem;
  }
  .labor-project-summary__kpis .labor-card__kpi-value {
    font-size: 0.9rem;
  }
  .task-space-builder__row,
  .project-passport__finance-item,
  .project-passport__section-head {
    grid-template-columns: 1fr;
    display: grid;
  }
  .task-space-builder__fields {
    grid-template-columns: 1fr;
  }
  .task-space-builder__actions {
    justify-content: flex-start;
  }
  .labor-card__history-note {
    max-width: 140px;
  }
  .project-passport__summary-grid {
    grid-template-columns: 1fr;
  }
}

/* Tom Select в других модалках паспорта (контакты) */
.modal .ts-dropdown {
  z-index: 2005 !important;
}

/* Поиск в модалке назначений (паспорт проекта) */
#assignModal .assign-modal-suggest {
  z-index: 2005;
  max-height: min(280px, 45vh);
  overflow: auto;
}

#assignModal .ev-participant-search-wrap {
  position: relative;
}

.assign-modal-pick:empty {
  display: none;
}

.modal .ts-dropdown-content {
  max-height: min(280px, 45vh);
}

/* Loading states */
.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Focus states for accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .calendar-event {
    border: 2px solid currentColor;
  }
  
  .btn {
    border-width: 2px;
  }
}

/* Drag & Drop улучшения */
.drag-date-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, var(--primary-color), #0056b3);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  animation: fadeInScale 0.2s ease;
  pointer-events: none;
}

.drag-tooltip {
  position: fixed;
  z-index: 10000;
  pointer-events: none;
  animation: fadeInScale 0.2s ease;
}

.drag-tooltip-content {
  background: linear-gradient(135deg, #2c3e50, #34495e);
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  min-width: 200px;
  max-width: 300px;
}

.drag-tooltip-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drag-tooltip-hint {
  font-size: 0.8rem;
  opacity: 0.9;
  color: #ecf0f1;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Улучшенная подсветка при drag-over */
.calendar-day.drag-over::before,
.calendar-day-column.drag-over::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.1), rgba(13, 110, 253, 0.05));
  border-radius: 4px;
  z-index: 1;
  pointer-events: none;
}

.calendar-day.drag-over .day-number,
.calendar-day-column.drag-over .day-number {
  color: var(--primary-color);
  font-weight: 700;
  position: relative;
  z-index: 2;
}

/* Анимация пульсации для целевой даты */
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 15px rgba(13, 110, 253, 0.3);
  }
  50% {
    box-shadow: 0 0 25px rgba(13, 110, 253, 0.5);
  }
}

.calendar-day.drag-over,
.calendar-day-column.drag-over {
  animation: pulse 2s ease-in-out infinite;
}

/* Страница «Загрузка»: не выталкивать layout по ширине из-за широкого Гантта */
section.workload-page.app-page {
  max-width: 100%;
  overflow-x: clip;
}

/* --- Загрузка (/workload): шапка — идентичность / период / область видимости --- */
.workload-page__header.app-page__header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  padding: 0.15rem 0 0.85rem;
  padding-left: max(0px, env(safe-area-inset-left, 0px));
  padding-right: max(0px, env(safe-area-inset-right, 0px));
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

.workload-page__header-identity {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
}

.workload-page__title-block {
  flex: 1 1 16rem;
  min-width: 0;
}

.workload-page__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
}

.workload-page__default-pref {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgb(var(--brand-neutral-rgb) / 0.06);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
}

.workload-page__default-pref .form-check-input {
  margin: 0;
  float: none;
  width: 0.9rem;
  height: 0.9rem;
  cursor: pointer;
}

.workload-page__default-pref:hover {
  color: #334155;
  border-color: rgba(100, 116, 139, 0.45);
}

.workload-page__header-scope {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.55rem 0.75rem;
  flex: 0 1 auto;
  min-width: 0;
}

.workload-page__filter-label {
  display: block;
  margin: 0 0 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  line-height: 1;
}

.workload-page__hour-axis {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem;
  min-width: 0;
}

.workload-page__hour-axis-switch {
  flex-wrap: nowrap;
}

.workload-page__hour-axis-switch .btn {
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}

.workload-page__hour-axis-switch .btn.active {
  color: #fff;
  background: var(--brand-primary, #2563eb);
  border-color: var(--brand-primary, #2563eb);
}

.workload-page__events-switch {
  flex: 0 0 auto;
  padding-bottom: 0.15rem;
  white-space: nowrap;
}

.workload-page__events-switch .form-check-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
}

.workload-page__user-filter-wrap,
.workload-page__department-filter-wrap {
  flex: 0 1 13.5rem;
  min-width: 10.5rem;
  max-width: 16rem;
  position: relative;
  z-index: 2;
}

.workload-page__header-scope .task-filter-combobox {
  width: 100%;
}

.workload-page__header-scope .task-filter-combobox.is-open {
  z-index: 40;
}

.workload-page__header-scope .task-filter-combobox__control .form-control {
  text-overflow: ellipsis;
}

.workload-page__header-scope .task-filter-combobox__menu {
  left: auto;
  right: 0;
  width: max(100%, 18.5rem);
  max-width: min(24rem, 72vw);
}

.workload-page__header-scope .task-filter-combobox__option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workload-page__user-filter {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.workload-page__user-filter-wrap.d-flex,
.workload-page__department-filter-wrap.d-flex {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
}

.workload-page__period-shell {
  border-radius: 0.75rem;
  background: rgb(var(--brand-neutral-rgb) / 0.045);
  border: 1px solid rgba(148, 163, 184, 0.22);
  overflow: hidden;
}

.workload-page__period-shell-collapse:not(.show) {
  display: none;
}

.workload-page__header-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  padding: 0.4rem 0.65rem;
  min-height: 0;
}

.workload-page__period-shell > .workload-page__header-toolbar {
  background: transparent;
  border: 0;
  border-radius: 0;
}

.workload-page__period-shell-body {
  padding: 0.55rem 0.7rem 0.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.55);
}

.workload-page__view-switch {
  flex: 0 1 auto;
  flex-wrap: nowrap;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 0.55rem;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: none;
}

.workload-page__view-switch .btn {
  flex: 0 0 auto;
  border: 0;
  border-radius: 0;
  margin: 0;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  box-shadow: none !important;
}

.workload-page__view-switch .btn + .btn {
  border-left: 1px solid rgba(148, 163, 184, 0.28);
}

.workload-page__view-switch .btn:hover {
  color: #0f172a;
  background: rgb(var(--brand-primary-rgb) / 0.06);
}

.workload-page__view-switch .btn.active,
.workload-page__view-switch .btn[aria-pressed="true"] {
  color: #fff;
  background: var(--brand-primary, #2563eb);
}

.workload-page__header-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 0;
  flex: 1 1 auto;
}

.workload-page__nav-icon {
  padding: 0.3rem 0.55rem;
  line-height: 1;
}

.workload-page__period-title {
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
  max-width: 16rem;
  padding: 0 0.25rem;
  font-size: clamp(0.9rem, 0.84rem + 0.3vw, 1.1rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #0f172a;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workload-page__header-summary {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem 0.55rem;
  min-width: 0;
  flex: 0 0 auto;
}

.workload-page--view-others .workload-queue-list .task-card {
  cursor: default;
}

@media (max-width: 991.98px) {
  .workload-page__header-identity {
    align-items: stretch;
  }

  .workload-page__header-scope {
    justify-content: flex-start;
    width: 100%;
  }

  .workload-page__user-filter-wrap,
  .workload-page__department-filter-wrap {
    flex: 1 1 10rem;
    max-width: none;
  }

  .workload-page__header-toolbar {
    flex-wrap: wrap;
    align-items: stretch;
  }

  .workload-page__header-summary {
    justify-content: flex-start;
    flex: 1 1 auto;
  }

  .workload-page__view-switch {
    width: 100%;
  }

  .workload-page__view-switch .btn {
    flex: 1 1 0;
    text-align: center;
    min-width: 0;
  }

  .workload-page__header-nav {
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
  }

  .workload-page__period-title {
    max-width: none;
  }
}

/* --- Загрузка (/workload): очередь как колонка таск-деска + плановые блоки --- */
.workload-page__queue-panel {
  flex: 0 0 22rem;
  width: 22rem;
  min-width: 20rem;
  max-width: 28rem;
}

.workload-queue-search__wrap {
  position: relative;
}

.workload-queue-search__icon {
  position: absolute;
  left: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  color: #94a3b8;
  pointer-events: none;
}

.workload-queue-search__input {
  padding-left: 1.85rem;
  border-radius: 0.5rem;
  border-color: rgba(148, 163, 184, 0.35);
  background: #fff;
}

.workload-queue-search__input:focus {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 0.15rem rgba(37, 99, 235, 0.12);
}

.workload-queue-hint {
  font-size: 0.72rem;
  line-height: 1.3;
}

.workload-queue-list {
  max-height: min(70vh, 42rem);
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.35rem 0.4rem 1.25rem;
}

/* Не клипать низ карточек с планом/исполнителями */
.workload-queue-list .workload-queue-space.task-desk__load-col-group,
.workload-queue-list .workload-queue-board.task-desk__load-col-group,
.workload-queue-list .workload-queue-column.task-desk__load-col-group {
  overflow: visible;
}

.workload-queue-space__boards {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0 0.4rem 0.45rem;
}

.workload-queue-board {
  background: #fff;
}

.workload-queue-board__summary {
  font-size: 0.76rem;
  padding: 0.45rem 0.55rem;
}

.workload-queue-board__cards {
  padding: 0 0.4rem 0.4rem;
}

.workload-queue-board__columns {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0 0.35rem 0.45rem 0.7rem;
}

.workload-queue-column {
  background: #f8fafc;
  border-color: rgba(148, 163, 184, 0.28);
}

.workload-queue-column__summary {
  font-size: 0.72rem;
  font-weight: 650;
  padding: 0.35rem 0.5rem;
  color: #334155;
}

.workload-queue-column__cards {
  padding: 0 0.35rem 0.4rem;
}

.workload-queue-list .task-card,
.task-desk__load-cards-list .task-card.wl-load-card {
  cursor: grab;
  margin-bottom: 0.45rem;
}

.workload-queue-list .task-card:last-child,
.task-desk__load-cards-list .task-card.wl-load-card:last-child {
  margin-bottom: 0;
}

.workload-queue-list .task-card:active,
.task-desk__load-cards-list .task-card.wl-load-card:active {
  cursor: grabbing;
}

.workload-queue-list .task-card.dragging,
.task-desk__load-cards-list .task-card.wl-load-card.dragging,
.task-desk__load-cards-list .task-card.wl-load-card.is-dragging {
  cursor: grabbing;
}

.workload-page.is-hl-task .wl-load-card.is-hl-source,
.task-desk__panel--load-view.is-hl-task .wl-load-card.is-hl-source,
.app-page.task-desk.is-hl-task .wl-load-card.is-hl-source,
.is-hl-task .wl-load-card.is-hl-source {
  outline: 2px solid color-mix(in srgb, var(--wl-task-color, #2563eb) 72%, #2563eb);
  outline-offset: 1px;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--wl-task-color, #2563eb) 22%, transparent);
}

.wl-load-card.wl-load-card--task-tint {
  border-left: 4px solid var(--wl-task-color, var(--brand-primary));
  border-top-color: var(--wl-task-color, var(--brand-primary));
}

/* --- Единый паттерн карточки загрузки (Загрузка + таск-деск) --- */
.wl-load-card .task-card__inner {
  padding: 0.55rem 0.6rem 0.6rem;
}

.wl-load-card__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.35rem 0.45rem;
  margin: 0 0 0.3rem;
}

.wl-load-card__title {
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.3;
  color: #0f172a;
  margin: 0;
  min-width: 0;
  flex: 1 1 8rem;
  word-break: break-word;
}

.wl-load-card__code-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin-top: 0.1rem;
  padding: 0.1rem 0.4rem;
  border-radius: 0.35rem;
  background: #e2e8f0;
  color: #334155;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

.wl-load-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.45rem;
  margin-bottom: 0.45rem;
  font-size: 0.68rem;
  line-height: 1.2;
  color: #64748b;
}

.wl-load-card__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  max-width: 100%;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 600;
  white-space: nowrap;
}

.wl-load-card__chip--pri-high {
  background: #fee2e2;
  color: #b91c1c;
}

.wl-load-card__chip--pri-normal {
  background: #dbeafe;
  color: #1d4ed8;
}

.wl-load-card__chip--pri-low {
  background: #e2e8f0;
  color: #475569;
}

.wl-load-card__chip--deadline {
  background: transparent;
  padding-left: 0;
  color: #64748b;
  font-weight: 500;
}

.wl-load-card__ctx {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin: -0.1rem 0 0.4rem;
  font-size: 0.68rem;
  color: #64748b;
}

.wl-load-card__ctx a {
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wl-load-card__ctx a:hover {
  color: #1d4ed8;
}

.wl-load-card__progress {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.35rem 0.55rem;
  margin-bottom: 0.4rem;
}

.wl-load-card__progress-track {
  grid-column: 1 / -1;
  height: 0.35rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.wl-load-card__progress-fill {
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
  transition: width 0.2s ease;
}

.wl-load-card__progress--done .wl-load-card__progress-fill {
  background: #16a34a;
}

.wl-load-card__progress--partial .wl-load-card__progress-fill {
  background: #d97706;
}

.wl-load-card__progress--over .wl-load-card__progress-fill {
  background: #dc2626;
}

.wl-load-card__progress--empty .wl-load-card__progress-fill {
  background: #94a3b8;
  width: 0 !important;
}

.wl-load-card__progress-label {
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}

.wl-load-card__progress-hint {
  font-size: 0.66rem;
  font-weight: 500;
  color: #64748b;
}

.wl-load-card__progress--done .wl-load-card__progress-hint {
  color: #15803d;
}

.wl-load-card__progress--partial .wl-load-card__progress-hint {
  color: #b45309;
}

.wl-load-card__progress--over .wl-load-card__progress-hint {
  color: #b91c1c;
}

.wl-load-card__people {
  list-style: none;
  margin: 0;
  padding: 0.3rem 0 0;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.wl-load-card__person {
  display: grid;
  grid-template-columns: 1.35rem minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.4rem;
  min-height: 1.35rem;
}

.wl-load-card__avatar {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #1e3a8a;
  background: #dbeafe;
  overflow: hidden;
}

.wl-load-card__person-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 600;
  color: #334155;
}

.wl-load-card__person-hours {
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  white-space: nowrap;
}

.wl-load-card__person-status {
  width: 1rem;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1;
}

.wl-load-card__person--done .wl-load-card__person-status {
  color: #16a34a;
}

.wl-load-card__person--remain .wl-load-card__person-status {
  color: #d97706;
}

.wl-load-card__person--idle .wl-load-card__person-status {
  color: #94a3b8;
}

.wl-load-card__person--over .wl-load-card__person-hours,
.wl-load-card__person--over .wl-load-card__person-status {
  color: #b91c1c;
}

.workload-queue-list .wl-load-card--locked,
.task-desk__load-cards-list .wl-load-card--locked {
  cursor: default;
  background: #f8fafc;
}

.workload-queue-list .wl-load-card--locked:active,
.task-desk__load-cards-list .wl-load-card--locked:active {
  cursor: default;
  opacity: 1;
}

.wl-load-card__chip--locked {
  color: #475569;
  background: #e2e8f0;
}

.workload-gantt__bar--locked {
  cursor: default;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.18);
}

.wl-load-card__people--empty {
  font-size: 0.7rem;
  color: #94a3b8;
  padding-top: 0.35rem;
}

.workload-planned-block.workload-block-event {
  border-left: 4px solid var(--brand-primary-dark);
  z-index: 3;
  background: linear-gradient(135deg, rgb(var(--brand-primary-rgb) / 0.92) 0%, rgb(var(--brand-primary-rgb) / 0.88) 100%) !important;
  color: #f8fafc !important;
}

.workload-planned-block.workload-block-event .event-title {
  font-weight: 600;
}

.workload-planned-block--month .workload-chip {
  border-left: 3px solid var(--brand-primary-dark);
}

@media (max-width: 991.98px) {
  .workload-page__queue-col {
    order: 2;
  }
  .workload-page__calendar-col {
    order: 1;
  }

  .workload-page__queue-panel {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}

/* Календарь/Гантт «Загрузка»: не расширять страницу по горизонтали — скролл внутри блока */
.workload-page__calendar-col .card {
  max-width: 100%;
  overflow: hidden;
}

.workload-page__calendar-col .card-body {
  min-width: 0;
}

#workloadCalendarContainer {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

/* События календаря на «Загрузка»: без кнопок/↗, компактная типографика */
#workloadCalendarContainer .calendar-event:not(.workload-block-event) {
  font-size: 0.68rem;
  padding: 3px 5px;
  min-height: 28px;
}

#workloadCalendarContainer .calendar-event:not(.workload-block-event) .event-content--workload {
  height: 100%;
  justify-content: flex-start;
  gap: 2px;
}

#workloadCalendarContainer .calendar-event:not(.workload-block-event) .event-time-row {
  line-height: 1.2;
  margin-bottom: 1px;
}

#workloadCalendarContainer .calendar-event:not(.workload-block-event) .event-time-row .event-time {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 3px;
  margin-right: 4px;
  vertical-align: middle;
}

#workloadCalendarContainer .calendar-event:not(.workload-block-event) .event-title--workload {
  font-size: 0.68rem;
  font-weight: 600;
  vertical-align: middle;
}

#workloadCalendarContainer .calendar-event:not(.workload-block-event) .event-meta {
  font-size: 0.58rem;
  opacity: 0.92;
  font-weight: 500;
  line-height: 1.15;
  margin-top: 1px;
}

#workloadCalendarContainer .calendar-event:not(.workload-block-event) .event-meta .badge {
  font-size: 0.55rem;
  padding: 0.08em 0.3em;
  font-weight: 500;
}

#workloadCalendarContainer .reminder-indicator--inline {
  width: 5px;
  height: 5px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 4px;
}

#workloadCalendarContainer .calendar-event--month:not(.workload-block-event) {
  font-size: 0.62rem;
  padding: 2px 4px;
  min-height: 0;
}

#workloadCalendarContainer .calendar-event--month:not(.workload-block-event) .event-chip {
  gap: 2px;
}

/* Сводка плановых блоков за период (мастер/менеджер) — в полосе периода */
.workload-summary-panel {
  font-size: 0.875rem;
}

.workload-summary-panel__toggle {
  color: var(--bs-body-color, #212529);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.workload-summary-panel__toggle:hover {
  color: var(--bs-primary);
}

.workload-summary-panel__toggle::after {
  content: 'Свернуть';
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #f1f5f9;
}

.workload-summary-panel__toggle.collapsed::after {
  content: 'Показать';
}

.workload-summary-panel .workload-summary-table thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #6c757d;
  border-bottom-width: 1px;
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: var(--bs-body-bg, #fff);
  box-shadow: inset 0 -1px 0 var(--bs-border-color, #dee2e6);
}

.workload-summary-panel .workload-summary-table td {
  font-size: 0.8rem;
  vertical-align: middle;
}

.workload-summary-panel__toolbar-meta {
  min-width: 0;
}

@media (min-width: 768px) {
  .workload-summary-panel__toolbar-meta {
    flex-wrap: nowrap;
  }
}

.workload-summary-spoiler__btn {
  font-weight: inherit;
}

.workload-summary-spoiler__btn:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(13, 110, 253, 0.35);
  z-index: 1;
}

.workload-summary-spoiler__chev {
  flex-shrink: 0;
  transition: transform 0.2s ease;
  color: #64748b;
}

.workload-summary-spoiler__btn.collapsed .workload-summary-spoiler__chev {
  transform: rotate(-90deg);
}

/* Видим ~5 строк данных; остальное — вертикальная прокрутка (одинаково для обеих таблиц) */
.workload-summary-panel__table-wrap {
  max-height: calc(var(--workload-summary-thead-h, 2.1rem) + 5 * var(--workload-summary-row-h, 2.35rem));
  overflow-y: auto;
  overflow-x: auto;
}

/* --- Загрузка: дневная диаграмма Ганта (мастер, все сотрудники) --- */
.workload-day-gantt,
.workload-team-gantt {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  --gantt-name-w: 11rem;
}

.workload-gantt__scroll-hint {
  line-height: 1.35;
}

.workload-gantt__scroll {
  overflow: auto;
  overflow-x: auto;
  overflow-y: auto;
  max-width: 100%;
  max-height: min(72vh, 50rem);
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
  padding-bottom: max(0.35rem, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}

.workload-gantt__header {
  display: grid;
  grid-template-columns: var(--gantt-name-w, 11rem) minmax(0, 1fr);
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f1f5f9;
  border-bottom: 1px solid #dee2e6;
}

.workload-gantt__corner {
  border-right: 1px solid #dee2e6;
  min-height: 2rem;
  position: sticky;
  left: 0;
  z-index: 5;
  background: #f1f5f9;
  box-shadow: 4px 0 10px -6px rgb(var(--brand-neutral-rgb) / 0.18);
}

.workload-gantt__header-hours {
  display: grid;
  grid-template-columns: repeat(12, minmax(2.25rem, 1fr));
  align-items: center;
  min-height: 2rem;
}

.workload-gantt__hcell {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
  border-left: 1px solid #e2e8f0;
  padding: 0.25rem 0;
}

.workload-gantt__hcell:first-child {
  border-left: none;
}

.workload-gantt__hcell--overtime {
  background: #e5e7eb;
  color: #64748b;
}

.workload-gantt__body {
  min-width: 0;
}

.workload-team-gantt .workload-gantt__header--multiday {
  min-width: 100%;
  width: max-content;
}

.workload-team-gantt .workload-gantt__body {
  min-width: 100%;
  width: max-content;
}

/* Мульти-дневной командный Гантт (4 дня / неделя) */
.workload-gantt__header--multiday {
  align-items: stretch;
  /* Вторая колонка по ширине шкалы — горизонтальный скролл один на .workload-gantt__scroll */
  grid-template-columns: var(--gantt-name-w, 11rem) max-content;
}

.workload-gantt__row--multiday {
  grid-template-columns: var(--gantt-name-w, 11rem) max-content;
}

.workload-gantt__corner--multiday {
  min-height: 4.5rem;
  align-self: stretch;
  /* Визуально как две зоны шапки: полоса дней + полоса часов */
  background: linear-gradient(
    180deg,
    #e2e8f0 0%,
    #e2e8f0 50%,
    #f1f5f9 50%,
    #f1f5f9 100%
  );
  border-bottom: 1px solid #dee2e6;
}

.workload-gantt__header-scale-wrap {
  min-width: 0;
  overflow: hidden;
  align-self: stretch;
}

.workload-gantt__track-scale,
.workload-gantt__track-scale--header {
  display: flex;
  flex-direction: column;
}

.workload-gantt__track-scale {
  position: relative;
  flex: 1 0 auto;
  width: 100%;
}

.workload-gantt__row--multiday .workload-gantt__track-scale,
.workload-gantt__header--multiday .workload-gantt__track-scale--header {
  width: auto;
  flex: 0 0 auto;
  max-width: none;
  overflow: hidden;
  box-sizing: border-box;
}

.workload-team-gantt {
  --wl-gantt-zoom: 1;
  position: relative;
}

.workload-gantt__row--multiday .workload-gantt__track-scale,
.workload-gantt__header--multiday .workload-gantt__track-scale--header,
.workload-gantt__group-row--multiday .workload-gantt__group-line {
  width: calc(var(--gantt-track-base, 100%) * var(--wl-gantt-zoom, 1));
  min-width: calc(var(--gantt-track-base, 100%) * var(--wl-gantt-zoom, 1));
}

.workload-day-gantt {
  --wl-gantt-zoom: 1;
  --gantt-hour-min: 2.25rem;
  position: relative;
}

.workload-day-gantt .workload-gantt__header-hours {
  grid-template-columns: repeat(12, minmax(calc(var(--gantt-hour-min) * var(--wl-gantt-zoom, 1)), 1fr));
}

.workload-day-gantt.is-wl-zoomed .workload-gantt__header,
.workload-day-gantt.is-wl-zoomed .workload-gantt__row,
.workload-day-gantt.is-wl-zoomed .workload-gantt__group-row {
  width: max-content;
  min-width: 100%;
  grid-template-columns: var(--gantt-name-w, 11rem) max-content;
}

.workload-day-gantt.is-wl-zoomed .workload-gantt__header-hours,
.workload-day-gantt.is-wl-zoomed .workload-gantt__track,
.workload-day-gantt.is-wl-zoomed .workload-gantt__group-line {
  width: calc(var(--gantt-fit-width, 100%) * var(--wl-gantt-zoom, 1));
  min-width: calc(var(--gantt-fit-width, 100%) * var(--wl-gantt-zoom, 1));
}

.workload-day-gantt.is-wl-zoomed .workload-gantt__header-hours {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.workload-gantt__zoom-label {
  position: absolute;
  top: 0.45rem;
  right: 0.7rem;
  z-index: 6;
  margin: 0;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: 0.72rem;
  line-height: 1.3;
  pointer-events: none;
}

.workload-gantt__zoom-label[hidden] {
  display: none;
}

/* Линейка часов дня сверху вниз: дни — колонки, слоты 1–12 — строки */
.workload-team-gantt.is-wl-hours-vertical,
.workload-day-gantt.is-wl-hours-vertical {
  --gantt-hour-slot: 1.75rem;
  --gantt-hour-rows: 12;
}

.workload-team-gantt.is-wl-hours-vertical,
.workload-team-gantt.is-wl-hours-vertical .workload-gantt__body,
.workload-team-gantt.is-wl-hours-vertical .workload-gantt__header--multiday,
.workload-day-gantt.is-wl-hours-vertical,
.workload-day-gantt.is-wl-hours-vertical .workload-gantt__body,
.workload-day-gantt.is-wl-hours-vertical .workload-gantt__header {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.workload-team-gantt.is-wl-hours-vertical .workload-gantt__header--multiday,
.workload-team-gantt.is-wl-hours-vertical .workload-gantt__row--multiday,
.workload-team-gantt.is-wl-hours-vertical .workload-gantt__group-row--multiday,
.workload-day-gantt.is-wl-hours-vertical .workload-gantt__header,
.workload-day-gantt.is-wl-hours-vertical .workload-gantt__row,
.workload-day-gantt.is-wl-hours-vertical .workload-gantt__group-row,
.workload-day-gantt.is-wl-hours-vertical.is-wl-zoomed .workload-gantt__header,
.workload-day-gantt.is-wl-hours-vertical.is-wl-zoomed .workload-gantt__row,
.workload-day-gantt.is-wl-hours-vertical.is-wl-zoomed .workload-gantt__group-row {
  width: 100%;
  min-width: 0;
  grid-template-columns: var(--gantt-name-w, 11rem) minmax(0, 1fr);
}

.workload-team-gantt.is-wl-hours-vertical .workload-gantt__row--multiday .workload-gantt__track-scale {
  width: 100%;
  min-width: 0;
  height: calc(var(--gantt-hour-rows, 12) * var(--gantt-hour-slot, 1.75rem) * var(--wl-gantt-zoom, 1));
}

.workload-team-gantt.is-wl-hours-vertical .workload-gantt__header--multiday .workload-gantt__track-scale--header,
.workload-team-gantt.is-wl-hours-vertical .workload-gantt__group-row--multiday .workload-gantt__group-line,
.workload-day-gantt.is-wl-hours-vertical .workload-gantt__header-hours,
.workload-day-gantt.is-wl-hours-vertical .workload-gantt__group-line,
.workload-day-gantt.is-wl-hours-vertical.is-wl-zoomed .workload-gantt__header-hours,
.workload-day-gantt.is-wl-hours-vertical.is-wl-zoomed .workload-gantt__group-line {
  width: 100%;
  min-width: 0;
  height: auto;
}

.workload-day-gantt.is-wl-hours-vertical .workload-gantt__header-hours,
.workload-day-gantt.is-wl-hours-vertical.is-wl-zoomed .workload-gantt__header-hours {
  display: flex;
  align-items: center;
  grid-template-columns: none;
  min-height: 2rem;
}

.workload-gantt__axis-note {
  padding: 0.35rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 650;
  color: #64748b;
}

.workload-day-gantt.is-wl-hours-vertical .workload-gantt__track,
.workload-day-gantt.is-wl-hours-vertical.is-wl-zoomed .workload-gantt__track {
  width: 100%;
  min-width: 0;
  height: calc(var(--gantt-hour-rows, 12) * var(--gantt-hour-slot, 1.75rem) * var(--wl-gantt-zoom, 1));
  min-height: calc(var(--gantt-hour-rows, 12) * var(--gantt-hour-slot, 1.75rem) * var(--wl-gantt-zoom, 1));
}

.workload-team-gantt.is-wl-hours-vertical .workload-gantt__corner--multiday {
  min-height: 2rem;
  background: #e2e8f0;
}

.is-wl-hours-vertical .workload-gantt__name {
  align-items: flex-start;
  padding-top: 0.45rem;
}

.is-wl-hours-vertical .workload-gantt__track-scale,
.is-wl-hours-vertical .workload-gantt__track {
  position: relative;
}

.is-wl-hours-vertical .workload-gantt__bar-bands,
.is-wl-hours-vertical .workload-gantt__bar-band,
.is-wl-hours-vertical .workload-gantt__bar-band .workload-gantt__bars,
.is-wl-hours-vertical .workload-gantt__bars {
  position: absolute;
  inset: 0;
  height: 100%;
  min-height: 0;
}

.workload-gantt__vday {
  display: grid;
  grid-template-rows: repeat(12, minmax(0, 1fr));
  min-width: 0;
  min-height: 100%;
  border-left: 2px solid rgba(71, 85, 105, 0.45);
}

.workload-gantt__vday:first-child {
  border-left: none;
}

.workload-gantt__hrow {
  border-top: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 0.62rem;
  font-weight: 700;
  color: #64748b;
  padding: 0.04rem 0.28rem 0;
  line-height: 1.1;
}

.workload-gantt__hrow:first-child {
  border-top: none;
}

.workload-gantt__hrow--overtime {
  background: rgba(148, 163, 184, 0.16);
}

.is-wl-hours-vertical .workload-gantt__bar,
.is-wl-hours-vertical .workload-gantt__bar--assignment {
  min-width: 0;
  min-height: 0;
  max-width: none;
  padding: 2px 6px;
}

.is-wl-hours-vertical .workload-gantt__bar-text {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.is-wl-hours-vertical .workload-gantt__bar-resize--left {
  left: 0;
  right: 0;
  top: 0;
  bottom: auto;
  width: auto;
  height: 8px;
  cursor: ns-resize;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), transparent);
}

.is-wl-hours-vertical .workload-gantt__bar-resize--right {
  left: 0;
  right: 0;
  top: auto;
  bottom: 0;
  width: auto;
  height: 8px;
  cursor: ns-resize;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.22), transparent);
}

.workload-gantt__header-day-strip {
  display: grid;
  grid-template-columns: repeat(var(--gantt-mday-span, 1), minmax(0, 1fr));
  align-items: center;
  min-height: 2rem;
  border-bottom: 1px solid #e2e8f0;
  background: #e2e8f0;
}

.workload-gantt__day-title {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: #475569;
  padding: 0.2rem 0.15rem;
  border-left: 1px solid #cbd5e1;
}

.workload-gantt__day-title:first-child {
  border-left: none;
}

.workload-gantt__header-hours--multiday {
  display: grid;
  /* Тот же шаблон, что и сетка в строках: иначе min-сумма колонок > width шкалы и шапка шире тела */
  grid-template-columns: repeat(var(--gantt-mday-cols, 64), minmax(0, 1fr));
  align-items: center;
  min-height: 2rem;
  background: #f1f5f9;
}

.workload-gantt__header-hours--multiday .workload-gantt__hcell {
  font-size: 0.55rem;
  font-weight: 600;
  padding: 0.12rem 0.05rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.workload-gantt__hcell--day-start {
  border-left: 2px solid #94a3b8 !important;
}

.workload-gantt__track.workload-gantt__track--multiday {
  /* visible: иначе при несовпадении ширины ячейки и шкалы обрезается вторая половина сетки */
  overflow: visible;
  min-width: 0;
  /* Высота строки общая (--gantt-row-h); сетка на всю высоту, полосы по вертикали по центру */
  justify-content: flex-start;
  align-self: stretch;
  min-height: var(--gantt-row-h, 2rem);
}

.workload-gantt__row--multiday .workload-gantt__track--multiday > .workload-gantt__track-scale {
  flex: 1 1 auto;
  align-self: stretch;
  min-height: var(--gantt-row-h, 2rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.workload-gantt__row--multiday .workload-gantt__track-scale {
  background-color: #fff;
}

/* Горизонтальная прокрутка мульти-дня — у всего блока Ганта */
.workload-team-gantt .workload-gantt__scroll {
  scrollbar-width: thin;
}

.workload-team-gantt .workload-gantt__scroll::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.workload-team-gantt .workload-gantt__scroll::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.45);
  border-radius: 4px;
}

.workload-gantt__grid-bg--multiday {
  /* Полный override ниже — после .workload-gantt__grid-bg (иначе побеждает repeat(12)) */
  width: 100%;
  min-width: 100%;
  box-sizing: border-box;
}

.workload-gantt__vline--day-boundary {
  border-left-color: rgba(71, 85, 105, 0.55);
  border-left-width: 2px;
}

.workload-gantt__time-off-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.workload-gantt__time-off-col {
  position: absolute;
  top: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    -45deg,
    rgba(251, 191, 36, 0.12),
    rgba(251, 191, 36, 0.12) 6px,
    rgba(251, 191, 36, 0.22) 6px,
    rgba(251, 191, 36, 0.22) 12px
  );
  border-left: 1px solid rgba(217, 119, 6, 0.25);
  border-right: 1px solid rgba(217, 119, 6, 0.25);
}

.workload-team-heatmap {
  --heatmap-gap: 1px;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #fff;
  overflow: hidden;
}

.workload-heatmap__scroll {
  overflow: auto;
  max-height: min(70vh, 720px);
}

.workload-heatmap__header,
.workload-heatmap__row {
  display: grid;
  grid-template-columns: var(--gantt-name-w, 11rem) minmax(0, 1fr);
  align-items: stretch;
}

.workload-heatmap__corner,
.workload-heatmap__name {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
  padding: 0.35rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.workload-heatmap__days,
.workload-heatmap__cells {
  display: grid;
  grid-template-columns: repeat(var(--heatmap-day-cols, 31), minmax(var(--heatmap-cell-min, 2.25rem), 1fr));
  gap: var(--heatmap-gap);
}

.workload-heatmap__day {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  padding: 0.35rem 0;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.workload-heatmap__row {
  border-top: 1px solid #eef2f7;
}

.workload-heatmap__cell {
  border: none;
  margin: 0;
  min-height: 1.85rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #0f172a;
  background: #f1f5f9;
  cursor: pointer;
  transition: filter 0.12s ease;
}

.workload-heatmap__cell:hover {
  filter: brightness(0.95);
}

.workload-heatmap__cell--l0 { background: #f8fafc; color: #94a3b8; font-weight: 500; }
.workload-heatmap__cell--l1 { background: #dbeafe; }
.workload-heatmap__cell--l2 { background: #93c5fd; }
.workload-heatmap__cell--l3 { background: #3b82f6; color: #fff; }
.workload-heatmap__cell--l4 { background: #1d4ed8; color: #fff; }
.workload-heatmap__cell--l5 { background: #1e3a8a; color: #fff; }

.workload-heatmap__cell--time-off {
  background: repeating-linear-gradient(
    -45deg,
    #fef3c7,
    #fef3c7 4px,
    #fde68a 4px,
    #fde68a 8px
  ) !important;
  color: #92400e !important;
}

.workload-gantt__row {
  display: grid;
  grid-template-columns: var(--gantt-name-w, 11rem) minmax(0, 1fr);
  border-top: 1px solid #e9ecef;
  min-height: var(--gantt-row-h, 2rem);
  background: #fff;
}

.workload-gantt__row--zebra {
  background: #f3f6fa;
}

.workload-gantt__row--zebra .workload-gantt__name {
  background: #e8eef5;
}

.workload-gantt__row--zebra .workload-gantt__track,
.workload-gantt__row--zebra .workload-gantt__track-scale {
  background: #f3f6fa;
}

.workload-gantt__row--overtime {
  background: rgba(245, 158, 11, 0.06);
}

.workload-gantt__row--overtime .workload-gantt__name {
  background: #fff8eb;
}

.workload-gantt__row--blocked {
  background: rgba(220, 38, 38, 0.07);
}

.workload-gantt__row--blocked .workload-gantt__name {
  background: #fff1f1;
}

.workload-gantt__name-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workload-gantt__load-badge {
  flex: 0 0 auto;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.2rem 0.35rem;
  border-radius: 0.25rem;
  background: #e2e8f0;
  color: #334155;
}

.workload-gantt__load-badge--overtime {
  background: #fef3c7;
  color: #92400e;
  box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.35);
}

.workload-gantt__load-badge--blocked {
  background: #fee2e2;
  color: #991b1b;
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.4);
}

.workload-gantt__day-load-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.workload-gantt__day-load {
  position: absolute;
  top: 0;
  bottom: 0;
  pointer-events: none;
}

.workload-gantt__day-load--ok {
  background: transparent;
}

.workload-gantt__day-load--overtime {
  background: rgba(245, 158, 11, 0.12);
  box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.25);
}

.workload-gantt__day-load--blocked {
  background: repeating-linear-gradient(
    -45deg,
    rgba(220, 38, 38, 0.1),
    rgba(220, 38, 38, 0.1) 4px,
    rgba(248, 113, 113, 0.16) 4px,
    rgba(248, 113, 113, 0.16) 8px
  );
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.35);
}

.workload-gantt__track[data-wl-day-blocked="1"] {
  cursor: not-allowed;
}

.workload-gantt__group-row {
  display: grid;
  grid-template-columns: var(--gantt-name-w, 11rem) minmax(0, 1fr);
  border-top: 1px solid rgba(71, 85, 105, 0.2);
  background: linear-gradient(90deg, #e2e8f0, #f8fafc);
  min-height: 1.7rem;
}

.workload-gantt__group-row--multiday {
  grid-template-columns: var(--gantt-name-w, 11rem) max-content;
}

.workload-gantt__group-name {
  position: sticky;
  left: 0;
  z-index: 3;
  padding: 0.3rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #334155;
  background: #e2e8f0;
  border-right: 1px solid rgba(148, 163, 184, 0.45);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workload-gantt__group-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font: inherit;
  text-align: left;
}

.workload-gantt__group-toggle:focus-visible {
  outline: 2px solid rgba(13, 110, 253, 0.45);
  outline-offset: 2px;
  border-radius: 0.35rem;
}

.workload-gantt__group-chev {
  flex: 0 0 auto;
  transition: transform 0.18s ease;
}

.workload-gantt__group-toggle.is-collapsed .workload-gantt__group-chev {
  transform: rotate(-90deg);
}

.workload-gantt__group-meta {
  margin-left: auto;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.workload-gantt__group-line {
  min-height: 1.7rem;
  background: linear-gradient(90deg, rgba(226, 232, 240, 0.9), rgba(248, 250, 252, 0.72));
}

.workload-gantt__row.workload-gantt__row--collapsed {
  display: none;
}

.workload-gantt__name {
  padding: 0.4rem 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  border-right: 1px solid #dee2e6;
  background: #f8fafc;
  overflow: hidden;
  align-self: stretch;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  position: sticky;
  left: 0;
  z-index: 2;
  box-shadow: 4px 0 10px -6px rgb(var(--brand-neutral-rgb) / 0.12);
  max-width: var(--gantt-name-w, 11rem);
}

.workload-gantt__track {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--gantt-row-h, 2rem);
  min-width: 0;
}

.workload-gantt__track--drag-over {
  outline: 2px dashed var(--bs-primary);
  outline-offset: -2px;
  background: rgba(13, 110, 253, 0.07);
}

.workload-page.is-wl-drop .workload-gantt__row--drop-ok .workload-gantt__name,
.workload-page.is-wl-drop .workload-gantt__row--drop-ok .workload-gantt__track {
  background: rgba(22, 163, 74, 0.16);
  box-shadow: inset 3px 0 0 #16a34a;
}

.workload-page.is-wl-drop .workload-gantt__row--drop-no {
  opacity: 0.38;
}

.workload-gantt__track--drop-forbidden {
  outline: 2px dashed #dc2626;
  outline-offset: -2px;
  background: rgba(220, 38, 38, 0.08);
  cursor: not-allowed;
}

.workload-gantt__drop-cell {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 5;
  pointer-events: none;
  background: rgba(22, 163, 74, 0.32);
  box-shadow: inset 0 0 0 2px #16a34a;
  border-radius: 4px;
}

.workload-gantt__row.is-wl-drop-person .workload-gantt__name {
  background: rgba(22, 163, 74, 0.34);
  box-shadow: inset 3px 0 0 #15803d;
}

.workload-gantt__day-title.is-wl-drop-day {
  background: #bbf7d0;
  color: #14532d;
}

.workload-gantt__grid-bg {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  pointer-events: none;
  z-index: 0;
}

/* После base: иначе repeat(12) ломает мульти-день (84 ячейки → 7 рядов по 12) */
.workload-gantt__grid-bg.workload-gantt__grid-bg--multiday {
  grid-template-columns: repeat(var(--gantt-mday-cols, 64), minmax(0, 1fr));
  grid-auto-rows: 100%;
  height: 100%;
  align-content: stretch;
}

.workload-gantt__grid-bg.workload-gantt__grid-bg--hours-vertical {
  grid-template-columns: repeat(var(--gantt-mday-span, 1), minmax(0, 1fr));
  grid-auto-rows: 100%;
  height: 100%;
  align-content: stretch;
}

.workload-gantt__grid-bg--multiday .workload-gantt__vline {
  border-left: 1px solid rgba(148, 163, 184, 0.45);
  min-height: 100%;
}

.workload-gantt__grid-bg--multiday .workload-gantt__vline--day-boundary {
  border-left: 2px solid rgba(71, 85, 105, 0.55);
}

.workload-gantt__grid-bg--multiday .workload-gantt__vline:first-child {
  border-left: none;
}

.workload-gantt__vline {
  border-left: 1px solid rgba(148, 163, 184, 0.35);
}

.workload-gantt__vline--overtime {
  background: rgba(148, 163, 184, 0.14);
}

.workload-gantt__vline:first-child {
  border-left: none;
}

.workload-gantt__bar-bands {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
}

.workload-gantt__bar-band {
  position: relative;
  width: 100%;
}

.workload-gantt__bar-band--tasks {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.workload-gantt__bar-band--calendar {
  margin-bottom: 2px;
  padding-bottom: 3px;
  border-bottom: 1px dashed rgba(194, 65, 12, 0.45);
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.workload-gantt__bar-band .workload-gantt__bars {
  flex: 1 1 auto;
  min-height: 0;
}

.workload-gantt__bars {
  position: relative;
  z-index: 1;
  min-height: 2.5rem;
  cursor: cell;
}

.workload-gantt__bar--assignment {
  background: color-mix(in srgb, var(--wl-task-color, var(--brand-primary)) 16%, #ffffff);
  color: #334155;
  border: 1px dashed color-mix(in srgb, var(--wl-task-color, var(--brand-primary)) 58%, #64748b);
  box-shadow: none;
  cursor: grab;
  z-index: 0;
  min-height: 2rem;
  top: 4px;
  min-width: 4.5rem;
}

.workload-gantt__bar--assignment.is-dragging {
  opacity: 0.45;
  cursor: grabbing;
}

.workload-gantt__bar--assignment .workload-gantt__bar-resize--left {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.28), transparent);
}

.workload-gantt__bar--assignment .workload-gantt__bar-resize--right {
  background: linear-gradient(270deg, rgba(15, 23, 42, 0.28), transparent);
}

.workload-gantt__row.is-hl-assignee .workload-gantt__name,
.workload-gantt__row.is-hl-assignee .workload-gantt__track {
  background: rgb(var(--brand-primary-rgb) / 0.08);
}

.workload-gantt__bar {
  position: absolute;
  margin: 0;
  border: none;
  padding: 4px 10px;
  text-align: left;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
  color: #f8fafc;
  font-size: 0.72rem;
  line-height: 1.25;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 1px 3px rgb(var(--brand-neutral-rgb) / 0.15);
  max-width: 100%;
}

/* Несколько задач у одного сотрудника — разный оттенок по taskId */
.workload-gantt__bar--task-tint {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--wl-task-color, var(--brand-primary)) 82%, #ffffff) 0%,
    var(--wl-task-color, var(--brand-primary-dark)) 100%
  );
  border-left: 3px solid color-mix(in srgb, var(--wl-task-color, var(--brand-primary)) 62%, #0f172a);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--wl-task-color, var(--brand-primary)) 35%, transparent);
}

.workload-gantt__bar--assignment.workload-gantt__bar--task-tint {
  background: color-mix(in srgb, var(--wl-task-color, var(--brand-primary)) 20%, #ffffff);
  color: #1e293b;
  border: 1px dashed color-mix(in srgb, var(--wl-task-color, var(--brand-primary)) 62%, #64748b);
  border-left: 3px solid color-mix(in srgb, var(--wl-task-color, var(--brand-primary)) 72%, #0f172a);
  box-shadow: none;
}

/* Карточка-тултип задачи над полосой Gantt */
.workload-gantt-tip {
  position: fixed;
  z-index: 1090;
  width: min(20rem, calc(100vw - 1.5rem));
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.workload-gantt-tip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.workload-gantt-tip__card {
  margin: 0;
  box-shadow:
    0 10px 28px rgb(var(--brand-neutral-rgb) / 0.18),
    0 1px 0 rgb(255 255 255 / 0.4) inset;
  border: 1px solid rgb(var(--brand-neutral-rgb) / 0.12);
  background: #fff;
}

.workload-gantt-tip__card .task-card__inner {
  padding: 0.65rem 0.75rem;
}

.workload-gantt-tip__hours {
  margin-top: 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
  letter-spacing: 0.01em;
}

.workload-gantt__bar-resize {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 10px;
  z-index: 3;
  touch-action: none;
  box-sizing: border-box;
}

.workload-gantt__bar-resize--left {
  left: 0;
  cursor: ew-resize;
  border-radius: 4px 0 0 4px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.22), transparent);
}

.workload-gantt__bar-resize--right {
  right: 0;
  cursor: ew-resize;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(270deg, rgba(0, 0, 0, 0.22), transparent);
}

.workload-gantt__bar--resizing {
  filter: brightness(1.12);
  outline: 2px dashed rgba(248, 250, 252, 0.75);
  outline-offset: 0;
  z-index: 4;
}

.workload-gantt__bar[draggable='true'] {
  cursor: grab;
}

.workload-gantt__bar[draggable='true']:active,
.workload-gantt__bar.is-dragging {
  cursor: grabbing;
  opacity: 0.72;
}

.workload-gantt__bar--event {
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--wl-event-color, #ea580c) 85%, #fff7ed) 0%,
    var(--wl-event-color, #c2410c) 100%
  );
  color: #fff7ed;
  border-left: 3px solid color-mix(in srgb, var(--wl-event-color, #c2410c) 70%, #431407);
  box-shadow: 0 1px 3px rgba(194, 65, 12, 0.4);
  cursor: default;
}

.workload-gantt__bar--reserve {
  background: repeating-linear-gradient(-45deg, #f8fafc, #f8fafc 7px, #e8eef5 7px, #e8eef5 14px);
  color: #334155;
  border: 1px dashed #64748b;
  box-shadow: none;
}

.workload-page.is-wl-drop .workload-gantt__bar--reserve {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}

.workload-gantt__bar--calendar {
  background: var(--wl-cal-color, #c2410c);
  color: #fff7ed !important;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(194, 65, 12, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.28);
  cursor: pointer;
  border-left: 3px solid rgba(0, 0, 0, 0.28);
}

.workload-gantt__bar--calendar:hover,
.workload-gantt__bar--calendar:focus-visible {
  filter: brightness(1.08);
  color: #f8fafc !important;
  outline: 2px solid rgba(248, 250, 252, 0.45);
  outline-offset: 1px;
}

.workload-planned-block--event {
  border-left: 3px solid #6f42c1;
}

.workload-gantt__bar:hover,
.workload-gantt__bar:focus-visible {
  filter: brightness(1.08);
  outline: 2px solid rgb(var(--brand-primary-rgb) / 0.5);
  outline-offset: 1px;
}

.workload-gantt__bar-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  min-width: 0;
  width: 100%;
  pointer-events: none;
  position: relative;
  z-index: 1;
}

.workload-gantt__bar-text {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.workload-gantt__bar-hours {
  flex: 0 0 auto;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  white-space: nowrap;
  opacity: 0.95;
}

.workload-gantt__bar-note {
  display: block;
  max-width: 100%;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.92;
}

.workload-gantt-tip__note {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
}

/* --- CRM client profile --- */
.clients-registry-card,
.client-hero,
.client-edit-card {
  border-radius: var(--app-radius-xl);
}

.clients-view-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.clients-view-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.22rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--app-elev-1);
}

.clients-view-switch__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  border: 0;
  border-radius: 999px;
  padding: 0.42rem 0.85rem;
  background: transparent;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 800;
}

.clients-view-switch__btn:hover {
  color: var(--brand-primary-dark);
  background: rgb(var(--brand-primary-rgb) / 0.07);
}

.clients-view-switch__btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
  box-shadow: 0 8px 18px rgb(var(--brand-primary-rgb) / 0.22);
}

.clients-funnel {
  min-height: 34rem;
}

.clients-funnel__rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(18rem, 22rem);
  gap: 1rem;
  min-height: 33rem;
  overflow-x: auto;
  padding: 0.2rem 0.15rem 1rem;
  scroll-snap-type: x proximity;
}

.clients-funnel__rail.is-dnd-edge-scroll,
.tenders-funnel__rail.is-dnd-edge-scroll {
  scroll-snap-type: none;
  scroll-behavior: auto;
}

.clients-funnel__loading,
.clients-funnel__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 16rem;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  border-radius: var(--app-radius-xl);
  background: rgba(255, 255, 255, 0.76);
  color: #64748b;
  font-weight: 700;
}

.clients-funnel-column {
  display: flex;
  flex-direction: column;
  min-height: 33rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: var(--app-radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.92)),
    radial-gradient(circle at top right, rgb(var(--brand-primary-rgb) / 0.1), transparent 18rem);
  box-shadow: var(--app-elev-1);
  scroll-snap-align: start;
}

.clients-funnel-column__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 0.95rem 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.clients-funnel-column__header h2 {
  margin: 0;
  color: #172033;
  font-size: 0.98rem;
  font-weight: 900;
  letter-spacing: -0.015em;
}

.clients-funnel-column__header span {
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
}

.clients-funnel-column__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem;
}

.clients-funnel-column__actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  padding: 0;
  border-radius: 999px;
}

.clients-funnel-column__dropzone {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 0.85rem;
  transition: background-color 0.15s ease, outline-color 0.15s ease;
}

.clients-funnel-column__dropzone.is-over {
  outline: 2px dashed rgb(var(--brand-primary-rgb) / 0.45);
  outline-offset: -0.45rem;
  background: rgb(var(--brand-primary-rgb) / 0.06);
}

.clients-funnel-column__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 6rem;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  border-radius: var(--app-radius-lg);
  color: #94a3b8;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
}

.clients-funnel-card {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--app-radius-lg);
  padding: 0.82rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 22px rgb(var(--brand-neutral-rgb) / 0.08);
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.clients-funnel-card:hover {
  transform: translateY(-2px);
  border-color: rgb(var(--brand-primary-rgb) / 0.28);
  box-shadow: 0 14px 30px rgb(var(--brand-neutral-rgb) / 0.13);
}

.clients-funnel-card.is-dragging {
  opacity: 0.65;
  transform: rotate(1deg) scale(0.99);
}

.clients-funnel-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
}

.clients-funnel-card__top a {
  color: #172033;
  font-weight: 900;
  line-height: 1.2;
  text-decoration: none;
}

.clients-funnel-card__top a:hover {
  color: var(--brand-primary-dark);
}

.clients-funnel-card__meta,
.clients-funnel-card__brands {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.clients-funnel-card__meta span,
.clients-funnel-card__brands span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 0.2rem 0.48rem;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 800;
}

.clients-funnel-card__brands span {
  background: rgb(var(--brand-primary-rgb) / 0.08);
  color: var(--brand-primary-dark);
}

.clients-funnel-card p {
  display: -webkit-box;
  margin: 0;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.35;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Project tender passport --- */
.project-tender-hero {
  overflow: hidden;
  border-radius: var(--app-radius-xl);
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.15), transparent 30rem),
    radial-gradient(circle at bottom left, rgb(var(--brand-primary-rgb) / 0.12), transparent 32rem),
    linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.project-tender-hero__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.project-tender-hero__eyebrow {
  color: #f97316;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-tender-hero__title {
  margin: 0;
  color: #172033;
  font-size: clamp(1.45rem, 2.4vw, 2.1rem);
  font-weight: 900;
  letter-spacing: -0.035em;
}

.project-tender-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  background: rgb(var(--brand-primary-rgb) / 0.1);
  color: var(--brand-primary-dark);
  font-size: 0.82rem;
  font-weight: 900;
}

.project-tender-status--won {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.project-tender-status--lost,
.project-tender-status--declined_by_dada {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
}

.project-tender-status--waiting_feedback,
.project-tender-status--waiting_briefing {
  background: rgba(249, 115, 22, 0.12);
  color: #c2410c;
}

.project-tender-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.project-tender-card {
  min-height: 5.25rem;
  padding: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--app-radius-lg);
  background: rgba(255, 255, 255, 0.82);
}

.project-tender-card--wide {
  grid-column: span 2;
}

.project-tender-card span,
.project-tender-details h3 {
  display: block;
  margin-bottom: 0.28rem;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.project-tender-card strong {
  color: #0f172a;
  font-size: 1.02rem;
  font-weight: 900;
}

.project-tender-card__meta,
.project-tender-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.project-tender-card__meta span,
.project-tender-tags span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 0.22rem 0.5rem;
  background: rgb(var(--brand-primary-rgb) / 0.08);
  color: var(--brand-primary-dark);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: none;
}

.project-tender-tags span.is-muted {
  background: #f1f5f9;
  color: #94a3b8;
}

.project-tender-details {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
}

.project-tender-details > div {
  min-height: 8rem;
  padding: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--app-radius-lg);
  background: rgba(255, 255, 255, 0.78);
}

.project-tender-money {
  color: #15803d !important;
}

.tenders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.tenders-table-card {
  overflow: hidden;
}

.tenders-table {
  --bs-table-bg: transparent;
}

.tenders-table thead th {
  color: #64748b;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
  white-space: nowrap;
  border-bottom-width: 1px;
  padding: 0.95rem 1rem;
  background: #f8fafc;
}

.tenders-table__th--sortable,
.projects-table__th--sortable {
  padding: 0.55rem 0.5rem;
  user-select: none;
}

.tenders-table__th--sortable.is-sorted,
.projects-table__th--sortable.is-sorted {
  color: #0f172a;
  background: rgba(var(--bs-primary-rgb), 0.08);
}

.tenders-table__sort-btn,
.projects-table__sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  margin: 0;
  padding: 0.4rem 0.5rem;
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-align: left;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.tenders-table__sort-btn--end {
  justify-content: flex-end;
  text-align: right;
}

.tenders-table__sort-btn:hover,
.projects-table__sort-btn:hover {
  background: rgba(15, 23, 42, 0.05);
  color: #0f172a;
}

.tenders-table__sort-btn:focus-visible,
.projects-table__sort-btn:focus-visible {
  outline: 2px solid rgba(var(--bs-primary-rgb), 0.45);
  outline-offset: 1px;
}

.tenders-table__sort-icons,
.projects-table__sort-icons {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  line-height: 0.55;
  opacity: 0.38;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.tenders-table__sort-icons .bi,
.projects-table__sort-icons .bi {
  font-size: 0.55rem;
  color: currentColor;
}

.tenders-table__sort-btn:hover .tenders-table__sort-icons,
.projects-table__sort-btn:hover .projects-table__sort-icons {
  opacity: 0.7;
}

.tenders-table__th--sortable.is-sorted .tenders-table__sort-icons,
.projects-table__th--sortable.is-sorted .projects-table__sort-icons {
  opacity: 1;
  color: var(--bs-primary);
}

.tenders-table__th--sortable.is-sorted-asc .tenders-table__sort-desc,
.tenders-table__th--sortable.is-sorted-desc .tenders-table__sort-asc,
.projects-table__th--sortable.is-sorted-asc .projects-table__sort-desc,
.projects-table__th--sortable.is-sorted-desc .projects-table__sort-asc {
  opacity: 0.28;
  color: #94a3b8;
}

.tenders-table__th--sortable.is-sorted-asc .tenders-table__sort-asc,
.tenders-table__th--sortable.is-sorted-desc .tenders-table__sort-desc,
.projects-table__th--sortable.is-sorted-asc .projects-table__sort-asc,
.projects-table__th--sortable.is-sorted-desc .projects-table__sort-desc {
  opacity: 1;
  color: var(--bs-primary);
}

.tenders-table tbody td {
  padding: 0.9rem 1rem;
  vertical-align: middle;
  border-color: #eef2f7;
}

.tenders-table__row {
  cursor: default;
}

.tenders-table__name:hover {
  color: var(--bs-primary) !important;
}

.tenders-table__worktypes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  max-width: 14rem;
}

.tender-card,
.tender-passport,
.tenders-toolbar,
.tenders-empty,
.tenders-table-card {
  border-radius: 1.5rem;
}

.tenders-toolbar__row {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 0.65rem 0.75rem;
}

.tenders-toolbar__field {
  min-width: 0;
}

.tenders-toolbar__field--scope {
  flex: 0 1 8.5rem;
  max-width: 10rem;
}

.tenders-toolbar__field--search {
  flex: 1 1 14rem;
}

.tenders-toolbar__field--status,
.tenders-toolbar__field--client {
  flex: 0 1 12rem;
  max-width: 16rem;
}

.tenders-toolbar__field--reset {
  flex: 0 0 auto;
  min-width: 7rem;
}

@media (max-width: 991.98px) {
  .tenders-toolbar__row {
    flex-wrap: wrap;
  }

  .tenders-toolbar__field--scope,
  .tenders-toolbar__field--status,
  .tenders-toolbar__field--client,
  .tenders-toolbar__field--reset {
    flex: 1 1 calc(50% - 0.4rem);
    max-width: none;
  }

  .tenders-toolbar__field--search {
    flex: 1 1 100%;
  }
}

.tender-card .card-body,
.tender-passport .card-body {
  padding: 1.25rem;
}

.tender-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f172a;
  background: #e2e8f0;
}

.tender-status--won,
.tender-status--converted {
  color: #065f46;
  background: #d1fae5;
}

.tender-status--lost,
.tender-status--declined_by_dada {
  color: #991b1b;
  background: #fee2e2;
}

.tender-status--waiting_feedback,
.tender-status--waiting_briefing,
.tender-status--waiting_brief,
.tender-status--waiting_result {
  color: #92400e;
  background: #fef3c7;
}

.tender-status--in_progress {
  color: #1d4ed8;
  background: #dbeafe;
}

.tender-status--pitch,
.tender-status--defense {
  color: #6d28d9;
  background: #ede9fe;
}

.tender-status--prospect,
.tender-status--first_contact {
  color: #475569;
  background: #e2e8f0;
}

.tender-status--briefing,
.tender-status--waiting_tender {
  color: #6d28d9;
  background: #ede9fe;
}

.tender-status--proposal_sent {
  color: #0f766e;
  background: #ccfbf1;
}

.tender-status--documents {
  color: #166534;
  background: #dcfce7;
}

.tender-status--rejected {
  color: #991b1b;
  background: #fee2e2;
}

.tender-card__metrics,
.tender-passport__metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.tender-card__metrics div,
.tender-passport__metrics div {
  padding: 0.85rem;
  border-radius: 1rem;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.tender-card__metrics span,
.tender-passport__metrics span {
  display: block;
  color: #64748b;
  font-size: 0.78rem;
}

.tender-card__metrics strong,
.tender-passport__metrics strong {
  display: block;
  margin-top: 0.15rem;
  color: #0f172a;
  font-size: 1.05rem;
}

.tender-passport__hero {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tender-lifecycle-row__body {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.tender-lifecycle-row .bizdev-lifecycle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  flex: 1 1 auto;
  min-width: 0;
}

.tender-brand-tenders-inline {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  border-radius: 0.85rem;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.06), transparent 50%),
    #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.25);
  flex: 0 1 auto;
  max-width: 100%;
}

.tender-brand-tenders-inline__title {
  font-size: 0.875rem;
  font-weight: 650;
  line-height: 1.25;
  color: #0f172a;
  white-space: nowrap;
}

.tender-brand-tenders-inline .btn {
  align-self: center;
}

@media (min-width: 992px) {
  .tender-lifecycle-row__body {
    flex-wrap: nowrap;
    justify-content: space-between;
  }
}

.bizdev-lifecycle__track {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  flex-wrap: nowrap;
}

.bizdev-lifecycle__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  flex: 1 1 4.5rem;
  min-width: 4.5rem;
  text-align: center;
  position: relative;
}

.bizdev-lifecycle__step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 0.55rem;
  left: calc(50% + 0.65rem);
  width: calc(100% - 1.3rem);
  height: 2px;
  background: #cbd5e1;
  z-index: 0;
}

.bizdev-lifecycle__step.is-done:not(:last-child)::after,
.bizdev-lifecycle__step.is-passed:not(:last-child)::after,
.bizdev-lifecycle__step.is-current:not(:last-child)::after {
  background: #93c5fd;
}

.bizdev-lifecycle__dot {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  border: 2px solid #cbd5e1;
  background: #fff;
  position: relative;
  z-index: 1;
}

.bizdev-lifecycle__label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  line-height: 1.2;
}

.bizdev-lifecycle__step.is-done .bizdev-lifecycle__dot,
.bizdev-lifecycle__step.is-passed .bizdev-lifecycle__dot {
  border-color: #2563eb;
  background: #2563eb;
}

.bizdev-lifecycle__step.is-done .bizdev-lifecycle__label,
.bizdev-lifecycle__step.is-passed .bizdev-lifecycle__label {
  color: #1e40af;
}

.bizdev-lifecycle__step.is-current .bizdev-lifecycle__dot {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgb(37 99 235 / 0.15);
}

.bizdev-lifecycle__step.is-current .bizdev-lifecycle__label {
  color: #0f172a;
}

.bizdev-lifecycle__step.is-skipped .bizdev-lifecycle__dot {
  border-style: dashed;
  background: #f8fafc;
}

.bizdev-lifecycle__step.is-skipped .bizdev-lifecycle__label {
  color: #94a3b8;
  text-decoration: line-through;
}

.bizdev-lifecycle__step.is-pending .bizdev-lifecycle__dot,
.bizdev-lifecycle__step.is-not_started .bizdev-lifecycle__dot {
  background: #f8fafc;
}

.tender-stage-history__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tender-stage-history__item {
  display: grid;
  grid-template-columns: 1rem 1fr;
  gap: 0.75rem;
  position: relative;
  padding-bottom: 1rem;
}

.tender-stage-history__item:last-child {
  padding-bottom: 0;
}

.tender-stage-history__item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 0.4rem;
  top: 1rem;
  bottom: 0;
  width: 2px;
  background: #e2e8f0;
}

.tender-stage-history__marker {
  width: 0.85rem;
  height: 0.85rem;
  margin-top: 0.2rem;
  border-radius: 50%;
  border: 2px solid #94a3b8;
  background: #fff;
  z-index: 1;
}

.tender-stage-history__item.is-current .tender-stage-history__marker {
  border-color: #2563eb;
  background: #2563eb;
  box-shadow: 0 0 0 4px rgb(37 99 235 / 0.15);
}

.tender-stage-history__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.15rem;
}

.tender-stage-history__duration {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
}

.tender-stage-history__item.is-current .tender-stage-history__duration {
  color: #1d4ed8;
}

.tender-stage-history__stay {
  color: #1d4ed8;
  font-weight: 600;
}

.tender-stage-history__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.35rem;
}

.tenders-funnel-card__lifecycle {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.55rem;
}

.tenders-funnel-card__lifecycle span {
  flex: 1;
  height: 0.2rem;
  border-radius: 999px;
  background: #e2e8f0;
}

.tenders-funnel-card__lifecycle span.is-done,
.tenders-funnel-card__lifecycle span.is-current {
  background: #2563eb;
}

.tenders-funnel-card__lifecycle span.is-skipped {
  background: repeating-linear-gradient(90deg, #cbd5e1, #cbd5e1 4px, transparent 4px, transparent 7px);
}

.tender-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.85rem;
  margin-bottom: 0;
}

.tender-details--stack {
  grid-template-columns: 1fr;
}

.tender-details div {
  padding: 0.75rem;
  border-radius: 0.9rem;
  background: #f8fafc;
}

.tender-details dt {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tender-details dd {
  margin-bottom: 0;
  color: #0f172a;
  font-weight: 600;
}

.tender-stage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
}

.tender-stage-grid article {
  min-height: 9rem;
  padding: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 1rem;
  background: #f8fafc;
}

.tender-stage-grid span {
  display: block;
  margin-bottom: 0.45rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

.tender-stage-grid p {
  display: -webkit-box;
  margin-bottom: 0.45rem;
  overflow: hidden;
  color: #0f172a;
  font-size: 0.88rem;
  line-height: 1.4;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  white-space: pre-line;
}

.tender-stage-grid a,
.tender-stage-grid strong {
  font-size: 0.82rem;
  font-weight: 800;
}

.tender-edit-stage-section {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.95rem 1rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 1rem;
  background: #f8fafc;
}

.tender-edit-stage-section--inline {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.tender-edit-stage-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.tender-edit-stage-section__head h3 {
  margin: 0 0 0.2rem;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 800;
}

.tender-edit-stage-section__head p {
  margin: 0;
  max-width: 36rem;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.4;
}

.tender-edit-stage-section__toggle {
  flex: 0 0 auto;
  padding: 0.15rem 0.25rem;
  color: #2563eb;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.tender-edit-stage-section__toggle:hover {
  color: #1d4ed8;
}

.tender-edit-stage-action {
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 0.85rem;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.tender-edit-stage-action__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.tender-edit-stage-action__head .form-label {
  margin-bottom: 0;
}

.tender-edit-stage-action__add {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.tender-edit-stage-action .form-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.4rem;
  color: #0f172a;
  font-weight: 700;
}

.tender-edit-stage-action__hint {
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 600;
}

.tender-next-step-composer {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: #f8fafc;
  border: 1px dashed rgba(37, 99, 235, 0.28);
}

.tender-next-step-composer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.tender-next-step-history {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.tender-next-step-history:empty {
  display: none;
}

.tender-next-step-history__item {
  padding: 0.55rem 0.7rem;
  border-radius: 0.65rem;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.tender-next-step-history__step {
  display: block;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.tender-next-step-history__result {
  display: block;
  margin-top: 0.2rem;
  color: #64748b;
  font-size: 0.85rem;
  line-height: 1.35;
  white-space: pre-wrap;
}

.tender-next-step-history__meta {
  display: block;
  margin-top: 0.25rem;
  color: #94a3b8;
  font-size: 0.72rem;
}

.tender-edit-stage-groups {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tender-edit-stage-group {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.85rem;
  background: #fff;
  overflow: clip;
}

.tender-edit-stage-group[open] {
  border-color: rgba(100, 116, 139, 0.35);
}

.tender-edit-stage-group.is-filled {
  border-color: rgba(37, 99, 235, 0.28);
}

.tender-edit-stage-group.is-filled[open] {
  border-color: rgba(37, 99, 235, 0.4);
}

.tender-edit-stage-group__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.tender-edit-stage-group__summary::-webkit-details-marker {
  display: none;
}

.tender-edit-stage-group__summary::after {
  content: "";
  flex: 0 0 auto;
  width: 0.55rem;
  height: 0.55rem;
  margin-left: 0.15rem;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.tender-edit-stage-group[open] > .tender-edit-stage-group__summary::after {
  transform: translateY(0.15rem) rotate(225deg);
}

.tender-edit-stage-group__title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 700;
}

.tender-edit-stage-group__title i {
  color: #64748b;
  font-size: 0.95rem;
}

.tender-edit-stage-group.is-filled .tender-edit-stage-group__title i {
  color: #2563eb;
}

.tender-edit-stage-group__meta {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.tender-edit-stage-group.is-filled .tender-edit-stage-group__meta {
  background: #dbeafe;
  color: #1d4ed8;
}

.tender-edit-stage-group__body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0 0.85rem 0.85rem;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.tender-edit-stage-group__body > .form-label {
  margin-top: 0.7rem;
  margin-bottom: 0;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 700;
}

.tender-edit-stage-group__body .tender-doc-panel {
  margin-top: 0.15rem;
}

.tender-stage-docs {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.45rem;
}

.tender-stage-docs a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.tender-doc-panel {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  height: 100%;
  padding: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.88);
}

.tender-doc-panel__head {
  margin: 0;
}

.tender-doc-panel__title {
  margin: 0 0 0.15rem;
  color: #172033;
  font-size: 0.88rem;
  font-weight: 900;
}

.tender-doc-panel__hint {
  margin: 0;
  color: #64748b;
  font-size: 0.76rem;
  line-height: 1.35;
}

.tender-doc-panel__upload {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
}

.tender-attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 1.75rem;
}

.tender-attachment-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 100%;
  padding: 0.42rem 0.55rem 0.42rem 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 999px;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 800;
}

.tender-attachment-pill a {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1d4ed8;
  text-decoration: none;
}

.tender-attachment-pill a:hover {
  text-decoration: underline;
}

.tender-attachment-pill small {
  color: #64748b;
  font-weight: 700;
  white-space: nowrap;
}

.tender-attachment-pill button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border: 0;
  border-radius: 999px;
  color: #991b1b;
  background: #fee2e2;
  line-height: 1;
}

.quick-application-card {
  padding: 1rem;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 1.25rem;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.07), transparent 42%),
    #f8fafc;
}

.quick-application-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.quick-application-card__head h3 {
  margin: 0 0 0.15rem;
  color: #172033;
  font-size: 0.98rem;
  font-weight: 900;
}

.quick-application-card__head p {
  margin: 0;
  color: #64748b;
  font-size: 0.84rem;
}

.quick-application-card__head span {
  display: inline-flex;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 0.76rem;
  font-weight: 800;
}

.application-summary__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1rem;
}

.tender-page__header-main {
  flex: 1 1 auto;
  min-width: 0;
}

.app-page.tender-page {
  --tender-page-nav-offset: 4rem;
  --tender-page-sticky-bg: #eef2f8;
}

.app-page--tender-passport {
  --tender-passport-nav-offset: 4rem;
  --tender-passport-header-sticky-h: 5.5rem;
  --tender-passport-hub-sticky-h: 8.5rem;
  --tender-passport-sticky-bg: #eef2f8;
}

.app-page--tender-passport [id^="tenderPassport"],
.app-page--tender-passport #tenderStageWorkCard,
.app-page--tender-passport .tender-chat-card {
  scroll-margin-top: calc(
    var(--tender-passport-nav-offset) + var(--tender-passport-hub-sticky-h) + 0.75rem
  );
}

.app-page--tender-passport .project-passport__hub-tabs,
.app-page--tender-passport .project-passport__quick-nav {
  top: calc(var(--tender-passport-nav-offset) + var(--tender-passport-header-sticky-h));
  background: var(--tender-passport-sticky-bg) !important;
}

.app-page--tender-passport .project-passport__hub-tabs.is-compact,
.app-page--tender-passport .project-passport__quick-nav.is-compact {
  top: calc(var(--tender-passport-nav-offset) + var(--tender-passport-header-sticky-h));
  left: var(--tender-passport-fixed-left, 0);
  width: var(--tender-passport-fixed-width, 100%);
  max-width: var(--tender-passport-fixed-width, 100%);
  background: var(--tender-passport-sticky-bg) !important;
}

@media (max-width: 991.98px) {
  .app-page--tender-passport {
    --tender-passport-nav-offset: 3.5rem;
  }
}

.tender-page__header-sentinel {
  height: 1px;
  margin: 0;
  pointer-events: none;
  visibility: hidden;
}

.tender-page__header {
  position: sticky;
  top: var(--tender-page-nav-offset);
  z-index: 41;
  margin-left: -0.35rem;
  margin-right: -0.35rem;
  padding: 0.55rem 0.35rem 0.85rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  background: var(--tender-page-sticky-bg);
  transition: padding 0.18s ease, box-shadow 0.18s ease;
}

.tender-page__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.tender-page__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
  min-width: 0;
}

.tender-page__title-row .tender-page__title {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.tender-page__title-row .tender-page__badges {
  flex: 0 1 auto;
  min-width: 0;
}

.tender-page__title-meta {
  display: none;
  flex: 0 1 auto;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.55rem 0.85rem;
  min-width: 0;
}

.tender-page__title-meta-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  min-width: 0;
  max-width: 11rem;
  font-size: 0.78rem;
  line-height: 1.2;
  color: var(--bs-secondary-color, #64748b);
}

.tender-page__title-meta-label {
  flex: 0 0 auto;
  font-weight: 500;
  opacity: 0.85;
}

.tender-page__title-meta-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--bs-body-color, #0f172a);
  text-decoration: none;
}

a.tender-page__title-meta-value:hover,
a.tender-page__title-meta-value:focus-visible {
  color: var(--bs-primary);
  text-decoration: underline;
}

.tender-page__title-meta-value.is-empty {
  font-weight: 500;
  color: var(--bs-secondary-color, #64748b);
}

.tender-page__title-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: var(--bs-secondary-color, #64748b);
  text-decoration: none;
  line-height: 1;
  font-size: 1.15rem;
  cursor: pointer;
}

.tender-page__title-icon:hover,
.tender-page__title-icon:focus-visible {
  color: var(--bs-primary);
  background: rgba(37, 99, 235, 0.08);
}

.tender-page__share-link.is-copied {
  color: var(--bs-success, #198754);
}

.tender-page__header.is-compact .tender-page__title-row {
  flex: 1 1 auto;
  flex-wrap: nowrap;
  min-width: 0;
  margin-top: 0 !important;
}

.tender-page__header-actions .btn,
.tender-page__back {
  gap: 0.35rem;
}

.tender-page__header-actions .btn {
  display: inline-flex;
  align-items: center;
}

.tender-page__header.is-compact {
  padding-top: 0.35rem;
  padding-bottom: 0.4rem;
  box-shadow: 0 0.35rem 0.9rem -0.55rem rgba(15, 23, 42, 0.35);
}

.tender-page__header.is-compact .tender-page__header-top {
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.5rem 0.75rem !important;
}

.tender-page__header.is-compact .tender-page__header-main {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  min-width: 0;
}

.tender-page__header.is-compact .tender-page__meta,
.tender-page__header.is-compact .tender-page__parent-lead,
.tender-page__header.is-compact .tender-page__extra-badge,
.tender-page__header.is-compact .tender-page__action-label,
.tender-page__header.is-compact .app-page__action-label {
  display: none !important;
}

.tender-page__header.is-compact .tender-page__badges {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  margin: 0 !important;
}

.tender-page__header.is-compact .tender-page__title-meta {
  display: inline-flex;
}

.tender-page__header.is-compact .tender-page__title {
  flex: 0 1 auto;
  margin-top: 0 !important;
  font-size: 0.98rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tender-page__header.is-compact .tender-page__title-icon {
  width: 1.65rem;
  height: 1.65rem;
  font-size: 1rem;
}

.tender-page__header.is-compact .tender-page__header-actions {
  flex: 0 0 auto;
  gap: 0.35rem;
}

.tender-page__header.is-compact .tender-page__header-actions .btn {
  flex: 0 0 auto;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  justify-content: center;
  border-radius: 999px;
  font-size: 1rem;
  line-height: 1;
}

.tender-page__header.is-compact .tender-page__back {
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  justify-content: center;
  margin: 0;
}

.tender-page__meta.application-summary__grid {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 1rem 1.75rem;
  margin-top: 1rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  -webkit-overflow-scrolling: touch;
}

.tender-page__meta.application-summary__grid > div {
  flex: 0 0 auto;
  min-width: 0;
}

.tender-page__header-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  -webkit-overflow-scrolling: touch;
}

.tender-page__header-actions .btn,
.tender-page__header-actions .badge {
  flex: 0 0 auto;
  white-space: nowrap;
}

.tender-page__header-actions .btn {
  padding-left: 0.95rem;
  padding-right: 0.95rem;
}

@media (min-width: 992px) {
  .tender-page__header-actions {
    justify-content: flex-end;
  }
}

.tender-page__tasks-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
  flex: 0 0 auto;
}

.tender-page__tasks-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.tender-page__tasks-fullform {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8125rem;
  line-height: 1.2;
  color: var(--bs-secondary-color, #64748b);
  text-decoration: none;
  white-space: nowrap;
}

.tender-page__tasks-fullform:hover,
.tender-page__tasks-fullform:focus-visible {
  color: var(--bs-primary);
  text-decoration: underline;
}

.tender-page__tasks-fullform i {
  font-size: 0.9em;
  opacity: 0.85;
}

.application-summary__grid span {
  display: block;
  margin-bottom: 0.25rem;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.application-summary__grid strong {
  color: #172033;
  font-size: 0.98rem;
  font-weight: 800;
}

.application-summary__grid a {
  color: inherit;
  text-decoration: none;
}

.application-summary__grid a:hover {
  color: #2563eb;
}

.tender-chat {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 20rem;
  max-height: 20rem;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.15rem;
  scroll-behavior: smooth;
}

.tender-chat__message {
  max-width: 92%;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 1rem 1rem 1rem 0.35rem;
  background: rgba(248, 250, 252, 0.96);
}

.tender-chat__message--pinned {
  border-color: rgba(245, 158, 11, 0.38);
  background: rgba(255, 251, 235, 0.98);
}

.tender-chat__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.tender-chat__meta-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem;
  min-width: 0;
}

.tender-chat__pin-label {
  color: #b45309;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tender-chat__pin-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: #fff;
  color: #64748b;
  line-height: 1;
}

.tender-chat__pin-btn:hover {
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(255, 251, 235, 0.9);
}

.tender-chat__pin-btn.is-pinned {
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(254, 243, 199, 0.95);
}

.tender-chat__meta strong {
  color: #172033;
  font-size: 0.82rem;
  font-weight: 800;
}

.tender-chat__meta time {
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 600;
}

.tender-chat__filter .btn.active {
  color: #fff;
  background-color: #64748b;
  border-color: #64748b;
}

.tender-chat__attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.tender-chat__attach-chip-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  max-width: 100%;
}

.tender-chat__attach-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.05rem;
  flex-shrink: 0;
}

.tender-chat__attach-action {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: #94a3b8;
  width: 1.45rem;
  height: 1.45rem;
  padding: 0;
  border-radius: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-decoration: none;
  font-size: 0.92rem;
}

.tender-chat__attach-action:hover,
.tender-chat__attach-action:focus-visible {
  color: var(--app-accent, #2254E1);
  background: rgba(239, 246, 255, 0.95);
  text-decoration: none;
}

.tender-chat__attach-delete {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: #94a3b8;
  width: 1.45rem;
  height: 1.45rem;
  padding: 0;
  border-radius: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.tender-chat__attach-delete:hover,
.tender-chat__attach-delete:focus-visible {
  color: #b91c1c;
  background: rgba(254, 226, 226, 0.9);
}

.tender-chat__attach-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.3;
}

.tender-chat__attach-chip:hover {
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.4);
  background: rgba(239, 246, 255, 0.9);
}

.tender-chat__attach-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tender-chat__attach-preview {
  display: block;
  max-height: 80px;
  max-width: 120px;
  width: auto;
  height: auto;
  border-radius: 0.35rem;
  object-fit: cover;
}

.tender-chat__attach-chip:has(.tender-chat__attach-preview) {
  flex-direction: column;
  align-items: flex-start;
  border-radius: 0.55rem;
  padding: 0.35rem;
}

.tender-chat__draft-chips {
  max-width: 100%;
}

.tender-chat__draft-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  max-width: min(100%, 22rem);
  min-width: 0;
  padding: 0.15rem 0.35rem 0.15rem 0.55rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
}

.tender-chat__draft-chip > .bi {
  flex-shrink: 0;
}

.tender-chat__draft-chip-label {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tender-chat__draft-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-left: 0.1rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  line-height: 1;
  font-size: 1rem;
  cursor: pointer;
}

.tender-chat__draft-chip-remove:hover {
  color: #b91c1c;
  background: rgba(254, 226, 226, 0.8);
}

.tender-chat__message p {
  color: #334155;
  font-size: 0.92rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.tender-chat__composer textarea {
  resize: vertical;
  min-height: 2.8rem;
}

.tender-chat-card .input-group .btn {
  align-self: stretch;
}

.tender-create-modal .modal-dialog,
.tender-edit-modal .modal-dialog {
  max-height: calc(100vh - 1.5rem);
  margin: 0.75rem auto;
  width: min(1140px, calc(100vw - 1.5rem));
  max-width: calc(100vw - 1.5rem);
}

.tender-create-modal .modal-content,
.tender-edit-modal .modal-content {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 1.5rem);
  overflow: hidden;
}

.tender-create-modal .modal-header,
.tender-edit-modal .modal-header {
  flex: 0 0 auto;
}

.tender-create-modal form,
.tender-edit-modal form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}

.tender-create-modal .modal-body,
.tender-edit-modal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
}

.tender-create-modal .modal-body .row,
.tender-edit-modal .modal-body .row {
  --bs-gutter-x: 1rem;
  margin-left: 0;
  margin-right: 0;
}

.tender-create-modal .modal-body .row > [class*="col-"],
.tender-edit-modal .modal-body .row > [class*="col-"] {
  min-width: 0;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.tender-create-modal .modal-footer,
.tender-edit-modal .modal-footer {
  flex: 0 0 auto;
  min-width: 0;
}

.tender-create-modal .ts-wrapper,
.tender-edit-modal .ts-wrapper {
  min-width: 0;
  max-width: 100%;
}

.tender-work-types {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.25rem), 1fr));
  gap: 0.5rem;
  min-width: 0;
  width: 100%;
}

.tender-work-types__item {
  margin-bottom: 0;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  padding: 0.45rem 0.65rem;
  padding-left: 0.65rem;
  border: 1px solid var(--bs-border-color-translucent);
  border-radius: 0.65rem;
  background: var(--bs-body-bg);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.tender-work-types__item.form-check,
.tender-work-types__item.form-switch {
  padding-left: 0.65rem;
}

.tender-work-types__item .form-check-input {
  flex: 0 0 auto;
  position: static;
  float: none;
  margin: 0;
}

.tender-work-types__item .form-check-label {
  cursor: pointer;
  user-select: none;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.contact-form-modal .modal-dialog {
  height: calc(100vh - 1rem);
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.contact-form-modal .modal-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
}

.contact-form-modal form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

.contact-form-modal .modal-header,
.contact-form-modal .modal-footer {
  flex: 0 0 auto;
}

.contact-form-modal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.tenders-funnel {
  min-height: 34rem;
}

.tenders-funnel__rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(18rem, 22rem);
  gap: 1rem;
  min-height: 33rem;
  overflow-x: auto;
  padding: 0.2rem 0.15rem 1rem;
  scroll-snap-type: x proximity;
}

.tenders-funnel__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 16rem;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  border-radius: var(--app-radius-xl);
  background: rgba(255, 255, 255, 0.76);
  color: #64748b;
  font-weight: 700;
}

.tenders-funnel-column {
  display: flex;
  flex-direction: column;
  min-height: 33rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: var(--app-radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.94)),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.1), transparent 18rem);
  box-shadow: var(--app-elev-1);
  scroll-snap-align: start;
}

.tenders-funnel-column__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 0.75rem 0.7rem 0.95rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.tenders-funnel-column__header-main {
  min-width: 0;
  flex: 1 1 auto;
}

.tenders-funnel-column__promote-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  vertical-align: middle;
  white-space: nowrap;
}

.tender-split-brands {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 14rem;
  overflow: auto;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.85rem;
  background: #f8fafc;
}

.tender-brand-tenders--empty {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.06), transparent 50%),
    #fff;
}

.tenders-funnel-column__actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  flex: 0 0 auto;
}

.tenders-funnel-column__actions .btn {
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.55rem;
}

.tenders-funnel-column__menu {
  flex: 0 0 auto;
  margin-top: -0.1rem;
}

.tenders-funnel-column--add {
  min-height: 12rem;
  border-style: dashed;
  background: rgba(248, 250, 252, 0.75);
  box-shadow: none;
  justify-content: center;
}

.tenders-funnel-column__add-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 12rem;
  border: 0;
  background: transparent;
  color: #475569;
  font-weight: 700;
  cursor: pointer;
}

.tenders-funnel-column__add-btn:hover {
  color: var(--bs-primary);
}

.tenders-funnel-column__add-btn .bi {
  font-size: 1.35rem;
}

.tenders-funnel-column__menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.45rem;
  color: #64748b;
  line-height: 1;
}

.tenders-funnel-column__menu-btn:hover,
.tenders-funnel-column__menu-btn:focus,
.tenders-funnel-column__menu-btn.show {
  color: #334155;
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(248, 250, 252, 0.96);
}

.tenders-funnel-column__menu-btn .bi {
  font-size: 0.95rem;
}

.tenders-funnel-column__menu-panel {
  min-width: 9.5rem;
  padding: 0.3rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--app-radius-lg);
}

.tenders-funnel-column__menu-panel .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.55rem;
  border-radius: 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.tenders-funnel-column__menu-panel .dropdown-item .bi {
  width: 0.95rem;
  font-size: 0.82rem;
  opacity: 0.82;
}

.tenders-funnel-column__menu-panel .dropdown-divider {
  margin: 0.25rem 0;
}

.tenders-funnel-column__header h2 {
  margin: 0;
  color: #172033;
  font-size: 0.98rem;
  font-weight: 900;
  letter-spacing: -0.015em;
}

.tenders-funnel-column__header span {
  display: block;
  color: #64748b;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tenders-funnel-column__dropzone {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 0.85rem;
  transition: background-color 0.15s ease, outline-color 0.15s ease;
}

.tenders-funnel-column__dropzone.is-over {
  outline: 2px dashed rgba(37, 99, 235, 0.45);
  outline-offset: -0.45rem;
  background: rgba(37, 99, 235, 0.06);
}

.tenders-funnel-column__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 6rem;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  border-radius: var(--app-radius-lg);
  color: #94a3b8;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
}

.tenders-funnel-card {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--app-radius-lg);
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.tenders-funnel-card[draggable="true"] {
  cursor: grab;
}

.tenders-funnel-card[draggable="true"]:active {
  cursor: grabbing;
}

.tenders-funnel-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.13);
}

.tenders-funnel-card.is-dragging {
  opacity: 0.65;
  transform: rotate(1deg) scale(0.99);
}

.tenders-funnel-card.is-hash-focus,
.tenders-table__row.is-hash-focus {
  outline: 2px solid rgba(37, 99, 235, 0.55);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  transition: box-shadow 0.2s ease, outline-color 0.2s ease;
}

.tenders-funnel-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
}

.tenders-funnel-card__top a {
  color: #172033;
  font-weight: 900;
  line-height: 1.2;
  text-decoration: none;
}

.tenders-funnel-card__top a:hover {
  color: var(--brand-primary-dark);
}

.tenders-funnel-card__badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

.tenders-funnel-card__format-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.2;
  background: #e2e8f0;
  color: #334155;
}

.tenders-funnel-card__format-badge--tender {
  background: #dbeafe;
  color: #1d4ed8;
}

.tenders-funnel-card__format-badge--project {
  background: #dcfce7;
  color: #15803d;
}

.tenders-funnel-card__format-badge--queue {
  background: #fef3c7;
  color: #92400e;
}

.tenders-funnel-card__action-label {
  margin-left: 0.2rem;
  font-size: 0.7rem;
  font-weight: 600;
}

.tenders-funnel-card__stage-badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #475569;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
}

.tenders-funnel-card__client {
  margin-bottom: 0.55rem;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}

.tenders-funnel-card__metrics,
.tenders-funnel-card__worktypes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.tenders-funnel-card__metrics span,
.tenders-funnel-card__worktypes span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 0.2rem 0.48rem;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 800;
}

.tenders-funnel-card__worktypes span {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}

.tenders-funnel-card__worktypes span.is-muted {
  color: #94a3b8;
  background: transparent;
}

.tenders-funnel-card__stagechips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-height: 0.35rem;
}

.tenders-funnel-card__stagechips span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 0.18rem 0.45rem;
  color: #166534;
  background: #dcfce7;
  font-size: 0.7rem;
  font-weight: 900;
}

.tenders-funnel-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.45rem 0.55rem;
  margin-top: 0.7rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  cursor: default;
}

.tenders-funnel-card__format-choice {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  flex: 1 1 auto;
  min-width: 0;
}

.tenders-funnel-card__format-choice-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  line-height: 1;
}

.tenders-funnel-card__format-choice-btns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr));
  gap: 0.35rem;
}

.tenders-funnel-card__format-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.1rem;
  padding: 0.35rem 0.55rem;
  border-radius: 0.7rem;
  border: 1px solid transparent;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.tenders-funnel-card__format-btn .bi {
  font-size: 0.95rem;
  pointer-events: none;
}

.tenders-funnel-card__format-btn--tender {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.tenders-funnel-card__format-btn--tender:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
  transform: translateY(-1px);
}

.tenders-funnel-card__format-btn--project {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}

.tenders-funnel-card__format-btn--project:hover {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
  transform: translateY(-1px);
}

.tenders-funnel-card__format-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.tenders-funnel-card__tools {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

.tenders-funnel-card__tools:empty {
  display: none;
}

.tenders-funnel-card__tools--meta {
  margin-left: auto;
}

.tenders-funnel-card__action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 0.65rem;
  flex-shrink: 0;
  line-height: 1;
}

.tenders-funnel-card__action-btn .bi {
  font-size: 0.95rem;
  pointer-events: none;
}

.white-space-preline {
  white-space: pre-line;
}

.projects-filter-bar {
  position: relative;
  z-index: 5;
  overflow: visible;
  border-radius: 1.1rem;
  background:
    linear-gradient(180deg, #ffffff, #f8fafc);
}

.projects-filter-bar__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.85rem;
}

.projects-board-toolbar__count {
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 800;
}

.projects-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.projects-filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  color: #334155;
  background: #e2e8f0;
  font-size: 0.74rem;
  font-weight: 700;
}

.projects-status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.projects-status-chip {
  padding: 0.28rem 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.projects-status-chip:hover {
  border-color: rgba(37, 99, 235, 0.4);
  color: #1d4ed8;
}

.projects-status-chip.is-active {
  border-color: transparent;
  background: #1d4ed8;
  color: #fff;
}

.projects-board-card {
  border-radius: 1.25rem;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.06), transparent 32rem),
    linear-gradient(180deg, #ffffff, #f8fafc);
}

.projects-table {
  margin-bottom: 0;
  --projects-table-row-border: rgba(148, 163, 184, 0.22);
}

.projects-table thead th {
  border-bottom-width: 1px;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  vertical-align: middle;
  background: rgba(248, 250, 252, 0.95);
}

.projects-table tbody td {
  padding: 0.85rem 0.7rem;
  border-color: var(--projects-table-row-border);
  vertical-align: middle;
}

.projects-table__row {
  transition: background-color 0.12s ease;
}

.projects-table__row:hover {
  background: rgba(241, 245, 249, 0.72);
}

.projects-table__row.is-mine {
  box-shadow: inset 3px 0 0 #0ea5e9;
}

.projects-table__row.is-overdue {
  background: rgba(254, 242, 242, 0.55);
}

.projects-table__project {
  min-width: 14rem;
  max-width: 22rem;
}

.projects-table__name {
  display: -webkit-box;
  overflow: hidden;
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.projects-table__name:hover {
  color: #1d4ed8;
}

.projects-table__project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.projects-table__code {
  padding: 0.12rem 0.4rem;
  border-radius: 0.35rem;
  color: #64748b;
  background: #f1f5f9;
  font-size: 0.72rem;
  font-weight: 700;
}

.projects-table__primary {
  color: #334155;
  font-size: 0.9rem;
  font-weight: 700;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.projects-table__dates {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 9.5rem;
}

.projects-table__date-range {
  color: #475569;
  font-size: 0.82rem;
  font-weight: 700;
}

.projects-table__mini-progress {
  height: 0.28rem;
  margin-top: 0.35rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
  max-width: 9.5rem;
}

.projects-table__mini-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #14b8a6);
}

.projects-table__budget {
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
}

.projects-table__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  max-width: 11rem;
}

.projects-table__tags span {
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 0.7rem;
  font-weight: 700;
}

.projects-table__tags span.is-muted {
  color: #94a3b8;
  background: transparent;
}

.projects-table__actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  white-space: nowrap;
}

.projects-table__th--actions {
  width: 1%;
}

@media (max-width: 991.98px) {
  .projects-table__primary {
    max-width: 8rem;
  }
}

.projects-empty-state {
  display: grid;
  place-items: center;
  gap: 0.35rem;
  min-height: 12rem;
  padding: 1.5rem;
  border: 1px dashed rgba(148, 163, 184, 0.7);
  border-radius: 1.15rem;
  color: #64748b;
  background: rgba(248, 250, 252, 0.72);
  text-align: center;
}

.projects-empty-state__title {
  color: #334155;
  font-weight: 800;
}

.projects-empty-state__text {
  max-width: 28rem;
  font-size: 0.9rem;
}

.projects-empty-state--loading {
  font-weight: 700;
}

.projects-mine-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.projects-mine-pill--owner {
  color: #9a3412;
  background: #ffedd5;
}

.projects-mine-pill--assigned,
.projects-mine-pill--mine {
  color: #075985;
  background: #e0f2fe;
}

.crm-project-card {
  position: relative;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 1.15rem;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.crm-project-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
}

.crm-project-card.is-mine {
  border-color: rgba(14, 165, 233, 0.35);
}

.crm-project-card__accent {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: #94a3b8;
}

.crm-project-card--active .crm-project-card__accent { background: #10b981; }
.crm-project-card--planning .crm-project-card__accent { background: #3b82f6; }
.crm-project-card--done .crm-project-card__accent { background: #6366f1; }
.crm-project-card--draft .crm-project-card__accent { background: #94a3b8; }
.crm-project-card--cancelled .crm-project-card__accent { background: #ef4444; }

.crm-project-card__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1rem 1.1rem 1.05rem;
}

.crm-project-card__top,
.crm-project-card__timeline-head,
.crm-project-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.crm-project-card__badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.crm-project-card__code {
  display: inline-flex;
  max-width: 9.5rem;
  padding: 0.2rem 0.5rem;
  overflow: hidden;
  border-radius: 0.45rem;
  color: #64748b;
  background: #f1f5f9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 0;
}

.crm-project-card__status {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.crm-project-card__status--active {
  color: #047857;
  background: #d1fae5;
}

.crm-project-card__status--planning {
  color: #1d4ed8;
  background: #dbeafe;
}

.crm-project-card__status--done {
  color: #4338ca;
  background: #e0e7ff;
}

.crm-project-card__status--draft {
  color: #475569;
  background: #e2e8f0;
}

.crm-project-card__status--cancelled {
  color: #991b1b;
  background: #fee2e2;
}

.crm-project-card__title {
  display: -webkit-box;
  margin: 0.75rem 0 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.crm-project-card__title:hover {
  color: #1d4ed8;
}

.crm-project-card__meta {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0.65rem;
  margin: 0.85rem 0 0;
}

.crm-project-card__meta dt {
  margin: 0;
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.crm-project-card__meta dd {
  margin: 0.15rem 0 0;
  overflow: hidden;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-project-card__meta .is-empty {
  color: #94a3b8;
  font-weight: 600;
}

.crm-project-card__timeline {
  margin-top: 0.9rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.85rem;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.crm-project-card__timeline-head span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}

.crm-project-card__due {
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.crm-project-card__due--ok {
  color: #047857;
}

.crm-project-card__due--warning {
  color: #b45309;
}

.crm-project-card__due--danger {
  color: #b91c1c;
}

.crm-project-card__due--muted {
  color: #64748b;
}

.crm-project-card__progress {
  height: 0.35rem;
  margin-top: 0.5rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.crm-project-card__progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #14b8a6);
}

.crm-project-card__finance {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-top: 0.75rem;
  color: #0f172a;
  font-size: 0.86rem;
  font-weight: 800;
}

.crm-project-card__finance em {
  margin-right: 0.3rem;
  color: #94a3b8;
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.crm-project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.crm-project-card__tags span {
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 0.72rem;
  font-weight: 700;
}

.crm-project-card__tags span.is-muted {
  color: #94a3b8;
  background: transparent;
}

.crm-project-card__actions {
  margin-top: auto;
  padding-top: 0.95rem;
}

@media (max-width: 991.98px) {
  .project-tender-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-tender-details {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .project-tender-grid {
    grid-template-columns: 1fr;
  }

  .project-tender-card--wide {
    grid-column: auto;
  }
}

.clients-filter-bar {
  position: relative;
  z-index: 5;
  overflow: visible;
  border-radius: 1.1rem;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.clients-filter-bar__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.85rem;
}

.clients-result-count {
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 800;
}

.clients-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.clients-filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  color: #334155;
  background: #e2e8f0;
  font-size: 0.74rem;
  font-weight: 700;
}

.clients-status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.clients-status-chip {
  padding: 0.28rem 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.clients-status-chip:hover {
  border-color: rgba(37, 99, 235, 0.4);
  color: #1d4ed8;
}

.clients-status-chip.is-active {
  border-color: transparent;
  background: #1d4ed8;
  color: #fff;
}

.clients-registry-card {
  border-radius: 1.25rem;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.05), transparent 30rem),
    linear-gradient(180deg, #ffffff, #f8fafc);
}

.clients-table {
  margin-bottom: 0;
}

.clients-table th,
.clients-table__th {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  background: rgba(248, 250, 252, 0.95);
  border-bottom-width: 1px;
  vertical-align: middle;
}

.clients-table__th--sortable {
  padding: 0.45rem 0.35rem;
  user-select: none;
}

.clients-table__th--sortable.is-sorted {
  color: #0f172a;
  background: rgba(var(--bs-primary-rgb), 0.08);
}

.clients-table__sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  width: 100%;
  margin: 0;
  padding: 0.35rem 0.45rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-align: left;
  cursor: pointer;
}

.clients-table__sort-btn:hover {
  background: rgba(15, 23, 42, 0.05);
  color: #0f172a;
}

.clients-table__sort-icons {
  display: inline-flex;
  flex-direction: column;
  line-height: 0.55;
  opacity: 0.38;
}

.clients-table__sort-icons .bi {
  font-size: 0.55rem;
}

.clients-table__th--sortable.is-sorted .clients-table__sort-icons {
  opacity: 1;
  color: var(--bs-primary);
}

.clients-table__th--sortable.is-sorted-asc .clients-table__sort-desc,
.clients-table__th--sortable.is-sorted-desc .clients-table__sort-asc {
  opacity: 0.28;
  color: #94a3b8;
}

.clients-table tbody td {
  padding: 0.85rem 0.7rem;
  border-color: rgba(148, 163, 184, 0.22);
  vertical-align: middle;
}

.clients-table__row:hover {
  background: rgba(241, 245, 249, 0.72);
}

.clients-table__row.is-mine {
  box-shadow: inset 3px 0 0 #0ea5e9;
}

.clients-table__cell-brands {
  min-width: 10rem;
  max-width: 18rem;
}

.clients-table__cell-client {
  min-width: 11rem;
  max-width: 20rem;
}

.clients-table__name {
  display: -webkit-box;
  overflow: hidden;
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.clients-table__name:hover {
  color: #1d4ed8;
}

.clients-table__holding {
  color: #334155;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.3;
  text-decoration: none;
}

.clients-table__holding:hover {
  color: #1d4ed8;
}

.clients-table__sub {
  margin-top: 0.2rem;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clients-mine-pill {
  display: inline-flex;
  margin-top: 0.3rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  color: #075985;
  background: #e0f2fe;
  font-size: 0.68rem;
  font-weight: 800;
}

.clients-table__brands,
.clients-table__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  max-width: 12rem;
}

.clients-table__brands--lead {
  max-width: 22rem;
  gap: 0.36rem;
}

.clients-table__brands span,
.clients-table__brands a.clients-table__brand,
.clients-table__tags span {
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 0.7rem;
  font-weight: 700;
}

.clients-table__brands--lead a.clients-table__brand {
  color: #0f172a;
  background: #e2e8f0;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.clients-table__brands--lead a.clients-table__brand:hover {
  color: #1d4ed8;
}

.clients-table__brands span.is-muted,
.clients-table__tags span.is-muted {
  color: #94a3b8;
  background: transparent;
}

.clients-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.clients-status-pill--current {
  color: #047857;
  background: #d1fae5;
}

.clients-status-pill--prospect {
  color: #1d4ed8;
  background: #dbeafe;
}

.clients-status-pill--past {
  color: #475569;
  background: #e2e8f0;
}

.clients-status-pill--blacklist {
  color: #991b1b;
  background: #fee2e2;
}

.clients-table__manager {
  color: #334155;
  font-size: 0.9rem;
  font-weight: 700;
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clients-table__actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  white-space: nowrap;
}

.clients-table__th--actions,
.clients-table__cell-actions {
  width: 1%;
}

.client-profile-page {
  --client-profile-nav-offset: 4rem;
  --client-profile-header-sticky-h: 4.5rem;
  --client-profile-sticky-bg: #eef2f8;
}

.client-profile__header-sentinel,
.client-profile__hub-tabs-sentinel {
  height: 1px;
  margin: 0;
  pointer-events: none;
  visibility: hidden;
}

.client-profile__header {
  position: sticky;
  top: var(--client-profile-nav-offset);
  z-index: 41;
  margin-left: -0.35rem;
  margin-right: -0.35rem;
  margin-bottom: 0.85rem;
  padding: 0.55rem 0.35rem 0.7rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  background: var(--client-profile-sticky-bg);
  transition: padding 0.18s ease, gap 0.18s ease, box-shadow 0.18s ease;
}

.client-profile__header.is-compact {
  gap: 0.4rem 0.75rem;
  padding-top: 0.3rem;
  padding-bottom: 0.35rem;
  align-items: center;
  box-shadow: 0 0.35rem 0.9rem -0.55rem rgba(15, 23, 42, 0.35);
}

.client-profile__header.is-compact .app-page__subtitle {
  display: none;
}

.client-profile__header.is-compact .app-page__title {
  font-size: 0.98rem;
}

.client-profile__header.is-compact .app-page__header-actions {
  gap: 0.35rem;
}

.client-profile__header.is-compact .app-page__header-actions .btn {
  padding: 0.22rem 0.55rem;
  font-size: 0.8rem;
}

.client-profile__hub-tabs.project-passport__hub-tabs {
  position: sticky;
  top: calc(var(--client-profile-nav-offset) + var(--client-profile-header-sticky-h));
  z-index: 40;
  background: var(--client-profile-sticky-bg) !important;
  background-color: var(--client-profile-sticky-bg) !important;
  --bs-card-bg: var(--client-profile-sticky-bg);
  transition: box-shadow 0.18s ease;
}

.client-profile__hub-tabs.is-compact {
  box-shadow: 0 0.35rem 0.9rem -0.55rem rgba(15, 23, 42, 0.35);
  border-radius: 0;
}

.client-profile__hub-tabs.is-compact .card-body {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.client-profile__hub-tabs.is-compact .project-passport__hub-tab {
  padding: 0.28rem 0.7rem;
  font-size: 0.82rem;
}

.client-hero {
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgb(var(--brand-primary-rgb) / 0.13), transparent 34rem),
    linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.client-hero__title {
  color: #172033;
  font-size: clamp(1.55rem, 2.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.client-profile__tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  margin-left: 0.25rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: rgb(var(--brand-neutral-rgb) / 0.1);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}

.project-passport__hub-tab[aria-selected="true"] .client-profile__tab-count {
  background: rgb(var(--brand-primary-rgb) / 0.2);
}

.client-edit-block .card-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.client-edit-block .form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--bs-secondary-color);
}

.client-brand-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.client-brand-chip,
.client-segment-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid rgb(var(--brand-primary-rgb) / 0.15);
  border-radius: 999px;
  background: rgb(var(--brand-primary-rgb) / 0.08);
  color: var(--brand-primary-dark);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}

.client-brand-chip {
  padding: 0.42rem 0.72rem;
  text-decoration: none;
}

a.client-brand-chip:hover {
  background: rgb(var(--brand-primary-rgb) / 0.16);
  color: var(--brand-primary-dark);
}

.client-create-brand-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-height: 1.75rem;
}

.client-create-brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.32rem 0.55rem 0.32rem 0.72rem;
  border: 1px solid rgb(var(--brand-primary-rgb) / 0.15);
  border-radius: 999px;
  background: rgb(var(--brand-primary-rgb) / 0.08);
  color: var(--brand-primary-dark);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}

.client-create-brand-chip__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-size: 1rem;
  line-height: 1;
}

.client-create-brand-chip__remove:hover,
.client-create-brand-chip__remove:focus-visible {
  background: rgb(var(--brand-primary-rgb) / 0.18);
}

.client-brand-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.client-brand-list__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--app-radius-lg);
  background: rgba(255, 255, 255, 0.76);
}

.client-brand-archive > summary {
  cursor: pointer;
  font-weight: 700;
  color: #64748b;
}

.client-brand-page__header {
  margin-bottom: 1.25rem;
}

.client-segment-pill {
  padding: 0.3rem 0.6rem;
  background: #fff;
}

.client-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.client-profile-field {
  min-height: 4.25rem;
  padding: 0.78rem 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--app-radius-lg);
  background: rgba(255, 255, 255, 0.76);
}

.client-profile-field span,
.client-stat-grid span {
  display: block;
  margin-bottom: 0.25rem;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.client-profile-field strong {
  color: #1e293b;
  font-size: 0.95rem;
}

.client-stat-panel {
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--app-radius-xl);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.client-stat-panel__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.client-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.client-stat-grid div {
  padding: 0.75rem;
  border-radius: var(--app-radius-lg);
  background: #f8fafc;
}

.client-stat-grid strong {
  color: #0f172a;
  font-size: 1.05rem;
}

.client-notes-stack {
  display: grid;
  gap: 1rem;
}

.client-activity-list {
  display: grid;
  gap: 0.55rem;
}

.client-activity-item {
  display: grid;
  grid-template-columns: minmax(8rem, 0.8fr) minmax(12rem, 1.6fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--app-radius-lg);
  background: rgba(255, 255, 255, 0.86);
  color: #0f172a;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.client-activity-item:hover {
  border-color: rgb(var(--brand-primary-rgb) / 0.25);
  box-shadow: var(--app-elev-1);
  color: #0f172a;
  transform: translateY(-1px);
}

.client-activity-item__date {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
}

.client-activity-item__title {
  font-weight: 900;
}

.client-activity-item__meta {
  justify-self: end;
}

.client-projects-card {
  border-radius: var(--app-radius-xl);
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgb(var(--brand-primary-rgb) / 0.1), transparent 28rem),
    linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.client-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.client-section-eyebrow {
  margin-bottom: 0.15rem;
  color: var(--brand-primary-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.client-section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  background: rgb(var(--brand-primary-rgb) / 0.1);
  color: var(--brand-primary-dark);
  font-weight: 900;
}

.client-portal-desk__head {
  gap: 1.25rem;
}

.client-portal-seats {
  min-width: 16rem;
  max-width: 22rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgb(15 23 42 / 0.08);
  border-radius: var(--app-radius-lg, 1rem);
  background: #fff;
}

.client-portal-seats__meter {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.client-portal-seats__value {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.client-portal-seats__label {
  color: var(--text-muted, #64748b);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.client-portal-seats__bar {
  height: 0.35rem;
  margin: 0.55rem 0 0.75rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(15 23 42 / 0.08);
}

.client-portal-seats__bar.is-unlimited {
  background: repeating-linear-gradient(
    -45deg,
    rgb(var(--brand-primary-rgb) / 0.12),
    rgb(var(--brand-primary-rgb) / 0.12) 6px,
    rgb(15 23 42 / 0.06) 6px,
    rgb(15 23 42 / 0.06) 12px
  );
}

.client-portal-seats__bar span {
  display: block;
  height: 100%;
  background: var(--brand-primary);
  transition: width 0.2s ease;
}

.client-portal-seats__bar.is-full span {
  background: #b45309;
}

.client-portal-desk__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(18rem, 0.9fr);
  gap: 1.25rem;
  margin-top: 0.5rem;
}

@media (max-width: 991.98px) {
  .client-portal-desk__grid {
    grid-template-columns: 1fr;
  }
}

.client-portal-pane__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.client-portal-user,
.client-portal-space {
  padding: 0.85rem 0.95rem;
  margin-bottom: 0.65rem;
  border: 1px solid rgb(15 23 42 / 0.08);
  border-radius: 0.9rem;
  background: #fff;
}

.client-portal-user.is-disabled {
  opacity: 0.72;
}

.client-portal-user__main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.client-portal-user__who {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.client-portal-user__login {
  color: var(--text-muted, #64748b);
  font-size: 0.82rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.client-portal-user__status {
  flex-shrink: 0;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgb(22 163 74 / 0.12);
  color: #166534;
  font-size: 0.72rem;
  font-weight: 700;
}

.client-portal-user.is-disabled .client-portal-user__status {
  background: rgb(15 23 42 / 0.08);
  color: #475569;
}

.client-portal-user__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1rem;
  margin: 0.65rem 0 0.4rem;
}

.client-portal-user__meta dt {
  color: var(--text-muted, #64748b);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.client-portal-user__meta dd {
  margin: 0;
  font-size: 0.86rem;
}

.client-portal-user__spaces {
  margin: 0 0 0.65rem;
  color: var(--text-muted, #64748b);
  font-size: 0.82rem;
}

.client-portal-user__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.client-portal-space__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.client-portal-space__boards {
  flex-shrink: 0;
  color: var(--text-muted, #64748b);
  font-size: 0.75rem;
}

.client-portal-access__caption {
  margin: 0 0 0.35rem;
  color: var(--text-muted, #64748b);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.client-portal-access__modes {
  display: inline-flex;
  max-width: 100%;
  margin-bottom: 0.65rem;
  padding: 0.18rem;
  border: 1px solid rgb(15 23 42 / 0.08);
  border-radius: 0.7rem;
  background: rgb(15 23 42 / 0.04);
}

.client-portal-access__mode {
  position: relative;
  display: flex;
  margin: 0;
  cursor: pointer;
}

.client-portal-access__mode input {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  width: auto;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  cursor: pointer;
}

.client-portal-access__mode span {
  position: relative;
  z-index: 0;
  min-width: 7.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 0.55rem;
  color: var(--text-muted, #64748b);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
}

.client-portal-access__mode:hover span {
  color: var(--text-body, #0f172a);
}

.client-portal-access__mode input:checked + span {
  background: #fff;
  color: var(--brand-primary-dark);
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.12);
}

.client-portal-access__mode input:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 1px;
}

.client-portal-people {
  display: grid;
  gap: 0.45rem;
}

.client-portal-people.is-everyone .client-portal-people__filter,
.client-portal-people.is-everyone .client-portal-people__list {
  display: none;
}

.client-portal-people__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-height: 1.6rem;
}

.client-portal-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  padding: 0.15rem 0.45rem 0.15rem 0.55rem;
  border: 0;
  border-radius: 999px;
  background: rgb(var(--brand-primary-rgb) / 0.12);
  color: var(--brand-primary-dark);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.client-portal-chip--all {
  background: rgb(22 163 74 / 0.12);
  color: #166534;
}

.client-portal-chip span {
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.7;
}

.client-portal-people__empty {
  margin: 0;
  color: #b45309;
  font-size: 0.78rem;
}

.client-portal-people__list {
  max-height: 12.5rem;
  overflow: auto;
  border: 1px solid rgb(15 23 42 / 0.08);
  border-radius: 0.75rem;
  background: #fafbfc;
}

.client-portal-person {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid rgb(15 23 42 / 0.06);
  cursor: pointer;
}

.client-portal-person:last-child {
  border-bottom: 0;
}

.client-portal-person:hover {
  background: #fff;
}

.client-portal-person.is-disabled {
  opacity: 0.62;
}

.client-portal-person input {
  margin: 0;
  flex-shrink: 0;
}

.client-portal-person__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: hsl(var(--avatar-hue, 210) 45% 42%);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.client-portal-person__who {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.05rem;
}

.client-portal-person__who strong {
  overflow: hidden;
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-portal-person__who span {
  overflow: hidden;
  color: var(--text-muted, #64748b);
  font-size: 0.72rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-portal-issue {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgb(15 23 42 / 0.08);
}

.client-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 0.85rem;
}

.client-project-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: var(--app-radius-xl);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--app-elev-1);
}

.client-project-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.client-project-card__title {
  color: #172033;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.2;
  text-decoration: none;
}

.client-project-card__title:hover {
  color: var(--brand-primary-dark);
}

.client-project-card__sub {
  margin-top: 0.2rem;
  color: #64748b;
  font-size: 0.78rem;
}

.client-project-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 0.28rem 0.58rem;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.client-project-status--active {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.client-project-status--planning {
  background: rgb(var(--brand-primary-rgb) / 0.1);
  color: var(--brand-primary-dark);
}

.client-project-status--cancelled {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
}

.client-project-status--done {
  background: rgba(15, 23, 42, 0.08);
  color: #334155;
}

.client-project-card__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.client-project-card__metrics div {
  padding: 0.55rem;
  border-radius: var(--app-radius-lg);
  background: #f8fafc;
}

.client-project-card__metrics span {
  display: block;
  margin-bottom: 0.18rem;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.client-project-card__metrics strong {
  color: #0f172a;
  font-size: 0.82rem;
}

.client-project-card__meta,
.client-project-card__contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.client-project-card__meta span,
.client-project-card__contacts span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 0.22rem 0.5rem;
  background: rgb(var(--brand-primary-rgb) / 0.08);
  color: var(--brand-primary-dark);
  font-size: 0.72rem;
  font-weight: 800;
}

.client-project-card__contacts span {
  background: #f1f5f9;
  color: #475569;
}

.client-project-card__contacts span.is-muted {
  color: #94a3b8;
}

.client-project-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

.client-project-empty {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  border-radius: var(--app-radius-xl);
  background: rgba(255, 255, 255, 0.75);
}

.client-project-empty h6 {
  margin: 0 0 0.2rem;
  color: #172033;
  font-weight: 900;
}

.client-project-empty p {
  margin: 0;
  color: #64748b;
}

.text-preline {
  white-space: pre-line;
}

.contact-hero,
.contact-info-card {
  border-radius: var(--app-radius-xl);
}

.contact-hero {
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.16), transparent 28rem),
    radial-gradient(circle at bottom right, rgb(var(--brand-primary-rgb) / 0.11), transparent 30rem),
    linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.contact-hero__title {
  color: #172033;
  font-size: clamp(1.55rem, 2.5vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.contact-quick-grid,
.contact-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.contact-quick-card,
.contact-stat-grid div {
  padding: 0.78rem 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--app-radius-lg);
  background: rgba(255, 255, 255, 0.78);
}

.contact-quick-card span,
.contact-stat-grid span {
  display: block;
  margin-bottom: 0.25rem;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.contact-quick-card strong,
.contact-stat-grid strong {
  display: block;
  margin-top: 0.15rem;
  color: #172033;
  font-size: 0.95rem;
  line-height: 1.35;
  word-break: break-word;
}

.contact-quick-card--span-2 {
  grid-column: 1 / -1;
}

.contact-quick-card--referrer .contact-referrer-select {
  margin-top: 0.35rem;
}

.contact-quick-card--referrer .contact-referrer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.contact-quick-card--referrer .form-text {
  margin-top: 0.35rem;
  font-size: 0.78rem;
}

.contact-stat-grid small {
  display: block;
  margin-top: 0.2rem;
  color: #64748b;
}

.contact-stat-panel {
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--app-radius-xl);
  background: rgba(255, 255, 255, 0.86);
}

.contact-info-card--accent {
  border-left: 4px solid #f97316 !important;
}

.contact-influence-pill,
.contact-gift-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
}

.contact-influence-pill--regular,
.contact-influence-pill-- {
  border: 1px solid rgba(100, 116, 139, 0.18);
  background: #f8fafc;
  color: #475569;
}

.contact-influence-pill--decision_maker {
  border: 1px solid rgb(var(--brand-primary-rgb) / 0.18);
  background: rgb(var(--brand-primary-rgb) / 0.09);
  color: var(--brand-primary-dark);
}

.contact-influence-pill--super_decision_maker {
  border: 1px solid rgba(249, 115, 22, 0.28);
  background: rgba(249, 115, 22, 0.12);
  color: #c2410c;
}

.contact-gift-pill {
  border: 1px solid rgba(249, 115, 22, 0.28);
  background: rgba(249, 115, 22, 0.12);
  color: #c2410c;
}

.contact-gift-switch {
  padding: 0.85rem 0.85rem 0.85rem 3rem;
  border: 1px solid rgba(249, 115, 22, 0.22);
  border-radius: var(--app-radius-lg);
  background: rgba(249, 115, 22, 0.07);
}

.contacts-filter-bar {
  border-radius: 1.1rem;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.contacts-filter-bar__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.85rem;
}

.contacts-result-count {
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 800;
}

.contacts-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.contacts-filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  color: #334155;
  background: #e2e8f0;
  font-size: 0.74rem;
  font-weight: 700;
}

.contacts-influence-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.contacts-influence-chip {
  padding: 0.28rem 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.contacts-influence-chip:hover {
  border-color: rgba(37, 99, 235, 0.4);
  color: #1d4ed8;
}

.contacts-influence-chip.is-active {
  border-color: transparent;
  background: #1d4ed8;
  color: #fff;
}

.contacts-client-link-switch {
  display: flex;
  width: 100%;
  align-items: center;
  padding: 0.15rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.9);
  gap: 0.1rem;
}

.contacts-client-link-switch__item {
  flex: 1 1 0;
  min-width: 0;
  padding: 0.3rem 0.35rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  color: #475569;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.contacts-client-link-switch__item:hover {
  color: var(--brand-primary-dark);
  background: rgba(255, 255, 255, 0.85);
}

.contacts-client-link-switch__item.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-primary-dark), var(--brand-primary-light));
  box-shadow: 0 4px 12px rgb(var(--brand-primary-rgb) / 0.28);
}

.contacts-registry-card {
  border-radius: 1.25rem;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.05), transparent 30rem),
    linear-gradient(180deg, #ffffff, #f8fafc);
}

.contacts-table {
  margin-bottom: 0;
}

.contacts-table th,
.contacts-table__th {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  background: rgba(248, 250, 252, 0.95);
  border-bottom-width: 1px;
  vertical-align: middle;
}

.contacts-table__th--sortable {
  padding: 0.45rem 0.35rem;
  user-select: none;
}

.contacts-table__th--sortable.is-sorted {
  color: #0f172a;
  background: rgba(var(--bs-primary-rgb), 0.08);
}

.contacts-table__sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  width: 100%;
  margin: 0;
  padding: 0.35rem 0.45rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-align: left;
  cursor: pointer;
}

.contacts-table__sort-btn:hover {
  background: rgba(15, 23, 42, 0.05);
  color: #0f172a;
}

.contacts-table__sort-icons {
  display: inline-flex;
  flex-direction: column;
  line-height: 0.55;
  opacity: 0.38;
}

.contacts-table__sort-icons .bi {
  font-size: 0.55rem;
}

.contacts-table__th--sortable.is-sorted .contacts-table__sort-icons {
  opacity: 1;
  color: var(--bs-primary);
}

.contacts-table__th--sortable.is-sorted-asc .contacts-table__sort-desc,
.contacts-table__th--sortable.is-sorted-desc .contacts-table__sort-asc {
  opacity: 0.28;
  color: #94a3b8;
}

.contacts-table tbody td {
  padding: 0.85rem 0.7rem;
  border-color: rgba(148, 163, 184, 0.22);
  vertical-align: middle;
}

.contacts-table__row:hover {
  background: rgba(241, 245, 249, 0.72);
}

.contacts-table__row.is-free {
  box-shadow: inset 3px 0 0 #94a3b8;
}

.contacts-table__cell-name {
  min-width: 11rem;
  max-width: 18rem;
}

.contacts-table__name {
  display: -webkit-box;
  overflow: hidden;
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.contacts-table__name:hover {
  color: #1d4ed8;
}

.contacts-table__sub {
  margin-top: 0.2rem;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contacts-table__client {
  color: #334155;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.contacts-table__client:hover {
  color: #1d4ed8;
}

.contacts-free-pill {
  display: inline-flex;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  color: #475569;
  background: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 800;
}

.contacts-table__cell-birthday {
  min-width: 7.5rem;
}

.contacts-table__birthday {
  color: #334155;
  font-size: 0.88rem;
  font-weight: 700;
}

.contacts-table__cell-birthday .contact-gift-pill {
  margin-top: 0.3rem;
}

.contacts-table__channels {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  max-width: 14rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: #334155;
}

.contacts-table__channels a {
  color: #1d4ed8;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contacts-table__projects {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  max-width: 12rem;
}

.contacts-table__projects a {
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contacts-table__projects a:hover {
  color: #1d4ed8;
}

.contacts-table__projects .is-muted {
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 700;
}

.contacts-table__actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  white-space: nowrap;
}

.contacts-table__th--actions,
.contacts-table__cell-actions {
  width: 1%;
}

.calendar-event--birthday {
  border: 1px solid rgba(249, 115, 22, 0.3);
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.18);
}

.calendar-item-type-switch {
  flex-shrink: 0;
}

.calendar-item-type-switch .btn {
  white-space: nowrap;
}

.calendar-event--task {
  border: 1px solid rgba(99, 102, 241, 0.35);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.16);
}

.event-chip__birthday,
.event-birthday-gift {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff7ed;
}

.event-chip__task {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #eef2ff;
}

@media (max-width: 767.98px) {
  .client-profile-grid,
  .client-stat-grid,
  .contact-quick-grid,
  .contact-stat-grid,
  .client-activity-item {
    grid-template-columns: 1fr;
  }

  .client-project-card__metrics {
    grid-template-columns: 1fr;
  }

  .client-activity-item__meta {
    justify-self: start;
  }
}

.workload-gantt__bar-proj {
  display: block;
  font-size: 0.65em;
  opacity: 0.88;
  font-weight: 400;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

@media (max-width: 991.98px) {
  .workload-gantt__name {
    font-size: 0.74rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .workload-gantt__hcell {
    font-size: 0.65rem;
    padding: 0.2rem 0.05rem;
  }

  .workload-gantt__day-title {
    font-size: 0.62rem;
    padding: 0.25rem 0.1rem;
  }
}

@media (max-width: 575.98px) {
  .workload-gantt__scroll {
    max-height: min(65vh, 42rem);
    border-radius: 6px;
  }

  .workload-gantt__header-hours {
    grid-template-columns: repeat(12, minmax(1.65rem, 1fr));
  }

  .workload-gantt__header-hours--multiday {
    grid-template-columns: repeat(var(--gantt-mday-cols, 64), minmax(0, 1fr));
  }

  .workload-gantt__header-hours--multiday .workload-gantt__hcell {
    font-size: 0.5rem;
    padding: 0.08rem 0;
  }

  .workload-gantt__bar {
    font-size: 0.58rem;
    padding: 2px 3px;
    border-radius: 3px;
  }

  .workload-gantt__corner--multiday {
    min-height: 5rem;
  }
}

@media (hover: none) and (pointer: coarse) {
  .workload-gantt__bar {
    min-height: 1.65rem;
  }

  .workload-page__view-switch .btn {
    min-height: 2.75rem;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
  }

  .workload-queue-list .task-card {
    min-height: 3.25rem;
  }

  .workload-page__nav-icon {
    min-width: 2.75rem;
    min-height: 2.75rem;
  }
}

/* Загрузка: месяц / неделя — календарная сетка, крупнее ячейки на телефоне */
@media (max-width: 767.98px) {
  #workloadCalendarContainer .calendar-day-column {
    min-width: 0;
  }

  #workloadCalendarContainer .calendar-4days-grid .calendar-day-column .calendar-events,
  #workloadCalendarContainer .calendar-day-grid .calendar-day-column .calendar-events {
    min-height: 8rem;
  }

  #workloadCalendarContainer .calendar-month-view .calendar-day {
    min-height: 2.6rem;
  }

  #workloadCalendarContainer .calendar-month-view .day-number {
    font-size: 0.8rem;
    font-weight: 600;
  }
}

@media (max-width: 991.98px) {
  .workload-gantt__header:not(.workload-gantt__header--multiday),
  .workload-gantt__row:not(.workload-gantt__row--multiday) {
    grid-template-columns: var(--gantt-name-w, 10rem) minmax(0, 1fr);
  }

  .workload-gantt__header--multiday,
  .workload-gantt__row--multiday {
    grid-template-columns: var(--gantt-name-w, 10rem) max-content;
  }

  .workload-gantt__corner {
    min-width: var(--gantt-name-w, 10rem);
  }
}

/* --- Home page --- */
.home-page__tile {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.home-page__tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--app-elev-2);
}

.home-page__icon {
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  background: rgb(var(--brand-primary-rgb) / 0.12);
  color: var(--brand-primary-dark);
  font-size: 1.25rem;
}

.home-dashboard__widgets {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.home-dashboard__widget-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--bs-secondary-color);
  margin-bottom: 0.75rem;
}

.home-dashboard__row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgb(var(--brand-primary-rgb) / 0.08);
  text-decoration: none;
  color: inherit;
}

.home-dashboard__row:last-child {
  border-bottom: 0;
}

.home-dashboard__row:hover .home-dashboard__row-main {
  color: var(--brand-primary-dark);
}

.home-dashboard__row-main {
  font-weight: 500;
  font-size: 0.9375rem;
}

.home-dashboard__row-meta {
  font-size: 0.8125rem;
  color: var(--bs-secondary-color);
}

.home-dashboard__empty {
  font-size: 0.875rem;
  color: var(--bs-secondary-color);
}

.home-dashboard__pipeline-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.875rem;
  padding: 0.35rem 0;
}

.home-dashboard__kpi {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .calendar-day.drag-over,
  .calendar-day-column.drag-over {
    animation: none;
  }
  
  .drag-date-indicator,
  .drag-tooltip {
    animation: none;
  }
}

.project-passport__ops-tabs .nav-link {
  font-size: 0.9rem;
}

.project-passport__ops-tab-content {
  padding-top: 0.15rem;
}

.project-passport__ops-labor-section {
  padding-top: 0.25rem;
  border-top: 1px solid rgb(var(--brand-primary-rgb) / 0.08);
}

.project-passport__ops-labor-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.project-passport__participation-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.project-passport__participation-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  background: rgb(var(--brand-primary-rgb) / 0.06);
  border: 1px solid rgb(var(--brand-primary-rgb) / 0.12);
  color: #475569;
}

.project-passport__participation-table th {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
  white-space: nowrap;
}

.project-passport__participation-cell {
  min-width: 9rem;
  max-width: 18rem;
}

.project-passport__participation-link {
  display: block;
  font-size: 0.82rem;
  text-decoration: none;
  line-height: 1.35;
  margin-bottom: 0.15rem;
}

.project-passport__participation-link:hover {
  text-decoration: underline;
}

/* Модалка редактирования проекта — группировка полей */
.project-edit-modal__header {
  align-items: flex-start;
  gap: 0.75rem;
  padding-bottom: 0.85rem;
}

.project-edit-modal__lead {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.35;
}

.project-edit-form {
  display: grid;
  gap: 0;
  padding-top: 0.75rem;
  padding-bottom: 0.5rem;
}

.project-edit-form__section {
  padding: 1rem 0 1.15rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.project-edit-form__section--last {
  border-bottom: 0;
  padding-bottom: 0.25rem;
}

.project-edit-form__section-title {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.project-edit-form .form-label {
  margin-bottom: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}

.project-edit-form .form-control-lg {
  font-size: 1.05rem;
  font-weight: 600;
}

.project-edit-form .form-text {
  margin-top: 0.3rem;
  font-size: 0.76rem;
  line-height: 1.35;
}

.project-edit-form .input-group-text {
  background: rgb(var(--brand-neutral-rgb) / 0.06);
  color: #64748b;
  font-weight: 600;
}

.task-searchable-select { z-index: 4; }
.task-searchable-select:focus-within { z-index: 30; }
.task-searchable-select__control { position: relative; }
.task-searchable-select__control > .bi-search {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}
.task-searchable-select__control .form-control {
  padding-left: 2.15rem;
  padding-right: 2.15rem;
}
.task-searchable-select__clear {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #94a3b8;
  width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.4rem;
}
.task-searchable-select__clear:hover,
.task-searchable-select__clear:focus-visible {
  color: #0f172a;
  background: rgba(148, 163, 184, 0.18);
}
.task-searchable-select__list {
  z-index: 40;
  max-height: 16rem;
  overflow: auto;
  margin: 0.25rem 0 0;
  padding: 0.35rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 0.5rem;
  background: var(--bs-body-bg, #fff);
  box-shadow: 0 0.5rem 1rem rgba(15, 23, 42, 0.12);
  text-align: left;
}
.task-searchable-select__option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.2rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: 0.4rem;
  text-align: left;
  cursor: pointer;
}
.task-searchable-select__list .task-searchable-select__option.active,
.task-searchable-select__list .task-searchable-select__option:hover {
  background: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.08);
}
.task-searchable-select__option-label {
  width: 100%;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  word-break: break-word;
}
.task-searchable-select__option-meta {
  max-width: 100%;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.3;
  text-align: left;
}
.task-searchable-select__option-meta--tender {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: rgba(154, 52, 18, 0.1);
  color: #9a3412;
  font-size: 0.72rem;
  font-weight: 600;
}
.task-searchable-select__empty {
  padding: 0.65rem 0.75rem;
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.4;
  text-align: left;
  cursor: default;
  pointer-events: none;
}
#projectEditModal .task-searchable-select:focus-within,
#projectModal .task-searchable-select:focus-within,
#clientModal .task-searchable-select:focus-within {
  z-index: 1080;
}

.project-edit-modal__footer {
  gap: 0.5rem;
}

.task-action-feedback {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-height: 1.5rem;
}

.task-action-progress {
  height: 0.35rem;
}

.task-contractor-modal__divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--bs-secondary-color);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.task-contractor-modal__divider::before,
.task-contractor-modal__divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--bs-border-color);
}

/* Task form + desk mobile accessibility (TCA responsive gate). */
.task-desk__mobile-nav {
  display: none;
}

.task-desk__mobile-nav-list {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.25rem;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.task-desk__mobile-nav-button {
  flex: 0 0 auto;
  min-height: 2.25rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 999px;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  font-size: 0.78rem;
  font-weight: 600;
  scroll-snap-align: start;
}

.task-desk__mobile-nav-button[aria-current="location"] {
  border-color: var(--bs-primary);
  background: rgba(var(--bs-primary-rgb), 0.12);
  color: var(--bs-primary-text-emphasis);
}

.task-desk__mobile-nav-button:focus-visible,
.task-desk__col-title:focus-visible {
  outline: 2px solid var(--app-accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--app-accent) 35%, transparent);
}

.task-desk__mobile-nav-indicator {
  min-height: 1.25rem;
  padding-inline: 0.35rem;
  color: var(--bs-secondary-color);
  font-size: 0.75rem;
}

@media (max-width: 991.98px) {
  /* TCUX_03: sidebar sticky hours removed; keep rule inert if class reappears */
  .task-card-page__sticky {
    position: static;
  }
}

@media (max-width: 767.98px) {
  .task-desk__mobile-nav {
    position: sticky;
    top: 0.5rem;
    z-index: 35;
    display: grid;
    gap: 0.2rem;
    margin-bottom: 0.65rem;
    padding: 0.35rem;
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 0.75rem;
    background: color-mix(in srgb, var(--bs-body-bg) 92%, transparent);
    box-shadow: 0 0.25rem 0.75rem rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(8px);
  }
}

@media (max-width: 575.98px) {
  .task-card-page {
    min-width: 0;
    overflow-x: clip;
  }

  .task-card-page__header {
    align-items: stretch;
  }

  .task-card-page__title-wrap,
  .task-card-page__header .app-page__header-actions {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }

  .task-card-page__header .app-page__header-actions {
    flex-wrap: wrap !important;
  }

  .task-card-page__header .app-page__header-actions .btn-primary {
    order: -2;
    flex: 1 1 auto;
  }

  .task-card-page__back {
    order: -1;
    flex: 1 1 auto;
  }

  .task-card-page__header.is-compact .app-page__header-actions {
    flex-wrap: nowrap !important;
    width: auto;
    flex: 0 0 auto;
  }

  .task-card-page__header.is-compact .app-page__header-actions .btn:not(.btn-link),
  .task-card-page__header.is-compact .task-card-page__back {
    flex: 0 0 auto !important;
    width: 2.15rem;
    height: 2.15rem;
  }

  .task-card-page__header .app-page__header-actions .btn-outline-secondary:not(.task-card-page__back) {
    order: 0;
  }

  .task-card-page__secondary-action {
    flex: 0 1 auto;
    max-width: 48%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .task-card-page__title-line,
  .task-card-page .app-page__subtitle {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .task-card-page .card-body {
    padding: 1rem !important;
  }

  .task-card-page .row > *,
  .task-card-page .modal-dialog {
    min-width: 0;
    max-width: 100%;
  }
}

@media (pointer: coarse) {
  .task-card__check,
  .task-card__menu,
  .task-card__priority,
  .task-card__add-tag,
  .task-card__tag .tag-remove,
  .task-card__avatars,
  .task-card__avatars--empty,
  .task-desk__mobile-nav-button,
  .task-checklist-item__remove,
  [data-remove-ref] {
    min-width: 44px;
    min-height: 44px;
  }
}

/* �� Hour log audit (management) �� */
.hour-log-audit-page {
  --hla-border: rgba(148, 163, 184, 0.22);
  --hla-surface: #f8fafc;
}

.hour-log-audit__header {
  align-items: flex-start;
}

.hour-log-audit__kpi {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hour-log-audit__kpi-item {
  min-width: 5.5rem;
  padding: 0.45rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--hla-border);
  background: linear-gradient(180deg, #fff 0%, var(--hla-surface) 100%);
}

.hour-log-audit__kpi-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  line-height: 1.2;
}

.hour-log-audit__kpi-value {
  display: block;
  margin-top: 0.15rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-neutral);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.hour-log-audit__export {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.hour-log-audit__demo-banner {
  background: rgb(var(--brand-primary-rgb) / 0.06);
  color: var(--brand-neutral);
}

.hour-log-audit__demo-banner code {
  font-size: 0.85em;
}

.hour-log-audit__filters {
  border: 1px solid var(--hla-border) !important;
}

.hour-log-audit__chips-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  min-height: 2.25rem;
}

.hour-log-audit__chip-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
}

.hour-log-audit__chip-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  white-space: nowrap;
  line-height: 1;
}

.hour-log-audit__chips-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: auto;
}

.hour-log-audit__details-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.55rem 0.15rem 0.35rem;
  border-radius: 999px;
  border: 1px solid var(--hla-border);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}

.hour-log-audit__details-switch .form-check-input {
  cursor: pointer;
  margin-top: 0;
  width: 2.2rem;
  height: 1.15rem;
}

.hour-log-audit__details-switch .form-check-label {
  cursor: pointer;
  user-select: none;
}

.hour-log-audit__type-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.hour-log-audit__type-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgb(var(--brand-neutral-rgb) / 0.05);
  color: var(--brand-neutral);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.hour-log-audit__type-chip:hover {
  background: rgb(var(--brand-primary-rgb) / 0.1);
  color: var(--brand-primary-dark);
}

.hour-log-audit__type-chip.is-active {
  background: rgb(var(--brand-primary-rgb) / 0.16);
  border-color: rgb(var(--brand-primary-rgb) / 0.35);
  color: var(--brand-primary-dark);
}

.hour-log-audit__board {
  border: 1px solid var(--hla-border) !important;
  overflow: hidden;
}

.hour-log-audit__table-wrap {
  max-height: min(70vh, 48rem);
  overflow: auto;
}

.hour-log-audit__table {
  --bs-table-bg: transparent;
  font-size: 0.9rem;
}

.hour-log-audit__table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--hla-surface, #fff);
  background-color: var(--hla-surface, #fff) !important;
  box-shadow: 0 1px 0 var(--hla-border, rgba(15, 23, 42, 0.12));
  border-bottom: 1px solid var(--hla-border);
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 0.7rem 0.85rem;
}

.hour-log-audit__table--grouped th:first-child,
.hour-log-audit__table--grouped td:first-child {
  min-width: 14rem;
}

.hour-log-audit__staff-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.hour-log-audit__timeoff-trigger {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.hour-log-audit__timeoff-trigger:focus-visible {
  outline: 2px solid rgb(var(--brand-primary-rgb) / 0.45);
  outline-offset: 2px;
  border-radius: 0.35rem;
}

.hour-log-audit__timeoff-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  border: 1px solid transparent;
  white-space: nowrap;
}

.hour-log-audit__timeoff-chip--vacation {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.hour-log-audit__timeoff-chip--dayoff {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.hour-log-audit__timeoff-chip--unpaid {
  background: #f3e8ff;
  color: #6b21a8;
  border-color: #d8b4fe;
}

.hour-log-audit__timeoff-popover {
  --bs-popover-max-width: 18rem;
}

.hour-log-audit__timeoff-section + .hour-log-audit__timeoff-section {
  margin-top: 0.55rem;
}

.hour-log-audit__timeoff-dates {
  margin-top: 0.2rem;
  color: #475569;
  font-size: 0.82rem;
  line-height: 1.35;
}

.hour-log-audit__row--group .hour-log-audit__person {
  font-weight: 600;
}

.hour-log-audit__table tbody td {
  border-color: var(--hla-border);
  padding: 0.75rem 0.85rem;
  vertical-align: middle;
}

.hour-log-audit__row:hover {
  background: rgb(var(--brand-primary-rgb) / 0.035);
}

.hour-log-audit__when-date {
  display: block;
  white-space: nowrap;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  color: #334155;
}

.hour-log-audit__when--tooltip {
  cursor: help;
}

.hour-log-audit__when--tooltip .hour-log-audit__when-date {
  display: inline;
}

.hour-log-audit__when-hint {
  margin-left: 0.28rem;
  font-size: 0.78rem;
  color: #94a3b8;
  vertical-align: 0.05em;
}

.hour-log-audit__timing {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.hour-log-audit__timing--now {
  background: rgb(16 185 129 / 0.12);
  color: #047857;
}

.hour-log-audit__timing--date {
  background: rgb(245 158 11 / 0.14);
  color: #b45309;
}

.hour-log-audit__type {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.hour-log-audit__type--task {
  background: rgb(var(--brand-primary-rgb) / 0.12);
  color: var(--brand-primary-dark);
}

.hour-log-audit__type--event {
  background: rgb(168 85 247 / 0.12);
  color: #7e22ce;
}

.hour-log-audit__type--project {
  background: rgb(14 165 233 / 0.14);
  color: #0369a1;
}

.hour-log-audit__type--tender {
  background: rgb(244 63 94 / 0.12);
  color: #be123c;
}

.hour-log-audit__type--adhoc {
  background: rgb(100 116 139 / 0.14);
  color: #334155;
}

.hour-log-audit__action {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.5rem;
  border-radius: 0.4rem;
  font-size: 0.72rem;
  font-weight: 650;
  white-space: nowrap;
}

.hour-log-audit__action--create {
  background: rgb(22 163 74 / 0.12);
  color: #15803d;
}

.hour-log-audit__action--update {
  background: rgb(245 158 11 / 0.16);
  color: #b45309;
}

.hour-log-audit__action--delete {
  background: rgb(239 68 68 / 0.12);
  color: #b91c1c;
}

.hour-log-audit__entity-link {
  font-weight: 600;
  color: var(--brand-primary-dark);
  text-decoration: none;
}

.hour-log-audit__entity-link:hover {
  text-decoration: underline;
}

.hour-log-audit__entity {
  max-width: 16rem;
}

.hour-log-audit__person {
  font-weight: 600;
  color: #1e293b;
}

.hour-log-audit__staff {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.25;
  min-width: 8rem;
}

.hour-log-audit__person-title {
  font-size: 0.78rem;
  font-weight: 500;
  color: #64748b;
}

.hour-log-audit__person--muted {
  font-weight: 500;
  color: #64748b;
}

.hour-log-audit__num {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}

.hour-log-audit__money {
  color: #0f766e;
}

.hour-log-audit__note {
  max-width: 14rem;
  color: #64748b;
  font-size: 0.84rem;
}

.hour-log-audit__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 2.5rem 1.25rem;
  text-align: center;
  color: #64748b;
}

.hour-log-audit__empty .bi {
  font-size: 1.75rem;
  color: rgb(var(--brand-primary-rgb) / 0.55);
}

.hour-log-audit__empty--filter {
  border-top: 1px solid var(--hla-border);
}

.hour-log-audit__pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.7rem 1rem 0.85rem;
  border-top: 1px solid var(--hla-border, #e2e8f0);
}

.hour-log-audit__pager-pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.hour-log-audit__pager-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border-radius: 0.4rem;
  border: 1px solid #e2e8f0;
  color: #334155;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.hour-log-audit__pager-link:hover {
  background: #f8fafc;
  color: var(--brand-primary-dark, #0f766e);
}

.hour-log-audit__pager-link.is-current {
  background: var(--brand-primary, #0f766e);
  border-color: transparent;
  color: #fff;
}

.hour-log-audit__pager-link.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.hour-log-audit__pager-ellipsis {
  display: inline-flex;
  min-width: 1.5rem;
  justify-content: center;
  color: #94a3b8;
}

@media (max-width: 991.98px) {
  .hour-log-audit__entity,
  .hour-log-audit__note {
    max-width: 11rem;
  }
}

.hour-log-audit__context {
  max-width: 14rem;
  min-width: 9rem;
}

.hour-log-audit__context-stack {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  line-height: 1.25;
}

.hour-log-audit__context-client {
  font-weight: 700;
  color: #1e293b;
  text-decoration: none;
}

.hour-log-audit__context-client:hover {
  color: var(--brand-primary-dark);
  text-decoration: underline;
}

.hour-log-audit__context-project {
  font-size: 0.8rem;
  color: #64748b;
  text-decoration: none;
}

.hour-log-audit__context-project:hover {
  color: var(--brand-primary-dark);
  text-decoration: underline;
}

.hour-log-audit__context-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.hour-log-audit__context-pill--internal {
  background: rgb(100 116 139 / 0.14);
  color: #475569;
}

/* Work timer (task card + navbar) */
.work-timer-nav {
  --work-timer-pulse: 0;
  box-shadow: 0 0 0 calc(0.15rem * var(--work-timer-pulse)) rgba(255, 193, 7, 0.35);
}
.work-timer-nav.is-running,
#workTimerNavItem.is-running .work-timer-nav {
  animation: work-timer-nav-pulse 1.6s ease-in-out infinite;
}
.work-timer-nav__time {
  min-width: 3.25rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
#workTimerNavItem.is-paused .work-timer-nav {
  opacity: 0.92;
  filter: saturate(0.85);
}
@keyframes work-timer-nav-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.0); }
  50% { box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.28); }
}

.task-work-timer {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.35rem 0.2rem 0.55rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 0.5rem;
  background: #f8fafc;
}
.task-work-timer.is-running {
  border-color: rgba(25, 135, 84, 0.45);
  background: rgba(25, 135, 84, 0.08);
}
.task-work-timer.is-paused {
  border-color: rgba(255, 193, 7, 0.55);
  background: rgba(255, 193, 7, 0.12);
}
.task-work-timer__display {
  min-width: 3.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  letter-spacing: 0.02em;
}
.task-work-timer.is-running .task-work-timer__display {
  color: #146c43;
}
.task-work-timer.is-paused .task-work-timer__display {
  color: #997404;
}
.task-card-page__header.is-compact .task-work-timer .app-page__action-label {
  display: none;
}

/* Expense modal � ����� ���������� ���������� */
.expense-modal .modal-header {
  align-items: flex-start;
  gap: 0.75rem;
}

.expense-docs__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .expense-docs__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.expense-docs__slot {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 7.5rem;
  padding: 0.7rem 0.75rem;
  border: 1px dashed #cbd5e1;
  border-radius: 0.65rem;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 70%);
}

.expense-docs__slot.is-filled {
  border-style: solid;
  border-color: #94a3b8;
  background: #fff;
}

.expense-docs__slot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.expense-docs__slot-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #334155;
}

.expense-docs__slot-files {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-height: 1.5rem;
}

.expense-docs__file {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  font-size: 0.78rem;
}

.expense-docs__file a {
  overflow: hidden;
  color: #0f172a;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-docs__file a:hover {
  color: #1d4ed8;
}

.expense-docs__file-pending {
  color: #475569;
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-docs__empty {
  color: #94a3b8;
  font-size: 0.75rem;
}

.expense-docs__pending li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.25rem 0;
  font-size: 0.8rem;
  color: #475569;
}

.expense-legal-forms,
.expense-vat-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.expense-legal-forms .btn,
.expense-vat-modes .btn {
  border-radius: 999px;
  font-weight: 650;
}

.expense-money-card {
  padding: 0.85rem 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 65%);
}

.expense-money-preview {
  font-size: 0.86rem;
  color: #334155;
}

.expense-money-preview strong {
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}

.workload-mine-timesheet-wrap {
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 0.55rem;
  background: #fff;
  max-width: 100%;
}

.workload-mine-timesheet-wrap.is-month {
  overflow-x: auto;
}

.workload-mine-date-input {
  width: auto;
  min-width: 10.5rem;
}

.workload-mine-week-label {
  font-size: 0.95rem;
}

.workload-mine-table {
  --wl-grid: #e2e8f0;
  margin: 0;
  font-size: 0.82rem;
  border-collapse: separate;
  border-spacing: 0;
}

.workload-mine-table th,
.workload-mine-table td {
  border: 1px solid var(--wl-grid);
  vertical-align: middle;
  padding: 0.35rem 0.45rem;
}

.workload-mine-table thead th {
  background: #f8fafc;
  font-weight: 650;
  white-space: nowrap;
  text-align: center;
}

.workload-mine-closed {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.35rem;
  font-weight: 600;
  vertical-align: middle;
}

.workload-mine-table.table > :not(caption) > * > .workload-mine-table__name {
  min-width: 16rem;
  max-width: 22rem;
  width: 16rem;
  text-align: left !important;
  position: sticky;
  left: 0;
  z-index: 3;
  background-color: #fff;
  background-clip: padding-box;
  --bs-table-bg: #fff;
  --bs-table-accent-bg: #fff;
  --bs-table-bg-state: #fff;
  box-shadow: 6px 0 8px -6px rgba(15, 23, 42, 0.18);
}

.workload-mine-table.table > thead > * > .workload-mine-table__name,
.workload-mine-table.table > tfoot > * > .workload-mine-table__name,
.workload-mine-table.table > :not(caption) > .workload-mine-table__composer > .workload-mine-table__name {
  background-color: #f8fafc;
  --bs-table-bg: #f8fafc;
  --bs-table-accent-bg: #f8fafc;
  --bs-table-bg-state: #f8fafc;
  z-index: 4;
}

.workload-mine-table.table > :not(caption) > .workload-mine-table__group > .workload-mine-table__name {
  background-color: #eef2f6;
  --bs-table-bg: #eef2f6;
  --bs-table-accent-bg: #eef2f6;
  --bs-table-bg-state: #eef2f6;
  z-index: 4;
}

.workload-mine-table--month {
  min-width: 96rem;
}

.workload-mine-table--month .workload-mine-table__day,
.workload-mine-table--month .workload-mine-table__cell,
.workload-mine-table--month .workload-mine-table__num {
  min-width: 3.6rem;
}

.workload-mine-table__project {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 650;
  margin-bottom: 0.1rem;
}

.workload-mine-table__num,
.workload-mine-table__day,
.workload-mine-table__cell {
  min-width: 4.4rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.workload-mine-table__wd {
  display: block;
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 600;
  text-transform: lowercase;
}

.workload-mine-table .is-weekend {
  background: #f1f5f9;
}

.workload-mine-table .is-today {
  box-shadow: inset 0 -2px 0 #2563eb;
}

.workload-mine-table .is-future {
  background: #f8fafc;
  color: #94a3b8;
}

.workload-mine-hours {
  min-width: 4.4rem;
  max-width: 5.2rem;
  margin: 0 auto;
  padding: 0.15rem 0.3rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.workload-mine-hours::placeholder {
  color: #94a3b8;
  font-size: 0.72rem;
}

.workload-mine-table__readonly {
  color: #334155;
}

.workload-mine-table__foot th {
  background: #f8fafc;
  font-weight: 650;
}

.workload-mine-table__foot--plan th {
  color: #64748b;
  font-weight: 550;
}

.workload-mine-table__group th {
  background: #eef2f6;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  padding: 0.45rem 0.7rem;
  border-top: 1px solid #d8dee8;
}

.workload-mine-table__group .workload-mine-table__name {
  background: #eef2f6;
  z-index: 4;
}

.workload-mine-table__group-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  text-transform: inherit;
  cursor: pointer;
}

.workload-mine-table__group-toggle .bi {
  font-size: 0.75rem;
  color: #64748b;
  transition: transform 0.15s ease;
}

.workload-mine-table__group.is-collapsed .workload-mine-table__group-toggle .bi {
  transform: rotate(-90deg);
}

.workload-mine-table__group-meta {
  margin-left: 0.6rem;
  font-weight: 550;
  letter-spacing: 0;
  text-transform: none;
  color: #64748b;
}

.workload-mine-table__empty td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  background: #fafbfc;
}

.workload-mine-table__composer .workload-mine-table__name {
  background: #f8fafc;
}

.workload-mine-table__adhoc {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem;
}

.workload-mine-table__adhoc-text {
  min-width: 0;
}

.workload-mine-table__adhoc-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.1rem;
}

.workload-mine-adhoc-pin,
.workload-mine-adhoc-delete {
  flex: 0 0 auto;
  padding: 0.1rem 0.25rem;
  line-height: 1;
}

.workload-mine-adhoc-pin {
  color: #94a3b8;
}

.workload-mine-adhoc-pin:hover,
.workload-mine-adhoc-pin:focus-visible,
.workload-mine-adhoc-pin.is-pinned {
  color: #2563eb;
}

.workload-mine-table__row--pinned > .workload-mine-table__name {
  background-color: #f4f8ff;
  --bs-table-bg: #f4f8ff;
  --bs-table-accent-bg: #f4f8ff;
  --bs-table-bg-state: #f4f8ff;
}

.workload-mine-purpose {
  max-width: 18rem;
  font-size: 0.82rem;
}

.client-comments-md__view.project-passport__md-rendered {
  min-height: 4.5rem;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.5rem;
  background: #fff;
}

.client-comments-md.project-passport__md-editor {
  min-height: 0;
}

.client-comments-md .project-passport__md-textarea,
.client-comments-md .project-passport__md-preview {
  min-height: 10rem;
}

.client-doc-form {
  padding: 1rem 1.05rem 1.05rem;
  border: 1px solid var(--app-border-soft, rgba(148, 163, 184, 0.22));
  border-radius: var(--app-radius-lg, 0.85rem);
  background:
    linear-gradient(180deg, rgb(var(--brand-primary-rgb) / 0.045), rgb(var(--brand-primary-rgb) / 0.02)),
    var(--app-surface, #fff);
  box-shadow: var(--app-elev-1, 0 4px 16px rgb(55 55 55 / 0.06));
}

.client-doc-form__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.9rem;
}

.client-doc-form__title {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  min-width: 0;
}

.client-doc-form__icon {
  display: inline-grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  flex-shrink: 0;
  border-radius: 0.7rem;
  background: rgb(var(--brand-primary-rgb) / 0.12);
  color: var(--app-accent, #2254E1);
  font-size: 1.05rem;
}

.client-doc-form.is-editing .client-doc-form__icon {
  background: rgb(var(--brand-primary-rgb) / 0.18);
}

.client-doc-form__heading {
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--app-text, #373737);
  line-height: 1.25;
}

.client-doc-form__sub {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--app-text-muted, #64748b);
  max-width: 42rem;
}

.client-doc-kind {
  display: inline-flex;
  padding: 0.18rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--app-border, #e2e8f0);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.8);
}

.client-doc-kind__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  background: transparent;
  color: var(--app-text-muted, #64748b);
  border-radius: 999px;
  padding: 0.32rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  margin: 0;
}

.client-doc-kind__btn:hover {
  color: var(--app-text, #373737);
}

.client-doc-kind__btn.is-active {
  background: var(--app-accent, #2254E1);
  color: #fff;
  box-shadow: 0 4px 10px rgb(var(--brand-primary-rgb) / 0.28);
}

.client-doc-kind__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.client-doc-kind .btn-check:checked + .client-doc-kind__btn,
.client-doc-kind .btn-check:checked + label.client-doc-kind__btn {
  background: var(--app-accent, #2254E1);
  color: #fff;
  box-shadow: 0 4px 10px rgb(var(--brand-primary-rgb) / 0.28);
}

.client-doc-form__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.55rem 0.7rem;
  align-items: end;
}

.client-doc-form__grid--one-row {
  grid-template-columns:
    minmax(8rem, 1.25fr)
    minmax(7rem, 0.85fr)
    minmax(7rem, 0.85fr)
    minmax(7rem, 0.85fr)
    minmax(9rem, 1.15fr)
    auto;
}

.client-doc-form__grid--one-row .client-doc-form__source,
.client-doc-form.is-kind-file .client-doc-form__grid--one-row .client-doc-form__source,
.client-doc-form.is-kind-link .client-doc-form__grid--one-row .client-doc-form__source {
  grid-column: auto;
}

.client-doc-form__grid--one-row .client-doc-chips {
  display: none;
}

.client-doc-form__source {
  grid-column: span 2;
}

.client-doc-form.is-kind-file .client-doc-form__source {
  grid-column: span 1;
}

.client-doc-form__span-2 {
  grid-column: span 2;
}

.client-doc-field .form-label {
  color: var(--app-text-muted, #64748b);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.client-doc-field__control {
  position: relative;
}

.client-doc-field__control > .bi {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  font-size: 0.92rem;
}

.client-doc-field__control .form-control,
.client-doc-field__control .form-select {
  padding-left: 2.05rem;
  border-radius: 0.65rem;
  background: #fff;
}

.client-doc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.4rem;
}

.client-doc-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: rgb(var(--brand-primary-rgb) / 0.1);
  color: var(--app-accent, #2254E1);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
}

.client-doc-drop {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 31px;
  margin: 0;
  padding: 0.2rem 0.65rem;
  border: 1px dashed rgb(var(--brand-primary-rgb) / 0.35);
  border-radius: 0.65rem;
  background: rgb(var(--brand-primary-rgb) / 0.04);
  color: var(--app-text-muted, #64748b);
  cursor: pointer;
}

.client-doc-drop:hover,
.client-doc-drop.is-dragover {
  border-color: var(--app-accent, #2254E1);
  background: rgb(var(--brand-primary-rgb) / 0.08);
  color: var(--app-text, #373737);
}

.client-doc-drop > .bi {
  font-size: 1.05rem;
  color: var(--app-accent, #2254E1);
}

.client-doc-drop__copy {
  min-width: 0;
  line-height: 1.15;
}

.client-doc-drop__title {
  display: block;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--app-text, #373737);
}

.client-doc-drop__name {
  display: block;
  font-size: 0.68rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-doc-form__actions {
  display: flex;
  gap: 0.4rem;
  align-items: stretch;
}

.client-doc-form__actions .btn {
  white-space: nowrap;
  min-height: 2rem;
  border-radius: 0.65rem;
  padding-inline: 0.9rem;
}

.client-docs-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.client-docs-toolbar__search,
.client-docs-toolbar__filter {
  position: relative;
}

.client-docs-toolbar__search {
  flex: 1 1 16rem;
}

.client-docs-toolbar__filter {
  flex: 0 1 13.5rem;
}

.client-docs-toolbar__search > .bi,
.client-docs-toolbar__filter > .bi {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  font-size: 0.88rem;
  z-index: 1;
}

.client-docs-toolbar__search .form-control,
.client-docs-toolbar__filter .form-select {
  padding-left: 2.05rem;
  border-radius: 0.65rem;
}

.client-docs-section {
  margin-bottom: 1.15rem;
}

.client-docs-section__title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}

.client-docs-section__title .bi {
  font-size: 0.95rem;
  color: var(--app-accent, #2254E1);
}

.client-docs-empty {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 0.95rem;
  border: 1px dashed var(--app-border, #e2e8f0);
  border-radius: 0.8rem;
  background: #f8fafc;
  color: #64748b;
}

.client-docs-empty .bi {
  font-size: 1.15rem;
  color: #94a3b8;
  margin-top: 0.05rem;
}

.client-doc-group {
  margin-bottom: 0.85rem;
}

.client-doc-group__title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.15rem;
}

@media (max-width: 991.98px) {
  .client-doc-form__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .client-doc-form__grid--one-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .client-doc-form__source,
  .client-doc-form.is-kind-file .client-doc-form__source {
    grid-column: span 2;
  }

  .client-doc-form__grid--one-row .client-doc-form__source,
  .client-doc-form.is-kind-file .client-doc-form__grid--one-row .client-doc-form__source {
    grid-column: span 2;
  }
}

@media (max-width: 575.98px) {
  .client-doc-form__grid {
    grid-template-columns: 1fr;
  }

  .client-doc-form__span-2,
  .client-doc-form__source,
  .client-doc-form.is-kind-file .client-doc-form__source {
    grid-column: auto;
  }

  .client-docs-toolbar__filter {
    flex: 1 1 100%;
  }
}

.kaiten-import-page {
  --kaiten-import-border: rgba(148, 163, 184, 0.22);
}

.kaiten-import-banner {
  border: 1px solid var(--kaiten-import-border);
}

.kaiten-import-stepper__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  list-style: none;
  padding: 0;
  margin: 0 0 0.25rem;
  font-size: 0.82rem;
  color: #64748b;
}

.kaiten-import-stepper__list li.is-current {
  color: var(--brand-neutral, #0f172a);
  font-weight: 650;
}

.kaiten-import-list-body {
  padding-bottom: 0.85rem;
}

.kaiten-import-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem;
  min-width: 0;
}

.kaiten-import-filters__item {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.kaiten-import-filters__item .form-label {
  white-space: nowrap;
}

.kaiten-import-filters__item .form-select,
.kaiten-import-filters__item .form-control {
  min-width: 0;
  width: 100%;
}

.kaiten-import-filters__item--space {
  flex: 1.6 1 12rem;
}

.kaiten-import-filters__item--board {
  flex: 0.7 1 6.5rem;
}

.kaiten-import-filters__item--sm {
  flex: 0.85 1 7.5rem;
}

.kaiten-import-filters__item--import {
  flex: 1 1 9.5rem;
}

.kaiten-import-filters__item--search {
  flex: 1.2 1 9rem;
}

.kaiten-import-filters__item--tag {
  flex: 0.9 1 7.5rem;
}

.kaiten-import-table-scroll {
  max-height: min(58vh, 32rem);
  overflow: auto;
  border: 1px solid var(--kaiten-import-border);
  border-radius: 0.5rem;
}

.kaiten-import-card-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
  box-shadow: 0 1px 0 var(--kaiten-import-border);
}

.kaiten-import-card-table tbody tr {
  cursor: pointer;
}

.kaiten-import-card-table tbody tr.is-imported {
  background: rgba(16, 185, 129, 0.06);
}

.kaiten-import-card-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.kaiten-import-card-id {
  font-size: 0.72rem;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

.kaiten-import-tags-cell {
  max-width: 12rem;
}

.kaiten-import-tag {
  display: inline-block;
  margin: 0 0.2rem 0.2rem 0;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.68rem;
  line-height: 1.3;
  white-space: nowrap;
}

.kaiten-import-owners-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-height: 1.5rem;
}

.kaiten-import-owner-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  border: 0;
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
  background: #e0f2fe;
  color: #075985;
  font-size: 0.75rem;
  line-height: 1.3;
}

.kaiten-import-badge {
  display: inline-block;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: #d1fae5;
  color: #065f46;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.kaiten-import-children-count {
  display: inline-block;
  flex-shrink: 0;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.kaiten-import-crm-cell {
  max-width: 16rem;
}

.kaiten-import-crm-chip {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem;
  margin: 0.1rem 0.45rem 0.1rem 0;
  font-size: 0.8rem;
}

.kaiten-import-crm-chip__kind {
  color: #64748b;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 650;
}

.kaiten-import-existing {
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 0.5rem;
  background: #f0fdf4;
}

.kaiten-import-existing__title {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #047857;
  margin-bottom: 0.25rem;
}

.kaiten-import-existing__row {
  font-size: 0.86rem;
}

.kaiten-import-existing__row a {
  word-break: break-word;
}

.kaiten-import-family {
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--kaiten-import-border);
  border-radius: 0.5rem;
  font-size: 0.86rem;
}

.kaiten-import-family__title {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.2rem;
}

.kaiten-import-family__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  padding: 0.15rem 0;
}

.kaiten-import-family__label {
  color: #64748b;
  font-size: 0.75rem;
}

.kaiten-import-family__open {
  font-size: 0.75rem;
  padding: 0.05rem 0.4rem;
  line-height: 1.2;
}

.kaiten-import-card-table td:first-child {
  max-width: 28rem;
}

.kaiten-import-card-title > span:first-of-type {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.kaiten-import-crm-cell a {
  color: inherit;
}

.kaiten-import-hub__bar {
  position: sticky;
  top: 3.5rem;
  z-index: 4;
}

.kaiten-import-hub__bar .card-body {
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.kaiten-import-hub__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem);
  gap: 1rem;
  align-items: start;
}

@media (max-width: 991.98px) {
  .kaiten-import-hub__grid {
    grid-template-columns: 1fr;
  }
}

.kaiten-import-hub__actions {
  position: sticky;
  top: 7.25rem;
  max-height: calc(100vh - 8rem);
  overflow: auto;
}

.kaiten-import-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--kaiten-import-border);
}

.kaiten-import-tabs__btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0.4rem 0.7rem;
  font-size: 0.82rem;
  color: #64748b;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.kaiten-import-tabs__btn.is-active {
  color: var(--brand-neutral, #0f172a);
  font-weight: 650;
  border-bottom-color: var(--brand-neutral, #0f172a);
}

.kaiten-import-tabs__count {
  display: inline-block;
  min-width: 1.25rem;
  font-variant-numeric: tabular-nums;
  color: #94a3b8;
}

.kaiten-import-tabs__sub {
  margin-left: 0.15rem;
  font-variant-numeric: tabular-nums;
  color: #94a3b8;
  font-weight: 500;
}

.kaiten-import-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem 1rem;
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--kaiten-import-border);
  border-radius: 0.5rem;
  background: #f8fafc;
}

@media (max-width: 575.98px) {
  .kaiten-import-facts {
    grid-template-columns: 1fr;
  }
}

.kaiten-import-facts dt {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.kaiten-import-facts dd {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
  font-weight: 550;
  color: var(--brand-neutral, #0f172a);
  word-break: break-word;
}

.kaiten-import-combobox {
  position: relative;
}

.kaiten-import-combobox__control {
  position: relative;
}

.kaiten-import-combobox__control > .bi-search {
  position: absolute;
  top: 50%;
  left: 0.55rem;
  z-index: 1;
  color: #64748b;
  font-size: 0.75rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.kaiten-import-combobox__control .form-control {
  padding-right: 1.75rem;
  padding-left: 1.75rem;
}

.kaiten-import-combobox__clear {
  position: absolute;
  top: 50%;
  right: 0.2rem;
  width: 1.4rem;
  height: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  color: #64748b;
  font-size: 0.65rem;
  transform: translateY(-50%);
}

.kaiten-import-combobox__clear[hidden] {
  display: none;
}

.kaiten-import-combobox__clear:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.kaiten-import-combobox__menu {
  position: fixed;
  z-index: 1080;
  max-height: 16rem;
  overflow-y: auto;
  padding: 0.3rem;
  border: 1px solid #dfe1e6;
  border-radius: 0.4rem;
  background: #fff;
  box-shadow: 0 8px 24px rgb(9 30 66 / 0.2);
}

.kaiten-import-combobox__option {
  display: flex;
  width: 100%;
  align-items: center;
  padding: 0.35rem 0.5rem;
  border: 0;
  border-radius: 0.3rem;
  background: transparent;
  color: #0f172a;
  font-size: 0.82rem;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kaiten-import-combobox__option:hover,
.kaiten-import-combobox__option.is-active {
  background: #eef2f6;
}

.kaiten-import-combobox__option.is-selected {
  font-weight: 650;
}

.kaiten-import-combobox__empty {
  padding: 0.45rem 0.5rem;
  color: #64748b;
  font-size: 0.82rem;
}

.kaiten-import-pane {
  max-height: min(52vh, 28rem);
  overflow: auto;
}

.kaiten-import-pane--people {
  max-height: min(62vh, 36rem);
}

.kaiten-import-mapping-table {
  table-layout: auto;
}

.kaiten-import-mapping-table td {
  vertical-align: top;
}

.kaiten-import-map-who {
  width: 42%;
  max-width: none;
  font-size: 0.86rem;
  word-break: break-word;
}

.kaiten-import-map-who__name {
  font-weight: 550;
}

.kaiten-import-hours-empty {
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: #94a3b8;
}

.kaiten-import-hours-spoiler {
  margin-top: 0.35rem;
}

.kaiten-import-hours-spoiler > summary {
  cursor: pointer;
  font-size: 0.78rem;
  color: #475569;
  list-style: none;
}

.kaiten-import-hours-spoiler > summary::-webkit-details-marker {
  display: none;
}

.kaiten-import-hours-spoiler > summary::before {
  content: '▸ ';
  color: #94a3b8;
}

.kaiten-import-hours-spoiler[open] > summary::before {
  content: '▾ ';
}

.kaiten-import-hours-spoiler .kaiten-import-item {
  padding: 0.28rem 0 0.28rem 0.95rem;
}

.kaiten-import-hours-spoiler .kaiten-import-item__title,
.kaiten-import-hours-spoiler .kaiten-import-item__meta {
  font-size: 0.78rem;
}

.kaiten-import-hours-spoiler .kaiten-import-item__body {
  padding-left: 0.95rem;
  font-size: 0.76rem;
  color: #64748b;
}

.kaiten-import-choice,
.kaiten-import-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.kaiten-import-item {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--kaiten-import-border);
}

.kaiten-import-item:last-child {
  border-bottom: 0;
}

.kaiten-import-item__head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
}

.kaiten-import-item__title {
  font-size: 0.88rem;
  color: var(--brand-neutral, #0f172a);
  word-break: break-word;
}

.kaiten-import-item__meta {
  flex-shrink: 0;
  color: #64748b;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.kaiten-import-item__body {
  margin-top: 0.2rem;
  font-size: 0.86rem;
  white-space: pre-wrap;
  word-break: break-word;
  color: #334155;
}

.kaiten-import-tabs__count[hidden] {
  display: none;
}

.kaiten-import-file:last-child {
  border-bottom: 0;
}

.kaiten-import-file__size {
  flex-shrink: 0;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.kaiten-import-mapping-table .kaiten-import-combobox {
  min-width: 0;
}

.kaiten-import-pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.9rem;
}

.kaiten-import-pre.is-collapsed {
  max-height: 10rem;
  overflow: hidden;
}

.kaiten-import-report__section {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--kaiten-import-border);
}

.kaiten-import-report__section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.kaiten-import-pane [data-testid="kaiten_import-preview-comments"] > div,
.kaiten-import-pane [data-testid="kaiten_import-preview-timelogs"] > div,
.kaiten-import-pane [data-testid="kaiten_import-preview-checklist"] > div {
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--kaiten-import-border);
  font-size: 0.86rem;
}

.kaiten-import-existing a {
  font-size: 0.86rem;
}

.portal-board__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.portal-board__tab.active,
.portal-board__tab.btn.active {
  background: var(--bs-primary);
  color: #fff;
  border-color: var(--bs-primary);
}

.portal-board__column--handoff {
  outline: 1px dashed var(--bs-primary);
}

.portal-board__column--return {
  outline: 1px dashed #198754;
}

.portal-board__column-role {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.task-space-builder__block--handoff {
  border-color: rgba(13, 110, 253, 0.55);
  box-shadow: inset 0 0 0 1px rgba(13, 110, 253, 0.35);
  background: rgba(13, 110, 253, 0.06);
}

.task-space-builder__block--return {
  border-color: rgba(25, 135, 84, 0.55);
  box-shadow: inset 0 0 0 1px rgba(25, 135, 84, 0.35);
  background: rgba(25, 135, 84, 0.06);
}

.task-space-builder__row--portal {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.task-space-builder__roles {
  min-width: 11rem;
}

.task-space-builder__roles .btn-group {
  flex-wrap: wrap;
}

.portal-body {
  overflow-x: clip;
}

.portal-board {
  min-width: 0;
}

.portal-board #portalDeskCanvas {
  min-height: 10rem;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.portal-board .task-desk__dock--stack {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.portal-board .task-desk__dock--stack > .task-desk__panel {
  align-self: flex-start;
  width: max-content;
  min-width: 100%;
  max-width: none;
}

.portal-board .task-desk__dock--row {
  width: max-content;
  max-width: none;
}

.portal-board__columns {
  display: flex;
  gap: 0.75rem;
  padding-bottom: 0.5rem;
  align-items: flex-start;
}

.portal-board .task-desk__panel-board.portal-board__columns {
  max-width: none;
  overflow: visible;
}

.portal-board__column {
  flex: 0 0 16.5rem;
  min-width: 16.5rem;
  background: var(--bs-light, #f8f9fa);
  border-radius: 0.75rem;
  padding: 0.75rem;
}

.portal-board__column-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.portal-board__column-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 4rem;
}

.portal-board__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 0.6rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  padding: 0.7rem 0.8rem;
}

.portal-board__card--unread .portal-board__card-title {
  padding-right: 1.7rem;
}

.portal-board__card-unread {
  position: absolute;
  top: 0.45rem;
  right: 0.5rem;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.32rem;
  border-radius: 999px;
  background: #dc3545;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.15rem;
  text-align: center;
}

.portal-board__column.is-drop-target {
  outline: 2px dashed rgba(13, 110, 253, 0.55);
  outline-offset: 2px;
  background: rgba(13, 110, 253, 0.06);
}

.portal-board__column.is-drop-forbidden {
  outline: 2px dashed rgba(220, 53, 69, 0.45);
  outline-offset: 2px;
}

.portal-board__card[draggable="true"] {
  cursor: grab;
  user-select: none;
}

.portal-board__card.is-dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.portal-board__card-title {
  font-weight: 600;
  font-size: 0.92rem;
}

.portal-board__card-deadline {
  font-size: 0.78rem;
  color: var(--bs-secondary-color, #6c757d);
}

.portal-bell__menu {
  min-width: 18rem;
  max-height: 20rem;
  overflow: auto;
}

.portal-board__card-files {
  display: inline-flex;
  align-items: center;
  margin-top: 0;
  font-size: 0.75rem;
  color: var(--bs-secondary-color, #6c757d);
}

.portal-board__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

.portal-board__search {
  max-width: 22rem;
  min-width: 12rem;
}

.portal-board__space-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.portal-board__chip {
  border: 1px solid var(--bs-border-color, #dee2e6);
  background: #fff;
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  font-size: 0.82rem;
  line-height: 1.4;
}

.portal-board__chip.is-active {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.portal-board__quick-add {
  margin-left: auto;
  width: 1.7rem;
  padding: 0;
  line-height: 1;
}

.portal-board__quick-form {
  padding: 0 0.15rem 0.35rem;
}

.portal-board__card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  align-items: center;
}

.portal-board__prio {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  background: #eef2f7;
  color: #475569;
}

.portal-board__prio--high {
  background: #fee2e2;
  color: #b91c1c;
}

.portal-board__prio--low {
  background: #f1f5f9;
  color: #64748b;
}

.portal-board__card--high {
  box-shadow: inset 3px 0 0 #dc2626, 0 1px 2px rgba(0, 0, 0, 0.06);
}

.portal-board__card--low {
  box-shadow: inset 3px 0 0 #94a3b8, 0 1px 2px rgba(0, 0, 0, 0.06);
}

.portal-board__avatars {
  display: flex;
  gap: 0.2rem;
  margin-top: 0.35rem;
}

.portal-board__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.62rem;
  font-weight: 700;
}

.portal-board__avatar--more {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
}

.portal-card-side {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.9rem 1rem;
}

.portal-card-people {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 12rem;
  overflow: auto;
}

.portal-card-people__item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  cursor: pointer;
  font-size: 0.85rem;
}

.portal-card-people__name {
  min-width: 0;
}

.portal-board__archive-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.portal-board__archive-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  text-align: left;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.65rem;
  background: #fff;
  padding: 0.75rem 0.9rem;
}

#portalCardModal .portal-card-dialog {
  width: 90vw;
  max-width: 90vw;
  height: 90vh;
  max-height: 90vh;
  margin: 5vh auto;
}

#portalCardModal .modal-content {
  height: 100%;
  max-height: 100%;
}

#portalCardModal .modal-header {
  align-items: center;
  gap: 0.75rem;
}

#portalCardModal .modal-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.portal-card-modal__heading {
  min-width: 0;
  flex: 1 1 auto;
}

#portalCardModal .portal-card-rail {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
}

#portalCardModal .portal-card-side {
  flex: 0 0 auto;
}

#portalCardModal .portal-card-side.is-open {
  flex: 0 1 auto;
  max-height: 46%;
  overflow: auto;
}

.portal-card-side__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.portal-card-side__toggle .bi {
  transition: transform 0.15s ease;
}

.portal-card-side.is-open .portal-card-side__toggle .bi {
  transform: rotate(180deg);
}

.portal-card-side__summary {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  color: #334155;
}

.portal-card-side.is-open .portal-card-side__summary {
  display: none;
}

.portal-card-side__body {
  margin-top: 0.85rem;
}

#portalCardClientChat:not(.d-none) {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 16rem;
  margin: 0;
}

#portalCardClientChatList {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.portal-card-share {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  max-width: 100%;
}

.portal-card-share__url {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8rem;
}

.portal-card-share__copy {
  flex: 0 0 auto;
  line-height: 1;
  padding: 0.15rem 0.4rem;
}

.portal-card-dropzone {
  border: 1px dashed #94a3b8;
  border-radius: 0.5rem;
  padding: 0.9rem 1rem;
  background: #f8fafc;
  cursor: pointer;
  text-align: center;
  color: #475569;
  font-size: 0.9rem;
}

.portal-card-dropzone--active {
  border-color: #2563eb;
  background: #eff6ff;
}

.portal-card-dropzone--disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.portal-brief-fields .form-text {
  margin-top: 0.25rem;
}

.portal-card-md .project-passport__md-toolbar {
  padding: 0.3rem 0.4rem;
}

.portal-card-md .project-passport__md-toolbar .btn {
  padding-inline: 0.45rem;
}

.portal-card-md textarea.form-control {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.portal-brief-snapshot dd p:last-child,
.portal-brief-snapshot dd ul:last-child,
.portal-brief-snapshot dd ol:last-child {
  margin-bottom: 0;
}

.portal-brief-snapshot dd ul,
.portal-brief-snapshot dd ol {
  padding-left: 1.2rem;
}

.portal-brief-sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.portal-brief-carousel__bar {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #dbe3ee;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0.45rem 1.1rem rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(8px);
}

.portal-brief-slide {
  border: 1px solid var(--bs-border-color, #e2e8f0);
  border-radius: 0.65rem;
  padding: 0.5rem 0.75rem;
  background: #f8fafc;
}

.portal-brief-slide__head {
  cursor: pointer;
  font-weight: 600;
}

.portal-brief-snapshot__list dt {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.5rem;
}

.portal-brief-snapshot__list dd {
  margin-bottom: 0;
  white-space: pre-wrap;
}

.portal-card-files__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.portal-card-block {
  border: 1px solid var(--bs-border-color, #e2e8f0);
  border-radius: 0.85rem;
  background: #fff;
  padding: 0.85rem 1rem;
}

.portal-card-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.portal-card-block__title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #64748b;
}

.portal-card-block__add {
  --bs-btn-padding-y: 0.15rem;
  --bs-btn-padding-x: 0.55rem;
  font-size: 0.8rem;
}

.portal-card-block__empty {
  margin: 0;
  padding: 0.65rem 0.15rem 0.15rem;
  font-size: 0.85rem;
  color: #94a3b8;
}

.portal-card-delivery {
  border-color: color-mix(in srgb, var(--brand-primary, #2254E1) 45%, #ffffff);
  background: color-mix(in srgb, var(--brand-primary, #2254E1) 9%, #ffffff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary, #2254E1) 14%, transparent);
}

.portal-card-delivery .portal-card-block__head {
  margin-bottom: 0.45rem;
}

.portal-card-delivery .portal-card-block__title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--brand-primary, #2254E1);
  font-size: 0.95rem;
}

.portal-card-delivery__comment {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--brand-neutral, #373737);
  white-space: pre-wrap;
}

.portal-card-delivery__comment:empty,
.portal-card-delivery__list:empty {
  display: none;
}

.portal-card-delivery__list {
  margin: 0 0 0.35rem;
  padding-left: 1.15rem;
  font-size: 0.95rem;
}

.portal-card-delivery__list:last-child {
  margin-bottom: 0;
}

.portal-card-client-chat__text {
  white-space: normal;
  overflow-wrap: anywhere;
}

.portal-card-client-chat__text :is(p, ul, ol, blockquote, pre) {
  margin: 0 0 0.35rem;
}

.portal-card-client-chat__text :last-child {
  margin-bottom: 0;
}

.portal-card-client-chat .tender-chat,
#taskClientChat .tender-chat,
#clientRequestClientChat .tender-chat {
  min-height: 12rem;
}

#clientRequestClientChat .tender-chat {
  max-height: 28rem;
  overflow: auto;
}

.portal-card-client-chat .project-passport__md-toolbar,
#taskClientChat .project-passport__md-toolbar,
#clientRequestClientChat .project-passport__md-toolbar {
  margin-bottom: 0.5rem;
}

.portal-client-chat__text img,
.tender-chat__attach-preview {
  max-width: 100%;
}

.portal-card-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.portal-card-link {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0.55rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  background: #f8fafc;
}

.portal-card-link__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  margin-top: 0.15rem;
  border-radius: 0.4rem;
  background: #fff;
  color: #64748b;
  flex: 0 0 auto;
}

.portal-card-link__fields {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.portal-card-link__remove {
  flex: 0 0 auto;
  padding: 0.15rem 0.25rem;
  line-height: 1;
}

.portal-card-activity__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.portal-card-activity__empty {
  padding: 0.15rem 0;
  font-size: 0.85rem;
  color: #94a3b8;
}

.portal-card-activity__item {
  display: flex;
  gap: 0.7rem;
  position: relative;
  padding: 0 0 0.85rem;
}

.portal-card-activity__item:last-child {
  padding-bottom: 0;
}

.portal-card-activity__item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 0.4rem;
  top: 1rem;
  bottom: 0;
  width: 1px;
  background: #e2e8f0;
}

.portal-card-activity__dot {
  width: 0.85rem;
  height: 0.85rem;
  margin-top: 0.2rem;
  border-radius: 999px;
  background: #cbd5e1;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #cbd5e1;
  flex: 0 0 auto;
  z-index: 1;
}

.portal-card-activity__item--submitted .portal-card-activity__dot,
.portal-card-activity__item--claimed .portal-card-activity__dot {
  background: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
}

.portal-card-activity__item--returned .portal-card-activity__dot,
.portal-card-activity__item--accepted .portal-card-activity__dot {
  background: #16a34a;
  box-shadow: 0 0 0 1px #16a34a;
}

.portal-card-activity__item--rejected .portal-card-activity__dot,
.portal-card-activity__item--withdrawn .portal-card-activity__dot {
  background: #f59e0b;
  box-shadow: 0 0 0 1px #f59e0b;
}

.portal-card-activity__body {
  min-width: 0;
  flex: 1 1 auto;
}

.portal-card-activity__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  align-items: baseline;
}

.portal-card-activity__label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #0f172a;
}

.portal-card-activity__time {
  font-size: 0.78rem;
  color: #94a3b8;
}

.portal-card-activity__comment {
  margin-top: 0.2rem;
  font-size: 0.85rem;
  color: #475569;
}

.client-request-delivery textarea {
  min-height: 5rem;
}

.cr-card__back {
  display: inline-flex;
  margin-bottom: 0.85rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
}

.cr-card__back:hover {
  color: #0f172a;
}

.cr-card__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.15rem;
  padding: 1.15rem 1.25rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.cr-card__heading {
  min-width: 0;
  flex: 1 1 18rem;
}

.cr-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}

.cr-card__chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.cr-card__chip--danger {
  background: rgba(185, 28, 28, 0.1);
  color: #b91c1c;
}

.cr-card__title {
  margin: 0 0 0.75rem;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.2;
  color: #0f172a;
}

.cr-card__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cr-card__facts li {
  min-width: 8rem;
  font-size: 0.9rem;
  color: #0f172a;
}

.cr-card__fact-label {
  display: block;
  margin-bottom: 0.12rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.cr-card__facts time.is-overdue {
  color: #b91c1c;
  font-weight: 700;
}

.cr-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0.5rem;
}

.cr-card__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 22rem);
  gap: 1rem;
  align-items: start;
}

.cr-card__main,
.cr-card__aside {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cr-card__aside {
  position: sticky;
  top: 4.75rem;
}

.cr-panel {
  padding: 1.05rem 1.15rem 1.15rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.cr-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.cr-panel__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
}

.cr-panel__hint,
.cr-panel__empty,
.cr-panel__meta {
  font-size: 0.82rem;
  color: #64748b;
}

.cr-panel__label {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.cr-panel__brief {
  font-size: 0.92rem;
  line-height: 1.5;
  color: #334155;
}

.cr-panel__brief.project-passport__md-view,
.cr-panel__brief .project-passport__md-rendered,
#clientRequestBriefPreview.project-passport__md-preview {
  min-height: 0;
  padding: 0.15rem 0 0.35rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #334155;
}

.cr-panel__brief .project-passport__md-rendered h1,
.cr-panel__brief .project-passport__md-rendered h2,
.cr-panel__brief .project-passport__md-rendered h3,
.cr-panel__brief .project-passport__md-rendered h4,
#clientRequestBriefPreview.project-passport__md-preview h1,
#clientRequestBriefPreview.project-passport__md-preview h2,
#clientRequestBriefPreview.project-passport__md-preview h3,
#clientRequestBriefPreview.project-passport__md-preview h4 {
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: #0f172a;
}

.cr-panel__brief .project-passport__md-rendered h1,
#clientRequestBriefPreview.project-passport__md-preview h1 {
  font-size: 1.28rem;
  margin: 0.1rem 0 0.55rem;
}

.cr-panel__brief .project-passport__md-rendered h2,
#clientRequestBriefPreview.project-passport__md-preview h2 {
  font-size: 0.98rem;
  margin: 0.95rem 0 0.28rem;
  color: #1e293b;
}

.cr-panel__brief .project-passport__md-rendered h3,
.cr-panel__brief .project-passport__md-rendered h4,
#clientRequestBriefPreview.project-passport__md-preview h3,
#clientRequestBriefPreview.project-passport__md-preview h4 {
  font-size: 0.88rem;
  margin: 0.7rem 0 0.2rem;
  color: #334155;
}

.cr-panel__brief .project-passport__md-rendered p,
#clientRequestBriefPreview.project-passport__md-preview p {
  margin-bottom: 0.35rem;
}

.cr-panel__brief .project-passport__md-rendered ul,
.cr-panel__brief .project-passport__md-rendered ol,
#clientRequestBriefPreview.project-passport__md-preview ul,
#clientRequestBriefPreview.project-passport__md-preview ol {
  margin: 0.15rem 0 0.45rem;
  padding-left: 1.15rem;
}

.cr-panel__brief .project-passport__md-rendered li:empty,
#clientRequestBriefPreview.project-passport__md-preview li:empty {
  display: none;
}

.cr-panel__links {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.86rem;
}

.cr-panel--next {
  background: #0f172a;
  border-color: #0f172a;
  color: #e2e8f0;
}

.cr-panel--next .cr-panel__title {
  color: #fff;
  margin-bottom: 0.4rem;
}

.cr-panel--next p {
  font-size: 0.88rem;
  line-height: 1.45;
}

.cr-card__tasks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.cr-card__task {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.75rem;
  background: #f8fafc;
  text-decoration: none;
  color: inherit;
}

.cr-card__task:hover {
  background: #eef2ff;
}

.cr-card__task-title {
  font-weight: 650;
  color: #0f172a;
}

.cr-card__task-meta {
  font-size: 0.75rem;
  color: #64748b;
  white-space: nowrap;
}

.cr-card__material {
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #f8fafc;
}

.cr-card__material-title {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
}

@media (max-width: 991.98px) {
  .cr-card__grid {
    grid-template-columns: 1fr;
  }

  .cr-card__aside {
    position: static;
  }

  .cr-card__title {
    font-size: 1.25rem;
  }
}

.cr-inbox-view {
  display: inline-flex;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.cr-inbox-view__btn {
  padding: 0.28rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
}

.cr-inbox-list {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.cr-inbox-list__bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.7rem 1rem 0.55rem;
  border-bottom: 1px solid #eef2f6;
}

.cr-inbox-list__count {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.cr-inbox-list__hint {
  font-size: 0.78rem;
  color: #94a3b8;
}

.cr-inbox-list__pager {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  padding: 0.7rem 1rem;
  border-top: 1px solid #eef2f6;
}

.cr-inbox-table {
  --bs-table-bg: transparent;
  margin: 0;
}

.cr-inbox-table thead th {
  color: #64748b;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
  white-space: nowrap;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.7rem 1rem;
}

.cr-inbox-table td {
  padding: 0.85rem 1rem;
  vertical-align: top;
  border-color: #f1f5f9;
}

.cr-inbox-table__row {
  cursor: pointer;
}

.cr-inbox-table__row:hover td {
  background: #f8fafc;
}

.cr-inbox-table__row:focus-visible {
  outline: 2px solid #111827;
  outline-offset: -2px;
}

.cr-inbox-table__row[data-status="new"] td:first-child {
  box-shadow: inset 3px 0 0 #2563eb;
}

.cr-inbox-table__row[data-status="rework"] td:first-child {
  box-shadow: inset 3px 0 0 #ea580c;
}

.cr-inbox-table__row[data-status="returned"] td:first-child {
  box-shadow: inset 3px 0 0 #d97706;
}

.cr-inbox-table__title {
  display: inline-block;
  font-weight: 650;
  font-size: 0.95rem;
  color: #0f172a;
  text-decoration: none;
}

.cr-inbox-table__title:hover {
  color: #1d4ed8;
}

.cr-inbox-table__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  margin-top: 0.28rem;
  font-size: 0.8rem;
  color: #64748b;
}

.cr-inbox-table__board {
  display: inline-flex;
  align-items: center;
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 650;
}

.cr-inbox-table__date {
  font-size: 0.84rem;
  color: #334155;
  white-space: nowrap;
}

.cr-inbox-table__date.is-overdue {
  color: #b91c1c;
  font-weight: 700;
}

.cr-inbox-table__muted {
  color: #94a3b8;
}

.cr-inbox-table__tasks {
  display: inline-flex;
  min-width: 1.75rem;
  justify-content: center;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.78rem;
  font-weight: 700;
}

.cr-inbox-table__tasks.is-empty {
  background: #f8fafc;
  color: #94a3b8;
}

.cr-status {
  display: inline-flex;
  align-items: center;
  max-width: 12rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  background: #f1f5f9;
  color: #334155;
}

.cr-status--new {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.cr-status--accepted {
  background: rgba(14, 165, 233, 0.14);
  color: #0369a1;
}

.cr-status--in_progress {
  background: rgba(13, 148, 136, 0.14);
  color: #0f766e;
}

.cr-status--returned {
  background: rgba(217, 119, 6, 0.14);
  color: #b45309;
}

.cr-status--rework {
  background: rgba(234, 88, 12, 0.14);
  color: #c2410c;
}

.cr-status--done {
  background: rgba(22, 163, 74, 0.14);
  color: #15803d;
}

.cr-status--cancelled {
  background: #f1f5f9;
  color: #64748b;
}

.cr-inbox-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.75rem 1.5rem;
}

.cr-inbox-empty .bi {
  font-size: 1.6rem;
  color: #94a3b8;
  margin-bottom: 0.7rem;
}

.cr-inbox-empty__title {
  font-weight: 700;
  color: #0f172a;
}

.cr-inbox-empty__text {
  max-width: 28rem;
  font-size: 0.9rem;
  color: #64748b;
}

@media (max-width: 991.98px) {
  .cr-inbox-table__col-hide-md {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .cr-inbox-table__col-hide-sm {
    display: none;
  }

  .cr-inbox-list__hint {
    display: none;
  }
}

.cr-funnel {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  align-items: stretch;
}

.cr-funnel__column {
  flex: 0 0 16.5rem;
  min-height: 12rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  padding: 0.7rem;
}

.cr-funnel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.cr-funnel__title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
}

.cr-funnel__body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.cr-funnel__card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.7rem 0.75rem;
  border-radius: 0.65rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  text-decoration: none;
  color: inherit;
}

.cr-funnel__card-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.cr-funnel__card-meta {
  font-size: 0.78rem;
  color: #64748b;
}

.cr-funnel__empty {
  margin: 0;
  font-size: 0.82rem;
  color: #94a3b8;
}

.cr-activity {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cr-activity__empty {
  font-size: 0.85rem;
  color: #94a3b8;
}

.cr-activity__item {
  display: flex;
  gap: 0.7rem;
  position: relative;
  padding: 0 0 0.85rem;
}

.cr-activity__item:last-child {
  padding-bottom: 0;
}

.cr-activity__item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 0.4rem;
  top: 1rem;
  bottom: 0;
  width: 1px;
  background: #e2e8f0;
}

.cr-activity__dot {
  width: 0.85rem;
  height: 0.85rem;
  margin-top: 0.2rem;
  border-radius: 999px;
  background: #cbd5e1;
  box-shadow: 0 0 0 1px #cbd5e1;
  flex: 0 0 auto;
  z-index: 1;
}

.cr-activity__item--claimed .cr-activity__dot,
.cr-activity__item--submitted .cr-activity__dot {
  background: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
}

.cr-activity__item--returned .cr-activity__dot,
.cr-activity__item--accepted .cr-activity__dot {
  background: #16a34a;
  box-shadow: 0 0 0 1px #16a34a;
}

.cr-activity__item--rejected .cr-activity__dot,
.cr-activity__item--withdrawn .cr-activity__dot {
  background: #f59e0b;
  box-shadow: 0 0 0 1px #f59e0b;
}

.cr-activity__item--comment .cr-activity__dot {
  background: #64748b;
  box-shadow: 0 0 0 1px #64748b;
}

.cr-activity__body {
  min-width: 0;
  flex: 1 1 auto;
}

.cr-activity__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.65rem;
  align-items: baseline;
}

.cr-activity__label {
  font-size: 0.88rem;
  font-weight: 600;
}

.cr-activity__time,
.cr-activity__actor {
  font-size: 0.78rem;
  color: #94a3b8;
}

.cr-activity__comment {
  margin-top: 0.2rem;
  font-size: 0.85rem;
  color: #475569;
}

.ct-registry__filters {
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ct-registry__filters-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(10rem, 14rem) 8.5rem;
  gap: 0.75rem;
  align-items: end;
}

.ct-registry__list {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ct-registry__bar {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1rem 0.55rem;
  border-bottom: 1px solid #eef2f6;
}

.ct-registry__count {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.ct-registry__hint {
  font-size: 0.78rem;
  color: #94a3b8;
}

.ct-registry__table thead th {
  color: #64748b;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.7rem 1rem;
}

.ct-registry__table td {
  padding: 0.85rem 1rem;
  border-color: #f1f5f9;
  vertical-align: top;
}

.ct-registry__row {
  cursor: pointer;
}

.ct-registry__row:hover td {
  background: #f8fafc;
}

.ct-registry__name {
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
}

.ct-registry__name:hover {
  color: #1d4ed8;
}

.ct-registry__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin-top: 0.35rem;
}

.ct-registry__tag {
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 650;
}

.ct-registry__contacts {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  font-size: 0.84rem;
}

.ct-registry__muted {
  color: #94a3b8;
}

.ct-registry__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 2.2rem 1rem;
  color: #64748b;
}

.ct-registry__empty .bi {
  font-size: 1.4rem;
  color: #94a3b8;
}

.ct-status {
  display: inline-flex;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #f1f5f9;
  color: #334155;
}

.ct-status--applicant {
  background: rgba(100, 116, 139, 0.14);
  color: #475569;
}

.ct-status--pending_review {
  background: rgba(217, 119, 6, 0.14);
  color: #b45309;
}

.ct-status--approved {
  background: rgba(22, 163, 74, 0.14);
  color: #15803d;
}

.ct-status--paused {
  background: rgba(14, 165, 233, 0.14);
  color: #0369a1;
}

.ct-status--blacklist {
  background: rgba(185, 28, 28, 0.12);
  color: #b91c1c;
}

.ct-card__back {
  display: inline-flex;
  margin-bottom: 0.85rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
}

.ct-card__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.15rem;
  padding: 1.15rem 1.25rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
}

.ct-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.ct-card__chip {
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: #f1f5f9;
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
}

.ct-card__title {
  margin: 0 0 0.25rem;
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
}

.ct-card__service {
  color: #64748b;
  font-size: 0.92rem;
}

.ct-card__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.35rem;
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
}

.ct-card__fact-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.ct-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-start;
}

.ct-card__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 22rem);
  gap: 1rem;
  align-items: start;
}

.ct-card__main,
.ct-card__aside {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ct-card__aside {
  position: sticky;
  top: 4.75rem;
}

.ct-panel {
  padding: 1.05rem 1.15rem 1.15rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
}

.ct-panel__head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.ct-panel__title {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 800;
}

.ct-panel__hint,
.ct-panel__empty {
  font-size: 0.82rem;
  color: #64748b;
}

.ct-panel--next {
  background: #0f172a;
  border-color: #0f172a;
  color: #e2e8f0;
}

.ct-panel--next .ct-panel__title {
  color: #fff;
}

.ct-card__projects {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ct-card__project {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  background: #f8fafc;
  text-decoration: none;
  color: inherit;
}

.ct-card__project:hover {
  background: #eef2ff;
}

.ct-card__project-name {
  font-weight: 650;
  color: #0f172a;
}

.ct-card__project-status {
  font-size: 0.75rem;
  color: #64748b;
}

.ct-card__files {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.ct-card__file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.ct-card__file {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.ct-card__portfolio-add {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.ct-card__reviews {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (max-width: 991.98px) {
  .ct-registry__filters-row {
    grid-template-columns: 1fr 1fr;
  }

  .ct-card__grid {
    grid-template-columns: 1fr;
  }

  .ct-card__aside {
    position: static;
  }
}

@media (max-width: 575.98px) {
  .ct-registry__filters-row {
    grid-template-columns: 1fr;
  }

  .ct-registry__hint {
    display: none;
  }
}

.hr-checklists {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-width: 16rem;
}

.hr-checklist {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  background: var(--bs-body-bg, #fff);
  min-width: 11.5rem;
}

.hr-checklist__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.55rem;
  font-size: 0.8125rem;
  user-select: none;
}

.hr-checklist__summary::before {
  content: "▸";
  font-size: 0.7rem;
  color: var(--bs-secondary-color);
}

.hr-checklist[open] > .hr-checklist__summary::before {
  content: "▾";
}

.hr-checklist__count {
  margin-left: auto;
  color: var(--bs-secondary-color);
  font-variant-numeric: tabular-nums;
}

.hr-checklist__items {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0 0.55rem 0.5rem;
  border-top: 1px solid var(--bs-border-color-translucent, rgba(0, 0, 0, 0.08));
}

.hr-checklist__items .form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

.hr-checklist__items .form-check-input {
  margin-top: 0.2rem;
}

.hr-time-off-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.65rem 0.75rem;
  margin-bottom: 1rem;
  padding: 0.65rem 0.8rem;
  border-radius: var(--app-radius-lg, 0.9rem);
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(248, 250, 252, 0.92);
}

.hr-time-off-toolbar__search {
  position: relative;
  flex: 0 1 15rem;
  min-width: 11rem;
  max-width: 18rem;
}

.hr-time-off-toolbar__search > i {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.85rem;
  pointer-events: none;
}

.hr-time-off-toolbar__search .form-control {
  padding-left: 2rem;
}

.hr-time-off-toolbar__chips {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 1px;
  scrollbar-width: thin;
}

.hr-time-off-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  margin: 0;
  padding: 0.3rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgb(var(--brand-neutral-rgb, 100 116 139) / 0.06);
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.hr-time-off-chip:hover {
  background: rgb(var(--brand-primary-rgb, 13 110 253) / 0.1);
  color: var(--brand-primary-dark, #1d4ed8);
}

.hr-time-off-chip__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.hr-time-off-chip.is-active {
  border-color: rgb(var(--brand-primary-rgb, 13 110 253) / 0.28);
  background: rgb(var(--brand-primary-rgb, 13 110 253) / 0.14);
  color: var(--brand-primary-dark, #1d4ed8);
}

.hr-time-off-chip--pending.is-active {
  border-color: rgba(217, 119, 6, 0.35);
  background: rgba(251, 191, 36, 0.22);
  color: #92400e;
}

.hr-time-off-chip--approved.is-active {
  border-color: rgba(22, 163, 74, 0.35);
  background: rgba(34, 197, 94, 0.16);
  color: #166534;
}

.hr-time-off-chip--rejected.is-active {
  border-color: rgba(220, 38, 38, 0.35);
  background: rgba(248, 113, 113, 0.18);
  color: #991b1b;
}

.hr-time-off-chip--planned.is-active {
  border-color: rgba(100, 116, 139, 0.35);
  background: rgba(148, 163, 184, 0.22);
  color: #334155;
}

.hr-time-off-chip--archive.is-active {
  border-color: rgba(71, 85, 105, 0.4);
  background: rgba(100, 116, 139, 0.18);
  color: #1e293b;
}

.hr-time-off-toolbar__aside {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  flex: 0 0 auto;
}

.hr-time-off-toolbar__type {
  width: auto;
  min-width: 8.5rem;
}

@media (max-width: 991.98px) {
  .hr-time-off-toolbar {
    flex-wrap: wrap;
  }

  .hr-time-off-toolbar__search {
    flex: 1 1 100%;
    max-width: none;
  }

  .hr-time-off-toolbar__chips {
    flex: 1 1 auto;
    order: 3;
    width: 100%;
  }

  .hr-time-off-toolbar__aside {
    margin-left: 0;
  }
}

.hr-hire-funnel__col.is-drop {
  outline: 2px dashed rgb(var(--brand-primary-rgb, 13 110 253) / 0.55);
  outline-offset: 2px;
}

.hr-hire-funnel__card[draggable="true"] {
  cursor: grab;
}

.hr-hire-funnel__card.is-dragging {
  opacity: 0.55;
}

.users-list-table-wrap {
  max-height: min(70vh, 48rem);
  overflow: auto;
}

.users-list-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--app-surface, #fff);
  background-color: var(--app-surface, #fff) !important;
  box-shadow: 0 1px 0 var(--app-border, rgba(15, 23, 42, 0.12));
}

.users-list-table thead th.hr-staff-table__th--sortable.is-sorted {
  background: #e8f1ff;
  background-color: #e8f1ff !important;
}

.hr-staff-table__th--sortable {
  padding: 0.45rem 0.35rem;
  user-select: none;
  vertical-align: middle;
}

.hr-staff-table__th--sortable.is-sorted {
  color: #0f172a;
  background: rgba(var(--bs-primary-rgb), 0.08);
}

.hr-staff-table__sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  width: 100%;
  margin: 0;
  padding: 0.35rem 0.45rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.hr-staff-table__sort-btn:hover {
  background: rgba(15, 23, 42, 0.05);
  color: #0f172a;
}

.hr-staff-table__sort-icons {
  display: inline-flex;
  flex-direction: column;
  line-height: 0.55;
  opacity: 0.38;
}

.hr-staff-table__sort-icons .bi {
  font-size: 0.55rem;
}

.hr-staff-table__th--sortable.is-sorted .hr-staff-table__sort-icons {
  opacity: 1;
  color: var(--bs-primary);
}

.hr-staff-table__th--sortable.is-sorted-asc .hr-staff-table__sort-desc,
.hr-staff-table__th--sortable.is-sorted-desc .hr-staff-table__sort-asc {
  opacity: 0.28;
  color: #94a3b8;
}

.hr-nda {
  min-width: 9.5rem;
}

.hr-nda-date {
  width: 9.6rem;
  max-width: 100%;
}

.hr-nda-download {
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.join-card {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
  background: var(--bs-body-bg, #fff);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.75rem;
}

.join-card__title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.join-card__lead,
.join-card__disclaimer,
.join-card__required-hint {
  margin-bottom: 0.75rem;
}

.join-card__required-hint,
.join-form__star {
  color: #c1121f;
}

.join-form__field {
  margin-bottom: 1.25rem;
}

.join-form__hint {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: var(--bs-secondary-color, #6c757d);
}

/* ——— Схемы (список) ——— */
.mindmap-search {
  max-width: 22rem;
  width: 100%;
}

.mindmap-tabs__btn.is-active {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
}

.mindmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0.85rem;
}

.mindmap-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.75rem;
  background: #fff;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.mindmap-card:hover {
  border-color: rgb(var(--brand-primary-rgb) / 0.45);
  color: inherit;
}

.mindmap-card__title {
  font-weight: 600;
  line-height: 1.3;
}

.mindmap-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  font-size: 0.8rem;
  color: #64748b;
}

.mindmap-card__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-weight: 600;
}

.mindmap-card__badge--public {
  background: #dbeafe;
  color: #1e3a8a;
}

.mindmap-empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: #64748b;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  border-radius: 0.75rem;
  background: #f8fafc;
}

.mindmap-empty__text {
  font-size: 1rem;
}

.mindmap-widget {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.mindmap-widget__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.mindmap-widget__title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.mindmap-widget__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.mindmap-widget__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.mindmap-widget__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.mindmap-widget__link {
  font-weight: 600;
  color: inherit;
  text-decoration: none;
}

.mindmap-widget__link:hover {
  color: rgb(var(--brand-primary-rgb));
}

.mindmap-widget__empty {
  margin: 0;
  font-size: 0.875rem;
  color: #64748b;
}

.mindmap-widget__pick-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mindmap-widget__pick-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.5rem;
  background: #f8fafc;
  padding: 0.55rem 0.75rem;
}

.mindmap-widget__pick-item:hover {
  border-color: rgb(var(--brand-primary-rgb) / 0.45);
}

.card-activity__kpi {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 6rem;
}

.card-activity__kpi-label {
  color: var(--bs-secondary-color);
  font-size: 0.75rem;
}

.card-activity__kpi-value {
  font-size: 1.5rem;
  font-weight: 650;
  line-height: 1.1;
}

.card-activity__table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bs-secondary-color);
  white-space: nowrap;
}

.card-activity__action {
  display: inline-block;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  background: #eef2f7;
}

.card-activity__action--create { background: #e8f6ee; color: #0f7a3a; }
.card-activity__action--rename { background: #eef2ff; color: #3730a3; }
.card-activity__action--move { background: #fff6e5; color: #9a6700; }
.card-activity__action--delete,
.card-activity__action--archive { background: #fdecec; color: #b42318; }
.card-activity__action--restore { background: #e7f6f8; color: #0f6f78; }

.card-activity__change {
  font-size: 0.8125rem;
  line-height: 1.35;
}

.entity-activity__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.entity-activity__item {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  background: var(--bs-body-bg);
}

.entity-activity__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.7rem;
  margin-bottom: 0.35rem;
}

.entity-activity__when {
  font-size: 0.8125rem;
  color: var(--bs-secondary-color);
}

.entity-activity__actor {
  font-weight: 600;
}

.entity-activity__summary {
  font-size: 0.9rem;
}

.planning-templates__table {
  width: max-content;
  max-width: none;
  table-layout: fixed;
}

.planning-templates__col-type {
  width: 17.5rem;
}

.planning-templates__col-hours {
  width: 11rem;
}

.planning-templates__table th,
.planning-templates__table td {
  white-space: nowrap;
  vertical-align: middle;
}

.planning-templates__cell {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.planning-templates__label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-weight: 600;
  color: var(--bs-body-color);
  text-overflow: ellipsis;
}

.planning-templates__name {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

.planning-templates__hours {
  width: 100%;
}

.planning-templates__remove {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: 0;
  border-radius: 0.5rem;
  color: #94a3b8;
  background: transparent;
}

.planning-templates__remove:hover,
.planning-templates__remove:focus-visible {
  color: #b91c1c;
  background: rgba(185, 28, 28, 0.08);
}

/* Вид «По должностям»: очередь, сотрудник, часы дня, события и сводка. Полоса периода и .workload-summary-panel остаются. */
.workload-page--by-position .workload-page__queue-col,
.workload-page--by-position #workloadUserFilterWrap,
.workload-page--by-position .workload-page__hour-axis,
.workload-page--by-position .workload-page__events-switch,
.workload-page--by-position .workload-summary-panel__toggle,
.workload-page--by-position #workloadSummaryCsvBtn,
.workload-page--by-position #workloadSummaryCollapse {
  display: none !important;
}

@media (max-width: 991.98px) {
  .workload-page__plan-view.workload-page__view-switch {
    width: auto;
    max-width: 100%;
  }

  .workload-page__plan-view.workload-page__view-switch .btn {
    flex: 0 0 auto;
  }
}

.workload-position-plan {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #fff;
  overflow: hidden;
}

.workload-position-plan__scroll {
  overflow: auto;
  max-height: min(70vh, 720px);
}

.workload-position-plan__sheet {
  min-width: 100%;
  width: max-content;
}

.workload-position-plan__header,
.workload-position-plan__row {
  display: grid;
  grid-template-columns: var(--gantt-name-w, 11rem) minmax(0, 1fr);
  align-items: stretch;
  min-width: 100%;
}

.workload-position-plan__row {
  background: #fff;
  border-top: 1px solid #e9ecef;
  min-height: 2rem;
}

.workload-position-plan__row--zebra {
  background: #f3f6fa;
}

.workload-position-plan__name {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
  padding: 0.35rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workload-position-plan__header .workload-position-plan__name {
  z-index: 3;
}

.workload-position-plan__row--zebra .workload-position-plan__name {
  background: #e8eef5;
}

.workload-position-plan__days,
.workload-position-plan__cells {
  display: grid;
  grid-template-columns: repeat(var(--pos-cols, 7), minmax(var(--pos-col-min, 4.5rem), 1fr));
}

.workload-position-plan__day {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  padding: 0.35rem 0.15rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  white-space: nowrap;
}

.workload-position-plan__cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.35rem 0.15rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
}

.workload-position-plan__row--within .workload-position-plan__name,
.workload-position-plan__row--within .workload-position-plan__title,
.workload-position-plan__row--within .workload-position-plan__staff-count,
.workload-position-plan__row--within .workload-position-plan__cell {
  color: #166534;
}

.workload-position-plan__row--over .workload-position-plan__name,
.workload-position-plan__row--over .workload-position-plan__title,
.workload-position-plan__row--over .workload-position-plan__staff-count,
.workload-position-plan__row--over .workload-position-plan__cell {
  color: #b91c1c;
}

.workload-position-plan__group {
  min-width: 100%;
  min-height: 1.7rem;
  border-top: 1px solid rgba(71, 85, 105, 0.2);
  background: linear-gradient(90deg, #e2e8f0, #f8fafc);
}

.workload-position-plan__group-name {
  position: sticky;
  left: 0;
  z-index: 2;
  display: inline-block;
  max-width: 100%;
  padding: 0.3rem 0.45rem;
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  color: #334155;
  background: #e2e8f0;
}

.workload-position-plan__message {
  margin: 0;
  padding: 2rem 1rem;
  text-align: center;
}

.workload-position-plan__toggle {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font: inherit;
  font-weight: 600;
  text-align: left;
}

.workload-position-plan__toggle:focus-visible {
  outline: 2px solid rgba(13, 110, 253, 0.45);
  outline-offset: 2px;
  border-radius: 0.35rem;
}

.workload-position-plan__chev {
  flex: 0 0 auto;
  transition: transform 0.18s ease;
}

.workload-position-plan__toggle.is-collapsed .workload-position-plan__chev {
  transform: rotate(-90deg);
}

.workload-position-plan__title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workload-position-plan__staff-count {
  flex: 0 0 auto;
  font-weight: 500;
  color: #64748b;
}

.workload-position-plan__detail {
  border-top: 1px solid #e9ecef;
  background: #fff;
}

.workload-position-plan__detail[hidden] {
  display: none !important;
}

.workload-position-plan__detail--zebra {
  background: #f3f6fa;
}

.workload-position-plan__detail-body {
  position: sticky;
  left: 0;
  box-sizing: border-box;
  width: max-content;
  max-width: min(42rem, calc(100vw - 3rem));
  padding: 0.35rem 0.65rem 0.55rem 1.35rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #334155;
  background: #fff;
}

.workload-position-plan__detail--zebra .workload-position-plan__detail-body {
  background: #f3f6fa;
}

.workload-position-plan__source-group + .workload-position-plan__source-group {
  margin-top: 0.45rem;
}

.workload-position-plan__source-heading {
  margin: 0 0 0.15rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.workload-position-plan__source,
.workload-position-plan__task {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  padding: 0.12rem 0;
}

.workload-position-plan__task {
  padding-left: 0.85rem;
}

.workload-position-plan__source-meta {
  color: #64748b;
}

.workload-position-plan__source a {
  font-weight: 600;
}
