/*
 * UGRC Portal canonical components.
 *
 * New UI uses the c-* classes below. Existing production classes remain in
 * styles.css and are migrated gradually by adding the canonical class beside
 * the legacy one. This file is loaded before styles.css so legacy screens keep
 * their current appearance during the transition.
 */

/* Shared line icon: SVG avoids platform emoji substitution on mobile. */
.ui-icon {
  width: 1em;
  height: 1em;
  display: block;
  flex: 0 0 auto;
  overflow: visible;
  pointer-events: none;
}

.ui-icon--layered {
  position: relative;
}

.theme-toggle .ui-icon,
.logout-button .ui-icon,
.sidebar-toggle .ui-icon {
  width: 18px;
  height: 18px;
}

.sidebar-mobile-toggle__icon .ui-icon {
  width: 16px;
  height: 16px;
}

.sidebar-mobile-toggle__icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 16px;
}

/* Loading state: one ring, neutral label and shared geometry in every workspace. */
.c-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3, 12px);
  min-width: 0;
  margin: 0;
  padding: var(--space-4, 16px);
  color: var(--muted);
  font-family: inherit;
  font-size: var(--type-body, 13px);
  font-weight: var(--weight-heading, 600);
  line-height: 1.45;
  overflow-wrap: anywhere;
  text-align: left;
}

.c-loader--panel {
  min-height: var(--loader-panel-height, 260px);
  border: 1px solid var(--line);
  border-radius: var(--radius, 16px);
  background: var(--panel);
}

.c-loader--section { min-height: 140px; }
.c-loader--inline { display: inline-flex; padding: 0; }
.c-loader--floating {
  position: fixed;
  bottom: calc(var(--portal-fab-size, 48px) + max(var(--space-6, 24px), env(safe-area-inset-bottom, 0px)) + var(--space-1, 4px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  max-width: calc(100vw - 32px);
  width: max-content;
  padding: var(--space-3, 12px) var(--space-4, 16px);
  border: 1px solid var(--line);
  border-radius: var(--radius, 16px);
  background: var(--card-surface, var(--panel));
  box-shadow: var(--shadow-soft);
  pointer-events: none;
}
@media (max-width: 700px) {
  .c-loader--floating {
    bottom: calc(var(--portal-fab-size, 48px) + max(var(--space-4, 16px), env(safe-area-inset-bottom, 0px)) + var(--space-1, 4px));
  }
}
.c-spinner--sm { --loader-size: 13px; }

.c-loader::before,
.c-spinner,
.contract-object-add[aria-busy="true"]::before,
.report-photo-preview[data-report-photo-state="loading"]::after {
  content: "";
  box-sizing: border-box;
  display: inline-block;
  flex: 0 0 auto;
  width: var(--loader-size, 18px);
  height: var(--loader-size, 18px);
  border: var(--loader-stroke, 2px) solid var(--line-strong);
  border-top-color: var(--brand-primary, var(--accent));
  border-radius: 50%;
  animation: c-loader-spin var(--loader-duration, 700ms) linear infinite;
}

.c-loader__label { min-width: 0; }
.c-loader__label strong { font: inherit; }
.c-loader__description {
  display: block;
  margin-top: var(--space-1, 4px);
  font-size: inherit;
  font-weight: var(--weight-body, 400);
}

@keyframes c-loader-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .c-loader::before,
  .c-spinner,
  .contract-object-add[aria-busy="true"]::before,
  .report-photo-preview[data-report-photo-state="loading"]::after { animation: none; }
}

/* File manager: shared layout and typography for every workspace.
 * file-manager is the compatibility alias for c-file-manager.
 */
.file-manager-view,
.c-file-manager,
.file-manager {
  min-width: 0;
}

.c-file-manager,
.file-manager {
  font-family: inherit;
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  line-height: 1.45;
  display: grid;
  gap: 16px;
}

.file-manager-notice {
  display: grid;
  padding: 13px 15px;
  border: 1px solid color-mix(in srgb, var(--warning) 28%, transparent);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--warning) 8%, var(--panel));
  gap: 3px;
}

.file-manager-notice strong {
  color: var(--warning);
  font-size: var(--type-body);
  font-weight: var(--weight-medium);
}

.file-manager-notice span {
  color: var(--muted);
  font-size: var(--type-caption);
  line-height: 1.45;
}

.file-manager-toolbar {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: minmax(0, 1fr) minmax(190px, 240px) var(--control-height);
}

.file-manager-toolbar .c-button--icon { color: var(--muted); }
.file-manager-toolbar .ui-icon { width: 18px; height: 18px; }

.file-manager-toolbar .c-select,
.file-manager-toolbar select {
  width: 100%;
}

.file-manager-layout {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(230px, 270px) minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.file-manager-directories,
.file-manager-browser {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

.file-manager-directories__head,
.file-manager-browser__head {
  display: flex;
  min-width: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.file-manager-directories__head span,
.file-manager-directories__head b,
.file-manager-browser__head > span {
  color: var(--muted);
  font-size: var(--type-caption);
  font-weight: var(--weight-body);
}

.file-manager-tree {
  display: grid;
  padding: 7px;
  gap: 3px;
}

.file-manager-folder {
  display: grid;
  width: 100%;
  min-width: 0;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  text-align: left;
  gap: 9px;
  cursor: pointer;
  transition: background var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast);
}

.file-manager-folder.is-active {
  border-color: var(--line);
  background: var(--surface-2);
}

.file-manager-folder:hover {
  background: color-mix(in srgb, var(--surface-2) 97%, var(--ink));
}

.file-manager-folder:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: 1px;
}

.file-manager-folder__label {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.file-manager-folder strong,
.file-manager-folder small {
  overflow-wrap: anywhere;
  white-space: normal;
}

.file-manager-folder strong {
  font-size: var(--type-body);
  font-weight: var(--weight-medium);
}

.file-manager-folder small {
  color: var(--muted);
  font-size: var(--type-caption);
}

.file-manager-folder b {
  min-width: 23px;
  padding: 3px 6px;
  border-radius: 999px;
  background: var(--card-surface);
  color: var(--muted);
  font-size: var(--type-caption);
  font-weight: var(--weight-body);
  text-align: center;
}

.file-manager-browser__head h3 {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: var(--type-body);
  font-weight: var(--weight-medium);
}

.file-manager-files {
  display: grid;
}

.file-manager-file {
  display: grid;
  min-width: 0;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  grid-template-columns: minmax(180px, 1fr) minmax(115px, .35fr) auto;
  align-items: center;
  gap: 12px;
}

.file-manager-file:last-child {
  border-bottom: 0;
}

.file-manager-file__body,
.file-manager-file__meta {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.file-manager-file__body strong,
.file-manager-file__body span,
.file-manager-file__body small {
  overflow-wrap: anywhere;
}

.file-manager-file__body strong {
  color: var(--ink);
  font-size: var(--type-body);
  font-weight: var(--weight-medium);
  line-height: 1.35;
}

.file-manager-file__body span {
  color: var(--muted);
  font-size: var(--type-caption);
  line-height: 1.4;
}

.file-manager-file__body small {
  color: var(--muted);
  font-size: var(--type-caption);
  line-height: 1.35;
}

.file-manager-file__meta {
  color: var(--ink);
  font-size: var(--type-caption);
}

.file-manager-file__meta small {
  color: var(--muted);
  font-size: var(--type-caption);
}

.file-manager-file__action {
  display: flex;
  justify-content: flex-end;
}

.file-manager-file__action .c-button {
  min-width: 78px;
  text-decoration: none;
}

.file-manager-file__unavailable {
  color: var(--muted);
  font-size: var(--type-caption);
}

.file-manager-empty {
  min-height: 220px;
}

:is(.c-file-manager, .file-manager) .file-manager-empty strong {
  font-size: var(--type-body);
  font-weight: var(--weight-medium);
}

:is(.c-file-manager, .file-manager) .c-button {
  font-weight: var(--weight-medium);
}

@media (max-width: 1080px) {
  .file-manager-file {
    grid-template-columns: minmax(160px, 1fr) minmax(105px, .3fr) auto;
  }
}

@media (max-width: 860px) {
  .file-manager-layout {
    grid-template-columns: 1fr;
  }

  .file-manager-tree {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {

  .file-manager-toolbar {
    grid-template-columns: minmax(0, 1fr) var(--control-height);
  }

  .file-manager-toolbar > .c-field__control {
    grid-column: 1 / -1;
  }

  .file-manager-file {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
  }

  .file-manager-file__meta {
    grid-column: 1;
  }

  .file-manager-file__action {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }
}

@media (max-width: 520px) {
  .file-manager-tree {
    grid-template-columns: 1fr;
  }

  .file-manager-file {
    padding: 12px;
    grid-template-columns: minmax(0, 1fr);
  }

  .file-manager-file__action {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .file-manager-file__action .c-button,
  .file-manager-file__unavailable {
    width: 100%;
  }
}


/* Feed card typography: shared by every workspace and standalone previews.
 * feed-* hooks are compatibility aliases during component migration.
 */
.c-feed-card,
.feed-card {
  font-family: inherit;
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  line-height: 1.45;
}

:is(.c-feed-card, .feed-card) :is(.feed-title, .feed-kind) {
  font-size: var(--type-body);
  font-weight: var(--weight-medium);
  line-height: 1.3;
  letter-spacing: normal;
  text-transform: none;
}

:where(.c-feed-card, .feed-card) .feed-title { color: var(--ink); }
:where(.c-feed-card, .feed-card) .feed-kind { color: var(--blue); }

:is(.c-feed-card, .feed-card) :is(.feed-subtitle, .feed-notification-context) {
  font-size: var(--type-body);
  font-weight: var(--weight-medium);
  line-height: 1.4;
  letter-spacing: normal;
}

:where(.c-feed-card, .feed-card) .feed-subtitle {
  color: var(--blue-2);
}

:is(.c-feed-card, .feed-card) .feed-text {
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  line-height: 1.45;
  letter-spacing: normal;
  color: var(--muted);
}

:is(.c-feed-card, .feed-card) :is(.feed-author, .feed-notification-mentions) {
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  line-height: 1.4;
}

:where(.c-feed-card, .feed-card) .feed-author { color: var(--ink); }

:is(.c-feed-card, .feed-card) .feed-time {
  font-size: var(--type-caption);
  font-weight: var(--weight-medium);
  line-height: 1.35;
  color: var(--muted);
  white-space: nowrap;
}

:is(.c-feed-card, .feed-card) .feed-pin {
  font-weight: var(--weight-medium);
  color: var(--muted);
}

:is(.c-feed-card, .feed-card) .employee-link {
  font-size: inherit;
  font-weight: var(--weight-medium);
  line-height: inherit;
  text-align: left;
}

:is(.c-feed-card, .feed-card) :is(.feed-title, .feed-subtitle, .feed-text) {
  overflow-wrap: anywhere;
}

/* Button: shared typography also covers legacy and native SDO controls.
   Important prevents page-specific font shorthands replacing the shared value. */
:where(button, [role="button"], .c-button, .primary-button, .secondary-button,
  .danger-button, .row-action, .text-button, .btn) {
  font-weight: var(--weight-button, 450) !important;
}

.c-button {
  min-height: var(--control-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: var(--type-body);
  font-weight: var(--weight-button);
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    color var(--motion-fast),
    background var(--motion-fast),
    border-color var(--motion-fast),
    box-shadow var(--motion-fast),
    transform var(--motion-fast);
}

.c-button:active {
  transform: translateY(0);
}

.c-button:focus-visible,
.c-field__control:focus-visible,
.c-select__control:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: 2px;
}

.c-button:disabled,
.c-button[aria-disabled="true"],
.primary-button:disabled,
.primary-button[aria-disabled="true"],
.secondary-button:disabled,
.secondary-button[aria-disabled="true"],
.danger-button:disabled,
.danger-button[aria-disabled="true"],
.row-action:disabled,
.row-action[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.c-button--primary {
  border-color: var(--brand-action, var(--brand-primary));
  background: var(--brand-action, var(--brand-primary));
  color: var(--brand-on-action, var(--brand-on-primary));
  box-shadow: none;
}

.c-button--primary:hover {
  border-color: var(--brand-action-strong, var(--brand-primary-strong));
  background: var(--brand-action-strong, var(--brand-primary-strong));
}

.c-button--secondary {
  border-color: var(--line);
  background: var(--panel-strong);
  color: var(--ink);
}

.c-button--secondary:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
}

.c-button--brand-outline {
  border-color: var(--brand-primary);
  background: transparent;
  color: var(--brand-primary);
}

.c-button--brand-outline:hover {
  border-color: var(--brand-primary-strong);
  background: var(--brand-primary-soft);
  color: var(--brand-primary-strong);
}

.c-button--danger {
  border-color: rgba(210, 58, 58, 0.24);
  background: transparent;
  color: var(--danger);
}

.c-button--danger:hover {
  border-color: var(--danger);
  background: rgba(210, 58, 58, 0.09);
}

.c-button--icon {
  width: var(--control-height);
  min-width: var(--control-height);
  padding: 0;
  border-color: var(--line);
  background: var(--panel);
  color: var(--blue);
}

/* Neutral actions keep their label color while the surface changes on hover. */
.c-button--neutral {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--ink);
}

.c-button--neutral:hover {
  border-color: var(--line-strong);
  background: var(--panel-strong);
  color: var(--ink);
}

/* Company brand */
.c-company-brand {
  min-width: 0;
}

.c-company-brand__logo {
  display: block;
  width: 132px;
  max-width: 100%;
  height: auto;
}

.c-company-brand__fallback {
  color: var(--brand-primary);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}

.c-company-brand__fallback[hidden],
.c-company-brand__logo[hidden] {
  display: none;
}

.c-button--sm {
  min-height: var(--control-height-sm);
  padding: 6px 11px;
  font-size: var(--type-caption);
}

.c-button--icon.c-button--sm {
  width: var(--control-height-sm);
  min-width: var(--control-height-sm);
  padding: 0;
}

.chat-object-share-button {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  height: 40px;
  padding: 0;
  color: var(--ink);
}

.chat-object-share-button .ui-icon { width: 18px; height: 18px; }

/* One compact icon geometry for modal actions and shared window controls. */
.c-button--modal-icon,
.c-modal .c-modal__close,
.window-managed-head > button.c-window-control,
.c-window-control--preview {
  width: var(--window-control-size, 34px);
  min-width: var(--window-control-size, 34px);
  min-height: var(--window-control-size, 34px);
  height: var(--window-control-size, 34px);
  flex: 0 0 auto;
  padding: 0;
}

/* Palette of the static modal close control. */
.c-modal .c-modal__close {
  border-color: var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--muted);
}

.c-button--modal-icon .ui-icon,
.c-modal .c-modal__close .ui-icon,
.window-managed-head > .c-window-control .ui-icon,
.c-window-control--preview .ui-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: none;
  pointer-events: none;
}

.c-modal .c-modal__close:hover {
  border-color: color-mix(in srgb, var(--brand-primary) 30%, var(--line));
  background: var(--brand-primary-soft);
  color: var(--brand-primary);
}

/* Breadcrumbs */
.c-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  margin: 0 0 18px;
  padding: 0 2px;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: var(--type-body);
  line-height: 1.35;
}

.c-breadcrumbs__link {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: var(--weight-medium);
  cursor: pointer;
}

.c-breadcrumbs__link:hover,
.c-breadcrumbs__link:focus-visible {
  color: var(--muted);
  text-decoration: underline;
}

.c-breadcrumbs__separator {
  flex: 0 0 auto;
}

.c-breadcrumbs__current {
  min-width: 0;
  color: var(--muted);
  font-weight: var(--weight-medium);
  overflow-wrap: anywhere;
  white-space: normal;
}

/* Card */
.c-card {
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

.c-card--strong {
  background: var(--panel-strong);
}

.c-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.c-card__title,
.c-card__description {
  margin: 0;
}

.c-card__title {
  color: var(--ink);
  font-size: var(--type-card);
  font-weight: var(--weight-medium);
  line-height: 1.3;
}

.c-card__description {
  color: var(--muted);
  font-size: var(--type-body);
  line-height: 1.45;
}

/* Canonical interactive registry/list. Modules only define their column grid. */
.c-registry {
  padding: 0;
  overflow: hidden;
}

.c-registry__header {
  border-bottom: 1px solid var(--line);
  background: var(--card-subtle);
  color: var(--muted);
  font-size: var(--type-caption);
  font-weight: var(--weight-medium);
  letter-spacing: 0.01em;
}

.c-registry__row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--card-surface, var(--panel));
  color: var(--ink);
  font: inherit;
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: background var(--motion-fast);
}

.c-registry__row:last-child {
  border-bottom: 0;
}

.c-registry__row:hover {
  background: var(--card-subtle);
}

.c-registry__row:focus-visible {
  position: relative;
  z-index: 1;
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: -2px;
}

/* Shared employee card
 *
 * The visual foundation intentionally reuses the established profile styles
 * while this role-neutral component owns composition and edit-mode layout.
 */
.c-employee-profile {
  display: grid;
  min-width: 0;
  gap: var(--space-4);
}

.c-employee-profile-page.view.is-active {
  gap: 0;
}

.c-employee-profile-page__heading {
  margin-bottom: var(--space-3);
}

.c-employee-profile-page__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.c-employee-profile__primary,
.c-employee-profile__progress,
.c-employee-profile__panel,
.c-employee-profile__hero {
  min-width: 0;
}

.c-employee-profile-editor--inline .c-employee-profile__primary {
  align-items: start;
}

.c-employee-profile-editor--inline .c-employee-profile__hero {
  align-self: start;
}

.c-employee-profile__hero-head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.c-employee-profile__hero-head .eng-profile-hero__main {
  flex: 1 1 auto;
}

.c-employee-profile__hero-head > .c-button {
  flex: 0 0 auto;
}

.c-employee-profile__exams {
  max-height: 250px;
  overflow-y: auto;
  padding-right: 3px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.c-employee-profile .eng-profile-contact strong {
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  letter-spacing: 0;
  line-height: 1.45;
}

.c-employee-profile .eng-profile-contact span {
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  line-height: 1.45;
}

.c-employee-profile__department-links {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 3px 8px;
}

.c-employee-profile__department-links .employee-link {
  text-align: left;
}

.c-employee-profile-editor__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-5);
}

.c-employee-profile-editor__heading .c-card__description {
  margin-top: var(--space-2);
}

.c-employee-profile-editor__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: var(--space-3);
}

.c-employee-profile-editor__activity {
  margin-top: var(--space-4);
}

.c-employee-profile-editor__avatar-shell {
  position: relative;
  display: flex;
  flex: 0 0 auto;
}

.c-employee-profile-editor__avatar-preview:not(.has-image) {
  background: var(--blue);
  color: #fff;
}

.c-employee-profile-editor__avatar-actions {
  position: absolute;
  right: -7px;
  bottom: -7px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.c-employee-profile-editor__avatar-action {
  width: 32px;
  height: 32px;
  display: grid;
  padding: 0;
  place-items: center;
  border: 2px solid var(--panel);
  border-radius: 50%;
  background: var(--brand-primary);
  color: var(--brand-on-primary);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.c-employee-profile-editor__avatar-action:hover {
  background: var(--brand-primary-strong);
}

.c-employee-profile-editor__avatar-action svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.c-employee-profile-editor__avatar-action input {
  display: none;
}

.c-employee-profile-editor__avatar-action--remove {
  width: 26px;
  height: 26px;
  background: var(--panel-strong);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.c-employee-profile-editor__avatar-action--remove:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.c-employee-profile-editor__name-control {
  width: 100%;
  min-width: 0;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-strong);
  color: var(--ink);
  font: inherit;
  font-size: 24px;
  font-weight: var(--weight-heading);
  line-height: 1.2;
}

.c-employee-profile-editor__hero-meta.eng-profile-hero__meta {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.c-employee-profile-editor__hero-meta > span {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
}

.c-employee-profile-editor__status-control {
  min-height: 30px;
  max-width: 125px;
  padding: 4px 26px 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--ink);
  font: inherit;
  font-size: var(--type-caption);
}

.c-employee-profile-editor__avatar-status {
  min-height: 0;
  margin: 5px 0 0;
  font-size: var(--type-caption);
  line-height: 1.35;
}

.c-employee-profile-editor__avatar-status:empty {
  display: none;
}

.c-employee-profile-editor__hire-metric input {
  width: 100%;
  min-width: 0;
  padding: 5px 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--ink);
  font: inherit;
  font-size: 10.5px;
}

.c-employee-profile-editor__hire-metric input::-webkit-calendar-picker-indicator {
  width: 14px;
  margin: 0;
  padding: 0;
}

.c-employee-profile-editor__contacts .eng-profile-contact {
  align-content: start;
}

.c-employee-profile-editor__contacts .c-field__control,
.c-employee-profile-editor__contacts .c-select__control {
  min-height: 36px;
  padding: 7px 9px;
  font-size: var(--type-body);
}

.c-employee-profile-editor__phone-fields {
  display: grid;
  gap: 6px;
}

/* Canonical searchable multi-select. */
.c-multi-picker {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 6px;
}

.c-multi-picker__chips {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 5px;
}

.c-multi-picker__chip {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--ink);
  font: inherit;
  font-size: var(--type-caption);
  line-height: 1.25;
  text-align: left;
}

