:root {
  --page: #f5f7f8;
  --surface: #ffffff;
  --surface-strong: #f9faf9;
  --line: #d9dfdf;
  --line-strong: #b8c2c1;
  --text: #18211f;
  --muted: #62706d;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-soft: #d9f0ed;
  --blue: #2f5f98;
  --violet: #684d8f;
  --amber: #a56514;
  --red: #aa3c3c;
  --green: #21724b;
  --shadow: 0 18px 42px rgba(33, 43, 41, 0.12);
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.08) 0 1px, transparent 1px 80px),
    linear-gradient(180deg, rgba(47, 95, 152, 0.05) 0 1px, transparent 1px 80px),
    var(--page);
  color: var(--text);
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ui-icon {
  display: block;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.button--icon .ui-icon {
  width: 23px;
  height: 23px;
}

.ui-icon--customize-image,
.ui-icon--summary-customize-image {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  object-fit: cover;
}

.ui-icon--summary-customize-image {
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1580px, 100%);
  margin: 0 auto;
  padding: 22px;
}

body:not(.is-logged-in) .app-shell {
  display: none;
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 22px;
}

body.is-logged-in .login-page {
  display: none;
}

body:not(.has-customer-selected) .dashboard-view {
  display: none;
}

body.has-customer-selected .customer-hub {
  display: none;
}

.login-card {
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.login-card h1 {
  margin: 0 0 18px;
  font-size: 1.5rem;
  line-height: 1.2;
}

.login-card .button {
  width: 100%;
  margin-top: 16px;
}

.login-reset-link {
  justify-self: center;
  margin-top: 12px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.topbar h1,
.tracker-toolbar h2,
.panel-block h2,
.dialog-header h2 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: 1.4rem;
  line-height: 1.2;
}

.topbar__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.pdf-audit-stamp {
  display: none;
}

.report-menu {
  position: relative;
  display: inline-flex;
}

.report-menu__panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  display: none;
  min-width: 188px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.report-menu:hover .report-menu__panel,
.report-menu:focus-within .report-menu__panel,
.report-menu.is-open .report-menu__panel {
  display: grid;
  gap: 6px;
}

.report-menu__panel .button {
  justify-content: flex-start;
  width: 100%;
}

.customer-hub,
.customer-context {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(33, 43, 41, 0.07);
}

.hub-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
}

.customer-context {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(660px, 1.35fr);
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
}

.hub-header h2,
.customer-context h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.25;
}

.customer-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 18px 18px;
}

.customer-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.customer-card.is-rejected,
.customer-context.is-rejected {
  border-color: rgba(170, 60, 60, 0.45);
  background:
    linear-gradient(180deg, rgba(170, 60, 60, 0.11), rgba(255, 255, 255, 0.96) 46%),
    var(--surface);
  box-shadow: 0 10px 24px rgba(170, 60, 60, 0.13);
}

.customer-card.is-rejected h3,
.customer-context.is-rejected h2 {
  color: var(--red);
}

.customer-card h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.25;
}

.customer-card__title,
.customer-context__title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.customer-card__badges {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.customer-card__badges--context {
  align-items: center;
}

.customer-status-badge {
  display: inline-flex;
  max-width: 100%;
}

.customer-status-panel {
  display: inline-grid;
  gap: 3px;
  justify-items: end;
}

.customer-status-panel small {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.project-id-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 950;
  white-space: nowrap;
}

.customer-card__meta {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.customer-card__stats,
.customer-context__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.customer-context__finance {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
}

.customer-context__finance .customer-context__stats,
.customer-context__finance .tax-panel {
  display: contents;
}

.customer-context__finance .customer-context__stats .mini-stat {
  grid-column: span 4;
}

.customer-context__finance .tax-panel__toggle,
.customer-context__finance .tax-panel__percent {
  grid-column: span 2;
}

.customer-context__finance .tax-panel .mini-stat {
  grid-column: span 3;
}

.customer-context__finance .tax-panel .mini-stat--tax-base {
  grid-column: span 3;
}

.customer-context__finance .tax-panel.is-disabled .mini-stat--tax-base {
  grid-column: span 10;
}

.customer-context__finance .tax-panel .mini-stat--tax-amount {
  grid-column: span 2;
}

.mini-stat {
  min-height: 62px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-strong);
}

.mini-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.mini-stat strong {
  display: block;
  margin-top: 5px;
  line-height: 1.2;
  word-break: break-word;
}

.mini-stat small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
}

.mini-stat--filter {
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.mini-stat--filter:hover,
.mini-stat--filter:focus-visible,
.mini-stat--filter.is-active {
  border-color: rgba(15, 118, 110, 0.48);
  background: rgba(15, 118, 110, 0.08);
  outline: none;
}

.mini-stat--filter.is-active strong {
  color: var(--primary-dark);
}

.mini-stat--cost-filter {
  position: relative;
  z-index: 4;
}

.mini-stat--cost-filter.is-open {
  border-color: rgba(15, 118, 110, 0.42);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.mini-stat__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mini-stat__heading span {
  min-width: 0;
}

.mini-stat__menu-button {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--primary-strong);
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.mini-stat__menu-button:hover,
.mini-stat__menu-button:focus-visible {
  border-color: rgba(15, 118, 110, 0.42);
  background: rgba(15, 118, 110, 0.08);
  outline: none;
}

.actual-cost-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: min(430px, 80vw);
  max-width: 430px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

.actual-cost-menu__actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.actual-cost-menu__list {
  display: grid;
  gap: 4px;
  max-height: 260px;
  margin-top: 8px;
  overflow-y: auto;
}

.actual-cost-menu__item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 6px;
  border-radius: 6px;
  cursor: pointer;
}

.actual-cost-menu__item:hover {
  background: rgba(15, 118, 110, 0.06);
}

.actual-cost-menu__item input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.actual-cost-menu__item span {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: none;
  overflow-wrap: anywhere;
}

.actual-cost-menu__item strong {
  margin-top: 0;
  font-size: 0.78rem;
  white-space: nowrap;
}

.actual-cost-menu__empty {
  padding: 14px 6px;
  color: var(--muted);
  font-size: 0.8rem;
}

.mini-stat--accent {
  border-color: rgba(15, 118, 110, 0.36);
  background: rgba(15, 118, 110, 0.08);
}

.tax-panel {
  display: grid;
  grid-template-columns: minmax(104px, 0.65fr) minmax(112px, 0.8fr) repeat(3, minmax(132px, 1fr));
  gap: 8px;
}

.tax-panel__toggle,
.tax-panel__percent {
  min-height: 62px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-strong);
}

