﻿html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(0, 91, 195, 0.5);
}

/* The footer sits at the bottom of short pages: the body is a column and the page area grows. */
.app-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ==== Design system ====
   Tokens and shared components used across the app. Bootstrap 5 defaults (system font, white
   surface, Bootstrap greys) plus the MOST brand palette, with Bridge Blue as the one UI accent. */

:root {
  /* MOST brand palette (brand specification sheet, Nov 2026). Cyan, steel, orange and amber are
     too light or too loud for UI state; they appear only in the brand mark. */
  --sit-navy: #001B45;   /* Midnight Navy: the wordmark */
  --sit-cyan: #00C6F4;   /* Electric Cyan */
  --sit-steel: #5B6570;  /* Steel Transition */
  --sit-orange: #FF7900; /* Signal Orange */
  --sit-amber: #FFB000;  /* Golden Amber */

  --sit-text: #212529;
  --sit-muted: #495057;
  --sit-accent: #005BC3; /* Bridge Blue */
  --sit-accent-hover: #004DA6;
  --sit-accent-tint: #E6EFF9;
  --sit-accent-line: #B3CEED;
  --sit-accent-ink: #003B7F;
  /* The faintest accent fill: a selected row or option. */
  --sit-accent-wash: #F2F7FC;
  --bs-link-color-rgb: 0, 91, 195;
  --bs-link-hover-color-rgb: 0, 77, 166;
  /* Bootstrap's table banding grey (rgba(0,0,0,.05) on white). */
  --sit-band: #F2F2F2;
  --sit-band-hover: #E9ECEF;
  --sit-border: var(--bs-border-color); /* #dee2e6 */
  --sit-border-strong: #CED4DA;
  --sit-danger: #B42318;
  --sit-danger-tint: #FCEBE9;
}

.min-w-0 {
  min-width: 0;
}

.text-accent {
  color: var(--sit-accent) !important;
}

/* ---- Buttons ---- */

.btn-primary {
  --bs-btn-bg: var(--sit-accent);
  --bs-btn-border-color: var(--sit-accent);
  --bs-btn-hover-bg: var(--sit-accent-hover);
  --bs-btn-hover-border-color: var(--sit-accent-hover);
  --bs-btn-active-bg: var(--sit-accent-hover);
  --bs-btn-active-border-color: var(--sit-accent-hover);
  --bs-btn-disabled-bg: var(--sit-accent);
  --bs-btn-disabled-border-color: var(--sit-accent);
  font-weight: 600;
}

.btn-quiet {
  --bs-btn-color: var(--sit-text);
  --bs-btn-bg: #fff;
  --bs-btn-border-color: var(--sit-border);
  --bs-btn-hover-color: var(--sit-text);
  --bs-btn-hover-bg: var(--sit-band);
  --bs-btn-hover-border-color: var(--sit-border-strong);
  --bs-btn-active-color: var(--sit-text);
  --bs-btn-active-bg: #E6E6E6;
  --bs-btn-active-border-color: var(--sit-border-strong);
  font-weight: 500;
}

.btn-icon,
.btn-icon-spacer {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  color: var(--sit-muted);
}

/* A quiet button that holds only an icon, sized to sit beside regular buttons. */
.btn-square {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sit-muted);
}

.btn-icon:hover,
.btn-icon[aria-expanded="true"] {
  background: var(--sit-band);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--sit-accent);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
}

.link-arrow:hover {
  color: var(--sit-accent-hover);
}

.link-arrow svg {
  transition: transform 120ms ease;
}

.link-arrow:hover svg {
  transform: translateX(2px);
}

.form-check-input:checked {
  background-color: var(--sit-accent);
  border-color: var(--sit-accent);
}

/* ---- Surfaces ---- */

.sit-card {
  background: #fff;
  border: 1px solid var(--sit-border);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(33, 37, 41, 0.04);
}