.c-multi-picker__chip:hover {
  border-color: var(--brand-primary);
}

.c-multi-picker__chip span {
  color: var(--brand-primary);
  font-size: 16px;
  line-height: 1;
}

.c-multi-picker__option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
}

.c-multi-picker__option:hover,
.c-multi-picker__option:focus-within {
  background: var(--panel-strong);
}

.c-multi-picker__option input { margin: 3px 0 0; }

.c-multi-picker__option > span {
  display: grid;
  gap: 2px;
}

.c-multi-picker__option strong {
  font-size: var(--type-body);
  font-weight: var(--weight-medium);
  line-height: 1.3;
}

.c-multi-picker__option small,
.c-multi-picker__empty {
  color: var(--muted);
  font-size: var(--type-caption);
  line-height: 1.35;
}

.c-multi-picker__empty {
  padding: 5px 1px;
}

.c-employee-profile-editor__access-label {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.c-employee-profile-editor__access-control {
  display: flex;
  width: 100%;
  min-height: 36px;
  min-width: 0;
  padding: 7px 9px;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-strong);
}

.c-employee-profile-editor__access-control strong {
  min-width: 0;
  color: var(--ink);
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  overflow-wrap: anywhere;
}

.c-employee-profile-editor__access-control .password-actions {
  flex: 0 0 auto;
  margin-top: 0;
}

.c-employee-profile-editor__access-control--password {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  transition: border-color var(--motion-fast), background var(--motion-fast);
}

.c-employee-profile-editor__access-control--password .password-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.c-employee-profile-editor__access-control--password .password-actions {
  width: 100%;
  justify-content: flex-end;
}

.c-employee-profile-editor__access-item {
  transition: background var(--motion-fast);
}

.c-employee-profile-editor__access-hint {
  color: var(--muted);
  font-size: var(--type-caption);
  font-weight: var(--weight-body);
  line-height: 1.35;
}

.c-employee-profile-editor__access-item.is-pending .c-employee-profile-editor__access-control--password {
  border-color: color-mix(in srgb, var(--brand-primary) 32%, transparent);
  background: color-mix(in srgb, var(--brand-primary-soft) 44%, var(--panel-strong));
}

.c-employee-profile-editor__access-item.is-pending .c-employee-profile-editor__access-hint {
  color: var(--brand-primary-strong);
}

/* Chip and status */
.c-chip {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--muted);
  font-size: var(--type-caption);
  font-weight: var(--weight-medium);
  line-height: 1.2;
  white-space: nowrap;
}

button.c-chip {
  cursor: pointer;
}

.c-chip--active,
.c-chip[aria-pressed="true"] {
  border-color: var(--brand-primary);
  background: var(--brand-primary);
  color: var(--brand-on-primary);
}

.c-chip--success {
  border-color: rgba(31, 133, 83, 0.08);
  background: rgba(31, 133, 83, 0.10);
  color: var(--success);
}

.c-chip--warning {
  border-color: rgba(183, 121, 18, 0.08);
  background: rgba(183, 121, 18, 0.10);
  color: var(--warning);
}

.c-chip--danger {
  border-color: rgba(210, 58, 58, 0.08);
  background: rgba(210, 58, 58, 0.10);
  color: var(--danger);
}

.c-chip--info {
  border-color: rgba(25, 87, 173, 0.08);
  background: var(--blue-soft);
  color: var(--blue-2);
}

.c-chip--muted,
.c-chip--neutral {
  border-color: rgba(107, 122, 140, 0.08);
  background: rgba(107, 122, 140, 0.10);
  color: var(--muted);
}

/* Non-interactive business state. Use c-chip for filters and tags. */
.c-status {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-size: 12px;
  font-weight: var(--weight-heading);
  line-height: 1.2;
  white-space: nowrap;
}

.c-status--success {
  border-color: rgba(31, 133, 83, 0.08);
  background: rgba(31, 133, 83, 0.10);
  color: var(--success);
}

.c-status--warning {
  border-color: rgba(183, 121, 18, 0.08);
  background: rgba(183, 121, 18, 0.10);
  color: var(--warning);
}

.c-status--neutral {
  border-color: rgba(107, 122, 140, 0.08);
  background: rgba(107, 122, 140, 0.10);
  color: var(--muted);
}

.c-status--danger {
  border-color: rgba(210, 58, 58, 0.08);
  background: rgba(210, 58, 58, 0.10);
  color: var(--danger);
}

.c-status--info {
  border-color: rgba(25, 87, 173, 0.08);
  background: var(--blue-soft);
  color: var(--blue-2);
}

/* Non-interactive numeric or short contextual count. */
.c-counter {
  min-width: 28px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(134, 151, 176, 0.09);
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--weight-medium);
  line-height: 1.2;
  white-space: nowrap;
}

body.theme-dark .c-counter:not(.c-counter--info):not(.c-counter--outline):not(.c-counter--alert) {
  background: rgba(255, 255, 255, 0.055);
}

.c-counter--info {
  border-color: rgba(25, 87, 173, 0.08);
  background: var(--blue-soft);
  color: var(--blue-2);
}

.c-counter--outline {
  border-color: var(--line);
  background: transparent;
}

.c-counter--pill {
  border-radius: 999px;
}

.c-counter--alert {
  min-width: 20px;
  min-height: 20px;
  height: 20px;
  padding: 0 6px;
  border: 0;
  border-radius: 999px;
  background: var(--brand-primary);
  color: var(--brand-on-primary);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.c-counter--compact {
  min-width: 18px;
  min-height: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 9px;
}

/* Field */
.c-field {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: var(--space-2);
}

.c-field__label {
  color: var(--ink);
  font-size: var(--type-caption);
  font-weight: var(--weight-medium);
  line-height: 1.3;
}

.c-field__hint,
.c-field__error {
  margin: 0;
  font-size: var(--type-caption);
  line-height: 1.35;
}

.c-field__hint {
  color: var(--muted);
}

.c-field__error {
  color: var(--danger);
}

/* Label/heading help, shared by portal tools and isolated SDO cards. */
.c-field-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1, 4px);
  min-width: 0;
}

.c-field-help--field {
  display: flex;
  margin-bottom: 6px;
}

.c-field-help--contained {
  display: flex;
}

.c-field-help--page { display: flex; align-items: center; gap: var(--space-3); }
.c-field-help--page > .c-field-help__tip { width: min(420px, calc(100vw - 64px)); }
.c-commercial-help-heading { display: flex; align-items: center; gap: var(--space-2); }
.c-commercial-help-heading > :is(h2, h3, h4) { margin: 0; font-size: var(--type-card); font-weight: var(--weight-body); line-height: 1.5; }

.c-field-help > label {
  margin: 0;
}

.c-field-help__button {
  flex: none;
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  min-height: 14px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  font-weight: var(--weight-body, 400);
  line-height: 1;
  cursor: help;
}

.c-field-help__button:focus-visible {
  outline: var(--focus-ring-width, 2px) solid var(--focus-ring, var(--accent));
  outline-offset: 2px;
}

.c-field-help__tip {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + var(--space-2, 8px));
  z-index: 10;
  box-sizing: border-box;
  width: min(300px, calc(100vw - 72px));
  padding: var(--space-3, 12px);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm, 10px);
  background: var(--card-surface, var(--panel));
  color: var(--ink, var(--text));
  box-shadow: var(--shadow-soft);
  font-size: 12px;
  font-weight: var(--weight-body, 400);
  line-height: 1.5;
  white-space: normal;
}

.c-field-help--contained > .c-field-help__tip {
  width: min(300px, 100%);
}

.c-field-help__button:not([data-help-dismissed]):is(:hover, :focus-visible, [aria-expanded="true"]) + .c-field-help__tip:not([hidden]),
.c-field-help--focus > .c-field-help__button:focus + .c-field-help__tip:not([hidden]),
.c-field-help--managed > .c-field-help__tip:not([hidden]) {
  display: block;
}

.c-field-help__button[hidden],
.c-field-help__tip[hidden] {
  display: none;
}

.c-field__control,
.c-select__control {
  width: 100%;
  min-height: var(--control-height);
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: 0;
  background: var(--panel-strong);
  color: var(--ink);
  font: inherit;
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  line-height: 1.4;
  transition: border-color var(--motion-fast), box-shadow var(--motion-fast);
}

.c-field__control::placeholder {
  color: var(--muted);
  opacity: 0.64;
}

.c-field__control:hover,
.c-select__control:hover {
  border-color: var(--line-strong);
}

.c-field__control:focus,
.c-select__control:focus {
  border-color: var(--focus-border);
}

textarea.c-field__control {
  min-height: 104px;
  resize: vertical;
}

.c-field--error .c-field__control {
  border-color: var(--danger);
}

/* Real file inputs keep their FileList, validation and platform file chooser.
 * Only visible shared fields own the outer geometry; hidden upload triggers
 * keep the size and positioning of their existing button or drop zone. */
input.c-field__control[type="file"]:not([hidden]),
.c-equipment .oso-field input.valve-field-input[type="file"] {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: var(--control-height, 40px);
  min-height: var(--control-height, 40px);
  padding: calc((var(--control-height, 40px) - var(--control-height-sm, 34px) - 2px) / 2);
  padding-inline-end: var(--space-2, 8px);
  overflow: hidden;
  color: var(--ink);
  font-family: inherit;
  font-size: var(--type-body, 13px);
  font-weight: var(--weight-body, 400);
  line-height: var(--control-height-sm, 34px);
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Keep these rules separate: an unsupported vendor pseudo-element must not
 * invalidate the standard file-selector-button rule in another browser. */
input[type="file"]::file-selector-button {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  height: var(--control-height-sm, 34px);
  margin: 0;
  margin-inline-end: var(--space-2, 8px);
  padding: 0 var(--space-3, 12px);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-sm, 10px) - 2px);
  background: var(--panel-strong);
  color: var(--ink);
  font-family: inherit;
  font-size: var(--type-body, 13px);
  font-weight: var(--weight-button, 450);
  line-height: 1.35;
  cursor: pointer;
  transition: background var(--motion-fast), border-color var(--motion-fast);
}
input[type="file"]::-webkit-file-upload-button {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  height: var(--control-height-sm, 34px);
  margin: 0;
  margin-inline-end: var(--space-2, 8px);
  padding: 0 var(--space-3, 12px);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-sm, 10px) - 2px);
  background: var(--panel-strong);
  color: var(--ink);
  font-family: inherit;
  font-size: var(--type-body, 13px);
  font-weight: var(--weight-button, 450);
  line-height: 1.35;
  cursor: pointer;
  transition: background var(--motion-fast), border-color var(--motion-fast);
}
input[type="file"]:enabled::file-selector-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}
input[type="file"]:enabled::-webkit-file-upload-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}
input[type="file"]:focus-visible {
  outline: var(--focus-ring-width, 2px) solid var(--focus-ring, var(--accent));
  outline-offset: 2px;
}
input[type="file"]:disabled { opacity: .5; cursor: not-allowed; }
input[type="file"]:disabled::file-selector-button { cursor: not-allowed; }
input[type="file"]:disabled::-webkit-file-upload-button { cursor: not-allowed; }

/* Checkbox: one appearance for real inputs, including dynamically rendered SDO roots.
 * No wrapper or JavaScript state is needed. Placement belongs to the surrounding form. */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  display: inline-block;
  flex: none;
  width: var(--checkbox-size, 18px);
  height: var(--checkbox-size, 18px);
  min-width: var(--checkbox-size, 18px);
  min-height: var(--checkbox-size, 18px);
  max-width: var(--checkbox-size, 18px);
  max-height: var(--checkbox-size, 18px);
  padding: 0;
  margin: 0;
  border: var(--checkbox-border-width, 1.5px) solid var(--line-strong, var(--line));
  border-radius: var(--checkbox-radius, 4px);
  background-color: var(--card-surface, var(--panel, #fff));
  background-image: none;
  background-position: center;
  background-size: 16px 16px;
  background-repeat: no-repeat;
  box-shadow: none;
  vertical-align: middle;
  cursor: pointer;
}
input[type="checkbox"]:is(:checked, :indeterminate) {
  border-color: var(--brand-primary, var(--accent));
  background-color: var(--brand-primary, var(--accent));
}
input[type="checkbox"]:checked {
  background-image: var(--checkbox-check, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3.5 8 3 3 6-6' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"));
}
input[type="checkbox"]:indeterminate {
  background-image: var(--checkbox-mixed, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8h8' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"));
}
input[type="checkbox"]:enabled:hover { border-color: var(--brand-primary, var(--accent)); }
input[type="checkbox"]:focus-visible {
  outline: var(--focus-ring-width, 2px) solid var(--focus-ring, var(--accent));
  outline-offset: 2px;
}
input[type="checkbox"][aria-invalid="true"] { border-color: var(--danger); }
input[type="checkbox"]:disabled { opacity: .5; cursor: default; }
input[type="checkbox"][hidden] { display: none; }
label:has(> input[type="checkbox"]),
.c-checkbox-label {
  font-size: var(--type-body, 13px);
  font-weight: var(--weight-body, 400);
  line-height: 1.4;
  letter-spacing: normal;
  text-transform: none;
}
.c-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2, 8px);
  min-height: var(--control-height, 40px);
  cursor: pointer;
}
label:has(> input[type="checkbox"]) > span,
label:has(> input[type="checkbox"]) strong {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-transform: inherit;
}
@media (forced-colors: active) {
  input[type="checkbox"] {
    appearance: auto;
    -webkit-appearance: auto;
    forced-color-adjust: auto;
  }
  input[type="checkbox"]:is(:checked, :indeterminate) { background-image: none; }
}

/* Radio uses the same real-input size and focus policy as checkbox.
 * Labels keep their existing report, audience and SDO layout/typography. */
input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  display: inline-block;
  flex: none;
  width: var(--checkbox-size, 18px);
  height: var(--checkbox-size, 18px);
  min-width: var(--checkbox-size, 18px);
  min-height: var(--checkbox-size, 18px);
  max-width: var(--checkbox-size, 18px);
  max-height: var(--checkbox-size, 18px);
  padding: 0;
  margin: 0;
  border: var(--checkbox-border-width, 1.5px) solid var(--line-strong, var(--line));
  border-radius: 50%;
  background-color: var(--card-surface, var(--panel));
  background-image: none;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: none;
  vertical-align: middle;
  cursor: pointer;
}
input[type="radio"]:checked {
  border-color: var(--brand-primary, var(--accent));
  background-image: radial-gradient(circle, var(--brand-primary, var(--accent)) 0 35%, transparent 40%);
}
input[type="radio"]:enabled:hover { border-color: var(--brand-primary, var(--accent)); }
input[type="radio"]:focus-visible {
  outline: var(--focus-ring-width, 2px) solid var(--focus-ring, var(--accent));
  outline-offset: 2px;
}
input[type="radio"][aria-invalid="true"] { border-color: var(--danger); }
input[type="radio"]:disabled { opacity: .5; cursor: default; }
input[type="radio"][hidden] { display: none; }
@media (forced-colors: active) {
  input[type="radio"] {
    appearance: auto;
    -webkit-appearance: auto;
    forced-color-adjust: auto;
  }
  input[type="radio"]:checked { background-image: none; }
}