.tax-panel__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 900;
}

.tax-panel__toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.tax-panel__percent {
  display: grid;
  gap: 5px;
}

.tax-panel__percent span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.tax-panel__percent input {
  width: 100%;
  min-width: 0;
  padding: 5px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
  font-weight: 850;
}

.tax-panel__percent input:disabled {
  color: var(--muted);
  background: #eef2f1;
}

.customer-card__actions,
.customer-context__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.customer-context__actions {
  align-items: center;
  padding-top: 2px;
}

.customer-context__main {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.customer-context__main--summary {
  justify-self: stretch;
}

.customer-context__notes {
  max-width: 72ch;
  color: var(--muted);
  line-height: 1.45;
}

.empty-hub {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--muted);
  text-align: center;
}

.admin-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

body.is-admin .admin-pill {
  border-color: rgba(33, 114, 75, 0.28);
  background: rgba(33, 114, 75, 0.12);
  color: var(--green);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.button,
.link-button {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-weight: 750;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  text-decoration: none;
  white-space: nowrap;
}

.button--small {
  min-height: 30px;
  padding: 0 10px;
  font-size: 0.8rem;
}

[hidden] {
  display: none !important;
}

.button span[aria-hidden="true"] {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 5px;
  background: var(--surface-strong);
  color: var(--primary-dark);
  font-size: 0.72rem;
  font-weight: 900;
}

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

.hub-search input {
  width: min(360px, 58vw);
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  padding: 0 12px;
  font-weight: 760;
}

.button--primary {
  border-color: var(--primary-dark);
  background: var(--primary);
  color: #ffffff;
}

.button--primary span[aria-hidden="true"] {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.button--icon {
  width: 38px;
  min-width: 38px;
  padding: 0;
}

.command-button {
  flex: 0 0 auto;
  --icon-primary: var(--primary-dark);
  --icon-secondary: #e6f3f1;
  --icon-accent: var(--primary);
  --icon-muted: #7d8b88;
  --icon-on-accent: #ffffff;
  color: var(--icon-primary);
}

.button.command-button span[aria-hidden="true"] {
  font-size: 0.95rem;
}

.button--primary.command-button,
.button--primary .ui-icon {
  --icon-primary: #ffffff;
  --icon-secondary: rgba(255, 255, 255, 0.18);
  --icon-accent: rgba(255, 255, 255, 0.22);
  --icon-on-accent: #ffffff;
}

.command-button[data-icon="home"] {
  --icon-primary: #146a63;
  --icon-secondary: #e3f3f0;
  --icon-accent: #279f8d;
}

.command-button[data-icon="customize"] {
  border-color: rgba(12, 111, 181, 0.42);
  background: #f4faff;
}

.command-button[data-icon="summary-customize"] {
  border-color: rgba(15, 118, 110, 0.38);
  background: #eef9f7;
}

.command-button[data-icon="settings"],
.command-button[data-icon="quick-edit"],
.command-button[data-icon="edit"] {
  --icon-primary: #274f74;
  --icon-secondary: #e7eff8;
  --icon-accent: #f1a328;
}

.command-button[data-icon="mail-settings"] {
  --icon-primary: #173b55;
  --icon-secondary: #e8f3ff;
  --icon-accent: #f0a530;
}

.command-button[data-icon="users"] {
  --icon-primary: #6b7472;
  --icon-accent: #8c9694;
}

.command-button[data-icon="password"] {
  --icon-primary: #2776bd;
  --icon-secondary: #eaf3ff;
  --icon-accent: #f3c25f;
  --icon-muted: #737e7c;
}

.command-button[data-icon="history"] {
  --icon-primary: #d01920;
  --icon-accent: #d01920;
}

.command-button[data-icon="backup"] {
  --icon-primary: #62b824;
  --icon-secondary: #eef2f1;
  --icon-muted: #899390;
}

.command-button[data-icon="restore"] {
  --icon-primary: #5fb92b;
  --icon-secondary: #eef2f1;
  --icon-muted: #899390;
}

.command-button[data-icon="export"] {
  --icon-primary: #58b91f;
  --icon-secondary: #f8faf9;
  --icon-muted: #687472;
}

.command-button[data-icon="print"] {
  --icon-primary: #111817;
  --icon-secondary: #ffffff;
  --icon-accent: #111817;
}

.command-button[data-icon="logout"] {
  --icon-primary: #a23f3f;
  --icon-secondary: #fff0f0;
  --icon-accent: #c05050;
}

.command-button[data-icon="filter"],
.command-button[data-icon="category"],
.command-button[data-icon="reset-columns"],
.command-button[data-icon="columns"],
.command-button[data-icon="summary-customize"] {
  --icon-primary: #0f6f68;
  --icon-secondary: #e5f5f2;
  --icon-accent: #0f766e;
}

.command-button[data-icon="priority"] {
  --icon-primary: #a96514;
  --icon-secondary: #fff3dc;
  --icon-accent: #d01920;
}

.topbar__actions .report-menu {
  flex: 0 0 auto;
  width: auto;
}

.topbar__actions .report-menu > .button {
  width: 38px;
}

.button.is-locked,
.admin-control.is-locked {
  opacity: 0.6;
}

.admin-hint {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

body.is-admin .admin-hint {
  display: none;
}

.link-button {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary-dark);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.metric {
  min-height: 88px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(33, 43, 41, 0.07);
}

button.metric {
  color: inherit;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

button.metric:hover,
button.metric:focus-visible,
button.metric.is-active {
  border-color: rgba(15, 118, 110, 0.48);
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.1), transparent 42%),
    var(--surface);
  outline: none;
}

button.metric.is-active strong {
  color: var(--primary-dark);
}

.metric strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 1.75rem;
  line-height: 1;
}

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

.metric__label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.metric--health {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.14), transparent 42%),
    var(--surface);
}