.section-label {
  margin-bottom: 2px;
  color: var(--sit-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sit-note {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--sit-band);
  color: var(--sit-muted);
  font-size: 0.8125rem;
  line-height: 1.45;
}

/* Empty area the viewer can fill: dashed outline plus the action that fills it. */
.sit-empty {
  padding: 20px;
  border: 1px dashed var(--sit-border-strong);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

/* Area the viewer can't see into: band-grey fill and a lock. */
.sit-locked {
  padding: 20px;
  border-radius: 10px;
  background: var(--sit-band);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  color: var(--sit-muted);
}

.sit-empty-title,
.sit-locked-title {
  color: var(--sit-text);
  font-size: 0.875rem;
  font-weight: 600;
}

.sit-empty-text,
.sit-locked-text {
  max-width: 260px;
  color: var(--sit-muted);
  font-size: 0.8125rem;
  line-height: 1.45;
}

/* ---- Tables and figures ---- */

/* Cells are transparent so they don't paint square corners over the card's rounded border. */
.sit-table {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: var(--sit-band);
  margin: 0;
  font-size: 0.8125rem;
}

.sit-table th {
  padding: 10px 16px;
  background: var(--sit-band);
  border-bottom-color: var(--sit-border);
  color: var(--sit-muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.sit-table td {
  padding: 12px 16px;
  border-bottom-color: var(--sit-border);
}

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

/* A table that starts its card (nothing above it) keeps the card's rounded top corners on its header band. */
.sit-card > .sit-table:first-child > thead > tr:first-child > th:first-child,
.sit-card > .table-responsive:first-child > .sit-table > thead > tr:first-child > th:first-child {
  border-top-left-radius: 13px;
}

.sit-card > .sit-table:first-child > thead > tr:first-child > th:last-child,
.sit-card > .table-responsive:first-child > .sit-table > thead > tr:first-child > th:last-child {
  border-top-right-radius: 13px;
}

/* Keep the last row's hover inside the card's rounded corners. */
.sit-table > tbody > tr:last-child > td:first-child {
  border-bottom-left-radius: 13px;
}

.sit-table > tbody > tr:last-child > td:last-child {
  border-bottom-right-radius: 13px;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.stat-tile {
  padding: 16px 18px;
  border: 1px solid var(--sit-border);
  border-radius: 12px;
}

.stat-label,
.stat-note {
  color: var(--sit-muted);
  font-size: 0.75rem;
}

.stat-label {
  font-weight: 500;
}

.stat-value {
  margin: 6px 0;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.sit-breadcrumb {
  --bs-breadcrumb-divider-color: #ADB5BD;
  --bs-breadcrumb-item-active-color: var(--sit-text);
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
}

.sit-breadcrumb a {
  color: var(--sit-muted);
  text-decoration: none;
}

.sit-breadcrumb a:hover {
  color: var(--sit-accent);
  text-decoration: underline;
}

.sit-breadcrumb .active {
  font-weight: 500;
}

/* A value shown in a form that can't be changed there. */
.sit-readonly-field {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--sit-band);
  color: var(--sit-text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sit-readonly-field svg {
  flex-shrink: 0;
  color: var(--sit-muted);
}

/* ---- Overlays ---- */

.dropdown-menu {
  --bs-dropdown-border-color: var(--sit-border);
  --bs-dropdown-border-radius: 12px;
  --bs-dropdown-padding-x: 6px;
  --bs-dropdown-padding-y: 6px;
  --bs-dropdown-item-border-radius: 8px;
  --bs-dropdown-font-size: 0.8125rem;
  --bs-dropdown-link-hover-bg: var(--sit-band);
  --bs-dropdown-link-active-bg: var(--sit-band);
  --bs-dropdown-link-active-color: var(--sit-text);
  min-width: 200px;
  box-shadow: 0 12px 32px rgba(33, 37, 41, 0.14), 0 2px 6px rgba(33, 37, 41, 0.06);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  font-weight: 500;
}

.dropdown-item.text-danger:hover {
  background: var(--sit-danger-tint);
}

.sit-offcanvas {
  --bs-offcanvas-width: 480px;
}

.sit-offcanvas .offcanvas-header,
/* Set by panels.js while a panel reopens after a page reload: no slide, no fade. */
.no-panel-motion .offcanvas,
.no-panel-motion .offcanvas-backdrop {
  transition: none !important;
}

.sit-offcanvas .offcanvas-body {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.sit-modal .modal-content {
  border: 0;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(33, 37, 41, 0.22);
}

.sit-modal .btn-danger {
  --bs-btn-bg: var(--sit-danger);
  --bs-btn-border-color: var(--sit-danger);
  font-weight: 600;
}

/* ---- People ---- */

.user-avatar {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.user-avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 0.6875rem;
}

.user-avatar-lg {
  width: 40px;
  height: 40px;
}

.avatar-0 { background: #005BC3; }
.avatar-1 { background: #8A4B2A; }
.avatar-2 { background: #5B3E96; }
.avatar-3 { background: #2D5874; }
.avatar-4 { background: #1F6150; }
.avatar-5 { background: #7A5A00; }
.avatar-6 { background: #8C2F5A; }
.avatar-7 { background: #A13A1F; }
.avatar-8 { background: #0E6B7A; }
.avatar-9 { background: #55621A; }
.avatar-10 { background: #7B3F8F; }
.avatar-11 { background: #455060; }

.user-avatar.is-invited {
  background: #fff;
  color: var(--sit-muted);
  border: 1px dashed var(--sit-border);
}

.user-avatar.is-deactivated {
  background: var(--sit-border);
  color: var(--sit-muted);
}

/* Overlapping faces, e.g. a portfolio's members. */
.avatar-stack {
  display: inline-flex;
  align-items: center;
}

.avatar-stack > * {
  box-shadow: 0 0 0 2px #fff;
}

.avatar-stack > * + * {
  margin-left: -8px;
}

.avatar-overflow {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--sit-band);
  color: var(--sit-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 600;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 600;
}

.user-email {
  color: var(--sit-muted);
  font-size: 0.8125rem;
}

.you-tag {
  flex-shrink: 0;
  padding: 1px 6px;
  border: 1px solid var(--sit-border);
  border-radius: 4px;
  color: var(--sit-muted);
  font-size: 0.6875rem;
  font-weight: 600;
}

/* ---- Tags ---- */

.role-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.role-chip {
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

/* One hue, stepped by privilege: filled > tinted > outlined > neutral. Class names are the role enums. */
.role-OrganizationAdministrator { background: var(--sit-accent); border-color: var(--sit-accent); color: #fff; }
.role-UserAdministrator,
.role-Administrator { background: var(--sit-accent-tint); border-color: var(--sit-accent-tint); color: var(--sit-accent-ink); }
.role-PortfolioManager { background: #fff; border-color: var(--sit-accent-line); color: var(--sit-accent-ink); }
.role-User,
.role-Contributor { background: #fff; border-color: var(--sit-border); color: var(--sit-muted); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--dot-fill);
  box-shadow: inset 0 0 0 2px var(--dot);
}

/* Filled dot = settled; hollow dot = waiting on something. */
.status-active { color: #1F5E3B; --dot: #2F8A57; --dot-fill: #2F8A57; }
.status-awaiting { color: var(--sit-accent-ink); --dot: var(--sit-accent); --dot-fill: #fff; }
.status-invited { color: #7A4B00; --dot: #B86E00; --dot-fill: #fff; }
.status-deactivated { color: var(--sit-muted); --dot: #ADB5BD; --dot-fill: #ADB5BD; }

/* A revision's processing state (see _RevisionStatus). */
.status-processed { color: #1F5E3B; --dot: #2F8A57; --dot-fill: #2F8A57; }
.status-processing { color: var(--sit-accent-ink); --dot: var(--sit-accent); --dot-fill: #fff; }
.status-failed { color: var(--sit-danger); --dot: var(--sit-danger); --dot-fill: var(--sit-danger); }
.status-none { color: var(--sit-muted); --dot: #ADB5BD; --dot-fill: #fff; }

/* A status that opens its details (e.g. which tasks are missing an ID). */
.status-link { text-decoration: none; }
.status-link:hover .status, .status-link:focus-visible .status { text-decoration: underline; }

.latest-tag {
  flex-shrink: 0;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--sit-accent-tint);
  color: var(--sit-accent-ink);
  font-size: 0.6875rem;
  font-weight: 600;
}

/* A key milestone's field = value, e.g. "Text12 = KM01". */
.km-key {
  font-family: var(--bs-font-monospace);
  font-size: 0.8125rem;
}

/* ---- Page headers and tabs ---- */

.page-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--sit-accent-tint);
  color: var(--sit-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* No overflow scrolling here: the active tab's underline overlaps the bar's border by 1px, which
   made the bar scroll vertically and show a scroll control. Tabs wrap on narrow screens instead. */
.sit-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--sit-border);
}

.sit-tab {
  height: 44px;
  margin-bottom: -1px;
  padding: 0 14px;
  border-bottom: 2px solid transparent;
  color: var(--sit-muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Tabs can be links (page tabs) or buttons (in-page tabs); strip the button look from the latter. */
button.sit-tab {
  border-top: 0;
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  background: transparent;
}

.sit-tab:hover {
  color: var(--sit-text);
}

.sit-tab.active {
  border-bottom-color: var(--sit-accent);
  color: var(--sit-text);
  font-weight: 600;
}

.sit-tab .count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--sit-band);
  color: var(--sit-muted);
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Label / value pairs, e.g. the latest revision's details. */
.detail-list {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  row-gap: 8px;
  font-size: 0.8125rem;
}

.detail-list dt {
  color: var(--sit-muted);
  font-weight: 400;
}

.detail-list dd {
  margin: 0;
}

/* Read-only facts inside a panel, e.g. the file and dates in Edit revision. */
.detail-box {
  padding: 16px;
  border-radius: 12px;
  background: var(--sit-band);
}

/* ---- Filters ---- */

.filter-pill {
  height: 34px;
  padding: 0 10px 0 14px;
  border: 1px solid var(--sit-border);
  border-radius: 999px;
  background: #fff;
  color: var(--sit-text);
  font-size: 0.8125rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.filter-pill:hover {
  border-color: var(--sit-border-strong);
}

.filter-pill .count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--sit-band);
  color: var(--sit-muted);
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.filter-pill[aria-pressed="true"] {
  background: var(--sit-text);
  border-color: var(--sit-text);
  color: #fff;
}

.filter-pill[aria-pressed="true"] .count {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* ==== Users (Manage) ==== */

.users-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--sit-border);
}

.users-toolbar .form-select {
  width: auto;
  height: 34px;
  padding-top: 0;
  padding-bottom: 0;
  border-color: var(--sit-border);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
}

.users-search {
  position: relative;
  width: 280px;
}

.users-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--sit-muted);
  pointer-events: none;
}

.users-search .form-control {
  height: 34px;
  padding-left: 36px;
  border-color: var(--sit-border);
  border-radius: 10px;
  background: #fff;
  font-size: 0.8125rem;
}

.text-never {
  color: var(--sit-muted);
}

tr.is-deactivated .user-name { color: var(--sit-muted); }
tr.is-deactivated .role-chips { opacity: 0.55; }

.role-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--sit-border);
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.875rem;
}

.role-option .form-check-input {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.role-option:has(input:checked) {
  border-color: var(--sit-accent);
  box-shadow: 0 0 0 1px var(--sit-accent);
  background: var(--sit-accent-wash);
}

.role-option:has(input:disabled) {
  background: var(--sit-band);
  color: var(--sit-muted);
  cursor: not-allowed;
}

.role-option-desc {
  margin-top: 4px;
  color: var(--sit-muted);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.role-option-locked {
  margin-top: 4px;
  color: var(--sit-muted);
  font-size: 0.75rem;
  font-weight: 500;
}

/* ==== Portfolios ==== */

/* Three portfolios to a row; two, then one, as the window narrows. */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

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

@media (max-width: 767.98px) {
  .portfolio-grid { grid-template-columns: minmax(0, 1fr); }
}

.portfolio-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 372px;
  padding: 24px;
}

.portfolio-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--sit-accent-tint);
  color: var(--sit-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.portfolio-icon-lg {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.portfolio-name-link {
  color: inherit;
  text-decoration: none;
}

.portfolio-name-link:hover {
  color: var(--sit-accent);
  text-decoration: underline;
}

.portfolio-name {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.portfolio-meta {
  margin: 3px 0 0;
  color: var(--sit-muted);
  font-size: 0.8125rem;
}

.portfolio-projects {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.portfolio-projects .sit-empty,
.portfolio-projects .sit-locked {
  flex-grow: 1;
  min-height: 150px;
}

.project-link {
  height: 40px;
  padding: 0 10px 0 12px;
  border-radius: 8px;
  background: var(--sit-band);
  color: var(--sit-text);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-link:hover {
  background: var(--sit-band-hover);
  color: var(--sit-text);
}

.project-link svg {
  flex-shrink: 0;
  color: var(--sit-muted);
}

.portfolio-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--sit-border);
}

.members-button {
  height: 40px;
  margin-left: -6px;
  padding: 0 10px 0 6px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--sit-muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  font-weight: 500;
}

.members-button:hover {
  background: var(--sit-band);
}

.members-button .is-empty {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px dashed #ADB5BD;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 8px 0;
  border-bottom: 1px solid var(--sit-border);
}

.member-row:last-child {
  border-bottom: 0;
}

.member-row .form-select {
  width: 140px;
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 500;
}

/* Portfolio page: project rows */

.project-cell {
  max-width: 420px;
}

.project-name {
  color: var(--sit-text);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.project-name:hover {
  color: var(--sit-accent);
  text-decoration: underline;
}

/* ==== Projects and schedules ==== */

.source-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--sit-band);
  color: var(--sit-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Land below the page top when a link jumps to #source-{id}. */
.source-card {
  scroll-margin-top: 1rem;
}

.schedule-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 991.98px) {
  .schedule-overview {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Says a setting applies to the whole schedule, not the revision in front of you. */
.schedule-wide-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--sit-accent-line);
  border-radius: 12px;
  background: var(--sit-accent-wash);
  color: var(--sit-accent-ink);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.schedule-wide-note strong {
  font-weight: 600;
}

/* ---- Health checks ---- */

/* Check set picker: pills, the chosen one filled dark. */
/* The run's selectors: one row for what's being measured, one for which checks to list. */
.run-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.run-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
}

.check-set {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.check-pill {
  height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--sit-border);
  border-radius: 999px;
  background: #fff;
  color: var(--sit-text);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

.check-pill:hover { border-color: var(--sit-border-strong); }

.btn-check:checked + .check-pill {
  border-color: var(--sit-text);
  background: var(--sit-text);
  color: #fff;
}

.btn-check:focus-visible + .check-pill {
  outline: 2px solid var(--sit-accent);
  outline-offset: 2px;
}

/* The selected revision at a glance: status date, then task counts, then their split as a bar. */
.revision-glance {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px;
}

.revision-glance-facts {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(4, minmax(0, 1fr));
}

.glance-fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding-right: 20px;
}

.glance-divided {
  padding-left: 20px;
  border-left: 1px solid var(--sit-border);
}

.glance-value {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.glance-swatch {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.glance-complete { background: #2F8A57; }
.glance-in-progress { background: var(--sit-accent); }
.glance-not-started { background: var(--sit-border-strong); }

.glance-bar {
  display: flex;
  gap: 2px;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--sit-band);
}

@media (max-width: 991.98px) {
  .revision-glance-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 16px;
  }
  .glance-divided { padding-left: 0; border-left: 0; }
}

.outcome-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.outcome-tiles .stat-tile {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.outcome-tiles .stat-value {
  margin: 0;
}

.outcome-tiles .is-failing {
  border-color: #F1C5C0;
  background: var(--sit-danger-tint);
}

.outcome-tiles .is-failing .stat-value {
  color: var(--sit-danger);
}

/* Passed matches the Pass chip, as failed matches the Fail chip. */
.outcome-tiles .is-passing {
  border-color: #C4E0CF;
  background: #E3F1E8;
}

.outcome-tiles .is-passing .stat-value {
  color: #1F5E3B;
}

/* The tiles are also the passed / failed filter. */
.outcome-filter {
  width: 100%;
  align-items: center !important;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
}

.outcome-filter:hover:not(:disabled) { border-color: var(--sit-border-strong); }

.outcome-filter.is-active {
  border-color: var(--sit-accent);
  box-shadow: 0 0 0 3px var(--sit-accent-tint);
}

.outcome-tiles.is-filtering .outcome-filter:not(.is-active) { opacity: 0.6; }

.outcome-filter-hint {
  margin-left: auto;
  color: #ADB5BD;
  font-size: 0.75rem;
  font-weight: 500;
}

.outcome-filter.is-active .outcome-filter-hint { color: var(--sit-accent); }
.outcome-filter:disabled { cursor: default; }
.outcome-filter:disabled .outcome-filter-hint { visibility: hidden; }

/* Filtered: the last visible check closes the card. */
.health-table > tbody > tr.last-shown:not(.is-open) > td { border-bottom: 0; }

.outcome-chip {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.outcome-pass { background: #E3F1E8; color: #1F5E3B; }
.outcome-fail { background: var(--sit-danger-tint); color: var(--sit-danger); }
.outcome-muted { background: var(--sit-band); color: var(--sit-muted); }
.outcome-error { background: #FDF6E7; color: #7A4B00; }

.health-row[data-drawer] { cursor: pointer; }
.health-row[data-drawer]:hover > td { background: #FAFAFA; }

/* A plain chevron (no box) that turns when its details open. */
.health-expander {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--sit-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.health-expander:hover { color: var(--sit-text); }

.health-expander svg { transition: transform 120ms ease; }
.health-expander[aria-expanded="true"] svg { transform: rotate(90deg); }

/* An open check reads as one block: a faint band and an accent edge down its row and details.
   Child selectors only, so none of this reaches the flagged-tasks table nested in the details. */
.health-table > tbody > tr.is-open > td { background: #FAFAFA; }
.health-table > tbody > tr.is-open > td:first-child { box-shadow: inset 3px 0 0 var(--sit-accent); }
.health-table > tbody > tr.health-row.is-open > td { border-bottom-color: transparent; }

/* The drawer row sits flush under its check; only the open one shows, closing the block. */
.sit-table > tbody > .health-drawer-row > td { border-bottom: 0; }
.sit-table > tbody > .health-drawer-row.is-open > td { border-bottom: 1px solid var(--sit-border); }
.sit-table > tbody > .health-drawer-row.is-open:last-child > td { border-bottom: 0; }

/* Lined up under the Check column (expander column + cell padding). */
.health-drawer {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 20px 20px 64px;
}

.health-about {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.health-about p {
  margin: 0;
  color: var(--sit-muted);
  font-size: 0.8125rem;
  line-height: 1.55;
}

/* Information, not a control: no border. */
.leaves-pill {
  padding: 3px 8px;
  border-radius: 999px;
  background: #E9ECEF;
  color: var(--sit-muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.health-findings {
  border: 1px solid var(--sit-border);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.health-findings-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--sit-border);
  font-size: 0.8125rem;
}

.health-findings th {
  padding: 7px 14px;
  background: var(--sit-band);
  color: var(--sit-muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.health-findings td {
  padding: 8px 14px;
  background: #fff;
  font-size: 0.8125rem;
}

.health-findings tbody tr:last-child td { border-bottom: 0; }

/* All findings, scrolling past about 15 rows with the header kept in view. */
.health-findings-scroll {
  max-height: 36rem;
  overflow-y: auto;
}

.health-findings thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

/* Sortable headers: the arrow shows the current order, faint until a column is sorted. */
.sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

.sort-btn:hover { color: var(--sit-text); }
.sort-arrow::after { content: "↕"; opacity: 0.35; }
th[aria-sort="ascending"] .sort-arrow::after { content: "▲"; opacity: 1; font-size: 0.6rem; }
th[aria-sort="descending"] .sort-arrow::after { content: "▼"; opacity: 1; font-size: 0.6rem; }
th[aria-sort="ascending"] .sort-btn,
th[aria-sort="descending"] .sort-btn { color: var(--sit-text); }

.health-none {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1F5E3B;
  font-size: 0.8125rem;
}

/* ---- Schedule settings ---- */

/* A titled section: its explanation on the left, its fields on the right. */
.settings-section {
  display: grid;
  grid-template-columns: 18rem minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
  margin-bottom: 2rem;
}

@media (max-width: 991.98px) {
  .settings-section {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }
}

.settings-intro {
  padding-top: 4px;
}

/* Label, then a dropdown wide enough for the longest milestone option ("Baseline Duration ≤ 2 Days"),
   then the value field. One column width keeps every dropdown the same size. */
.marker-row {
  display: grid;
  grid-template-columns: 10rem 16.5rem minmax(0, 16rem);
  gap: 10px;
  align-items: center;
}

.settings-table .input-group {
  flex-wrap: nowrap;
}

/* Excluded task type toggles: outlined when off, accent tint when on. */
.exclusion-pill {
  padding: 4px 10px;
  border: 1px solid var(--sit-border);
  border-radius: 999px;
  background: #fff;
  color: var(--sit-muted);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.exclusion-pill:hover {
  border-color: var(--sit-border-strong);
}

.btn-check:checked + .exclusion-pill {
  border-color: var(--sit-accent-tint);
  background: var(--sit-accent-tint);
  color: var(--sit-accent-ink);
}

.btn-check:focus-visible + .exclusion-pill {
  outline: 2px solid var(--sit-accent);
  outline-offset: 2px;
}

/* Save and cancel stay in reach while scrolling a long list of checks. */
.settings-save-bar {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--sit-border);
  background: #fff;
}

/* ---- Key milestone analysis ---- */

.key-chip {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--sit-band);
  color: var(--sit-text);
}

/* What's being compared, in one line above the tabs. */
.compare-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 12px 12px 18px;
}

.compare-bar-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--sit-accent-tint);
  color: var(--sit-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.compare-empty {
  border: 1px dashed var(--sit-border-strong);
  border-radius: 14px;
}

/* Choose revisions: wide enough for full names, dates and uploaders side by side. */
.picker-panel { --bs-offcanvas-width: 760px; }

.picker-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.picker-table td { vertical-align: top; }
.picker-table label { cursor: pointer; }
.picker-table tr.is-picked > td { background: var(--sit-accent-wash); }
.picker-table tr.is-unavailable > td { color: var(--sit-muted); }

/* Two or three mutually exclusive options as one pill-shaped control (radio inputs + labels). */
.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 3px;
  border-radius: 10px;
  background: var(--sit-band);
}

.segmented label {
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--sit-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}

.segmented .btn-check:checked + label {
  background: #fff;
  color: var(--sit-text);
  box-shadow: 0 1px 2px rgba(33, 37, 41, 0.12);
}

.segmented .btn-check:focus-visible + label {
  outline: 2px solid var(--sit-accent);
  outline-offset: 1px;
}

/* A day change: red later, green earlier, grey none. */
.delta-chip {
  display: inline-block;
  padding: 3px 6px;
  border-radius: 6px;
  font-family: var(--bs-font-monospace);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.delta-chip.delta-later { background: var(--sit-danger-tint); color: var(--sit-danger); }
.delta-chip.delta-earlier { background: #E3F1E8; color: #1F5E3B; }
.delta-chip.delta-none { background: var(--sit-band); color: var(--sit-muted); }
strong.delta-later { color: var(--sit-danger); }
strong.delta-earlier { color: #1F5E3B; }

/* Path by revision: tasks that entered (green) or dropped off (red, struck through). */
.sit-table tr.path-added td { background: #EEF7F1; }
.sit-table tr.path-added td:first-child { color: #1F5E3B; }
.sit-table tr.path-removed td { background: #FDF1EF; }
.sit-table tr.path-removed td:first-child { color: var(--sit-danger); }
.sit-table tr.path-removed .path-name { text-decoration: line-through; }

.trend-table .text-danger { color: var(--sit-danger) !important; }
.trend-table .text-success { color: #1F5E3B !important; }
.trend-task { scroll-margin-top: 1rem; }

/* Where a predecessor link landed: the task's table, and the row for the revision you came from. */
.trend-task.is-jump-target {
  border-color: var(--sit-accent);
  box-shadow: 0 0 0 3px var(--sit-accent-tint);
  animation: jump-pulse 900ms ease-out;
}

.trend-table tr.is-jump-row > td { background: var(--sit-accent-wash); }
.trend-table tr.is-jump-row > td:first-child { box-shadow: inset 3px 0 0 var(--sit-accent); }

@keyframes jump-pulse {
  from { box-shadow: 0 0 0 10px rgba(0, 91, 195, 0.28); }
  to { box-shadow: 0 0 0 3px var(--sit-accent-tint); }
}

@media (prefers-reduced-motion: reduce) {
  .trend-task.is-jump-target { animation: none; }
}

/* Revision names can be long; they cut off with "…" and show in full on hover. */
.revision-cell { max-width: 22rem; }
/* Task trends: every task's table shares one set of column widths, and Revision gets the rest.
   The minimum keeps Revision readable on narrow screens; past it the table scrolls sideways. */
.trend-table { table-layout: fixed; min-width: 76rem; }
.trend-table .tc-measure { width: 5rem; }
.trend-table .tc-delta { width: 4.25rem; }
.trend-table .tc-date { width: 7rem; }
.trend-table .tc-constraint { width: 9rem; }
.trend-table .tc-preds { width: 10rem; }

/* Predecessors as "24*, 31": the commas come from CSS so markup whitespace can't sneak in. */
.pred-list { display: inline-flex; flex-wrap: wrap; }
.pred { white-space: nowrap; }
.pred + .pred::before { content: ","; margin-right: 0.35em; }
.path-step { min-width: 0; max-width: 60%; }

/* A task's metric header opens its trend chart. */
.trend-chart-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--sit-accent);
  font: inherit;
  font-weight: 500;
}

.trend-chart-btn:hover { color: var(--sit-accent-hover); text-decoration: underline; }

/* Why did it move? */
.why-panel {
  --bs-offcanvas-width: 600px;
}

.why-finish {
  padding: 16px;
  border-radius: 12px;
  background: var(--sit-band);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* A chart's Download menu: each item names its file type and says what the file holds. */
.chart-download-menu {
  width: 340px;
}

.chart-download-menu .dropdown-item {
  align-items: flex-start;
  white-space: normal;
}

.download-ext {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.download-csv { background: #EEF7F1; color: #1F5E3B; }
.download-png { background: var(--sit-accent-tint); color: var(--sit-accent); }

.why-bar {
  display: flex;
  gap: 2px;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
}

.why-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.why-drift { background: #ADB5BD; }
.why-tasks { background: var(--sit-danger); }
.why-reroute { background: #B86E00; }

.mover {
  padding: 12px 14px;
  border: 1px solid var(--sit-border);
  border-radius: 10px;
}

.mover-tag {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--sit-band);
  color: var(--sit-muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.mover-tag.is-longer { background: #FDF6E7; color: #7A4B00; }
.mover-tag.is-shorter { background: #E3F1E8; color: #1F5E3B; }
.mover-tag.is-calendar { background: var(--sit-accent-tint); color: var(--sit-accent-ink); }

.mover-dates {
  display: grid;
  grid-template-columns: 5rem 1fr;
  row-gap: 2px;
}

.mover-dates dt {
  font-weight: 400;
}

.mover-dates dd {
  margin: 0;
}

/* ---- Path by revision: the revision walk ---- */

.path-walk {
  padding: 14px 16px 12px;
}

/* One stop per revision, oldest to newest; scrolls sideways when there are more than fit. */
.walk-stops {
  position: relative; /* offsetLeft of each stop is measured from here */
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(9rem, 1fr);
  overflow-x: auto;
}

.walk-stop {
  position: relative;
  height: 84px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

/* The line: each stop draws its half of the link on either side. */
.walk-stop::before,
.walk-stop::after {
  content: "";
  position: absolute;
  top: 39px;
  width: 50%;
  height: 2px;
  background: var(--sit-border);
}

.walk-stop::before { left: 0; }
.walk-stop::after { right: 0; }
.walk-stop:first-child::before,
.walk-stop:last-child::after { background: transparent; }

/* The link into the chosen revision is the step being shown. */
.walk-stop.is-active:not(:first-child)::before,
.walk-stop.is-before-active::after {
  top: 38.5px;
  height: 3px;
  background: var(--sit-accent);
}

.walk-dot {
  position: absolute;
  top: 40px;
  left: 50%;
  width: 12px;
  height: 12px;
  box-sizing: border-box;
  border: 2px solid #ADB5BD;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
}

.walk-stop:hover .walk-dot { border-color: var(--sit-accent); }

.walk-stop.is-active .walk-dot {
  width: 16px;
  height: 16px;
  border-color: var(--sit-accent);
  background: var(--sit-accent);
  box-shadow: 0 0 0 4px var(--sit-accent-tint);
}

.walk-stop:focus-visible { outline: none; }
.walk-stop:focus-visible .walk-dot { outline: 2px solid var(--sit-accent); outline-offset: 4px; }

/* What changed on the path, sitting on the link between this revision and the one before. */
.walk-pill {
  position: absolute;
  top: 28px;
  left: 0;
  z-index: 1;
  padding: 3px 7px;
  border: 1px solid var(--sit-border);
  border-radius: 999px;
  background: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transform: translateX(-50%);
}

.walk-stop.is-active .walk-pill {
  border-color: var(--sit-accent-line);
  background: var(--sit-accent-tint);
}

.walk-label {
  position: absolute;
  top: 58px;
  left: 6px;
  right: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}

.walk-name {
  max-width: 100%;
  overflow: hidden;
  color: var(--sit-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.walk-stop.is-active .walk-name {
  color: var(--sit-text);
  font-weight: 600;
}

.segmented-sm label {
  padding-top: 4px;
  padding-bottom: 4px;
  font-size: 0.75rem;
}

/* ---- Page width ---- */

/* Wider than Bootstrap's .container (1320px max), with slimmer side margins on large screens. */
.sit-container {
  max-width: 1680px;
}

@media (min-width: 992px) {
  .sit-container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* ---- App header ---- */

.app-header {
  position: relative;
  z-index: 1030;
  background: #fff;
  border-bottom: 1px solid var(--sit-border);
}

.app-header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 60px;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--sit-text);
  text-decoration: none;
}

.app-brand:hover { color: var(--sit-text); }

.app-brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  /* Stand-in for the logo until its SVG arrives: the brand's cyan-to-orange bridge. */
  background: linear-gradient(135deg, var(--sit-cyan), var(--sit-accent) 45%, var(--sit-steel) 65%, var(--sit-orange));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The wordmark is Midnight Navy throughout. */
.app-brand-name {
  color: var(--sit-navy);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}


/* Section links: the current one is dark with the accent underline, like the page tabs. */
.app-nav {
  align-self: stretch;
  display: flex;
  gap: 4px;
}

.app-nav-link {
  display: flex;
  align-items: center;
  padding: 0 12px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--sit-muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.app-nav-link:hover { color: var(--sit-text); }

.app-nav-link.active {
  border-bottom-color: var(--sit-accent);
  color: var(--sit-text);
  font-weight: 600;
}

.app-user {
  height: 40px;
  padding: 0 8px 0 5px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--sit-text);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-user:hover,
.app-user[aria-expanded="true"] { background: var(--sit-band); }

.app-user svg { color: var(--sit-muted); }

.app-account-menu { width: 260px; }

/* The account button's two lines: your name, and the organization you're in. */
.app-user-text {
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  max-width: 220px;
  line-height: 1.2;
}

.app-user-name,
.app-user-org {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-user-org {
  color: var(--sit-muted);
  font-size: 0.75rem;
  font-weight: 400;
}

/* Account menu: the organizations list. */
.app-menu-section {
  /* Same left edge as the menu's items (.dropdown-item: 10px). */
  padding: 2px 10px 0;
  color: var(--sit-muted);
  font-size: 0.75rem;
}

.app-menu-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 600;
  cursor: default;
}

.app-menu-current:hover,
.app-menu-current:active { background: transparent; color: inherit; }

/* ---- App footer ---- */

.app-footer {
  border-top: 1px solid var(--sit-border);
  background: #fff;
}

.app-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  padding-bottom: 16px;
  color: var(--sit-muted);
  font-size: 0.75rem;
}

.app-footer-mark {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  background: #ADB5BD;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Progress meter (long-running forms) ---- */

.sit-progress .progress {
  height: 6px;
  background: var(--sit-band);
}

.sit-progress .progress-bar { background-color: var(--sit-accent); }
/* A meter's own row in a wrapping layout takes no space until there's something to show. */
.sit-progress-slot:not(:has(> :not([hidden]))) { display: none; }

/* ---- Task identifiers (why a revision was rejected) ---- */

.link-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--sit-muted);
  text-decoration: none;
}

.link-back:hover { color: var(--sit-accent); }

/* The verdict: danger-tinted, like a failing outcome tile, with the revision's facts underneath. */
.id-alert {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid #F1C5C0;
  border-radius: 14px;
  background: var(--sit-danger-tint);
  color: var(--sit-text);
  font-size: 0.875rem;
  line-height: 1.5;
}

.id-alert-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  background: #fff;
  color: var(--sit-danger);
  display: flex;
  align-items: center;
  justify-content: center;
}

.id-alert-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  min-width: 0;
  color: var(--sit-muted);
  font-size: 0.8125rem;
}

.id-tiles .is-failing {
  border-color: #F1C5C0;
  background: var(--sit-danger-tint);
}

.id-tiles .is-failing .stat-value { color: var(--sit-danger); }
.id-tiles .is-clear .stat-value { color: #1F5E3B; }

/* Long lists scroll inside their card, with the header kept in view. */
.id-table-scroll {
  max-height: 32rem;
  overflow-y: auto;
  border-radius: 0 0 14px 14px;
}

.id-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
}

.id-table td:first-child,
.id-table th:first-child { width: 4rem; }
.id-table td:nth-child(2),
.id-table th:nth-child(2) { width: 4rem; }

/* Each shared value heads its own group of tasks. */
.sit-table > tbody > tr.id-group-head > th {
  padding-top: 10px;
  padding-bottom: 10px;
  background: var(--sit-band);
  font-weight: 400;
}

.id-group-head .key-chip {
  border: 1px solid var(--sit-border);
  background: #fff;
}

.task-tag {
  flex-shrink: 0;
  padding: 1px 6px;
  border: 1px solid var(--sit-border);
  border-radius: 4px;
  color: var(--sit-muted);
  font-size: 0.6875rem;
  font-weight: 600;
}

.fix-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.fix-steps li::marker {
  color: var(--sit-accent);
  font-weight: 600;
}

/* Schedule sources: fixed layout so the columns' widths come from the colgroup, not the content,
   and every source's table lines up with the next. */
.source-table {
  table-layout: fixed;
}

.source-table td:first-child {
  overflow-wrap: anywhere;
}

/* ---- Organization settings ---- */

/* Each level indented under its parent, so the table reads as the structure it renames. */
.org-term-level {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.org-term-branch {
  color: var(--sit-muted);
  line-height: 1.5;
}

.org-terms td {
  min-width: 12rem;
}

/* The Organization card's fields: one column, at the width of a text box. */
.org-settings-field {
  max-width: 480px;
}

/* ---- Organization (tenant) sign-in landing: the picker and No organization pages ---- */

.tenant-landing {
  max-width: 560px;
  margin: 48px auto 0;
}

.tenant-choices {
  overflow: hidden;
}

.tenant-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 18px;
  border: 0;
  border-top: 1px solid var(--sit-border);
  background: #fff;
  color: var(--sit-text);
  text-align: left;
}

.tenant-choice:first-child { border-top: 0; }
.tenant-choice:hover:not(:disabled),
.tenant-choice:focus-visible { background: var(--sit-band); }
.tenant-choice:disabled { color: var(--sit-muted); cursor: not-allowed; }
.tenant-choice.is-current { box-shadow: inset 3px 0 0 var(--sit-accent); }

.tenant-choice-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
}

.tenant-choice-note {
  color: var(--sit-muted);
  font-size: 0.875rem;
}


/* ---- IMS platform area and organization settings ---- */


/* The nav link: an accent pill, so it's obvious this is outside any one organization. */
.app-nav-link.app-nav-platform span {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--sit-accent);
  color: #fff;
}

/* Platform cards span the page like everywhere else; only their text boxes stay short, so an
   email or domain field with its button doesn't stretch across the screen. */
.platform-form .form-control,
.platform-inline .form-control {
  max-width: 420px;
}

/* The approval link is long: give it room, but not the whole page. */
.platform-form .input-group {
  max-width: 760px;
}

.platform-form .input-group .form-control {
  max-width: none;
}

/* Label / value pairs on an organization's overview: labels in a narrow column, values right beside them. */
.platform-facts {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr);
  gap: 8px 16px;
}

.platform-facts dt { font-weight: 600; }
.platform-facts dd { margin: 0; overflow-wrap: anywhere; }

.platform-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