/* Choice family: single, searchable and multiple selection. */
.c-select { position: relative; min-width: 0; }
.c-select__control { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer; }
.c-select::after,
.select-shell:where(.app-shell *, .ui-kit-page *)::after { display: none; }
.c-choice {
  position: relative;
  display: block;
  min-width: 0;
  width: 100%;
}
.c-choice.c-choice--native {
  padding: 0;
  border: 0;
  background: transparent;
  min-height: 0;
  height: auto;
}
.c-choice__native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  opacity: 0 !important;
  clip-path: inset(50%) !important;
  pointer-events: none !important;
}
.c-choice__trigger,
.report-dropdown > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2, 8px);
  width: 100%;
  min-width: 0;
  min-height: var(--control-height, 40px);
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm, 10px);
  background: var(--panel-strong, var(--panel, #fff));
  color: var(--ink, var(--text, #141f38));
  font: inherit;
  font-size: var(--type-body, 13px);
  font-weight: var(--weight-body, 400);
  line-height: 1.4;
  text-align: left;
  list-style: none;
  cursor: pointer;
}
.c-choice__validation { display: block; padding-top: var(--space-1); color: var(--danger); font-size: var(--type-caption); }
.c-choice__validation[hidden] { display: none; }
.c-choice__value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-choice__trigger:hover { border-color: var(--line-strong, var(--line)); }
.c-choice__trigger:focus-visible,
.c-choice__input:focus-visible { outline: 2px solid var(--focus-border, var(--accent)); outline-offset: 2px; }
.c-choice.is-open > .c-choice__trigger,
.c-choice.is-open > .c-choice__input { border-color: var(--focus-border, var(--accent)); }
.c-choice__trigger:disabled { opacity: .55; cursor: default; }
.c-choice__trigger[aria-invalid="true"] { border-color: var(--danger); }
.c-choice__arrow,
.c-choice__toggle {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.c-choice__arrow { width: 16px; height: 16px; pointer-events: none; }
.c-choice__arrow svg,
.c-choice__toggle svg { width: 16px; height: 16px; }
.c-choice.is-open > .c-choice__trigger > .c-choice__arrow,
.c-choice.is-open > .c-choice__toggle > svg { transform: rotate(180deg); }
.c-choice__input { width: 100%; padding-right: 36px !important; }
.c-choice__toggle {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 34px;
  height: calc(var(--control-height, 40px) - 2px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm, 10px);
  background: transparent;
  cursor: pointer;
}
.c-choice__toggle:disabled { opacity: .55; cursor: default; }
.c-choice__menu,
.c-multi-picker__menu {
  position: fixed;
  inset: auto;
  z-index: 10000;
  box-sizing: border-box;
  display: block;
  max-width: calc(100vw - 16px);
  max-height: var(--choice-menu-height, 320px);
  overflow: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: var(--space-1, 4px);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm, 10px);
  background: var(--card-surface, var(--panel, #fff));
  color: var(--ink, var(--text, #141f38));
  box-shadow: var(--shadow);
  font: inherit;
  font-size: var(--type-body, 13px);
  font-weight: var(--weight-body, 400);
  line-height: 1.4;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong, var(--line)) transparent;
}
.c-choice__menu[hidden],
.c-multi-picker__menu[hidden],
.c-choice[hidden] { display: none; }
.c-choice__menu--sheet { padding: var(--space-2, 8px); border-radius: var(--radius, 16px); padding-bottom: max(var(--space-2, 8px),env(safe-area-inset-bottom)); }
.c-choice__menu::backdrop { background: transparent; }
.c-choice__option,
.c-choice__menu > button,
.c-choice__menu .check-item {
  display: flex;
  align-items: center;
  gap: var(--space-2, 8px);
  width: 100%;
  min-height: var(--control-height, 40px);
  margin: 0;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--radius-sm, 10px);
  background: transparent;
  color: var(--ink, var(--text, #141f38));
  font: inherit;
  font-weight: var(--weight-body, 400);
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.c-choice__menu > button:not(.c-choice__option):not(.report-dropdown__done) { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-1); }
.c-choice__option::after { content: ""; flex: 0 0 16px; margin-left: auto; }
.c-choice__option[aria-selected="true"]::after { content: "✓"; color: var(--brand-primary, var(--accent)); }
.c-choice__option:hover,
.c-choice__option.is-active,
.c-choice__menu > button:hover,
.c-choice__menu .check-item:hover { background: var(--surface-2, var(--soft)); }
.c-choice__option:focus-visible { outline: 2px solid var(--focus-border, var(--accent)); outline-offset: -2px; }
.c-choice__option:disabled { opacity: .5; cursor: default; }
.c-choice__option:disabled:hover { background: transparent; }
.c-choice__message,
.c-choice__group { display: block; padding: 8px 12px; color: var(--muted); font-size: var(--type-caption, 11px); }
.c-choice__group { font-weight: var(--weight-heading, 600); }
.c-choice__search { position: sticky; top: 0; z-index: 1; width: 100%; min-height: var(--control-height, 40px); margin-bottom: var(--space-1, 4px); padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm, 10px); background: var(--card-surface, var(--panel, #fff)); color: var(--ink, var(--text, #141f38)); font: inherit; }
.c-choice__search[hidden] { display: none; }
.report-dropdown > summary::-webkit-details-marker { display: none; }
.report-dropdown > summary::after { display: none; }
.report-dropdown:not([open]) > .report-dropdown__menu { display: none; }
.report-dropdown__options { display: grid; gap: var(--space-1, 4px); }
.report-dropdown__search { width: 100%; margin-bottom: var(--space-1, 4px); }
.report-dropdown__done { display: block; margin: var(--space-2, 8px) 0 0 auto; min-height: var(--control-height-sm, 34px); padding: 7px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm, 10px); background: var(--surface-2, var(--soft)); color: var(--ink, var(--text, #141f38)); font: inherit; cursor: pointer; }

/* Search/filter toolbar. Legacy aliases are limited to the portal and UI Kit;
 * isolated SDO toolbars retain their own CSS. Page-specific grids and wrapping
 * remain with their owners in styles.css. */
:is(.c-toolbar, .toolbar:where(.app-shell *, .ui-kit-page *)) {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.48);
  box-shadow: none;
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

:is(.c-toolbar__search, .toolbar__search:where(.app-shell *, .ui-kit-page *)) {
  flex: 1 1 360px;
  min-width: 260px;
}

:is(.c-toolbar__filters, .toolbar__filters:where(.app-shell *, .ui-kit-page *)) {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-left: auto;
}

:is(.c-toolbar__control, .toolbar__control:where(.app-shell *, .ui-kit-page *)) {
  min-width: 180px;
}

:is(.c-toolbar__control--wide, .toolbar__control--wide:where(.app-shell *, .ui-kit-page *)) {
  min-width: 210px;
}

:is(.c-toolbar__control--competency, .toolbar__control--competency:where(.app-shell *, .ui-kit-page *)) {
  min-width: 280px;
}

.select-shell:where(.app-shell *, .ui-kit-page *) {
  position: relative;
  display: block;
  min-width: 180px;
}

.select-shell--competency:where(.app-shell *, .ui-kit-page *) {
  min-width: 280px;
}

.select-shell--wide:where(.app-shell *, .ui-kit-page *) {
  min-width: 210px;
}

.select-shell--modal:where(.app-shell *, .ui-kit-page *) {
  width: 100%;
  min-width: 0;
}

.select-shell:where(.app-shell *, .ui-kit-page *) > select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  cursor: pointer;
}

:is(.c-toolbar, .toolbar:where(.app-shell *, .ui-kit-page *)) input,
:is(.c-toolbar, .toolbar:where(.app-shell *, .ui-kit-page *)) select {
  min-height: var(--control-height);
  border-radius: var(--radius-sm);
  /* Existing toolbar text stays 13px when the mobile body token becomes 12.5px. */
  font-size: 13px;
}

:is(.c-toolbar, .toolbar:where(.app-shell *, .ui-kit-page *)) select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  cursor: pointer;
}

body.theme-dark :is(.c-toolbar, .toolbar:where(.app-shell *, .ui-kit-page *)) {
  background: var(--panel);
  border-color: var(--line);
}

body.theme-dark .select-shell:where(.app-shell *, .ui-kit-page *) {
  background: rgba(31, 36, 51, 0.72);
  border-color: var(--line);
  color: var(--ink);
}

:is(.c-toolbar, .toolbar:where(.app-shell *, .ui-kit-page *)) input::placeholder,
:is(.c-toolbar, .toolbar:where(.app-shell *, .ui-kit-page *)) textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 70%, transparent);
}

@media (max-width: 1120px) {
  :is(.c-toolbar, .toolbar:where(.app-shell *, .ui-kit-page *)) {
    flex-wrap: wrap;
  }

  :is(.c-toolbar__search, .toolbar__search:where(.app-shell *, .ui-kit-page *)) {
    flex-basis: 100%;
  }

  :is(.c-toolbar__filters, .toolbar__filters:where(.app-shell *, .ui-kit-page *)) {
    margin-left: 0;
  }
}

@media (max-width: 760px) {
  :is(.c-toolbar, .toolbar:where(.app-shell *, .ui-kit-page *)) {
    display: grid;
  }

  :is(.c-toolbar__filters, .toolbar__filters:where(.app-shell *, .ui-kit-page *)) {
    display: grid;
    gap: var(--space-2);
    width: 100%;
  }

  :is(.c-toolbar__search, .toolbar__search:where(.app-shell *, .ui-kit-page *)),
  :is(.c-toolbar__control, .toolbar__control:where(.app-shell *, .ui-kit-page *)),
  :is(.c-toolbar__control--wide, .toolbar__control--wide:where(.app-shell *, .ui-kit-page *)),
  .select-shell:where(.app-shell *, .ui-kit-page *),
  .select-shell--wide:where(.app-shell *, .ui-kit-page *) {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 700px) {
  :is(.c-toolbar, .toolbar:where(.app-shell *, .ui-kit-page *)) {
    padding: var(--space-2);
    border-radius: 12px;
  }

  :is(.c-toolbar__filters, .toolbar__filters:where(.app-shell *, .ui-kit-page *)) {
    grid-template-columns: 1fr;
  }
}

/* Month picker */
.c-month-picker { display: inline-block; min-width: 0; max-width: 100%; }
.c-month-picker--native { position: relative; display: block; width: 100%; }
.c-month-picker--native > .c-month-picker__trigger { width: 100%; }
.c-month-picker__native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  clip-path: inset(50%) !important;
}
.c-month-picker[hidden], .c-month-picker__panel[hidden] { display: none !important; }
.c-month-picker__trigger { width: auto; max-width: 100%; white-space: nowrap; text-align: center; cursor: pointer; }
.c-month-picker__panel {
  position: fixed;
  margin: 0;
  right: auto;
  bottom: auto;
  z-index: 1000;
  width: min(300px, calc(100vw - 16px));
  box-sizing: border-box;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card-surface);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}
.c-month-picker__header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-2); }
.c-month-picker__months { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-1); }
.c-month-picker__month { min-width: 0; padding: var(--space-2); font-size: var(--type-caption); }
.c-month-picker__month[aria-pressed="true"] { border-color: var(--brand-primary); background: var(--brand-primary-soft); color: var(--brand-primary); }

/* Shared day and time selection; native popover escapes modal/card clipping. */
.c-date-time { display: block; min-width: 0; width: 100%; }
.c-date-time__trigger { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); width: 100%; text-align: start; cursor: pointer; font-weight: var(--weight-body); }
.c-date-time__trigger > span { min-width: 0; overflow-wrap: anywhere; }
.c-date-time__trigger > :is(svg,.ui-icon) { width: 18px; height: 18px; flex: 0 0 auto; color: var(--muted); }
.c-date-time__panel { position: fixed; inset: auto; margin: 0; width: min(340px,calc(100vw - 24px)); max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); overflow: auto; box-sizing: border-box; padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card-surface); color: var(--ink); box-shadow: var(--shadow); font-family: inherit; font-size: var(--type-body); font-weight: var(--weight-body); }
.c-date-time__header { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; align-items: center; gap: var(--space-1); margin-bottom: var(--space-3); }
.c-date-time__header > span { text-align: center; text-transform: capitalize; }
.c-date-time__header .c-button--icon { color: var(--muted); }
.c-date-time__header .ui-icon { width: 18px; height: 18px; }
.c-date-time__week,.c-date-time__days { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: var(--space-1); }
.c-date-time__week { margin-bottom: var(--space-2); text-align: center; color: var(--muted); font-size: var(--type-caption); }
.c-date-time__day { display: grid; place-items: center; aspect-ratio: 1; min-width: 0; padding: 0; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.c-date-time__day:hover { background: var(--surface-2); }
.c-date-time__day.is-outside { color: var(--muted); }
.c-date-time__day[aria-current="date"] { border-color: var(--brand-primary); }
.c-date-time__day[aria-pressed="true"] { background: var(--brand-action,var(--brand-primary)); border-color: var(--brand-action,var(--brand-primary)); color: var(--brand-on-action,var(--brand-on-primary)); }
.c-date-time__day:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: 1px; }
.c-date-time__day:disabled { opacity: .4; cursor: default; }
.c-date-time__time { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--space-3); padding-top: var(--space-3); margin-top: var(--space-3); border-top: 1px solid var(--line); }
.c-date-time__time .c-field__label { font-weight: var(--weight-body); }
.c-date-time__footer { display: flex; gap: var(--space-2); margin-top: var(--space-4); }
.c-date-time__footer > .c-button { flex: 1; }

/* Modal */
.c-modal {
  width: min(760px, calc(100vw - 32px));
  max-height: min(88vh, 900px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 22px;
  background: var(--panel-strong);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(16, 24, 39, 0.24);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

.c-modal::backdrop {
  background: rgba(16, 24, 39, 0.28);
  backdrop-filter: blur(8px);
}

body.theme-dark .c-modal {
  border-color: var(--line);
  background: var(--panel-strong);
}

.c-modal__content {
  max-height: inherit;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.c-modal__header,
.c-modal__footer {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--panel-strong);
}

.c-modal__header {
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.c-modal__body {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: var(--space-5);
  background: var(--card-surface);
}

.c-modal__footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.c-modal__title {
  margin: 0;
  color: var(--ink);
  font-size: var(--type-section);
  font-weight: var(--weight-heading);
  line-height: 1.25;
}

/* Modal titles may receive programmatic focus for screen-reader context. */
.c-modal__title:focus {
  outline: 0;
}

/* Settings typography has one owner across employee workspaces. */
.c-settings {
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  line-height: 1.6;
}

.c-settings :is(.c-modal__title, h3, strong, .c-status) {
  font-weight: var(--weight-medium);
}

.c-settings h3 {
  font-size: var(--type-section);
  line-height: 1.3;
}

.c-settings .portal-settings__identity span {
  font-size: var(--type-caption);
}

.c-settings .portal-settings__connection strong {
  font-size: var(--type-card);
}

.c-settings dl {
  line-height: 1.5;
}

/* Employee creation uses the shared modal/field owners, without nested panels. */
.c-modal--employee,
.c-modal--employee .c-modal__header,
.c-modal--employee .c-modal__body,
.c-modal--employee .c-modal__footer {
  background: var(--card-surface);
}

.c-employee-form {
  display: grid;
  gap: var(--space-6);
}

.c-employee-form__section,
.c-employee-form__access,
.c-employee-form__photo-body,
.c-employee-form__policy {
  display: grid;
  min-width: 0;
  gap: var(--space-4);
}

.c-employee-form__section + .c-employee-form__section {
  padding-top: var(--space-6);
  border-top: 1px solid var(--line);
}

.c-employee-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: var(--space-4);
}

.c-employee-form__policy {
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--card-subtle);
}

.c-employee-form__policy strong {
  font-size: var(--type-body);
  font-weight: var(--weight-medium);
}

.c-employee-form__departments {
  display: grid;
  gap: var(--space-1);
  max-height: 260px;
  overflow: auto;
  padding: var(--space-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.c-employee-form .c-employee-form__departments .dept-option {
  min-width: 0;
  min-height: var(--control-height);
  padding: var(--space-2) var(--space-2) var(--space-2) calc(var(--space-2) + var(--dept-depth, 0) * var(--space-3));
  border-radius: var(--radius-sm);
  background: transparent;
}

.c-employee-form .c-employee-form__departments .dept-option:is(:hover, :has(input:checked)) {
  border-color: var(--line);
  background: var(--surface-2);
}


.c-employee-form__departments .dept-option__text {
  min-width: 0;
}

.c-employee-form__departments .dept-option__text strong {
  white-space: normal;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: var(--type-body);
  font-weight: var(--weight-body);
}

.c-employee-form__departments .dept-option__text small {
  font-size: var(--type-caption);
  font-weight: var(--weight-body);
}

.c-employee-form__photo {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: var(--space-4);
}

.c-employee-form__avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: calc(var(--space-8) * 2);
  height: calc(var(--space-8) * 2);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--type-section);
  font-weight: var(--weight-medium);
}

.c-employee-form__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.c-employee-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.c-employee-form__photo-body .media-status:empty {
  display: none;
}

.c-employee-form__password {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: var(--space-2);
}

@media (max-width: 700px) {
  .c-employee-form__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .c-employee-form__photo {
    align-items: flex-start;
  }

  .c-employee-form__password {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .c-employee-form__password > input {
    grid-column: 1 / -1;
  }
}

/* Shared window controls: native dialogs and SDO use one geometry and icon set. */
.window-managed-head,
.c-modal .window-managed-head {
  column-gap: var(--space-2, 8px);
  align-items: center;
  flex-wrap: nowrap;
}
.window-managed-head > button.c-window-control,
.c-window-control--preview {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm, 10px);
  background: var(--panel);
  color: var(--ink, var(--text));
  box-shadow: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.c-window-control--preview {
  cursor: default;
  pointer-events: none;
}
.window-managed-head > .window-minimize { margin-left: auto; }
.window-managed-head > button.c-window-control:hover {
  background: var(--surface-2, var(--soft));
  border-color: var(--muted);
}
.c-window-tray {
  position: fixed;
  inset: auto;
  right: var(--window-tray-right, 192px);
  bottom: var(--window-tray-bottom, max(var(--space-6), env(safe-area-inset-bottom)));
  z-index: 1480;
  display: flex;
  align-items: center;
  width: max-content;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  pointer-events: none;
}
.c-window-tray, .c-window-tray * { box-sizing: border-box; }
.c-window-tray[hidden] { display: none; }
.c-window-tray__toggle {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--portal-fab-size);
  height: var(--portal-fab-size);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--card-surface);
  color: var(--muted);
  box-shadow: var(--shadow-soft);
  font-size: var(--portal-fab-icon-size);
  font-weight: var(--weight-body);
  cursor: pointer;
  pointer-events: auto;
}
.c-window-tray__windows {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 0;
  max-width: var(--window-tray-space, 0px);
  margin-right: 0;
  opacity: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  transform: translateX(12px);
  transition: width 240ms ease, margin-right 240ms ease, opacity 180ms ease, transform 240ms ease;
  pointer-events: none;
}
.c-window-tray__windows::-webkit-scrollbar { display: none; }
.c-window-tray.is-expanded .c-window-tray__windows {
  width: min(var(--window-tray-content, 0px), var(--window-tray-space, 0px));
  margin-right: var(--space-2);
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
.c-window-tray .minimized-window-chip {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  max-width: min(280px, var(--window-tray-space));
  height: var(--portal-fab-size);
  padding: 0 var(--space-2) 0 var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card-surface);
  color: var(--muted);
  white-space: nowrap;
  pointer-events: auto;
}
.c-window-tray__restore {
  min-width: 0;
  height: 100%;
  padding: 0 var(--space-2) 0 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.c-window-tray__close {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.c-window-tray__close :is(svg, .ui-icon) { width: 14px; height: 14px; pointer-events: none; }
.c-window-tray__close:hover { background: var(--surface-2); color: var(--ink); }
.c-window-tray__toggle:hover, .c-window-tray.is-expanded .c-window-tray__toggle { background: var(--surface-2); }
.c-window-tray :is(button):focus-visible { outline: 2px solid var(--brand-primary); outline-offset: -3px; }
html[data-sdo-native-tray-active] dialog {
  max-height: min(88dvh, calc(100dvh - var(--sdo-native-tray-inset, 0px) - 32px)) !important;
}
html[data-sdo-native-tray-active] dialog > :is(.modal__content, .c-modal__content) {
  max-height: inherit !important;
}
@media (max-width: 700px) {
  .c-window-tray { bottom: var(--window-tray-bottom, max(var(--space-4), env(safe-area-inset-bottom))); }
}
@media (prefers-reduced-motion: reduce) {
  .c-window-tray__windows { transition: none; }
}

.c-modal--confirm,
body.theme-dark .c-modal--confirm {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  border-radius: 20px;
  background: var(--card-surface);
}

.c-modal--confirm::backdrop {
  background: rgba(16, 24, 39, 0.34);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
}

.c-modal--confirm .c-modal__content {
  grid-template-rows: auto auto auto;
}

.c-modal--confirm .c-modal__header {
  justify-content: flex-start;
  padding: 28px 30px var(--space-2);
  border-bottom: 0;
  background: transparent;
}

.c-modal--confirm .c-modal__title {
  font-size: 21px;
  line-height: 1.2;
}

.c-modal--confirm .c-modal__body {
  display: grid;
  gap: var(--space-3);
  overflow: visible;
  padding: 0 30px var(--space-4);
}

.c-modal__message {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
  font-size: var(--type-body);
  line-height: 1.5;
}

.c-modal--confirm .c-modal__footer {
  margin: 0 30px;
  padding: 14px 0 24px;
  background: transparent;
}

.c-modal--confirm .c-button {
  min-height: 40px;
}

.c-modal--confirm .c-button--danger {
  border-color: var(--danger);
  background: var(--danger);
  color: var(--card-surface);
}

.c-modal--confirm .c-button--danger:hover {
  border-color: color-mix(in srgb, var(--danger) 88%, black);
  background: color-mix(in srgb, var(--danger) 88%, black);
}

/* Company maintenance uses a second native dialog without removing the editor
   already open underneath. Its footer stays reachable on short/mobile screens. */
.c-maintenance {
  width: min(540px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  background: var(--card-surface);
  text-align: center;
}
.c-maintenance .c-modal__header { justify-content: center; }
.c-maintenance .c-modal__message { white-space: pre-line; text-align: center; margin-inline: auto; }
.c-maintenance__body {
  display: grid;
  gap: var(--space-4);
  overflow-wrap: anywhere;
}
.c-maintenance__countdown {
  margin: 0;
  color: var(--ink);
  font-size: var(--type-section);
  font-weight: var(--weight-heading);
  font-variant-numeric: tabular-nums;
}
.c-maintenance__countdown[data-counting="true"] { font-size: var(--type-page); }
.c-maintenance .c-modal__footer { flex-wrap: wrap; justify-content: center; }
.c-maintenance .c-modal__footer .c-button { white-space: normal; }
.c-maintenance [hidden], .c-maintenance__badge[hidden] { display: none !important; }
.c-maintenance__badge { font-variant-numeric: tabular-nums; }

.c-modal-preview {
  width: min(620px, 100%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: var(--shadow-soft);
}

.c-modal-preview.c-modal--confirm {
  width: min(560px, 100%);
  max-height: none;
  margin-top: var(--space-4);
}

/* Table */
.c-table-wrap {
  min-width: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  -webkit-overflow-scrolling: touch;
}

.c-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--ink);
  font-size: var(--type-body);
}

.c-table th,
.c-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.c-table th {
  color: var(--muted);
  font-size: var(--type-caption);
  font-weight: var(--weight-medium);
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.c-table tbody tr:last-child td {
  border-bottom: 0;
}

.c-table tbody tr {
  transition: background var(--motion-fast);
}

.c-table tbody tr:hover {
  background: color-mix(in srgb, var(--blue-soft) 42%, transparent);
}

/* Shared commercial workspace: company-neutral presentation, scoped to migrated modules. */
.c-commercial {
  min-width: 0;
  color: var(--ink);
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  line-height: 1.5;
}
.c-commercial :is(strong, b) { font-weight: var(--weight-medium); }
.c-commercial :is(.c-field, .c-field__control, .c-select, .c-toolbar, .c-table td) { min-width: 0; }
.c-commercial :is(.c-card, .c-table-wrap, .catalog-card__body) { background: var(--card-surface); }
.c-commercial-summary { display: grid; gap: var(--space-6); margin-bottom: var(--space-8); }
.c-commercial-metric { min-width: 0; padding: var(--space-6); }
.c-commercial-metric :is(span, strong) { display: block; overflow-wrap: anywhere; }
.c-commercial-metric span { color: var(--muted); font-size: var(--type-caption); }
.c-commercial-metric strong { margin-top: var(--space-2); font-size: var(--type-section); font-weight: var(--weight-body); font-variant-numeric: tabular-nums; }
.c-commercial-table { min-width: 0; table-layout: fixed; }
.c-commercial-table th { background: var(--card-surface); letter-spacing: normal; text-transform: none; }
.c-commercial-table :is(td, th) { padding: var(--space-5); overflow-wrap: anywhere; }
.c-commercial-table tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 97%, var(--ink) 3%); }
.c-commercial .c-toolbar { margin-bottom: var(--space-6); }
/* Commercial sections and tasks use the same spacious card geometry. */
.c-commercial-stack { display: grid; gap: var(--space-8); min-width: 0; }
.c-commercial-stack > .c-commercial-summary { margin-bottom: 0; }
.c-commercial-heading { gap: var(--space-8); }
.c-commercial-page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-4); min-width: 0; }
.c-commercial-page-actions:empty { display: none; }
.c-commercial :is(.c-modal__body) { padding: var(--space-6); }
.c-commercial .c-modal__footer { padding: var(--space-6); gap: var(--space-3); }