.metric--warning {
  background:
    linear-gradient(135deg, rgba(180, 83, 9, 0.12), transparent 44%),
    var(--surface);
}

.metric--danger {
  background:
    linear-gradient(135deg, rgba(185, 28, 28, 0.12), transparent 44%),
    var(--surface);
}

button.metric--warning:hover,
button.metric--warning:focus-visible,
button.metric--warning.is-active {
  border-color: rgba(180, 83, 9, 0.45);
  background:
    linear-gradient(135deg, rgba(180, 83, 9, 0.16), transparent 44%),
    var(--surface);
}

button.metric--danger:hover,
button.metric--danger:focus-visible,
button.metric--danger.is-active {
  border-color: rgba(185, 28, 28, 0.45);
  background:
    linear-gradient(135deg, rgba(185, 28, 28, 0.16), transparent 44%),
    var(--surface);
}

.health-ring {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--primary) 0deg, var(--primary-soft) 0deg);
  position: relative;
}

.health-ring::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
}

.workspace {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 330px;
  gap: 12px;
  margin-top: 12px;
  align-items: start;
}

body.filters-collapsed .workspace {
  grid-template-columns: minmax(0, 1fr) 330px;
}

body.details-collapsed .workspace {
  grid-template-columns: 280px minmax(0, 1fr);
}

body.filters-collapsed.details-collapsed .workspace {
  grid-template-columns: minmax(0, 1fr);
}

body.filters-collapsed .control-panel {
  display: none;
}

body.details-collapsed .detail-panel {
  display: none;
}

.control-panel,
.tracker-area,
.detail-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(33, 43, 41, 0.07);
}

.control-panel,
.detail-panel {
  position: sticky;
  top: 16px;
  overflow: hidden;
}

.panel-block {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.panel-block:last-child {
  border-bottom: 0;
}

.panel-heading,
.tracker-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.field > span,
.field-title > span,
.field-title label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.field-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 26px;
}

.permission-option {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.permission-option input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary);
}

.permission-option span,
.permission-option strong,
.permission-option small {
  display: block;
}

.permission-option strong {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 900;
}

.permission-option small {
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.35;
}

.mic-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid rgba(15, 118, 110, 0.36);
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.68rem;
  font-weight: 900;
}

.mic-button.is-listening {
  border-color: rgba(170, 60, 60, 0.36);
  background: rgba(170, 60, 60, 0.12);
  color: var(--red);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  padding: 8px 10px;
}

.field input:disabled,
.field select:disabled,
.field textarea:disabled {
  background: #eef2f1;
  color: var(--muted);
  cursor: not-allowed;
}

.field textarea {
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder,
.master-list-input::placeholder,
.master-list-add input::placeholder {
  color: #7b8986;
  font-weight: 650;
  opacity: 0.86;
}

.client-filter-field {
  display: none;
}

.tracker-toolbar {
  min-height: 58px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.tracker-toolbar__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.tracker-toolbar__actions .button {
  min-height: 32px;
  padding: 0 10px;
}

.column-menu {
  position: relative;
  display: inline-flex;
}

.column-menu__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 35;
  width: min(360px, calc(100vw - 32px));
  max-height: min(520px, calc(100vh - 180px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.column-menu__header {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-strong);
}

.column-menu__header strong {
  font-size: 0.9rem;
  font-weight: 900;
}

.column-menu__header small,
.column-menu__note {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 750;
  line-height: 1.35;
}

.column-menu__actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}

.column-menu__search {
  display: block;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.column-menu__search input {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 750;
}

.column-menu__search input::placeholder {
  color: #7b8986;
  font-weight: 650;
}

.column-menu__list {
  display: grid;
  gap: 4px;
  max-height: 330px;
  overflow: auto;
  padding: 8px;
}

.column-menu__option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 800;
}

.column-menu__option:hover,
.column-menu__option:focus-within {
  border-color: var(--line);
  background: var(--surface-strong);
}

.column-menu__option input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--primary);
}

.column-menu__empty {
  padding: 14px 10px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
}

.column-menu__note {
  margin: 0;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--line);
  background: var(--surface-strong);
}

col.is-hidden,
.is-column-hidden {
  display: none;
}

.category-toggle span[aria-hidden="true"] {
  background: rgba(15, 118, 110, 0.08);
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow: auto;
}

.line-item-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.035), transparent),
    var(--surface-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.tab-button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.tab-button.is-active {
  border-color: var(--primary-dark);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

table {
  width: 2720px;
  min-width: 2720px;
  border-collapse: collapse;
  table-layout: fixed;
}

body.is-quick-edit table {
  min-width: 2720px;
}

th,
td {
  overflow: hidden;
  padding: 7px 6px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 0.78rem;
  line-height: 1.24;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  user-select: none;
}

th.is-sortable {
  cursor: pointer;
}

th.is-sortable:hover {
  color: var(--primary-dark);
  background: #eef8f6;
}

.sort-indicator {
  display: inline-flex;
  min-width: 0;
  margin-left: 5px;
  color: var(--primary-dark);
  font-size: 0.58rem;
  font-weight: 900;
  vertical-align: middle;
}

th.is-sorted {
  color: var(--primary-dark);
  background: #e8f6f3;
}

.column-resizer {
  position: absolute;
  top: 0;
  right: -4px;
  bottom: 0;
  z-index: 2;
  width: 8px;
  cursor: col-resize;
  touch-action: none;
}

.column-resizer::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 3px;
  bottom: 8px;
  width: 2px;
  border-radius: 999px;
  background: transparent;
}

th:hover .column-resizer::after,
body.is-resizing-column .column-resizer::after {
  background: rgba(15, 118, 110, 0.42);
}

body.is-resizing-column,
body.is-resizing-column * {
  cursor: col-resize !important;
  user-select: none !important;
}

tbody tr {
  transition:
    background 120ms ease,
    box-shadow 120ms ease;
}

tbody tr:hover,
tbody tr.is-selected {
  background: #f4fbfa;
}

tbody tr.is-quick-row {
  background: #fbfdfc;
}

.quick-stack {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.quick-stack--wide {
  min-width: 0;
}

.customer-created-edit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  vertical-align: middle;
}

.customer-created-edit span {
  font-weight: 900;
}

.customer-created-edit .quick-field {
  width: 190px;
  min-height: 30px;
}

.quick-field {
  width: 100%;
  min-height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  padding: 5px 6px;
  font-size: 0.76rem;
  font-weight: 700;
}

.quick-field::placeholder {
  color: #7b8986;
  font-weight: 650;
  opacity: 0.86;
}

.quick-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
  outline: 0;
}

.quick-textarea {
  min-height: 78px;
  resize: vertical;
  line-height: 1.25;
}

.quick-input[type="number"] {
  min-width: 92px;
}

.quick-input[type="date"] {
  min-width: 0;
}

body.is-quick-edit .tracker-area {
  outline: 2px solid rgba(15, 118, 110, 0.22);
  outline-offset: 2px;
}

body.filters-paused .control-panel,
body.filters-paused .line-item-tabs,
body.filters-paused .summary-grid .metric--filter {
  opacity: 0.58;
}

body.filters-paused .control-panel :disabled,
body.filters-paused .line-item-tabs button:disabled,
body.filters-paused .summary-grid .metric--filter:disabled {
  cursor: not-allowed;
}

.item-name {
  display: grid;
  gap: 3px;
}

.item-name strong {
  line-height: 1.18;
}

.subproject-link {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 900;
  line-height: 1.18;
  text-align: left;
  cursor: pointer;
  padding: 0;
}

.subproject-link:hover,
.subproject-link:focus-visible {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  outline: none;
}

.item-meta,
.date-stack,
.cost-stack {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.22;
}

.date-stack strong {
  color: var(--text);
  font-size: 0.78rem;
}

.table-text {
  color: var(--text);
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.78rem;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.table-text--challenge {
  -webkit-line-clamp: 4;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  max-width: 100%;
  padding: 2px 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 850;
  line-height: 1.15;
  white-space: normal;
}

.badge--approved,
.badge--completed,
.badge--closed,
.badge--installed,
.badge--live {
  border-color: rgba(33, 114, 75, 0.28);
  background: rgba(33, 114, 75, 0.12);
  color: var(--green);
}

.badge--planned,
.badge--rfq,
.badge--quote-received,
.badge--not-started {
  border-color: rgba(47, 95, 152, 0.24);
  background: rgba(47, 95, 152, 0.11);
  color: var(--blue);
}

.badge--pending {
  border-color: rgba(170, 60, 60, 0.28);
  background: rgba(170, 60, 60, 0.12);
  color: var(--red);
}

.badge--critical {
  border-color: rgba(170, 60, 60, 0.38);
  background: rgba(170, 60, 60, 0.16);
  color: var(--red);
}

.badge--high {
  border-color: rgba(165, 101, 20, 0.32);
  background: rgba(165, 101, 20, 0.14);
  color: var(--amber);
}

.badge--hold,
.badge--on-hold,
.badge--blocked,
.badge--at-risk,
.badge--ordered,
.badge--po-raised {
  border-color: rgba(165, 101, 20, 0.28);
  background: rgba(165, 101, 20, 0.13);
  color: var(--amber);
}

.badge--rejected,
.badge--overdue {
  border-color: rgba(170, 60, 60, 0.28);
  background: rgba(170, 60, 60, 0.12);
  color: var(--red);
}

.badge--default,
.badge--delivered,
.badge--in-progress {
  border-color: rgba(104, 77, 143, 0.25);
  background: rgba(104, 77, 143, 0.11);
  color: var(--violet);
}

.progress-tube {
  display: grid;
  gap: 4px;
  width: 100%;
}

.progress-tube__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  line-height: 1.2;
}

.progress-tube__top span {
  display: inline;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: none;
}

.progress-tube__top strong {
  display: inline;
  margin: 0;
  color: var(--text);
  font-size: 0.74rem;
  line-height: 1.2;
  white-space: nowrap;
}

.progress-tube__track {
  height: 10px;
  overflow: hidden;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 999px;
  background: #dfe8e6;
  box-shadow: inset 0 1px 2px rgba(24, 33, 31, 0.12);
}

.progress-tube__fill {
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--blue));
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.history-panel {
  padding: 16px;
  border-top: 1px solid var(--line);
}

.history-header,
.history-entry__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.history-header {
  margin-bottom: 12px;
}