.c-commercial-section { min-width: 0; padding: var(--space-6); }
.c-commercial-task { min-width: 0; padding: var(--space-6); }
.c-commercial h2 { font-weight: var(--weight-body); }
.c-commercial :is(h3, h4) { font-size: var(--type-card); font-weight: var(--weight-body); overflow-wrap: anywhere; }
.c-commercial-caption { color: var(--muted); font-size: var(--type-caption); overflow-wrap: anywhere; }
.c-commercial-metric small { display: block; margin-top: var(--space-2); color: var(--muted); font-size: var(--type-caption); overflow-wrap: anywhere; }
.c-commercial :is(.wp-task-meta strong, .service-subject-card__facts strong, .payroll-person-card dd, .budget-table td strong) { font-weight: var(--weight-body); }
/* Reusable commercial registry and section heading. */
.c-commercial .c-commercial-heading__eyebrow { color: var(--muted); font-size: var(--type-caption); letter-spacing: normal; text-transform: none; }
.c-commercial-heading__title { margin: var(--space-2) 0 0; font-size: var(--type-section); font-weight: var(--weight-body); }
.c-commercial-heading p { max-width: 760px; margin: var(--space-3) 0 0; color: var(--muted); line-height: 1.5; }
.c-commercial-registry :is(.c-registry__header, .c-registry__row) { display: grid; min-width: 0; gap: var(--space-4); padding: var(--space-6); }
.c-commercial-registry .c-registry__header { background: var(--card-surface); letter-spacing: normal; text-transform: none; padding-block: var(--space-5); }
.c-commercial-registry .c-registry__row { cursor: default; line-height: 1.5; }
.c-commercial-registry .c-registry__row:hover { background: color-mix(in srgb, var(--surface-2) 97%, var(--ink) 3%); }
.c-commercial-registry :is(strong, .c-status) { overflow-wrap: anywhere; }
.c-commercial-registry .c-status { white-space: normal; text-align: center; }
.c-commercial-reservations :is(.reservation-row__main small, .reservation-result-count, .reservation-linked-note) { color: var(--muted); font-size: var(--type-caption); overflow-wrap: anywhere; }
.c-commercial-reservations .reservation-row__comment { margin: 0; padding-top: var(--space-4); border-top: 1px solid var(--line); color: var(--muted); font-size: var(--type-caption); overflow-wrap: anywhere; }
.c-commercial-reservations .reservation-availability { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card-subtle); }
.c-commercial-reservations .reservation-availability > div { border-radius: var(--radius-sm); background: var(--card-surface); }
.c-commercial-reservations .reservation-availability :is(span, strong) { display: block; overflow-wrap: anywhere; }
.c-commercial-reservations .reservation-availability span { color: var(--muted); font-size: var(--type-caption); }
.c-commercial-reservations .reservation-availability strong { margin-top: var(--space-2); font-size: var(--type-section); font-variant-numeric: tabular-nums; }
.c-commercial-reservations .reservation-availability__available strong { color: var(--success); }
.c-commercial-reservations .reservation-availability .reservation-availability__deficit { border: 1px solid color-mix(in srgb, var(--danger) 38%, var(--line)); background: color-mix(in srgb, var(--danger) 7%, var(--card-surface)); }
.c-commercial-reservations .reservation-availability__deficit :is(strong, small) { color: var(--danger); }
.c-commercial-reservations .reservation-availability__deficit small { display: block; margin-top: var(--space-2); font-size: var(--type-caption); }
@media (max-width: 860px) {
  .c-commercial .c-commercial-registry { display: grid; gap: var(--space-6); padding: 0; overflow: visible; border: 0; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .c-commercial-registry .c-registry__header { display: none; }
  .c-commercial-registry .c-registry__row { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card-surface); box-shadow: var(--shadow-soft); gap: var(--space-6); }
  .c-commercial-registry .c-registry__row > [data-label]:not(.c-commercial-registry__actions)::before { content: attr(data-label); display: block; margin-bottom: var(--space-2); color: var(--muted); font-size: var(--type-caption); font-weight: var(--weight-body); }
}
/* commercial-rentals presentation. */
:where(.c-commercial-rentals) .rental-summary-grid span { color: var(--muted); font-size: var(--type-caption); line-height: 1.35; }
:where(.c-commercial-rentals) .rental-summary-grid strong { color: var(--ink); font-size: var(--type-section); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
:where(.c-commercial-rentals) .rental-subheading h3 { color: var(--ink); font-size: var(--type-card); }
:where(.c-commercial-rentals) .rental-subheading p { color: var(--muted); font-size: var(--type-caption); line-height: 1.45; }
:where(.c-commercial-rentals) .rental-compact-list button { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card-subtle); color: inherit; font: inherit; cursor: pointer; }
:where(.c-commercial-rentals) .rental-compact-list strong { color: var(--ink); overflow-wrap: anywhere; }
:where(.c-commercial-rentals) .rental-compact-list small { color: var(--muted); overflow-wrap: anywhere; }
:where(.c-commercial-rentals) .rental-capacity-warning { border: 1px solid color-mix(in srgb, var(--danger) 42%, var(--line)); border-radius: var(--radius); background: color-mix(in srgb, var(--danger) 7%, var(--card-surface, var(--panel))); }
:where(.c-commercial-rentals) .rental-capacity-warning h3 { color: var(--ink); font-size: var(--type-card); }
:where(.c-commercial-rentals) .rental-capacity-warning p { color: var(--muted); font-size: var(--type-caption); line-height: 1.45; }
:where(.c-commercial-rentals) .rental-capacity-warning ul { color: var(--ink); font-size: var(--type-caption); line-height: 1.5; }
:where(.c-commercial-rentals) .rental-capacity-card.is-deficit { border-color: color-mix(in srgb, var(--danger) 50%, var(--line)); }
:where(.c-commercial-rentals) .rental-capacity-card h3 { color: var(--ink); font-size: var(--type-body); overflow-wrap: anywhere; }
:where(.c-commercial-rentals) .rental-capacity-card small { color: var(--muted); font-size: var(--type-caption); }
:where(.c-commercial-rentals) .rental-capacity-card strong { color: var(--ink); font-size: var(--type-card); font-variant-numeric: tabular-nums; }
:where(.c-commercial-rentals) .rental-capacity-card__deficit { border-top: 1px solid color-mix(in srgb, var(--danger) 35%, var(--line)); }
:where(.c-commercial-rentals) .rental-capacity-card__deficit small, :where(.c-commercial-rentals) .rental-capacity-card__deficit strong { color: var(--danger); }
:where(.c-commercial-rentals) .rental-payment-summary { border: 1px solid color-mix(in srgb, var(--warning) 34%, var(--line)); border-radius: var(--radius); background: color-mix(in srgb, var(--warning) 6%, var(--card-surface, var(--panel))); }
:where(.c-commercial-rentals) .rental-payment-summary span { color: var(--muted); font-size: var(--type-caption); }
:where(.c-commercial-rentals) .rental-payment-summary strong { color: var(--ink); font-size: var(--type-section); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
:where(.c-commercial-rentals) .rental-payment-summary p { color: var(--muted); font-size: var(--type-caption); line-height: 1.5; }
:where(.c-commercial-rentals) .rental-payment-summary p strong { font-size: inherit; }
:where(.c-commercial-rentals) .rental-accruals > summary { color: var(--ink); font-weight: var(--weight-medium); cursor: pointer; }
:where(.c-commercial-rentals) .rental-accruals[open] > summary { border-bottom: 1px solid var(--line); }
:where(.c-commercial-rentals) .rental-accrual-list article { border-top: 1px solid var(--line); color: var(--muted); font-size: var(--type-caption); }
:where(.c-commercial-rentals) .rental-accrual-list article:first-child { border-top: 0; }
:where(.c-commercial-rentals) .rental-accrual-list strong, :where(.c-commercial-rentals) .rental-accrual-list b { color: var(--ink); overflow-wrap: anywhere; }
:where(.c-commercial-rentals) .rental-accrual-list b { font-variant-numeric: tabular-nums; }
:where(.c-commercial-rentals) .rental-history-note strong { color: var(--ink); }
:where(.c-commercial-rentals) .rental-history-note--warning { border-color: color-mix(in srgb, var(--warning) 36%, var(--line)); }
:where(.c-commercial-rentals) .rental-reconciliation-card > p, :where(.c-commercial-rentals) .rental-reconciliation-card > ul { color: var(--muted); font-size: var(--type-caption); line-height: 1.5; }
:where(.c-commercial-rentals) .rental-file-card span, :where(.c-commercial-rentals) .rental-file-card small { color: var(--muted); font-size: var(--type-caption); overflow-wrap: anywhere; }
:where(.c-commercial-rentals) .rental-file-card strong { color: var(--ink); overflow-wrap: anywhere; }
:where(.c-commercial-rentals) .rental-document-unavailable { line-height: 1.35; }
:where(.c-commercial-rentals) .rental-contract-detail__hero { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card-surface, var(--panel)); box-shadow: var(--shadow-soft); }
:where(.c-commercial-rentals) .rental-contract-detail__hero h2 { color: var(--ink); font-size: var(--type-section); overflow-wrap: anywhere; }
:where(.c-commercial-rentals) .rental-contract-detail__hero p { color: var(--muted); }
:where(.c-commercial-rentals) .rental-contract-detail__summary > span { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card-subtle); }
:where(.c-commercial-rentals) .rental-contract-detail__summary small { color: var(--muted); font-size: var(--type-caption); }
:where(.c-commercial-rentals) .rental-contract-detail__summary strong { color: var(--ink); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
:where(.c-commercial-rentals) .rental-contract-detail__actions { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card-surface, var(--panel)); }
:where(.c-commercial-rentals) .rental-detail-panel h3 { color: var(--ink); font-size: var(--type-card); }
:where(.c-commercial-rentals) .rental-detail-panel p { color: var(--muted); font-size: var(--type-caption); line-height: 1.5; }
:where(.c-commercial-rentals) .rental-detail-panel dt { color: var(--muted); font-size: var(--type-caption); }
:where(.c-commercial-rentals) .rental-detail-panel dd { color: var(--ink); overflow-wrap: anywhere; }
:where(.c-commercial-rentals) .rental-lineage li { color: var(--ink); }
:where(.c-commercial-rentals) .rental-lineage li span, :where(.c-commercial-rentals) .rental-lineage li small { color: var(--muted); font-size: var(--type-caption); }
:where(.c-commercial-rentals) .rental-line-section__heading h3 { color: var(--ink); font-size: var(--type-card); }
:where(.c-commercial-rentals) .rental-line-section__heading p { color: var(--muted); font-size: var(--type-caption); line-height: 1.4; }
:where(.c-commercial-rentals) .rental-line-editor__amount span { color: var(--muted); font-size: var(--type-caption); }
:where(.c-commercial-rentals) .rental-line-editor__amount strong { color: var(--ink); font-size: var(--type-body); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
:where(.c-commercial-rentals) .rental-document-totals small { color: var(--muted); }
:where(.c-commercial-rentals) .rental-document-totals strong { color: var(--ink); font-size: var(--type-card); font-variant-numeric: tabular-nums; }
/* commercial-service presentation. */
:where(.c-commercial-service) .commercial-service { color: var(--ink); }
:where(.c-commercial-service) .service-year { color: var(--muted); font-size: var(--type-caption); }
:where(.c-commercial-service) .service-section__head h3 { font-size: var(--type-card); }
:where(.c-commercial-service) .service-subject-card__head h3, :where(.c-commercial-service) .service-subject-card__head p { overflow-wrap: anywhere; }
:where(.c-commercial-service) .service-subject-card__head h3 { font-size: var(--type-card); }
:where(.c-commercial-service) .service-subject-card__head p { color: var(--muted); font-size: var(--type-caption); }
:where(.c-commercial-service) .service-status { border: 1px solid var(--line); border-radius: 999px; background: var(--card-subtle); color: var(--muted); font-size: var(--type-caption); font-weight: var(--weight-medium); white-space: nowrap; }
:where(.c-commercial-service) .service-status.is-danger { border-color: color-mix(in srgb, var(--danger) 35%, transparent); background: var(--danger-soft); color: var(--danger); }
:where(.c-commercial-service) .service-status.is-warning { border-color: color-mix(in srgb, var(--warning) 35%, transparent); background: color-mix(in srgb, var(--warning) 10%, transparent); color: var(--warning); }
:where(.c-commercial-service) .service-status.is-success { border-color: color-mix(in srgb, var(--success) 35%, transparent); background: color-mix(in srgb, var(--success) 10%, transparent); color: var(--success); }
:where(.c-commercial-service) .service-subject-card__facts span { color: var(--muted); font-size: var(--type-caption); }
:where(.c-commercial-service) .service-subject-card__facts strong { color: var(--ink); font-size: var(--type-body); overflow-wrap: anywhere; }
:where(.c-commercial-service) .service-subject-card__footer { border-top: 1px solid var(--line); color: var(--muted); font-size: var(--type-caption); }
:where(.c-commercial-service) .service-actions { border-top: 1px solid var(--line); }
:where(.c-commercial-service) .service-schedule { border-top: 1px solid var(--line); }
:where(.c-commercial-service) .service-schedule__row { border-bottom: 1px solid var(--line); }
:where(.c-commercial-service) .service-schedule__row:last-child { border-bottom: 0; }
:where(.c-commercial-service) .service-schedule__row span { color: var(--muted); font-size: var(--type-caption); }
:where(.c-commercial-service) .service-empty-note { color: var(--muted); }
:where(.c-commercial-service) .service-group > summary { cursor: pointer; list-style-position: outside; }
:where(.c-commercial-service) .service-group > summary strong { overflow-wrap: anywhere; }
:where(.c-commercial-service) .service-group > summary span:not(.service-status) { color: var(--muted); font-size: var(--type-caption); }
:where(.c-commercial-service) .service-group__units { border-top: 1px solid var(--line); background: var(--card-subtle); }
:where(.c-commercial-service) .service-event h4, :where(.c-commercial-service) .service-reconciliation h4 { font-size: var(--type-card); }
:where(.c-commercial-service) .service-event > div > p, :where(.c-commercial-service) .service-reconciliation p { color: var(--muted); }
:where(.c-commercial-service) .service-event dt { color: var(--muted); font-size: var(--type-caption); }
:where(.c-commercial-service) .service-event__comment { border-radius: var(--radius-sm); background: var(--card-subtle); }
:where(.c-commercial-service) .service-reconciliation article > span:last-child { color: var(--muted); font-size: var(--type-caption); }
:where(.c-commercial-service) .service-empty strong { color: var(--ink); }
:where(.c-commercial-service) .service-empty--error strong { color: var(--danger); }
:where(.c-commercial-service) .service-modal__subject { color: var(--muted); }
:where(.c-commercial-service) .service-form-error { border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); }
.session-context-switcher { color: var(--muted); font-size: var(--type-caption); }
@media (max-width: 700px) {
:where(.c-commercial-service) .service-status { white-space: normal; }
}
/* commercial-operations presentation. */
:where(.c-commercial-operations) .commercial-toolbar > span { color: var(--muted); }
:where(.c-commercial-operations) .commercial-order-card.is-archived { opacity: .78; }
:where(.c-commercial-operations) .commercial-order-card > header small, :where(.c-commercial-operations) .commercial-order-heading small { color: var(--muted); }
:where(.c-commercial-operations) .commercial-order-heading { border: 0; background: transparent; color: inherit; cursor: pointer; }
:where(.c-commercial-operations) .commercial-order-detail { border-top: 1px solid var(--line); }
:where(.c-commercial-operations) .commercial-detail-table td small { color: var(--muted); }
:where(.c-commercial-operations) .commercial-subsection article { border-bottom: 1px solid var(--line); }
:where(.c-commercial-operations) .commercial-subsection article:last-child { border-bottom: 0; }
:where(.c-commercial-operations) .commercial-subsection small { color: var(--muted); }
:where(.c-commercial-operations) .commercial-models header span, :where(.c-commercial-operations) .commercial-history header span { color: var(--muted); font-size: var(--type-caption); }
:where(.c-commercial-operations) .commercial-revenue-bars span, :where(.c-commercial-operations) .commercial-revenue-bars strong { font-size: var(--type-caption); }
:where(.c-commercial-operations) .commercial-revenue-bars i { border-radius: var(--radius-sm) var(--radius-sm) 0 0; background: var(--brand-primary); }
:where(.c-commercial-operations) .commercial-breakdown p { border-bottom: 1px solid var(--line); }
:where(.c-commercial-operations) .commercial-breakdown p:last-child { border-bottom: 0; }
:where(.c-commercial-operations) .commercial-quarantine p { font-size: 1.05rem; }
:where(.c-commercial-operations) .commercial-quarantine small { color: var(--muted); }
/* commercial-documents presentation. */
:where(.c-commercial-archive) .document-kpis .is-warning { border-color: color-mix(in srgb, var(--warning) 45%, var(--line)); background: color-mix(in srgb, var(--warning) 8%, var(--card-surface)); }
:where(.c-commercial-archive) .document-reconciliation summary { font-weight: var(--weight-medium); cursor: pointer; }
:where(.c-commercial-archive) .document-reconciliation > div { border-top: 1px solid var(--line); }
:where(.c-commercial-archive) .document-reconciliation article + article { border-top: 1px solid var(--line); }
:where(.c-commercial-archive) .document-reconciliation article span { color: var(--muted); white-space: nowrap; }
:where(.c-commercial-archive) .document-toolbar > span { color: var(--muted); font-variant-numeric: tabular-nums; }
:where(.c-commercial-archive) .document-card__icon { border-radius: var(--radius-sm); color: var(--brand-primary-strong); background: var(--brand-primary-soft); font-size: var(--type-caption); font-weight: var(--weight-medium); letter-spacing: normal; }
:where(.c-commercial-archive) .document-card__body h3 { overflow-wrap: anywhere; font-size: var(--type-card); }
:where(.c-commercial-archive) .document-card__body p, :where(.c-commercial-archive) .document-card__body small { color: var(--muted); line-height: 1.45; }
:where(.c-commercial-archive) .document-card__badges span { border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: var(--type-caption); font-weight: var(--weight-medium); }
:where(.c-commercial-archive) .document-card__badges .is-signed { color: var(--success); background: color-mix(in srgb, var(--success) 10%, var(--card-surface)); }
:where(.c-commercial-archive) .document-card.is-archived { opacity: .75; }
/* work-plan presentation. */
:where(.c-work-plan) .wp-shell { color: var(--ink); }
:where(.c-work-plan) .wp-toolbar { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-strong); box-shadow: var(--shadow-soft); backdrop-filter: var(--blur); }
:where(.c-work-plan) .wp-field > span { color: var(--muted); font-size: var(--type-caption); font-weight: var(--weight-medium); }
:where(.c-work-plan) .wp-icon-button { font-size: 24px; }
:where(.c-work-plan) .wp-project.is-archived { opacity: 0.86; }
:where(.c-work-plan) .wp-project-head h3 { overflow-wrap: anywhere; font-size: var(--type-section); }
:where(.c-work-plan) .wp-progress > span { color: var(--muted); font-size: var(--type-caption); }
:where(.c-work-plan) .wp-progress > span strong { color: var(--ink); }
:where(.c-work-plan) .wp-progress-track { border-radius: 999px; background: var(--surface-2); }
:where(.c-work-plan) .wp-progress-track i { border-radius: inherit; background: linear-gradient(90deg, var(--brand-primary), var(--brand-primary-strong)); }
:where(.c-work-plan) .wp-task-card:last-child { border-bottom: 0; }
:where(.c-work-plan) .wp-task-title-row h4 { overflow-wrap: anywhere; font-size: var(--type-card); }
:where(.c-work-plan) .wp-task-main > p { color: var(--muted); font-size: var(--type-body); line-height: 1.5; overflow-wrap: anywhere; }
:where(.c-work-plan) .wp-task-meta { color: var(--muted); font-size: var(--type-caption); }
:where(.c-work-plan) .wp-task-meta strong { color: var(--ink); font-weight: var(--weight-medium); }
:where(.c-work-plan) .wp-badge { border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: var(--type-caption); font-weight: var(--weight-medium); letter-spacing: normal; white-space: nowrap; }
:where(.c-work-plan) .wp-badge.is-in_progress { background: var(--brand-primary-soft); color: var(--brand-primary-strong); }
:where(.c-work-plan) .wp-badge.is-completed { background: color-mix(in srgb, var(--success) 13%, transparent); color: var(--success); }
:where(.c-work-plan) .wp-badge.is-overdue { background: var(--danger-soft); color: var(--danger); }
:where(.c-work-plan) .wp-badge.is-archived { background: var(--surface-2); color: var(--muted); }
:where(.c-work-plan) .wp-empty span { color: var(--muted); }
:where(.c-work-plan) .wp-empty.is-error { border-color: var(--danger); }
:where(.c-work-plan) .wp-timeline { border: 1px solid var(--line); border-radius: calc(var(--radius) + 2px); background: var(--card-surface); box-shadow: var(--shadow-soft); }
:where(.c-work-plan) .wp-timeline-header { border-bottom: 1px solid var(--line); background: var(--card-subtle); text-transform: none; }
:where(.c-work-plan) .wp-timeline-labels { color: var(--muted); font-size: var(--type-caption); }
:where(.c-work-plan) .wp-timeline-row { border-bottom: 1px solid var(--line); }
:where(.c-work-plan) .wp-timeline-row:last-child { border-bottom: 0; }
:where(.c-work-plan) .wp-timeline-copy strong, :where(.c-work-plan) .wp-timeline-copy span { text-overflow: ellipsis; white-space: nowrap; }
:where(.c-work-plan) .wp-timeline-copy span { color: var(--muted); font-size: var(--type-caption); }
:where(.c-work-plan) .wp-timeline-track { border-radius: 7px; background: repeating-linear-gradient(90deg, transparent 0, transparent calc(12.5% - 1px), var(--line) calc(12.5% - 1px), var(--line) 12.5%),
    var(--surface-2); }
:where(.c-work-plan) .wp-timeline-bar { border-radius: 5px; background: var(--blue-2); }
:where(.c-work-plan) .wp-timeline-bar.is-in_progress { background: var(--brand-primary); }
:where(.c-work-plan) .wp-timeline-bar.is-completed { background: var(--success); }
:where(.c-work-plan) .wp-timeline-bar.is-overdue { background: var(--danger); }
:where(.c-work-plan) .wp-form-error { border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); font-size: var(--type-body); }
@media (max-width: 700px) {
:where(.c-work-plan) .wp-timeline-copy strong, :where(.c-work-plan) .wp-timeline-copy span { white-space: normal; overflow-wrap: anywhere; }
:where(.c-work-plan) .wp-timeline-row-footer { color: var(--muted); font-size: var(--type-caption); }
}
/* payroll presentation. */
:where(.c-payroll) .payroll-notice.is-warning, :where(.c-payroll) .payroll-empty.is-warning { border-left-color: var(--warning); }
:where(.c-payroll) .payroll-notice.is-danger, :where(.c-payroll) .payroll-empty.is-error { border-left-color: var(--danger); }
:where(.c-payroll) .payroll-month-control label { color: var(--muted); font-size: var(--type-caption); }
:where(.c-payroll) .payroll-period-bar { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card-surface); }
:where(.c-payroll) .payroll-notice span, :where(.c-payroll) .payroll-empty span { color: var(--muted); }
:where(.c-payroll) .payroll-table-wrap { border: 1px solid var(--line); border-radius: var(--radius-sm); }
:where(.c-payroll) .payroll-table th, :where(.c-payroll) .payroll-table td { border-bottom: 1px solid var(--line); }
:where(.c-payroll) .payroll-table th { background: var(--card-subtle); color: var(--muted); font-size: var(--type-caption); }
:where(.c-payroll) .payroll-table tr:last-child td { border-bottom: 0; }
:where(.c-payroll) .payroll-table tr.is-future { background: color-mix(in srgb, var(--warning) 8%, transparent); }
:where(.c-payroll) .payroll-table tr.is-confirmable { box-shadow: inset 3px 0 var(--warning); }
:where(.c-payroll) .payroll-table tr.is-missing:not(.is-confirmable) { opacity: .72; }
:where(.c-payroll) .payroll-table tr.is-vacation { background: color-mix(in srgb, var(--brand-primary) 7%, transparent); }
:where(.c-payroll) .payroll-fuel-stats > div, :where(.c-payroll) .payroll-breakdown dl > div { border-radius: var(--radius-sm); background: var(--card-subtle); }
:where(.c-payroll) .payroll-fuel-stats span, :where(.c-payroll) .payroll-breakdown dt { color: var(--muted); font-size: var(--type-caption); }
:where(.c-payroll) .payroll-terms-readonly dl > div { border-bottom: 1px solid var(--line); }
:where(.c-payroll) .payroll-terms-readonly dt { color: var(--muted); }
:where(.c-payroll) .payroll-terms-readonly dd { font-weight: var(--weight-medium); }
:where(.c-payroll) .payroll-person-card dt { color: var(--muted); font-size: var(--type-caption); }
:where(.c-payroll) .payroll-person-card dd { font-weight: var(--weight-medium); }
:where(.c-payroll) .payroll-adjustments-readonly > div:not(.payroll-section-head), :where(.c-payroll) .payroll-adjustments article { border-bottom: 1px solid var(--line); }
:where(.c-payroll) .payroll-private-history article { border-bottom: 1px solid var(--line); }
:where(.c-payroll) .payroll-private-history article span, :where(.c-payroll) .payroll-private-history time, :where(.c-payroll) .payroll-record-kind { color: var(--muted); font-size: var(--type-caption); }
:where(.c-payroll) .payroll-confirm-day { white-space: normal; }
:where(.c-payroll) .payroll-table tr.is-confirmed { box-shadow: inset 3px 0 var(--brand-primary); }
:where(.c-payroll) .payroll-breakdown > div:not(.payroll-section-head) { border-bottom: 1px solid var(--line); }
:where(.c-payroll) .payroll-breakdown > div.is-total { border-bottom: 0; font-size: 1.05rem; }
:where(.c-payroll) .payroll-completion-counts { color: var(--muted); }
:where(.c-payroll) .payroll-hours-chart > header span { color: var(--muted); font-size: var(--type-caption); }
:where(.c-payroll) .payroll-hours-chart > header strong { font-size: 1.1rem; }
:where(.c-payroll) .payroll-hours-bars i { border-radius: .45rem .45rem .15rem .15rem; background: linear-gradient(180deg, var(--brand-primary), var(--brand-primary-strong)); }
:where(.c-payroll) .payroll-hours-bars span { color: var(--muted); font-size: var(--type-caption); }
:where(.c-payroll) .payroll-dialog { border: 0; border-radius: var(--radius); background: transparent; color: var(--ink); }
:where(.c-payroll) .payroll-dialog::backdrop { background: rgba(7, 12, 24, .58); }
:where(.c-payroll) .payroll-modal-form { background: var(--card-surface); }
:where(.c-payroll) .payroll-form-error { color: var(--danger); }
:where(.c-payroll) .payroll-private-history code { overflow-wrap: anywhere; }
@media (max-width: 700px) {
:where(.c-payroll) .payroll-table-wrap { border: 0; }
:where(.c-payroll) .payroll-table tr { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card-surface); }
:where(.c-payroll) .payroll-table td { border: 0; }
:where(.c-payroll) .payroll-table td::before { color: var(--muted); font-size: var(--type-caption); font-weight: var(--weight-medium); text-transform: none; }
}
/* company-budget presentation. */
:where(.c-company-budget) .budget-period-control label { color: var(--muted); font-size: var(--type-caption); }
:where(.c-company-budget) .budget-privacy-note { border: 1px solid var(--line); border-left: 4px solid var(--brand-primary); border-radius: var(--radius); background: var(--card-surface); }
:where(.c-company-budget) .budget-privacy-note span { color: var(--muted); }
:where(.c-company-budget) .budget-section-head p { color: var(--muted); }
:where(.c-company-budget) .budget-table-wrap { border: 1px solid var(--line); border-radius: var(--radius-sm); }
:where(.c-company-budget) .budget-table th, :where(.c-company-budget) .budget-table td { border-bottom: 1px solid var(--line); }
:where(.c-company-budget) .budget-table th { background: var(--card-subtle); color: var(--muted); font-size: var(--type-caption); }
:where(.c-company-budget) .budget-table tr:last-child td { border-bottom: 0; }
:where(.c-company-budget) .budget-table tr.is-selected { background: var(--brand-primary-soft); }
:where(.c-company-budget) .budget-table td.is-money, :where(.c-company-budget) .budget-table th.is-money { white-space: nowrap; }
:where(.c-company-budget) .budget-variance { font-weight: var(--weight-medium); }
:where(.c-company-budget) .budget-variance.is-negative { color: var(--danger); }
:where(.c-company-budget) .budget-variance.is-positive { color: var(--success); }
:where(.c-company-budget) .budget-month { color: inherit; }
:where(.c-company-budget) .budget-month__bars { border-bottom: 1px solid var(--line); }
:where(.c-company-budget) .budget-month__bar { border-radius: .3rem .3rem 0 0; background: var(--brand-primary); }
:where(.c-company-budget) .budget-month__bar.is-actual { background: var(--ink); opacity: .72; }
:where(.c-company-budget) .budget-month strong { font-size: var(--type-caption); }
:where(.c-company-budget) .budget-month small { overflow-wrap: anywhere; color: var(--muted); font-size: var(--type-caption); }
:where(.c-company-budget) .budget-legend { color: var(--muted); font-size: var(--type-caption); }
:where(.c-company-budget) .budget-legend span::before { border-radius: .2rem; background: var(--brand-primary); }
:where(.c-company-budget) .budget-legend span.is-actual::before { background: var(--ink); opacity: .72; }
:where(.c-company-budget) .budget-evidence article { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card-subtle); }
:where(.c-company-budget) .budget-evidence dt { color: var(--muted); }
:where(.c-company-budget) .budget-evidence dd { overflow-wrap: anywhere; }
:where(.c-company-budget) .budget-audit article { border-bottom: 1px solid var(--line); }
:where(.c-company-budget) .budget-audit article:last-child { border-bottom: 0; }
:where(.c-company-budget) .budget-audit span, :where(.c-company-budget) .budget-audit time { color: var(--muted); font-size: var(--type-caption); }
:where(.c-company-budget) .budget-empty span { color: var(--muted); }
@media (max-width: 700px) {
:where(.c-company-budget) .budget-table-wrap { border: 0; }
:where(.c-company-budget) .budget-table tr { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card-surface); }
:where(.c-company-budget) .budget-table td { border: 0; white-space: normal !important; }
:where(.c-company-budget) .budget-table td::before { color: var(--muted); font-size: var(--type-caption); font-weight: var(--weight-medium); text-transform: none; }
}
/* Document cards, line items and tabs shared by commercial workspaces. */
.c-commercial-tabs { display: flex; flex-wrap: wrap; gap: var(--space-3); min-width: 0; }
.c-commercial-tabs .c-button { white-space: normal; }
.c-commercial-tabs [aria-selected="true"] { color: var(--brand-primary-strong); border-color: var(--brand-primary); background: var(--brand-primary-soft); }
.c-commercial .c-commercial-document { min-width: 0; padding: 0; overflow: hidden; }
.c-commercial .c-commercial-document--nested { border-radius: var(--radius-sm); background: var(--card-subtle); }
.c-commercial-document .c-card__header { margin: 0; padding: var(--space-6); gap: var(--space-6); border-bottom: 1px solid var(--line); }
.c-commercial-document .c-card__header > div { min-width: 0; flex: 1 1 0; }
.c-commercial-document :is(h3, h4) { margin: var(--space-2) 0 0; font-size: var(--type-card); font-weight: var(--weight-body); overflow-wrap: anywhere; }
.c-commercial-document .c-card__header p { margin: var(--space-3) 0 0; color: var(--muted); font-size: var(--type-body); overflow-wrap: anywhere; }
.c-commercial-document .c-status { white-space: normal; text-align: center; }
.c-commercial-document__meta { display: grid; gap: var(--space-6); padding: var(--space-6); }
.c-commercial-document__meta > span { display: grid; min-width: 0; gap: var(--space-2); }
.c-commercial-document__meta small { color: var(--muted); font-size: var(--type-caption); }
.c-commercial-document__meta strong { font-weight: var(--weight-body); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.c-commercial-document__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-3); padding: var(--space-6); border-top: 1px solid var(--line); }
.c-commercial-document__actions:empty { display: none; }
.c-commercial-document__details { border-top: 1px solid var(--line); }
.c-commercial-document__details > summary { padding: var(--space-5) var(--space-6); font-size: var(--type-body); font-weight: var(--weight-medium); cursor: pointer; }
.c-commercial-document__details[open] > summary { border-bottom: 1px solid var(--line); }
.c-commercial-document__details > summary:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: -2px; }
.c-commercial-document__terms { display: grid; gap: var(--space-6); padding: var(--space-6); border-top: 1px solid var(--line); }
.c-commercial-document__terms span { min-width: 0; overflow-wrap: anywhere; }
.c-commercial-document__terms small { display: block; margin-bottom: var(--space-2); color: var(--muted); font-size: var(--type-caption); }
.c-commercial-items { min-width: 0; }
.c-commercial-items :is(.c-commercial-items__header, .c-commercial-items__row) { gap: var(--space-4); padding: var(--space-5) var(--space-6); }
.c-commercial-items__header { overflow-wrap: anywhere; color: var(--muted); font-size: var(--type-caption); font-weight: var(--weight-body); }
.c-commercial-items__row { border-top: 1px solid var(--line); font-size: var(--type-body); font-variant-numeric: tabular-nums; }
.c-commercial-items__row > span { min-width: 0; overflow-wrap: anywhere; }
.c-commercial-items__row small { color: var(--muted); font-size: var(--type-caption); }
.c-commercial-line-editor { min-width: 0; margin-block: var(--space-4); padding: var(--space-6); gap: var(--space-6); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card-subtle); }
.c-commercial-note { padding: var(--space-6); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card-subtle); color: var(--muted); font-size: var(--type-body); overflow-wrap: anywhere; }
.c-commercial-note--warning { border-color: color-mix(in srgb, var(--warning) 35%, var(--line)); background: color-mix(in srgb, var(--warning) 7%, var(--card-surface)); }
.c-commercial-sales :is(.sales-document-card__type, .sales-history-card .c-card__header > div > span, .sales-reconciliation-card .c-card__header > div > span, .sales-specification .c-card__header > div > span) { color: var(--muted); font-size: var(--type-caption); letter-spacing: normal; text-transform: none; }
.c-commercial-sales .sales-specification-list { border-top: 1px solid var(--line); }
.c-commercial-sales .sales-specification-list__title { margin: 0; color: var(--muted); font-size: var(--type-body); font-weight: var(--weight-medium); text-transform: none; }
.c-commercial-sales .sales-specification h4 { font-size: var(--type-body); }
.c-commercial-sales .sales-specification__meta { color: var(--muted); font-size: var(--type-caption); font-variant-numeric: tabular-nums; }
.c-commercial-sales .sales-specification__meta strong { color: var(--ink); font-size: var(--type-body); }
.c-commercial-sales .sales-history-summary span { color: var(--muted); font-size: var(--type-caption); }
.c-commercial-sales .sales-history-summary strong { color: var(--ink); font-size: var(--type-section); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.c-commercial-sales .sales-history-summary p { margin: 0; }
.c-commercial-sales .sales-reconciliation-card { border-color: color-mix(in srgb, var(--warning) 35%, var(--line)); }
.c-commercial-sales .sales-reconciliation-card > :is(p, ul) { margin: 0; padding: var(--space-5) var(--space-6) 0; color: var(--muted); overflow-wrap: anywhere; }
.c-commercial-sales .sales-reconciliation-card > ul { padding-left: calc(var(--space-6) + var(--space-5)); }
.c-commercial-sales .sales-reconciliation-card > :last-child { padding-bottom: var(--space-6); }
.c-commercial-sales :is(.sales-subsection-heading, .sales-line-section__heading) :is(h3, p) { margin: 0; }
.c-commercial-sales :is(.sales-subsection-heading, .sales-line-section__heading) h3 { font-size: var(--type-card); font-weight: var(--weight-body); }
.c-commercial-sales :is(.sales-subsection-heading, .sales-line-section__heading) p { margin-top: var(--space-3); color: var(--muted); font-size: var(--type-body); }
.c-commercial-sales .sales-line-editor__amount span { color: var(--muted); font-size: var(--type-caption); }
.c-commercial-sales .sales-line-editor__amount strong { font-size: var(--type-body); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.c-commercial-sales .sales-document-total { color: var(--muted); }
.c-commercial-sales .sales-document-total strong { color: var(--ink); font-size: var(--type-section); font-variant-numeric: tabular-nums; }
@media (max-width: 860px) {
  .c-commercial-items .c-commercial-items__header { overflow-wrap: anywhere; display: none; }
  .c-commercial-items .c-commercial-items__row { gap: var(--space-6); padding: var(--space-6); }
  .c-commercial-items__row > [data-label]:not(:first-child)::before { content: attr(data-label); display: block; margin-bottom: var(--space-2); color: var(--muted); font-size: var(--type-caption); font-weight: var(--weight-body); }
}
@media (max-width: 700px) {
  .c-commercial-tabs .c-button { flex: 1 1 auto; }
}
.c-crm .crm-heading-actions { margin-bottom: var(--space-5); justify-content: flex-end; }
.c-crm .crm-table td > :is(strong, span:not(.c-status)) { display: block; }
.c-crm .crm-table td > span:not(.c-status) { margin-top: var(--space-2); color: var(--muted); font-size: var(--type-caption); line-height: 1.5; }
.c-crm .crm-table tr.is-archived { color: var(--muted); }
.c-crm .crm-table-actions { text-align: right; }
.c-crm .crm-table-actions .c-button { margin-bottom: var(--space-1); }
.c-crm .crm-form-grid textarea { resize: vertical; }
.c-crm .crm-form-section > h3 { margin: 0; font-size: var(--type-card); font-weight: var(--weight-body); line-height: 1.5; }
.c-crm .crm-form-grid .c-field__label { font-weight: var(--weight-body); }
.c-crm .crm-address-suggestions .c-button { justify-content: flex-start; text-align: left; white-space: normal; }
.c-crm .crm-address-suggestions__note { padding: var(--space-2); color: var(--muted); font-size: var(--type-caption); line-height: 1.4; }
.c-commercial-catalog :is(.catalog-card__category, .catalog-card__image span, .catalog-toolbar > span) { color: var(--muted); font-size: var(--type-caption); }
.c-commercial-catalog .catalog-summary-grid .c-commercial-metric span { font-size: var(--type-caption); line-height: 1.4; }
.c-commercial-catalog .catalog-summary-grid .c-commercial-metric strong { margin-top: var(--space-1); font-size: var(--type-card); line-height: 1.4; font-variant-numeric: tabular-nums; }
.c-commercial-catalog .catalog-card__category { display: block; line-height: 1.4; overflow-wrap: anywhere; }
.c-commercial-catalog .catalog-card h2 { margin: var(--space-3) 0 var(--space-5); overflow-wrap: anywhere; }
.c-commercial-catalog .catalog-card__price { font-size: var(--type-section); font-weight: var(--weight-heading); font-variant-numeric: tabular-nums; }
.c-commercial-catalog .catalog-card__price small { color: var(--muted); font-size: var(--type-caption); font-weight: var(--weight-body); }
.c-commercial-catalog .catalog-availability { border-block: 1px solid var(--line); }
.c-commercial-catalog .catalog-availability__row { border: 0; background: transparent; }
.c-commercial-catalog .catalog-availability__row + .catalog-availability__row { border-top: 1px solid var(--line); }
.c-commercial-catalog .catalog-availability__row > strong { font-size: var(--type-body); }
.c-commercial-catalog .catalog-availability__metrics > span { min-width: 0; }
.c-commercial-catalog .catalog-availability small { display: block; color: var(--muted); font-size: var(--type-caption); line-height: 1.4; overflow-wrap: anywhere; }
.c-commercial-catalog .catalog-availability b { display: block; margin-top: var(--space-1); color: var(--ink); font-size: var(--type-body); font-weight: var(--weight-medium); font-variant-numeric: tabular-nums; }
.c-commercial-catalog .catalog-availability__notice { color: var(--muted); font-size: var(--type-caption); line-height: 1.4; }

/* Native details keep their keyboard semantics; all commercial disclosures share the DS chevron. */
:is(.c-commercial, .rental-billing) details:not(.report-dropdown) > summary {
  position: relative;
  min-height: 24px;
  padding-inline-start: var(--space-8);
  list-style: none;
  overflow-wrap: anywhere;
  cursor: pointer;
}
:is(.c-commercial, .rental-billing) details:not(.report-dropdown) > summary::-webkit-details-marker { display: none; }
:is(.c-commercial, .rental-billing) details:not(.report-dropdown) > summary::marker { content: ""; }
:is(.c-commercial, .rental-billing) details:not(.report-dropdown) > summary::before {
  content: "";
  position: absolute;
  inset-inline-start: var(--space-2);
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  color: var(--muted);
  transform: translateY(-50%) rotate(-45deg);
  transition: transform var(--motion-fast);
  pointer-events: none;
}
:is(.c-commercial, .rental-billing) details[open]:not(.report-dropdown) > summary::before { transform: translateY(-65%) rotate(45deg); }
:is(.c-commercial, .rental-billing) details:not(.report-dropdown) > summary:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: -2px; border-radius: var(--radius-sm); }
.c-commercial-catalog details.catalog-details > summary { display: flex; align-items: center; padding-inline-start: var(--space-6); cursor: pointer; font-weight: var(--weight-medium); }
.c-commercial-catalog details.catalog-details > summary::before { inset-inline-start: 0; }
.c-commercial-catalog details.catalog-details > summary:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-sm); }
.c-commercial-catalog .catalog-details :is(pre, p) { color: var(--muted); font: inherit; line-height: 1.5; overflow-wrap: anywhere; }
.c-commercial-catalog .catalog-grid > .empty-state { grid-column: 1 / -1; }
.c-commercial-pricing .pricing-action-card h2 { margin: var(--space-2) 0 var(--space-3); }
.c-commercial-pricing .pricing-section .section-bar { margin-bottom: var(--space-5); }
.c-commercial-pricing .pricing-action-card p { margin: 0; color: var(--muted); font-size: var(--type-body); line-height: 1.5; }
.c-commercial-pricing :is(.pricing-action-card > div:first-child > span, .pricing-section .section-eyebrow) { color: var(--muted); font-size: var(--type-caption); font-weight: var(--weight-body); letter-spacing: normal; text-transform: none; }
.c-commercial-pricing .pricing-section h2 { font-size: var(--type-section); font-weight: var(--weight-heading); }
.c-commercial-pricing .pricing-tariff { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card-surface); }
.c-commercial-pricing .pricing-tariff__model :is(span, strong) { display: block; overflow-wrap: anywhere; }
.c-commercial-pricing .pricing-tariff__model span { color: var(--muted); font-size: var(--type-caption); }
.c-commercial-pricing .pricing-tariff.is-readonly dt { color: var(--muted); font-size: var(--type-caption); }
.c-commercial-pricing .pricing-tariff.is-readonly dd { margin: var(--space-1) 0 0; font-weight: var(--weight-medium); overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .c-commercial-table, .c-commercial-table tbody { display: block; }
  .c-commercial-table thead { display: none; }
  .c-commercial-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: var(--space-6); gap: var(--space-6); border-bottom: 1px solid var(--line); }
  .c-commercial-table tbody tr:last-child { border-bottom: 0; }
  .c-commercial-table td { display: block; padding: 0; border: 0; }
  .c-commercial-table td:first-child, .c-commercial-table td:last-child, .c-commercial-table td[colspan] { grid-column: 1 / -1; }
  .c-commercial-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: var(--space-2); color: var(--muted); font-size: var(--type-caption); font-weight: var(--weight-body); }
  .c-crm .crm-table-actions { text-align: left; }
}