.history-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.history-header span,
.history-entry__top span,
.history-entry__meta {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.history-entry__title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.history-entry__delete {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(220, 38, 38, 0.34);
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

.history-entry__delete:hover {
  background: rgba(220, 38, 38, 0.16);
  border-color: rgba(220, 38, 38, 0.58);
}

.history-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.history-header__actions .button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-dialog {
  width: min(1040px, calc(100% - 28px));
}

.history-dialog-body {
  display: grid;
  gap: 12px;
  max-height: min(680px, 72vh);
  overflow: auto;
  padding: 16px;
}

.history-tools {
  display: grid;
  gap: 12px;
}

.history-filter-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(180px, 1fr) minmax(180px, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.history-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 8px;
}

.history-stat-grid--compact {
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  margin-bottom: 12px;
}

.history-stat-grid > div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.history-stat-grid span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.history-stat-grid strong {
  font-size: 0.92rem;
}

.history-dialog-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.history-entry,
.history-empty {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.history-entry p {
  margin: 8px 0;
  color: var(--text);
  line-height: 1.45;
}

.history-action-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.history-entry--login .history-action-pill {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.history-entry--logout .history-action-pill {
  background: rgba(100, 116, 139, 0.14);
  color: #475569;
}

.history-entry--security .history-action-pill {
  background: rgba(124, 58, 237, 0.12);
  color: #6d28d9;
}

.history-entry--delete .history-action-pill {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.history-entry ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.settings-danger-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.user-admin-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 1fr);
  gap: 16px;
  align-items: start;
}

.user-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
}

.assignment-actions {
  display: flex;
  gap: 12px;
  min-height: 24px;
}

.project-access-list {
  display: grid;
  gap: 8px;
  max-height: 190px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.project-access-option {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: start;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.project-access-option input {
  margin-top: 3px;
}

.project-access-option span {
  line-height: 1.25;
}

.project-access-option small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
}

.user-row {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.user-row.is-active {
  border-color: rgba(15, 118, 110, 0.45);
  background: var(--primary-soft);
}

.user-row strong,
.user-row span {
  display: block;
}

.user-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.row-actions .button {
  min-height: 26px;
  padding: 0 7px;
  font-size: 0.72rem;
}

.detail-panel {
  min-height: 420px;
}

.detail-card {
  padding: 16px;
}

.detail-card h2 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.25;
}

.detail-card h3 {
  margin: 18px 0 8px;
  font-size: 0.86rem;
}

.detail-table {
  width: 100%;
  margin-top: 14px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.detail-table th,
.detail-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  vertical-align: top;
  line-height: 1.35;
}

.detail-table tr:last-child th,
.detail-table tr:last-child td {
  border-bottom: 0;
}

.detail-table th {
  width: 32%;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
}

.detail-table td {
  color: var(--text);
  word-break: break-word;
  white-space: pre-wrap;
}

.detail-table strong {
  font-weight: 850;
}

.detail-table .progress-tube {
  max-width: 280px;
}

.attachment-field {
  display: grid;
  gap: 10px;
}

.attachment-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.attachment-field.is-processing .attachment-toolbar .button {
  opacity: 0.58;
  pointer-events: none;
}

.attachment-dropzone {
  display: grid;
  gap: 4px;
  min-height: 88px;
  align-content: center;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: rgba(15, 118, 110, 0.04);
  color: var(--muted);
  outline: none;
}

.attachment-dropzone strong {
  color: var(--text);
}

.attachment-dropzone span {
  line-height: 1.45;
}

.attachment-dropzone:focus-visible,
.attachment-dropzone.is-dragging {
  border-color: var(--primary);
  background: rgba(15, 118, 110, 0.1);
}

.attachment-dropzone.is-processing {
  border-color: rgba(15, 118, 110, 0.48);
  background: rgba(15, 118, 110, 0.08);
}

.attachment-progress {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 8px;
  background: rgba(15, 118, 110, 0.06);
}

.attachment-progress[hidden] {
  display: none;
}

.attachment-progress__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.attachment-progress__top strong,
.attachment-progress__top span {
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.2;
}

.attachment-progress__top span {
  flex: 0 0 auto;
  font-weight: 850;
}

.attachment-progress__track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.14);
}

.attachment-progress__fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  transition: width 140ms ease;
}

.attachment-progress small {
  color: var(--muted);
  line-height: 1.35;
  word-break: break-word;
}

.attachment-progress.is-complete {
  border-color: rgba(22, 163, 74, 0.32);
  background: rgba(22, 163, 74, 0.08);
}