@media (max-width: 760px) {
  .c-breadcrumbs {
    margin-bottom: 20px;
  }

  .c-employee-profile-editor__heading,
  .c-employee-profile__hero-head {
    align-items: stretch;
    flex-direction: column;
  }

  .c-employee-profile__hero-head > .c-button,
  .c-employee-profile-editor__actions .c-button {
    width: 100%;
  }

  .c-employee-profile-editor__actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .c-employee-profile-page__actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .c-employee-profile-page__actions .c-button:only-child {
    grid-column: 1 / -1;
  }

  .c-employee-profile-editor__name-control {
    font-size: 20px;
  }

  .c-employee-profile-editor__status-control {
    width: 100%;
    max-width: 140px;
  }

  .c-employee-profile-editor__avatar-actions {
    right: -5px;
    bottom: -5px;
  }

}

@media (max-width: 700px) {
  .c-card {
    padding: var(--space-4);
  }

  .c-modal {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: var(--radius);
  }

  .c-modal__header,
  .c-modal__body,
  .c-modal__footer {
    padding: var(--space-4);
  }

  /* Window actions keep the top row; headings get the full mobile width. */
  .c-modal .window-managed-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(2, var(--window-control-size, 34px));
    row-gap: var(--space-3);
  }

  .c-modal .window-managed-head > :not(button) {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .c-modal .window-managed-head > .window-minimize {
    grid-column: 2;
    grid-row: 1;
    margin-left: 0;
  }

  .c-modal .window-managed-head > .window-close {
    grid-column: 3;
    grid-row: 1;
    margin-left: 0;
  }

  .c-modal .window-managed-head > .window-minimize:last-child {
    grid-column: 3;
  }

  .c-modal__footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .c-modal--confirm {
    width: calc(100vw - 12px);
    max-height: calc(100dvh - 12px);
    border-radius: 14px;
  }

  .c-modal--confirm .c-modal__header {
    padding: 20px 18px var(--space-2);
  }

  .c-modal--confirm .c-modal__body {
    padding: 0 18px var(--space-3);
  }

  .c-modal--confirm .c-modal__footer {
    gap: var(--space-2);
    margin: 0 18px;
    padding: 12px 0 18px;
  }

  .c-modal-preview.c-modal--confirm {
    width: 100%;
  }

  .c-table th,
  .c-table td {
    padding: 12px;
  }
}

/* Canonical compact presentation of the report detail modal. */
.c-modal--report .modal__content {
  gap: var(--space-3);
  padding: var(--space-5) var(--space-6) var(--space-5);
}

.c-modal--report .modal__content > .panel__head {
  padding-bottom: var(--space-3);
}

.c-modal--report .modal__content > menu {
  bottom: calc(-1 * var(--space-5));
  margin: 0 calc(-1 * var(--space-6)) calc(-1 * var(--space-5));
  padding-inline: var(--space-6);
}

.c-modal--report .panel__head h2 {
  font-size: var(--type-card);
  font-weight: var(--weight-medium);
  line-height: 1.4;
}

/* Report detail: one compact component for every workspace. */
.c-report-detail,
.report-detail {
  display: grid;
  gap: var(--space-3);
  margin-top: 0;
  min-width: 0;
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  line-height: 1.5;
}
.report-detail__hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}
.report-detail__hero .eyebrow {
  color: var(--muted);
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  line-height: 1.5;
  letter-spacing: normal;
  text-transform: none;
}
.report-detail__hero h3 {
  margin: var(--space-1) 0;
  color: var(--ink);
  font-size: var(--type-card);
  font-weight: var(--weight-medium);
  line-height: 1.4;
}
.report-detail__hero p {
  margin: 0;
  color: var(--muted);
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  line-height: 1.5;
}
.report-detail__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}
.report-detail > .report-detail__grid > article:nth-child(5):last-child { grid-column: span 2; }
.report-detail__grid article,
.report-detail__section {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: var(--space-1);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}
.report-detail__grid span,
.report-detail__section h4 {
  margin: 0;
  color: var(--muted);
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  line-height: 1.5;
  letter-spacing: normal;
  text-transform: none;
}
.report-detail__grid strong,
.report-detail__section p {
  margin: 0;
  color: var(--ink);
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.c-report-detail .equipment-photo-empty,
.c-report-detail .feed-comment__body {
  color: var(--ink);
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  line-height: 1.5;
}
.c-report-detail .report-employee-link { font-weight: var(--weight-medium); }
.c-report-detail .feed-comment__body {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
@media (max-width: 700px) {
  .c-modal--report .modal__content { gap: var(--space-3); padding: var(--space-4); }
  .c-modal--report .modal__content > menu {
    bottom: calc(-1 * var(--space-4));
    margin: 0 calc(-1 * var(--space-4)) calc(-1 * var(--space-4));
    padding-inline: var(--space-4);
  }
  .report-detail > .report-detail__grid { grid-template-columns: 1fr; }
  .report-detail > .report-detail__grid > article:nth-child(5):last-child { grid-column: auto; }
}
.c-modal--report .feed-thread__composer label > span,
.c-modal--report .feed-viewers__head {
  color: var(--muted);
}

.c-modal--report .feed-viewers__head {
  font-size: var(--type-caption);
  line-height: 1.35;
}

.c-modal--report .feed-viewers__head strong,
.c-modal--report .feed-viewers__head span {
  font-weight: var(--weight-medium);
}

.c-modal--report .feed-viewers__item strong {
  font-size: var(--type-body);
  font-weight: var(--weight-medium);
  line-height: 1.4;
}

.c-modal--report .feed-viewers__item time {
  font-size: var(--type-caption);
  font-weight: var(--weight-body);
  line-height: 1.35;
}

.c-modal--report .feed-viewers__state {
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  line-height: 1.5;
}

.c-modal--report .feed-comment__head strong {
  font-size: var(--type-body);
  font-weight: var(--weight-medium);
  line-height: 1.4;
}

.c-modal--report .feed-comment__head span {
  font-size: var(--type-caption);
  font-weight: var(--weight-body);
  line-height: 1.35;
}

.c-modal--report .feed-comment__actions button {
  font-size: var(--type-caption);
  font-weight: var(--weight-medium);
}

.report-detail__section--wide {
  gap: 12px;
}

.report-item-list {
  display: grid;
  gap: var(--space-2);
}

.report-item-detail {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.report-item-detail__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.report-item-detail__head strong {
  color: var(--ink);
  font-size: var(--type-body);
  font-weight: var(--weight-medium);
  line-height: 1.45;
}

.report-detail__grid--compact {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: var(--space-2);
}

.report-item-detail__field {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.report-item-detail__field > span {
  color: var(--muted);
  font-size: var(--type-caption);
  font-weight: var(--weight-medium);
  line-height: 1.35;
}

.report-item-detail__field > p {
  margin: 0;
  color: var(--ink);
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  line-height: 1.5;
  white-space: pre-wrap;
}

.report-detail-checklist {
  display: grid;
  gap: var(--space-2);
}

.report-detail-checklist__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-1) var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.report-detail-checklist__item span,
.report-detail-checklist__item small {
  color: var(--muted);
  font-size: var(--type-caption);
  font-weight: var(--weight-body);
  line-height: 1.35;
}

.report-detail-checklist__item strong {
  color: var(--ink);
  font-size: var(--type-body);
  font-weight: var(--weight-medium);
  line-height: 1.45;
}

.report-detail-checklist__item small {
  grid-column: 2;
}

.report-detail-checklist__item.is-complete {
  border-color: var(--success);
}

@media (max-width: 700px) {
  .report-detail__grid--compact {
    grid-template-columns: 1fr;
  }

  .report-item-detail__head {
    align-items: stretch;
    flex-direction: column;
  }

  .report-item-detail__head .c-status {
    align-self: flex-start;
  }
}
.report-detail .photo-grid {
  grid-template-columns: repeat(auto-fill, minmax(96px, 144px));
  justify-content: start;
}

.report-detail .photo-grid:has(> .equipment-photo-empty:only-child) {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 700px) {
  .report-detail .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.report-detail .report-employee-link {
  text-align: left;
  line-height: 1.3;
  text-underline-offset: 3px;
}

.report-equipment-link {
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand-primary);
  font: inherit;
  font-weight: var(--weight-medium);
  line-height: inherit;
  text-align: left;
  text-decoration: none;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.report-equipment-link:hover {
  color: var(--brand-primary-strong);
  text-decoration: underline;
}
/* Shared photo thumbnails and constrained media dialog. */
.photo-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  color: inherit;
  cursor: zoom-in;
  appearance: none;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.report-photo-preview {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
}

.report-photo-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}

.report-photo-preview[data-report-photo-state="ready"] img {
  opacity: 1;
}

.report-photo-preview[data-report-photo-state="loading"]::after {
  position: absolute;
  inset: 0;
  margin: auto;
}

.c-modal.report-photo-viewer {
  width: min(1120px, calc(100vw - 32px));
  max-height: min(92dvh, 960px);
}

.report-photo-viewer__content {
  height: min(calc(92dvh - 2px), 958px);
}

.report-photo-viewer__body {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  background: var(--surface-2);
}

html:has(#reportModal[open], #reportPhotoViewer[open]),
body:has(#reportModal[open], #reportPhotoViewer[open]) {
  overflow: hidden;
  overscroll-behavior: none;
}

body:has(#reportPhotoViewer[open]) #reportModal .modal__content {
  overflow: hidden;
}

#reportPhotoViewerBody {
  overflow: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.vehicle-document-viewer .report-photo-viewer__body {
  overflow: hidden;
}

.report-photo-viewer__stage {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  place-items: center;
}

.report-photo-viewer__stage > * {
  grid-area: 1 / 1;
  min-height: 0;
}

.report-photo-viewer__image {
  display: block;
  max-width: 100%;
  border-radius: var(--radius-sm);
  object-fit: contain;
  box-shadow: var(--shadow-soft);
}

#reportPhotoViewerBody .report-photo-viewer__stage {
  height: 100%;
  min-height: 0;
}

#reportPhotoViewerImage {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
}

.vehicle-document-viewer .report-photo-viewer__stage {
  height: 100%;
  min-height: 0;
}

.vehicle-document-viewer__image {
  max-height: 100%;
}

.report-photo-viewer__state {
  margin: 0;
  color: var(--muted);
  font-size: var(--type-body);
  font-weight: var(--weight-medium);
  text-align: center;
}

.report-photo-viewer__state--error {
  color: var(--danger);
}

.vehicle-document-viewer__pages {
  width: 100%;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: var(--space-3);
  overflow: auto;
  padding: var(--space-2);
  overscroll-behavior: contain;
}

.vehicle-document-viewer__page {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.vehicle-document-viewer__pages[hidden],
.vehicle-document-viewer__image[hidden] {
  display: none;
}

@media (max-width: 700px) {
  .c-modal.report-photo-viewer {
    width: calc(100vw - 12px);
    max-height: calc(100dvh - 12px);
  }

  .report-photo-viewer__content {
    height: calc(100dvh - 14px);
  }

  .report-photo-viewer__body {
    padding: var(--space-2);
  }
}

.c-photo-viewer__navigation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  padding: var(--space-2);
  gap: var(--space-2);
}
.c-photo-viewer__controls {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.c-photo-viewer__download { grid-column: 3; justify-self: end; }
.c-photo-viewer__counter { min-width: 6ch; color: var(--muted); font-size: var(--type-body); font-weight: var(--weight-medium); text-align: center; font-variant-numeric: tabular-nums; }
.c-photo-viewer [hidden] { display: none; }
.c-photo-viewer .report-photo-viewer__body { touch-action: pan-y pinch-zoom; }

/* Equipment: shared catalog, fields and history across every workspace. */

.c-equipment {
  min-width: 0;
  color: var(--ink);
  font-family: inherit;
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  line-height: 1.45;
}
.c-equipment .panel :is(h2, h3) {
  margin: 0;
  font-size: var(--type-card);
  font-weight: var(--weight-medium);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.c-equipment :is(p, td) {
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.c-equipment .muted {
  color: var(--muted);
  font-size: var(--type-caption);
  font-weight: var(--weight-body);
}
.c-equipment .panel__head { margin-bottom: var(--space-3); }
.c-equipment .panel__head > div { min-width: 0; }
.c-equipment .panel__head p { margin: var(--space-1) 0 0; }
.c-equipment .equipment-workspace__toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 200px) auto;
  gap: var(--space-3);
  align-items: center;
}
.c-equipment .equipment-workspace__toolbar:not(:has([data-equipment-create])) {
  grid-template-columns: minmax(0, 1fr) minmax(160px, 200px);
}
.c-equipment .equipment-workspace__toolbar :is(input, select, .c-select) { width: 100%; min-width: 0; }
.c-equipment .equipment-workspace__table { table-layout: fixed; }
.c-equipment .equipment-workspace__table :is(th, td) { white-space: normal; overflow-wrap: anywhere; }
.c-equipment .equipment-workspace__table td { padding-block: var(--space-3); vertical-align: middle; }
.c-equipment .equipment-workspace__table :is(th.equipment-workspace__location, th.equipment-workspace__responsible) { width: 20%; }
.c-equipment .equipment-workspace__table th.equipment-workspace__report-count { width: 72px; white-space: nowrap; }
.c-equipment .equipment-workspace__table .equipment-workspace__report-count {
  padding-inline: var(--space-2);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.c-equipment .equipment-workspace__table th {
  font-size: var(--type-caption);
  font-weight: var(--weight-medium);
  letter-spacing: 0;
  text-transform: none;
}
.c-equipment .person-cell strong {
  font-size: var(--type-body);
  font-weight: var(--weight-medium);
}
.c-equipment .equipment-workspace__table tbody tr[role="button"]:hover {
  background: color-mix(in srgb, var(--surface-2) 97%, var(--ink));
}
.c-equipment .employee-link { color: var(--brand-primary); font-weight: var(--weight-medium); }
.c-equipment .empty-state { min-height: 112px; padding: var(--space-4); }
.c-equipment .empty-state strong {
  font-size: var(--type-body);
  font-weight: var(--weight-medium);
}
.c-equipment .empty-state span { font-size: var(--type-caption); font-weight: var(--weight-body); }
.c-equipment .equipment-document__body strong { font-weight: var(--weight-medium); }
.c-equipment .equipment-history-list { max-height: none; overflow: visible; padding-right: 0; }
.c-equipment .equipment-history-item {
  background: var(--panel);
  border-color: var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
}
.c-equipment .equipment-history-item:hover {
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface-2) 97%, var(--ink));
}
.c-equipment .equipment-history-item strong { font-size: var(--type-body); font-weight: var(--weight-medium); }
.c-equipment .equipment-history-item > div > span { font-size: var(--type-caption); font-weight: var(--weight-body); }
.c-equipment .equipment-history-tags span {
  background: var(--surface-2);
  font-size: var(--type-caption);
  font-weight: var(--weight-body);
}

.c-equipment.equipment-workspace,
.c-equipment .equipment-workspace__content,
.c-equipment .equipment-workspace__detail-side {
  display: grid;
  align-content: start;
}

.c-equipment.equipment-workspace {
  gap: var(--space-4);
}

.c-equipment .equipment-workspace__content,
.c-equipment .equipment-workspace__detail-side {
  gap: 16px;
}

.c-equipment .equipment-workspace__detail-grid {
  align-items: start;
}

.c-equipment .equipment-workspace__table tr[role="button"] {
  cursor: pointer;
}

.c-equipment .equipment-workspace__table tr[role="button"]:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: -3px;
}

.c-equipment .oso-card-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.38fr);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.c-equipment .oso-card-main,
.c-equipment [data-oso-template-root],
.c-equipment .oso-additional-list {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
}

.c-equipment .oso-subhead {
  align-items: flex-start;
}

.c-equipment .oso-type-panel {
  display: grid;
  gap: 10px;
}

.c-equipment .oso-type-panel h2,
.c-equipment .oso-section h2,
.c-equipment .oso-subhead h2 {
  margin: 0;
}

.c-equipment .oso-type-field {
  max-width: 520px;
}

.c-equipment .oso-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.c-equipment .oso-field {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  color: var(--ink);
}

.c-equipment .oso-field > span {
  min-height: 2.6em;
  display: flex;
  align-items: flex-end;
  color: var(--ink);
  font-size: var(--type-caption);
  font-weight: var(--weight-medium);
  line-height: 1.3;
}

.c-equipment .oso-subhead span {
  color: var(--muted);
  font-size: var(--type-caption);
  font-weight: var(--weight-body);
  line-height: 1.35;
}

.c-equipment .oso-field .valve-field-input:not(textarea) {
  box-sizing: border-box;
  height: var(--control-height);
  min-height: var(--control-height);
  max-height: var(--control-height);
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-strong);
  color: var(--ink);
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  line-height: 1.4;
  transition: border-color var(--motion-fast), box-shadow var(--motion-fast);
}

.c-equipment .oso-field textarea.valve-field-input {
  min-height: calc(var(--control-height) + var(--control-height));
  padding: 10px 13px;
  border-color: var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-strong);
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  line-height: 1.4;
}

.c-equipment .oso-field .valve-field-input:hover {
  border-color: var(--line-strong);
}

.c-equipment .oso-field .valve-field-input:focus {
  border-color: var(--focus-border);
}

.c-equipment .oso-measurement {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px;
}

.c-equipment .oso-equipment-group {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}

.c-equipment .oso-equipment-group[hidden] {
  display: none;
}

.c-equipment .oso-equipment-group__head {
  display: flex;
  align-items: center;
  min-height: var(--control-height-sm);
}

.c-equipment .oso-equipment-group__head span {
  color: var(--ink);
  font-size: var(--type-body);
  font-weight: var(--weight-heading);
  line-height: 1.35;
}

.c-equipment .oso-additional-block {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.c-equipment .oso-subhead {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.c-equipment .oso-subhead > div {
  display: grid;
  gap: 4px;
}

.c-equipment .oso-additional-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(240px, 1.3fr);
  gap: 12px;
  padding: 14px 46px 14px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.c-equipment .oso-row-remove {
  top: 12px;
  right: 12px;
}

.c-equipment .oso-added-item {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.c-equipment .oso-added-item > div {
  display: grid;
  gap: 4px;
}

.c-equipment .oso-added-item span {
  color: var(--muted);
  font-size: var(--type-body);
  line-height: 1.45;
  white-space: pre-line;
}

.c-equipment .oso-empty {
  min-height: 112px;
}

.c-equipment .equipment-documents,
.c-equipment .equipment-document-list,
.c-equipment .equipment-document-editor {
  display: grid;
  gap: 14px;
}

.c-equipment .equipment-document-editor[hidden] {
  display: none;
}

.c-equipment .equipment-document {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.c-equipment .equipment-document__body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.c-equipment .equipment-document__body strong,
.c-equipment .equipment-document__body span {
  overflow-wrap: anywhere;
}

.c-equipment .equipment-document__body span {
  color: var(--muted);
  font-size: var(--type-caption);
  line-height: 1.4;
}

.c-equipment .equipment-document__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.c-equipment .equipment-document__action {
  min-height: var(--control-height-sm);
  padding: 7px 11px;
}

.c-equipment .equipment-document-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.c-equipment .equipment-document-form__file,
.c-equipment .equipment-document-form .editor-actions {
  grid-column: 1 / -1;
}

@media (max-width: 1100px) {
  .c-equipment .oso-card-layout {
    grid-template-columns: 1fr;
  }

  .c-equipment .oso-card-layout .valve-comments-panel {
    position: static;
  }
}

@media (max-width: 700px) {
  .c-equipment .oso-field-grid,
  .c-equipment .oso-additional-row,
  .c-equipment .equipment-document-form,
  .c-equipment .equipment-document {
    grid-template-columns: 1fr;
  }

  .c-equipment .oso-subhead {
    display: grid;
  }

  .c-equipment .oso-subhead .c-button {
    width: 100%;
  }

  .c-equipment .equipment-document__actions {
    justify-content: stretch;
  }

  .c-equipment .equipment-document__action {
    flex: 1 1 100%;
    justify-content: center;
  }
}

.c-equipment .valve-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

@media (max-width: 1100px) {
  .c-equipment .valve-detail-grid {
    grid-template-columns: 1fr;
  }
}

.c-equipment .valve-comments-panel {
  position: static;
}

.c-equipment .valve-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.c-equipment .valve-field {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
  align-content: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.c-equipment .valve-field > span {
  color: var(--muted);
  font-size: var(--type-caption);
  font-weight: var(--weight-medium);
  text-transform: none;
  letter-spacing: 0;
}

.c-equipment .valve-field strong {
  color: var(--ink);
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.c-equipment .valve-field.is-empty strong {
  color: var(--muted);
  font-weight: var(--weight-body);
  font-style: normal;
}

.c-equipment .valve-comments {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.c-equipment .valve-detail-left {
  display: grid;
  gap: 16px;
  min-width: 0;
}


.c-equipment .valve-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.c-equipment .valve-field-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: var(--type-body);
  line-height: 1.35;
  resize: vertical;
}

.c-equipment .valve-field-input:focus {
  border-color: var(--focus-border);
}

.c-equipment .valve-field.is-editing {
  position: relative;
  border-style: dashed;
}

.c-equipment .valve-history {
  display: grid;
  gap: 8px;
}

.c-equipment .valve-history__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.c-equipment .valve-history__row .muted {
  font-size: var(--type-caption);
  overflow-wrap: anywhere;
}

.c-equipment .valve-comment {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.c-equipment .valve-comment__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.c-equipment .valve-comment__head strong {
  color: var(--ink);
  font-size: var(--type-body);
}

.c-equipment .valve-comment__head span {
  color: var(--muted);
  font-size: var(--type-caption);
  overflow-wrap: anywhere;
}

.c-equipment .valve-comment p {
  margin: 0;
  color: var(--ink);
  font-size: var(--type-body);
  line-height: 1.5;
  white-space: pre-line;
  overflow-wrap: anywhere;
}


/* ---------- Редактирование полей карточки клапана ---------- */
.c-equipment .field-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: var(--type-body);
  line-height: 1;
  cursor: pointer;
}

.c-equipment .field-remove:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.c-equipment .valve-field--custom {
  display: grid;
  gap: 6px;
  border-style: dashed;
  border-color: var(--line-strong);
}

.c-equipment .valve-field-input--title {
  font-size: var(--type-caption);
  font-weight: var(--weight-medium);
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
}


@media (max-width: 700px) {
  .c-equipment .equipment-workspace__toolbar,
  .c-equipment .equipment-workspace__toolbar:not(:has([data-equipment-create])) { grid-template-columns: minmax(0, 1fr); }
  .c-equipment .equipment-workspace__toolbar .c-button { width: 100%; }
  .c-equipment .equipment-workspace__content > .c-table-wrap { border: 0; background: transparent; box-shadow: none; overflow: visible; }
  .c-equipment .equipment-workspace__table { display: block; min-width: 0; }
  .c-equipment .equipment-workspace__table thead { display: none; }
  .c-equipment .equipment-workspace__table tbody { display: grid; gap: var(--space-3); }
  .c-equipment .equipment-workspace__table tr {
    display: grid;
    gap: var(--space-2);
    padding: var(--space-4);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
  }
  .c-equipment .equipment-workspace__table td { min-width: 0; padding: 0; border: 0; }
  .c-equipment .equipment-workspace__table td.equipment-workspace__report-count { padding-inline: 0; text-align: left; }
  .c-equipment .equipment-workspace__table td[data-label] {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: var(--space-3);
    padding-top: var(--space-2);
    border-top: 1px solid var(--line);
  }
  .c-equipment .equipment-workspace__table td[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: var(--type-caption);
    font-weight: var(--weight-body);
    line-height: 1.45;
  }
  .c-equipment .valve-fields { grid-template-columns: minmax(0, 1fr); }
  .c-equipment .panel { padding: var(--space-4); }
  .c-equipment .valve-head-actions { justify-content: flex-start; }
  .c-equipment .valve-comment__head { flex-wrap: wrap; gap: var(--space-1); }
}

/* Reports: shared registry, monthly summary and employee archive cards. */
.daily-summary__actions {
  display: flex;
  gap: var(--space-3);
  align-items: end;
  flex-wrap: nowrap;
  flex-shrink: 0;
  padding: 0;
}

.daily-summary__actions > .c-button { flex-shrink: 0; white-space: nowrap; }

.daily-summary .daily-summary__month {
  width: min(180px, 100%);
  flex-shrink: 0;
  margin: 0;
}

.daily-summary {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.daily-summary > .c-card__header {
  margin-bottom: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.daily-summary .c-field__label { color: var(--muted); font-size: var(--type-caption); font-weight: var(--weight-medium); }

.daily-summary__table th {
  background: var(--card-surface);
  font-size: var(--type-caption);
  font-weight: var(--weight-medium);
  letter-spacing: normal;
  text-transform: none;
}

.daily-summary__table td { font-size: var(--type-body); font-weight: var(--weight-body); }

.daily-summary__table td strong {
  font-weight: var(--weight-medium);
}

.daily-summary__table tbody tr:hover {
  background: color-mix(in srgb, var(--surface-2) 97%, var(--ink) 3%);
}

.daily-summary .empty-state {
  min-height: 0;
  padding: 0;
  gap: var(--space-1);
  place-content: start;
  justify-items: start;
  text-align: left;
}

.daily-summary .empty-state strong {
  font-size: var(--type-body);
  font-weight: var(--weight-medium);
}

.reports-registry .empty-state strong {
  font-size: var(--type-card);
  font-weight: var(--weight-medium);
}

.daily-summary .empty-state span,
.reports-registry .empty-state span {
  color: var(--muted);
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  line-height: 1.5;
}

.daily-summary__table th,
.daily-summary__table td {
  vertical-align: middle;
  text-align: center;
}

.daily-summary__table th:first-child,
.daily-summary__table td:first-child {
  min-width: 220px;
  text-align: left;
}

.daily-summary__note {
  margin: 0;
  color: var(--muted);
  font-size: var(--type-body);
  line-height: 1.45;
}

.reports-registry {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
}

.reports-registry > .reports-registry__title {
  margin: 0;
  color: var(--ink);
  font-size: var(--type-card);
  font-weight: var(--weight-medium);
  line-height: 1.4;
}

.reports-list {
  display: grid;
  container: reports-list / inline-size;
  gap: var(--space-2);
}

.report-list__head,
.report-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1.5fr) minmax(0, 0.8fr) minmax(0, 0.8fr) 120px minmax(0, 0.7fr);
  align-items: center;
  gap: var(--space-3);
  width: 100%;
}

.report-list__head {
  min-height: var(--control-height-sm);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card-surface);
  color: var(--muted);
  font-size: var(--type-caption);
  font-weight: var(--weight-medium);
  line-height: 1.4;
}

.report-row {
  font: inherit;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  box-shadow: none;
  text-align: left;
  cursor: pointer;
  transition: background var(--motion-fast);
}

.report-row:hover {
  background: color-mix(in srgb, var(--surface-2) 97%, var(--ink) 3%);
}

.report-row:focus-visible {
  background: color-mix(in srgb, var(--surface-2) 97%, var(--ink) 3%);
}

.report-row__main {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
}

.report-row__main strong {
  color: var(--ink);
  font-size: var(--type-body);
  font-weight: var(--weight-medium);
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}

.report-row__main span,
.report-row__date,
.report-row__engineer,
.report-row__day-status,
.report-row__equipment,
.report-row__type,
.report-row__mobile {
  color: var(--muted);
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  line-height: 1.45;
}

.report-row__date,
.report-row__engineer,
.report-row__equipment {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-weight: var(--weight-body);
}

.report-row__date,
.report-row__mobile-date { white-space: pre-line; }

.report-row__day-status {
  min-width: 0;
  font-weight: var(--weight-body);
  overflow-wrap: anywhere;
}

.report-row__mobile {
  display: none;
}

@container reports-list (max-width: 820px) {
  .report-list__head,
  .report-row {
    grid-template-columns: 100px minmax(0, 1.4fr) 110px minmax(0, 0.8fr);
  }

  .report-list__head-equipment,
  .report-row__equipment,
  .report-list__head-engineer,
  .report-row__engineer {
    display: none;
  }

  .report-row__mobile { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); font-size: var(--type-caption); }
  .report-row__mobile-date,
  .report-row__mobile-type,
  .report-row__mobile-status { display: none; }
}

@container reports-list (max-width: 650px) {
  .report-list__head {
    display: none;
  }

  .report-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .report-row__date,
  .report-row__engineer,
  .report-row__equipment,
  .report-row__type,
  .report-row__day-status {
    display: none;
  }

  .report-row__mobile {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1) var(--space-3);
  }

  .report-row__mobile span {
    display: inline;
    font-size: var(--type-caption);
    font-weight: var(--weight-body);
  }
}

.reports-empty {
  grid-column: 1 / -1;
}


@media (max-width: 700px) {
  .daily-summary > .c-card__header {
    align-items: stretch;
    flex-direction: column;
  }

  .daily-summary__actions {
    align-items: stretch;
    flex-wrap: wrap;
    width: 100%;
  }

  .daily-summary .daily-summary__month {
    width: 100%;
  }

  .daily-summary__table,
  .daily-summary__table tbody,
  .daily-summary__table tr,
  .daily-summary__table td {
    display: grid;
    width: 100%;
  }

  .daily-summary__table-wrap .daily-summary__table {
    min-width: 0;
  }

  .daily-summary__table thead {
    display: none;
  }

  .daily-summary__table tbody {
    gap: var(--space-3);
  }

  .daily-summary__table tr {
    gap: var(--space-2);
    padding: var(--space-3);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
  }

  .daily-summary__table td,
  .daily-summary__table td:first-child {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-3);
    padding: 0;
    border: 0;
    text-align: right;
  }

  .daily-summary__table td::before {
    color: var(--muted);
    font-size: var(--type-caption);
    text-align: left;
  }

  .daily-summary__table td:nth-child(1)::before { content: "Сотрудник"; }
  .daily-summary__table td:nth-child(2)::before { content: "На объекте"; }
  .daily-summary__table td:nth-child(3)::before { content: "На объекте, выходные"; }
  .daily-summary__table td:nth-child(4)::before { content: "В дороге"; }
  .daily-summary__table td:nth-child(5)::before { content: "В дороге, выходные"; }
  .daily-summary__table td:nth-child(6)::before { content: "Простой"; }
  .daily-summary__table td:nth-child(7)::before { content: "Простой, выходные"; }

}

.c-reports,
.c-report-list { min-width: 0; }
.c-reports { font-size: var(--type-body); font-weight: var(--weight-body); line-height: 1.45; }
.c-report-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); min-width: 0; }
.c-report-filters > input { flex: 1 1 280px; min-width: 0; }
.c-report-filters > .c-select { flex: 0 1 200px; min-width: 0; }
.c-report-filters__options { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.c-report-filters__options > .c-select { flex: 1 1 160px; min-width: 0; }
.report-row__main > span { font-size: var(--type-caption); }
.c-report-card {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
  width: 100%;
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  line-height: 1.45;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background var(--motion-fast);
}
.c-report-card:hover,
.c-report-card:focus-visible { background: color-mix(in srgb, var(--surface-2) 97%, var(--ink) 3%); }
.c-report-card strong { color: var(--ink); font-size: var(--type-body); font-weight: var(--weight-medium); }
.c-report-card > span:not(.c-report-card__top):not(.c-report-card__meta),
.c-report-card p { margin: 0; color: var(--muted); font-size: var(--type-body); font-weight: var(--weight-body); }
.c-report-card__top { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: var(--space-2); }
.c-report-card__date { color: var(--muted); font-size: var(--type-caption); font-weight: var(--weight-body); }
.c-report-card__meta { display: flex; flex-wrap: wrap; gap: var(--space-2); color: var(--muted); font-size: var(--type-caption); }
@media (max-width: 700px) {
  .c-report-filters > input,
  .c-report-filters > .c-select,
  .c-report-filters__options { flex: 1 1 100%; width: 100%; }
  .daily-summary__actions > .c-button { width: 100%; }
  .daily-summary__table td > strong { min-width: 0; overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  .report-row,
.c-report-card { transition: none; }
}

/* Departments: one directory and employee-list owner for every workspace. */
.c-departments {
  container: departments / inline-size;
  display: grid;
  align-content: start;
  gap: var(--space-4);
  min-width: 0;
  color: var(--ink);
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  line-height: 1.45;
}
.c-departments :is(.department-toolbar, .department-toolbar__filters, .department-toolbar__buttons, .department-people-toolbar) {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  min-width: 0;
}
.c-departments .department-toolbar > input,
.c-departments .department-people-toolbar > input { flex: 1 1 260px; min-width: 0; }
.c-departments .department-filter { width: 220px; min-width: 0; }
.c-departments .department-people-toolbar > .c-select { width: 200px; min-width: 0; }
.c-departments .c-button { font-weight: var(--weight-medium); }
.c-departments :is(.c-button--secondary, .c-button--icon):hover {
  transform: none;
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface-2) 97%, var(--ink) 3%);
}
.c-departments .c-button--secondary:hover { color: var(--ink); }
.c-departments .department-results-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  color: var(--muted);
  font-size: var(--type-caption);
}
.c-departments .department-results-meta:empty { display: none; }
.c-departments .department-results-meta strong { color: var(--ink); font-weight: var(--weight-medium); }
.c-departments .departments-list { display: grid; gap: var(--space-2); min-width: 0; }
.c-departments .department-list-item { padding: 0; min-width: 0; overflow: hidden; box-shadow: none; }
.c-departments .department-list-item.is-filter-context { border-style: dashed; }
.c-departments .department-list-row {
  display: grid;
  grid-template-columns: var(--control-height-sm) minmax(0, 1.6fr) minmax(0, 1fr) repeat(3, calc(var(--space-4) * 5)) auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  transition: background var(--motion-fast);
}
.c-departments :is(.department-list-row, .department-subrow, .dept-person-row):hover,
.c-departments :is(.department-subrow, .dept-person-row):focus-visible {
  background: color-mix(in srgb, var(--surface-2) 97%, var(--ink) 3%);
}
.c-departments :is(.department-expand, .department-subexpand) { color: var(--muted); }
.c-departments :is(.department-expand, .department-subexpand) span { position: relative; width: 12px; height: 12px; }
.c-departments :is(.department-expand, .department-subexpand) span::before,
.c-departments :is(.department-expand, .department-subexpand) span::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 1px;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.c-departments :is(.department-expand, .department-subexpand) span::after { width: 1px; height: 12px; }
.c-departments :is(.department-expand, .department-subexpand)[aria-expanded="true"] span::after { opacity: 0; }
.c-departments :is(.department-list-title, .department-list-meta, .department-subrow__title) { display: grid; min-width: 0; gap: var(--space-1); }
.c-departments .department-title-button {
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: var(--weight-medium);
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.c-departments :is(.department-list-title > span, .department-list-meta > span, .department-subrow__title small, .department-subrow__meta) {
  color: var(--muted);
  font-size: var(--type-caption);
  font-weight: var(--weight-body);
  overflow-wrap: anywhere;
}
.c-departments :is(.department-list-meta strong, .department-list-value, .department-subrow__meta strong) {
  min-width: 0;
  color: var(--ink);
  font-size: var(--type-body);
  font-weight: var(--weight-body);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.c-departments .department-list-value .employee-link { font-size: var(--type-body); font-weight: var(--weight-medium); text-align: left; }
.c-departments .department-children-panel { display: grid; grid-template-rows: 0fr; background: var(--surface-2); }
.c-departments .department-children-panel.is-open { grid-template-rows: 1fr; border-top: 1px solid var(--line); }
.c-departments .department-children-panel__inner { display: grid; gap: var(--space-2); overflow: hidden; min-height: 0; }
.c-departments .department-children-panel.is-open > .department-children-panel__inner { padding: var(--space-3) var(--space-4); }
.c-departments .department-subitem-node { display: grid; min-width: 0; }
.c-departments .department-subrow-shell {
  display: grid;
  grid-template-columns: var(--control-height-sm) minmax(0, 1fr);
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.c-departments .department-subrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-width: 0;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background var(--motion-fast);
}
.c-departments .department-subrow__title strong { font-size: var(--type-body); font-weight: var(--weight-medium); overflow-wrap: anywhere; }
.c-departments .department-children-panel--nested {
  margin-left: calc(var(--control-height-sm) + var(--space-2));
  min-width: 0;
  padding-left: var(--space-3);
  background: transparent;
}
.c-departments .department-children-panel--nested.is-open { border-top: 0; }
.c-departments .department-children-panel--nested.is-open > .department-children-panel__inner { padding: var(--space-2) 0; }
.c-departments .department-detail-navigation { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); min-width: 0; }
.c-departments .department-detail-navigation nav { min-width: 0; margin: 0; }
.c-departments .department-detail-body { display: grid; gap: var(--space-4); min-width: 0; }
.c-departments .department-people-panel { min-width: 0; box-shadow: none; }
.c-departments .dept-person-list { display: grid; gap: var(--space-2); min-width: 0; }
.c-departments :is(.dept-person-list__head, .dept-person-row) {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, .7fr) minmax(0, 1fr) 110px;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
}
.c-departments .dept-person-list__head { padding-top: 0; color: var(--muted); font-size: var(--type-caption); font-weight: var(--weight-medium); background: var(--card-surface); }
.c-departments .dept-person-row {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background var(--motion-fast);
}
.c-departments .dept-person-row__identity { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.c-departments .dept-person-row__identity > span { display: grid; gap: var(--space-1); min-width: 0; }
.c-departments .dept-person-row strong { font-size: var(--type-body); font-weight: var(--weight-medium); overflow-wrap: anywhere; }
.c-departments .dept-person-row small { font-size: var(--type-caption); font-weight: var(--weight-body); color: var(--muted); overflow-wrap: anywhere; }
.c-departments .dept-person-row > span:not(.dept-person-row__identity):not(.c-status) { font-size: var(--type-body); color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.c-departments .dept-person-row .c-status { justify-self: start; }
.c-departments .empty-state strong { font-size: var(--type-body); font-weight: var(--weight-medium); }
.c-departments .empty-state span { font-size: var(--type-body); font-weight: var(--weight-body); }

@container departments (max-width: 900px) {
  .c-departments .department-list-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .c-departments .department-expand { grid-column: 1; grid-row: 1; align-self: start; }
  .c-departments .department-list-title { grid-column: 1 / -1; grid-row: 1; margin-left: calc(var(--control-height-sm) + var(--space-3)); }
  .c-departments .department-list-meta--head { grid-column: 1 / -1; }
  .c-departments .department-list-meta--head + .department-list-meta { grid-column: 1; }
  .c-departments .department-list-meta--head + .department-list-meta + .department-list-meta { grid-column: 2; }
  .c-departments .department-list-meta--head + .department-list-meta + .department-list-meta + .department-list-meta { grid-column: 3; }
  .c-departments .department-list-open { grid-column: 1 / -1; }
  .c-departments .dept-person-row { grid-template-columns: minmax(0, 1fr); }
  .c-departments .dept-person-list__head { display: none; }
  .c-departments .dept-person-row > span[data-label] { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--space-2); }
  .c-departments .dept-person-row > span[data-label]::before { content: attr(data-label); color: var(--muted); font-size: var(--type-caption); }
}
@container departments (max-width: 600px) {
  .c-departments :is(.department-toolbar, .department-toolbar__filters, .department-toolbar__buttons, .department-people-toolbar) { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; }
  .c-departments :is(.department-toolbar > input, .department-filter, .department-people-toolbar > .c-select) { width: 100%; }
  .c-departments .department-detail-navigation { align-items: stretch; flex-direction: column; }
  .c-departments .department-children-panel--nested { margin-left: var(--space-2); padding-left: var(--space-2); }
  .c-departments .department-subrow { grid-template-columns: minmax(0, 1fr); gap: var(--space-1); }
}
@media (prefers-reduced-motion: reduce) {
  .c-departments :is(.department-list-row, .department-subrow, .dept-person-row) { transition: none; }
}

/* Material demand: the shared approval queue, with source quantities and filter-scoped selection. */
.c-material-demand { --demand-sticky-top: calc(var(--demand-topbar-bottom, 0px) + var(--space-6)); --demand-bottom-clearance: calc(var(--portal-fab-size) + max(var(--space-6), env(safe-area-inset-bottom)) + var(--space-6)); min-width: 0; gap: var(--space-4); font-size: var(--type-body); font-weight: var(--weight-body); line-height: 1.5; }
.c-material-demand strong { font-weight: var(--weight-body); }
.c-material-demand .demand-error:empty, .c-material-demand .demand-notice:empty, .c-material-demand .demand-bulk:empty { display: none; }
.c-material-demand .demand-layout { display: grid; grid-template-columns: minmax(0,1fr) 244px; gap: var(--space-6); align-items: start; }
.c-material-demand .demand-queue { min-width: 0; display: grid; gap: var(--space-6); }
.c-material-demand .demand-filters { position: sticky; top: var(--demand-sticky-top); max-height: calc(100dvh - var(--demand-sticky-top) - var(--demand-bottom-clearance)); overflow-y: auto; box-sizing: border-box; padding: var(--space-5); display: grid; gap: var(--space-5); min-width: 0; }
.c-material-demand .demand-filters h2 { margin: 0; font-size: var(--type-body); font-weight: var(--weight-body); }
.c-material-demand .demand-filters .c-field { min-width: 0; }
.c-material-demand .demand-filters input { min-width: 0; max-width: 100%; box-sizing: border-box; }
.c-material-demand .demand-filters fieldset { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--space-2); min-width: 0; margin: 0; padding: 0; border: 0; }
.c-material-demand .demand-filters legend { margin-bottom: var(--space-2); padding: 0; }
.c-material-demand .demand-filters input[type=date] { padding-inline: var(--space-2); font-size: var(--type-caption); }
.c-material-demand .demand-filter-status { margin: 0; color: var(--muted); font-size: var(--type-caption); }
.c-material-demand .demand-actions { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.c-material-demand .demand-filters > .demand-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.c-material-demand .demand-filters .c-button { min-width: 0; padding-inline: var(--space-2); }
.c-material-demand .demand-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: var(--space-4); }
.c-material-demand .demand-summary > div { min-width: 0; padding: var(--space-4); display: grid; gap: var(--space-2); }
.c-material-demand .demand-summary-value { font-size: var(--type-section); font-variant-numeric: tabular-nums; color: var(--brand-primary); }
.c-material-demand .demand-summary > div > span:last-child, .c-material-demand .demand-muted, .c-material-demand .demand-group-title small { color: var(--muted); font-size: var(--type-caption); }
.c-material-demand .demand-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); padding: var(--space-5); }
.c-material-demand .demand-bulk > .demand-muted { flex: 1 1 100%; margin: 0; }
.c-material-demand .demand-select-all { display: inline-flex; align-items: center; gap: var(--space-2); }
.c-material-demand [data-demand-select] { flex: 0 0 var(--checkbox-size,18px); }
.c-material-demand .demand-results { display: grid; gap: var(--space-6); min-width: 0; }
.c-material-demand .demand-contract { min-width: 0; padding: 0; overflow: hidden; }
.c-material-demand .demand-contract > .demand-group-head { background: var(--card-subtle); }
.c-material-demand .demand-group-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-5) var(--space-4); }
.c-material-demand .demand-group-title { min-width: 0; flex: 1; }
.c-material-demand .demand-group-title > span { display: grid; gap: var(--space-2); min-width: 0; overflow-wrap: anywhere; }
.c-material-demand .demand-objects { border-top: 1px solid var(--line); padding: 0 var(--space-4); }
.c-material-demand .demand-object + .demand-object { border-top: 1px solid var(--line); }
.c-material-demand .demand-object > .demand-group-head { padding-inline: 0; }
.c-material-demand .demand-lines { width: 100%; min-width: 0; table-layout: fixed; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card-surface); font-size: var(--type-caption); margin-bottom: var(--space-5); }
.c-material-demand .demand-lines th, .c-material-demand .demand-lines td { text-align: left; padding: var(--space-3) var(--space-2); vertical-align: top; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; font-weight: var(--weight-body); }
.c-material-demand .demand-lines th { font-size: var(--type-caption); line-height: 1.4; letter-spacing: 0; text-transform: none; color: var(--muted); background: var(--card-surface); }
.c-material-demand .demand-lines th:first-child { border-top-left-radius: var(--radius-sm); }
.c-material-demand .demand-lines th:last-child { border-top-right-radius: var(--radius-sm); }
.c-material-demand .demand-lines tbody tr:last-child td { border-bottom: 0; }
.c-material-demand .demand-lines .demand-check-cell { width: 56px; text-align: center; }
.c-material-demand .demand-lines .demand-quantity { width: 88px; }
.c-material-demand .demand-lines .demand-approval-cell { width: 132px; }
.c-material-demand .demand-lines .demand-line-actions { width: 224px; }
.c-material-demand .demand-lines .c-button { min-width: 0; width: 100%; font-size: var(--type-caption); white-space: normal; padding-inline: var(--space-2); }
.c-material-demand .demand-approval { display: grid; gap: var(--space-2); min-width: 0; }
.c-material-demand .demand-approval [aria-pressed=true] { color: var(--success); border-color: var(--success); background: var(--success-soft); }
.c-material-demand .demand-approval-meta { display: grid; gap: var(--space-1); color: var(--muted); font-size: var(--type-caption); font-weight: var(--weight-body); line-height: 1.4; }
.c-material-demand .demand-approval-meta time { white-space: nowrap; }
.c-material-demand .demand-lines .demand-actions { align-items: flex-start; flex-wrap: nowrap; }
.c-material-demand .demand-line-actions .demand-actions > :not(.demand-history-button) { flex: 1 1 0; min-width: 0; width: auto; }
.c-material-demand .demand-lines .demand-history-button { flex: 0 0 var(--control-height); width: var(--control-height); padding: 0; }
.c-material-demand .demand-history-button .ui-icon { width: 18px; height: 18px; }
.c-material-demand .demand-muted { display: block; margin-top: var(--space-1); }
.c-material-demand .demand-status--approved { color: var(--success); }
.c-material-demand .demand-error:not(:empty), .c-material-demand .demand-notice:not(:empty) { padding: var(--space-4); margin-bottom: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card-surface); overflow-wrap: anywhere; }
.c-material-demand .demand-error { color: var(--danger); }
.c-material-demand .demand-notice { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.c-material-demand .demand-empty { padding: var(--space-6); color: var(--muted); }
.c-material-demand .demand-history { width: min(640px,calc(100vw - 32px)); max-height: calc(100dvh - 32px); color: var(--ink); background: var(--card-surface); overflow-wrap: anywhere; }
.c-material-demand .demand-history .c-modal__title { font-size: var(--type-section); font-weight: var(--weight-body); }
.c-material-demand .demand-history li { margin-bottom: var(--space-4); }
.c-material-demand .demand-history li span { display: block; }
.c-material-demand .demand-history li span + span { color: var(--muted); font-size: var(--type-caption); }
@media(max-width:1200px) {
  .c-material-demand .demand-lines, .c-material-demand .demand-lines tbody, .c-material-demand .demand-lines tr, .c-material-demand .demand-lines td { display: block; width: 100%; box-sizing: border-box; }
  .c-material-demand .demand-lines thead { display: none; }
  .c-material-demand .demand-lines { border: 0; border-radius: 0; background: transparent; }
  .c-material-demand .demand-lines tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--space-4); padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card-surface); margin-bottom: var(--space-4); }
  .c-material-demand .demand-lines td { border: 0; padding: 0; }
  .c-material-demand .demand-lines td::before { content: attr(data-label); display: block; color: var(--muted); font-size: var(--type-caption); margin-bottom: var(--space-2); }
  .c-material-demand .demand-lines .demand-check-cell { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--space-2); width: 100%; text-align: left; }
  .c-material-demand .demand-lines .demand-check-cell::before { margin-bottom: 0; }
  .c-material-demand .demand-lines .demand-quantity, .c-material-demand .demand-lines .demand-approval-cell, .c-material-demand .demand-lines .demand-line-actions { width: 100%; }
  .c-material-demand .demand-group-head { flex-wrap: wrap; }
  .c-material-demand .demand-group-head > .c-button { margin-left: auto; }
}
@media(max-width:800px) {
  .c-material-demand .demand-layout { grid-template-columns: minmax(0,1fr); }
  .c-material-demand .demand-filters { position: static; max-height: none; overflow: visible; grid-row: 1; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .c-material-demand .demand-filters h2, .c-material-demand .demand-filters > p, .c-material-demand .demand-filters > .demand-actions { grid-column: 1 / -1; }
  .c-material-demand .demand-filters fieldset { grid-template-columns: minmax(0,1fr); }
  .c-material-demand .demand-summary { gap: var(--space-2); }
  .c-material-demand .demand-summary > div { padding: var(--space-3); }
  .c-material-demand .demand-objects { padding-inline: var(--space-3); }
  .c-material-demand .demand-group-head { padding: var(--space-4) var(--space-3); }
  .c-material-demand .demand-group-head > .demand-group-title { flex: 1 1 70%; }
  .c-material-demand .demand-group-head > .c-button { max-width: 100%; }
  .c-material-demand .demand-lines tr { grid-template-columns: minmax(0,1fr); }
  .c-material-demand .demand-bulk { padding: var(--space-4); }
}


/* ====== Административные push-рассылки ====== */

.notification-device-summary {
  margin-bottom: var(--space-5);
}

.notification-device-summary__updated {
  color: var(--muted);
  font-size: var(--type-caption);
  text-align: right;
}

.notification-device-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
}