.attachment-progress.is-complete .attachment-progress__fill {
  background: linear-gradient(90deg, #16a34a, #0f766e);
}

.attachment-list,
.attachment-items {
  display: grid;
  gap: 8px;
  white-space: normal;
}

.attachment-item-wrap {
  display: grid;
  gap: 8px;
}

.attachment-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.attachment-item--previewable {
  cursor: pointer;
}

.attachment-item--previewable:hover,
.attachment-item.is-preview-open {
  border-color: rgba(15, 118, 110, 0.34);
  background: rgba(15, 118, 110, 0.06);
}

.attachment-item__icon {
  display: grid;
  min-height: 40px;
  place-items: center;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.attachment-item__thumb {
  width: 58px;
  height: 48px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

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

.attachment-item__body {
  min-width: 0;
}

.attachment-item__body strong,
.attachment-item__body span {
  display: block;
  overflow-wrap: anywhere;
}

.attachment-item__body span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
}

.attachment-item__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.attachment-item__actions .button.is-active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.view-document-section {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.view-document-section__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.view-document-section__header h3 {
  margin: 0;
}

.view-document-section__header span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.document-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
}

.document-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 74px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.document-card--container {
  border-color: rgba(15, 118, 110, 0.32);
  background: rgba(15, 118, 110, 0.04);
}

.document-card--clickable,
.document-file-row--clickable {
  cursor: pointer;
}

.document-card--clickable:hover,
.document-card--clickable:focus-visible,
.document-file-row--clickable:hover,
.document-file-row--clickable:focus-visible {
  border-color: rgba(15, 118, 110, 0.48);
  background: rgba(15, 118, 110, 0.08);
  outline: none;
}

.document-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.document-card__body {
  min-width: 0;
}

.document-card__body strong,
.document-card__body span {
  display: block;
  overflow-wrap: anywhere;
}

.document-card__body span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
}

.document-card__hint {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.document-container-view {
  display: grid;
  gap: 12px;
}

.document-container-view h3 {
  margin: 0;
}

.document-file-list {
  display: grid;
  gap: 9px;
}

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

.inline-doc-preview {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 8px;
  background: rgba(15, 118, 110, 0.04);
}

.inline-doc-preview[hidden] {
  display: none;
}

.inline-doc-preview__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.inline-doc-preview__header strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.inline-doc-preview__body {
  display: grid;
  gap: 10px;
}

.doc-download-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.attachment-preview {
  display: grid;
  gap: 10px;
  min-height: 120px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.attachment-preview[hidden] {
  display: none;
}

.attachment-preview__frame {
  width: 100%;
  min-height: min(68vh, 720px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.attachment-preview__image {
  display: block;
  max-width: 100%;
  max-height: min(72vh, 780px);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  object-fit: contain;
}

.attachment-text-preview,
.attachment-email-preview pre {
  max-height: min(66vh, 680px);
  margin: 0;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.attachment-email-preview {
  display: grid;
  gap: 10px;
}

.attachment-email-preview dl {
  display: grid;
  gap: 6px;
  margin: 0;
}

.attachment-email-preview dl div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-strong);
}

.attachment-email-preview dt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.attachment-email-preview dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.attachment-preview__unsupported {
  display: grid;
  gap: 10px;
}

.attachment-preview__unsupported p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.attachment-preview__meta {
  display: grid;
  gap: 6px;
  margin: 0;
}

.attachment-preview__meta div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.attachment-preview__meta dt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.attachment-preview__meta dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.attachment-empty {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--muted);
}

.detail-text {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.priority-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.priority-summary__stat {
  min-height: 70px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-strong);
}

.priority-summary__stat span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.priority-summary__stat strong {
  display: block;
  margin-top: 6px;
  font-size: 1.45rem;
  line-height: 1;
}

.priority-summary__stat--critical {
  border-color: rgba(170, 60, 60, 0.32);
  background: rgba(170, 60, 60, 0.08);
}

.priority-summary__stat--high {
  border-color: rgba(165, 101, 20, 0.32);
  background: rgba(165, 101, 20, 0.08);
}

.priority-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.priority-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  background: #ffffff;
}

.priority-item--critical {
  border-left-color: var(--red);
}

.priority-item--high {
  border-left-color: var(--amber);
}

.priority-item__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.priority-item__top strong {
  line-height: 1.25;
}

.priority-item__meta,
.priority-item__note {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.priority-item__note {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.milestone-list,
.approval-bars {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.milestone {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px;
  align-items: start;
}

.milestone__date {
  display: grid;
  min-height: 46px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-strong);
  color: var(--primary-dark);
  font-weight: 900;
  line-height: 1.05;
}

.milestone__date small {
  display: block;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 800;
}

.milestone strong {
  display: block;
  line-height: 1.25;
}

.milestone span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.approval-bar {
  display: grid;
  gap: 6px;
}

.approval-bar__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.approval-bar__track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dde5e3;
}

.approval-bar__fill {
  height: 100%;
  background: var(--primary);
}

.item-dialog {
  width: min(900px, calc(100% - 28px));
  max-height: min(92vh, 900px);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 30px 90px rgba(16, 24, 22, 0.35);
}

.view-dialog {
  width: min(980px, calc(100% - 28px));
}

.login-dialog,
.progress-dialog,
.backup-dialog {
  width: min(560px, calc(100% - 28px));
}

.settings-dialog {
  width: min(1180px, calc(100% - 28px));
}

.smtp-dialog {
  width: min(720px, calc(100% - 28px));
}

.two-factor-dialog {
  width: min(460px, calc(100% - 28px));
}

.two-factor-dialog input {
  text-align: center;
  font-size: 1.4rem;
  letter-spacing: 0.18em;
}

.two-factor-dialog input:disabled {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0;
}

.two-factor-dialog .dialog-actions .button {
  min-height: 44px;
}

.customer-dialog {
  width: min(980px, calc(100% - 28px));
}

.item-dialog::backdrop {
  background: rgba(16, 24, 22, 0.46);
}

.item-dialog form {
  margin: 0;
}

.dialog-header,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.master-list-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-height: min(680px, 70vh);
  overflow: auto;
  padding: 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
}

.master-list-card {
  display: grid;
  gap: 10px;
  align-self: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.master-list-card:first-child {
  grid-column: 1 / -1;
}

.master-list-card__header,
.master-list-row,
.master-list-add {
  display: flex;
  align-items: center;
  gap: 8px;
}

.master-list-card__header {
  justify-content: space-between;
}

.master-list-card__header h3 {
  margin: 0;
  font-size: 0.96rem;
}

.master-list-card__header span,
.master-list-empty {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.master-list-rows {
  display: grid;
  gap: 8px;
}

.master-list-input,
.master-list-add input {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  font: inherit;
  font-weight: 750;
  color: var(--text);
  background: #fff;
}

.master-list-row .button--icon {
  width: 38px;
  height: 38px;
  min-height: 38px;
  flex: 0 0 auto;
  font-size: 0.68rem;
}

.master-list-add .button,
.master-list-card__header .button {
  min-height: 36px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.dialog-actions {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  background: var(--surface-strong);
}

.dialog-actions > div {
  display: flex;
  gap: 8px;
}

.backup-options {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.backup-option {
  display: grid;
  gap: 6px;
  width: 100%;
  min-height: 88px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  padding: 16px;
  text-align: left;
  cursor: pointer;
}

.backup-option:hover:not(:disabled),
.backup-option:focus-visible:not(:disabled) {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
  outline: 0;
}

.backup-option:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.backup-option strong {
  font-size: 1rem;
}

.backup-option span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 760;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px 14px;
  padding: 4px 16px 18px;
}

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

.field--wide {
  grid-column: span 3;
}

.view-body {
  max-height: min(66vh, 680px);
  overflow: auto;
  padding: 16px;
}

.view-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.view-title-row h3 {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.25;
}

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

.smtp-status {
  margin: 0;
  padding: 0 16px 16px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10;
  min-width: 220px;
  max-width: min(420px, calc(100% - 36px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #17211f;
  color: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

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

  body.filters-collapsed .workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  body.details-collapsed .workspace {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  body.filters-collapsed.details-collapsed .workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-panel {
    position: static;
    grid-column: 1 / -1;
  }
}

@media (max-width: 1180px) {
  .customer-context {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 900px) {
  .app-shell {
    padding: 12px;
  }

  .topbar,
  .tracker-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar__actions {
    justify-content: flex-start;
  }

  .summary-grid,
  .workspace,
  .customer-list,
  .user-admin-layout,
  .master-list-layout,
  .history-filter-grid,
  .history-stat-grid,
  .history-stat-grid--compact {
    grid-template-columns: 1fr;
  }

  .hub-header,
  .history-dialog-summary {
    flex-direction: column;
    align-items: stretch;
  }

  .customer-context {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .customer-card__stats,
  .customer-context__stats,
  .tax-panel {
    grid-template-columns: 1fr 1fr;
  }

  .customer-context__finance {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .customer-context__finance .customer-context__stats .mini-stat,
  .customer-context__finance .tax-panel .mini-stat,
  .customer-context__finance .tax-panel .mini-stat--tax-amount {
    grid-column: span 2;
  }

  .customer-context__finance .tax-panel__toggle,
  .customer-context__finance .tax-panel__percent {
    grid-column: span 3;
  }

  .customer-context__finance .tax-panel.is-disabled .mini-stat--tax-base {
    grid-column: span 3;
  }

  .actual-cost-menu {
    width: min(420px, 72vw);
  }

  .control-panel {
    position: static;
  }

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

  .field--wide {
    grid-column: span 1;
  }

  .master-list-card:first-child {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {
  body {
    background: var(--page);
  }

  .app-shell,
  .login-page {
    padding: 10px;
  }

  .login-card,
  .topbar,
  .customer-hub,
  .customer-context,
  .control-panel,
  .tracker-area,
  .detail-panel,
  .metric {
    box-shadow: 0 8px 18px rgba(33, 43, 41, 0.08);
  }

  .login-card {
    padding: 18px;
  }

  .topbar {
    padding: 12px;
    gap: 12px;
  }

  .topbar h1 {
    font-size: 1.12rem;
  }

  .topbar__actions,
  .customer-card__actions,
  .customer-context__actions,
  .tracker-toolbar__actions,
  .detail-actions,
  .history-header__actions,
  .row-actions {
    align-items: stretch;
    width: 100%;
  }

  .topbar__actions .button,
  .customer-card__actions .button,
  .customer-context__actions .button,
  .tracker-toolbar__actions .button,
  .detail-actions .button,
  .history-header__actions .button,
  .row-actions .button {
    flex: 1 1 132px;
    min-width: 0;
    white-space: normal;
  }

  .admin-pill {
    width: 100%;
    justify-content: center;
    white-space: normal;
  }

  .report-menu {
    width: 100%;
  }

  .report-menu > .button,
  .report-menu__panel {
    width: 100%;
  }

  .hub-header,
  .customer-context,
  .panel-block,
  .tracker-toolbar,
  .detail-card,
  .history-panel {
    padding: 12px;
  }

  .customer-list {
    padding: 0 12px 12px;
  }

  .summary-grid {
    gap: 10px;
  }

  .metric {
    min-height: 96px;
    padding: 12px;
  }

  .metric strong {
    font-size: 1.38rem;
  }

  .metric--health {
    align-items: flex-start;
  }

  .health-ring {
    width: 58px;
    height: 58px;
  }

  .health-ring::after {
    inset: 8px;
  }

  .customer-card__stats,
  .customer-context__stats,
  .tax-panel,
  .priority-summary {
    grid-template-columns: 1fr;
  }

  .customer-context__finance {
    grid-template-columns: 1fr;
  }

  .customer-context__finance .customer-context__stats .mini-stat,
  .customer-context__finance .tax-panel .mini-stat,
  .customer-context__finance .tax-panel .mini-stat--tax-amount,
  .customer-context__finance .tax-panel .mini-stat--tax-base,
  .customer-context__finance .tax-panel__toggle,
  .customer-context__finance .tax-panel__percent {
    grid-column: 1 / -1;
  }

  .actual-cost-menu {
    position: static;
    width: 100%;
    max-width: none;
    margin-top: 8px;
  }

  .detail-table th,
  .detail-table td {
    display: block;
    width: 100%;
  }

  .detail-table th {
    border-bottom: 0;
    padding-bottom: 3px;
  }

  .detail-table td {
    padding-top: 3px;
  }

  .workspace {
    gap: 10px;
  }

  .control-panel,
  .detail-panel {
    position: static;
  }

  .tracker-toolbar {
    min-height: 0;
  }

  .tracker-toolbar h2,
  .panel-block h2 {
    font-size: 1rem;
  }

  .line-item-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 10px 12px;
    -webkit-overflow-scrolling: touch;
  }

  .tab-button {
    flex: 0 0 auto;
  }

  .table-wrap {
    max-width: calc(100vw - 20px);
    border-top: 1px solid var(--line);
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 1320px;
  }

  body.is-quick-edit table {
    min-width: 1520px;
  }

  th,
  td {
    padding: 10px 8px;
  }

  th {
    font-size: 0.68rem;
  }

  .table-text,
  .table-text--challenge {
    max-width: 32ch;
  }

  .progress-tube {
    width: 150px;
  }

  .row-actions {
    flex-wrap: wrap;
  }

  .item-dialog,
  .view-dialog,
  .login-dialog,
  .progress-dialog,
  .backup-dialog,
  .settings-dialog,
  .smtp-dialog,
  .customer-dialog {
    width: calc(100% - 18px);
    max-height: calc(100dvh - 18px);
  }

  .dialog-header,
  .dialog-actions {
    align-items: stretch;
    flex-direction: column;
    padding: 12px;
  }

  .dialog-header {
    gap: 10px;
  }

  .dialog-header .button--icon {
    align-self: flex-end;
    margin-top: -42px;
  }

  .dialog-actions > div {
    flex-wrap: wrap;
    width: 100%;
  }

  .dialog-actions .button,
  .dialog-actions > div .button {
    flex: 1 1 140px;
    min-width: 0;
    white-space: normal;
  }

  .two-factor-dialog .dialog-actions .button {
    flex: 0 0 auto;
    width: 100%;
  }

  .attachment-item {
    grid-template-columns: 1fr;
  }

  .document-card,
  .document-file-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .document-card .button,
  .document-file-row .button {
    width: 100%;
  }

  .attachment-item__icon {
    width: max-content;
    min-width: 58px;
    min-height: 30px;
    padding: 0 10px;
  }

  .attachment-item__actions {
    justify-content: stretch;
  }

  .attachment-item__actions .button {
    flex: 1 1 120px;
  }

  .attachment-preview {
    padding: 8px;
  }

  .attachment-preview__frame {
    min-height: 58vh;
  }

  .attachment-email-preview dl div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .form-grid {
    gap: 0;
    padding: 0 12px 14px;
  }

  .field input,
  .field select,
  .field textarea,
  .quick-field {
    font-size: 16px;
  }

  .view-body {
    max-height: calc(100dvh - 190px);
    padding: 12px;
  }

  .view-title-row,
  .priority-item__top,
  .history-header,
  .history-entry__top {
    flex-direction: column;
  }

  .view-badges {
    justify-content: flex-start;
  }

  .user-admin-layout {
    gap: 10px;
  }

  .user-list {
    max-height: 240px;
  }

  .toast {
    right: 10px;
    bottom: 10px;
    max-width: calc(100% - 20px);
  }
}

@page {
  size: A1 landscape;
  margin: 8mm;
}

@media print {
  body {
    background: #ffffff;
  }

  .topbar__actions,
  .tracker-toolbar__actions,
  .control-panel,
  .detail-panel,
  .row-actions,
  .column-resizer,
  .report-menu__panel,
  .toast {
    display: none !important;
  }

  .pdf-audit-stamp {
    display: grid;
    justify-items: end;
    gap: 2px;
    margin-left: auto;
    color: #43504d;
    font-size: 0.72rem;
    line-height: 1.25;
    text-align: right;
    white-space: nowrap;
  }

  .pdf-audit-stamp span {
    color: #62706d;
    font-weight: 900;
    text-transform: uppercase;
  }

  .pdf-audit-stamp strong {
    color: #18211f;
    font-size: 0.84rem;
  }

  .app-shell {
    width: 100%;
    padding: 0;
  }

  .workspace {
    display: block;
  }

  .summary-grid {
    display: grid;
    grid-template-columns: 1.1fr repeat(3, 1fr);
    gap: 5px;
    margin-top: 6px;
  }

  .tracker-area,
  .topbar,
  .metric {
    box-shadow: none;
  }

  .topbar,
  .customer-context,
  .tracker-toolbar {
    padding: 8px 10px;
  }

  .customer-context {
    grid-template-columns: minmax(320px, 0.9fr) minmax(620px, 1.35fr);
    gap: 10px;
  }

  .customer-context__finance {
    gap: 5px;
  }

  .customer-context__actions {
    display: none !important;
  }

  .metric {
    min-height: 54px;
    padding: 8px 10px;
  }

  .metric strong {
    margin-top: 3px;
    font-size: 1.05rem;
  }

  .metric small {
    margin-top: 4px;
    line-height: 1.2;
  }

  .health-ring {
    width: 42px;
    height: 42px;
  }

  .health-ring::after {
    inset: 6px;
  }

  .tracker-toolbar {
    min-height: 0;
  }

  table {
    font-size: 0.6rem;
  }

  th,
  td {
    padding: 4px 4px;
  }

  .badge {
    min-height: 16px;
    padding: 1px 4px;
    font-size: 0.55rem;
  }

  .table-text {
    font-size: 0.6rem;
    line-height: 1.16;
    -webkit-line-clamp: 2;
  }

  .table-text--challenge {
    -webkit-line-clamp: 3;
  }

  .date-stack,
  .item-meta,
  .progress-tube__top,
  .progress-tube__top span,
  .progress-tube__top strong {
    font-size: 0.56rem;
    line-height: 1.12;
  }

  .progress-tube__track {
    height: 7px;
  }

  table col:nth-child(24),
  table th:nth-child(24),
  table td:nth-child(24) {
    display: none;
  }
}

.topbar__actions .button.command-button,
.tracker-toolbar__actions .button.command-button {
  flex: 0 0 38px;
  width: 38px;
  min-width: 38px;
  white-space: nowrap;
}

.tracker-toolbar__actions .column-menu__toggle {
  position: relative;
  flex: 0 0 38px;
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  line-height: 1;
  touch-action: manipulation;
}

.tracker-toolbar__actions .column-menu__toggle > * {
  pointer-events: none;
}

.topbar__actions .report-menu {
  flex: 0 0 38px;
  width: auto;
}