.notification-device-stats article {
  display: grid;
  align-content: center;
  gap: var(--space-1);
  min-height: calc(var(--control-height) * 2);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.notification-device-stats strong {
  color: var(--ink);
  font-size: var(--type-section);
  line-height: 1.1;
}

.notification-device-stats span {
  color: var(--muted);
  font-size: var(--type-caption);
  line-height: 1.4;
}

.notification-broadcasts__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: var(--space-5);
  align-items: start;
}

.notification-composer,
.notification-history {
  min-width: 0;
}

.notification-composer__fields {
  display: grid;
  gap: var(--space-4);
}

.notification-audience {
  margin: 0;
  padding: 0;
  border: 0;
}

.notification-audience legend {
  margin-bottom: var(--space-2);
  color: var(--ink);
  font-size: var(--type-body);
  font-weight: var(--weight-heading);
}

.notification-audience__options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.notification-audience__option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: var(--space-3);
  min-height: 76px;
  padding: var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color var(--motion-fast), background var(--motion-fast);
}

.notification-audience__option:has(input:checked) {
  border-color: var(--brand-primary);
  background: var(--surface-2);
}

.notification-audience__option input { margin: 2px 0 0; }

.notification-audience__option span {
  display: grid;
  gap: var(--space-1);
}

.notification-audience__option strong {
  color: var(--ink);
  font-size: var(--type-body);
}

.notification-audience__option small {
  color: var(--muted);
  line-height: 1.45;
}

.notification-recipient-picker {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.notification-recipient-picker[hidden] {
  display: none;
}

.notification-recipient-picker__toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2);
}

.notification-recipient-list {
  display: grid;
  gap: var(--space-1);
  max-height: 310px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.notification-recipient {
  display: grid;
  grid-template-columns: 20px 36px minmax(0, 1fr);
  gap: var(--space-2);
  align-items: center;
  min-height: 52px;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.notification-recipient:hover,
.notification-recipient:has(input:checked) {
  background: var(--panel-strong);
}


.notification-recipient__avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--brand-primary);
  font-size: var(--type-caption);
  font-weight: var(--weight-heading);
}

.notification-recipient__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.notification-recipient__copy strong,
.notification-recipient__copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-recipient__copy strong {
  color: var(--ink);
  font-size: var(--type-body);
}

.notification-recipient__copy small {
  color: var(--muted);
}

.notification-preview {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.notification-preview__card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: var(--space-3);
  max-width: 520px;
  padding: var(--space-3);
  border: 1px solid var(--line-strong);
  border-radius: calc(var(--radius) + 4px);
  background: color-mix(in srgb, var(--panel-strong) 94%, transparent);
  box-shadow: var(--shadow-soft);
}

.notification-preview__card > img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  padding: 5px;
  border-radius: 10px;
  background: #ffffff;
}

.notification-preview__card > .c-company-brand__fallback {
  width: 40px;
  height: 40px;
  display: grid;
  padding: 5px;
  place-items: center;
  border-radius: 10px;
  background: #ffffff;
  font-size: 10px;
  text-align: center;
}

.notification-preview__card > .c-company-brand__fallback[hidden] {
  display: none;
}

.notification-preview__card > div {
  min-width: 0;
}

.notification-preview__meta {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: 2px;
  color: var(--muted);
  font-size: var(--type-caption);
}

.notification-preview__card > div > strong {
  display: block;
  color: var(--ink);
  font-size: var(--type-body);
}

.notification-preview__card p {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: var(--type-body);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.notification-composer__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}

.notification-composer__actions p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: var(--type-caption);
  line-height: 1.5;
}

.notification-history__list {
  display: grid;
  gap: var(--space-3);
}

.notification-history-item {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.notification-history-item__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.notification-history-item__head > div {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
}

.notification-history-item__head strong {
  color: var(--ink);
  font-size: var(--type-card);
  overflow-wrap: anywhere;
}

.notification-history-item time,
.notification-history-item__meta {
  color: var(--muted);
  font-size: var(--type-caption);
}

.notification-history-item > p {
  margin: 0;
  color: var(--ink);
  font-size: var(--type-body);
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.notification-history-item__meta {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
}

.notification-history-item__meta span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-delivery {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--type-caption);
  font-weight: var(--weight-heading);
}

.notification-delivery--success {
  background: color-mix(in srgb, var(--success) 12%, transparent);
  color: var(--success);
}

.notification-delivery--warning {
  background: color-mix(in srgb, var(--warning) 14%, transparent);
  color: var(--warning);
}

.notification-delivery--danger {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger);
}

.notification-history-item details {
  color: var(--danger);
  font-size: var(--type-caption);
}

.notification-history-item details ul {
  margin: var(--space-2) 0 0;
  padding-left: var(--space-5);
}

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

  .notification-broadcasts__layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .notification-device-summary .c-card__header {
    align-items: flex-start;
    gap: var(--space-2);
  }

  .notification-device-summary__updated {
    text-align: left;
  }

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

  .notification-audience__options,
  .notification-recipient-picker__toolbar {
    grid-template-columns: 1fr;
  }

  .notification-composer__actions,
  .notification-history-item__head,
  .notification-history-item__meta {
    align-items: stretch;
    flex-direction: column;
  }

  .notification-composer__actions .c-button,
  .notification-recipient-picker__toolbar .c-button {
    width: 100%;
  }

  .notification-delivery {
    align-self: flex-start;
  }
}


.c-broadcasts > .mkt-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: var(--space-4); }
.c-broadcasts [role="tabpanel"][hidden] { display: none; }
.c-broadcasts .c-card__description { margin-top: var(--space-2); }
.c-broadcasts .c-field__label { text-transform: none; font-size: var(--type-body); font-weight: var(--weight-medium); letter-spacing: normal; }
.c-broadcasts .c-field__hint { color: var(--muted); }
.notification-feed-composer { display: grid; gap: var(--space-4); }
.notification-feed-files { display: grid; gap: var(--space-2); }
.notification-feed-file { display: flex; align-items: center; gap: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--space-2); }
.notification-feed-file img { width: var(--control-height-lg); height: var(--control-height-lg); object-fit: cover; border-radius: var(--radius-sm); }
.notification-feed-file span { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: var(--type-body); }
.notification-feed-history { margin-top: var(--space-4); }
.notification-feed-history article { padding-block: var(--space-3); border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.notification-feed-history p { color: var(--muted); font-size: var(--type-body); white-space: pre-wrap; }
.notification-feed-history h3 { margin: 0; font-size: var(--type-body); font-weight: var(--weight-heading); }
.announcement-media { margin-block: var(--space-3); display: grid; gap: var(--space-2); }
.announcement-media .c-button { overflow-wrap: anywhere; white-space: normal; }
.announcement-media .photo-grid:empty, .announcement-media .blog-actions:empty { display: none; }

.notification-feed-attach { color: var(--muted); }
.notification-feed-attach .ui-icon { width: var(--nav-icon-size); height: var(--nav-icon-size); }

/* Marketing report actions share the feed card presentation in every workspace. */
.c-marketing-report {
  min-width: 0;
  scroll-margin-block: var(--space-6);
}

.c-marketing-report:focus {
  outline: 0;
}

.mkt-report-card__header {
  min-width: 0;
  align-items: center;
}

.mkt-report-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
}

@media (max-width: 700px) {
  .mkt-report-card__header {
    display: grid;
  }

  .mkt-report-card__actions {
    width: 100%;
  }

  .mkt-report-card__actions .c-button {
    flex: 1 1 auto;
  }
}
