/* Tokens come from ../design-tokens.css (linked before this stylesheet). */

/*
 * Client Operations keeps the shared Portal structure while carrying the
 * calmer Compass visual language. These overrides deliberately live in this
 * module stylesheet so Time Tracker, Invoicing, and Administration retain
 * their own established presentation.
 */
:root {
  --navy: #17375f;
  --navy-deep: #0f294a;
  --blue: #2f6da7;
  --blue-light: #5c8fc9;
  --ink: #17263b;
  --muted: #627188;
  --muted-light: #8a98aa;
  --surface: #fff;
  --surface-soft: #f3f5f4;
  --surface-blue: #f4f8fc;
  --border: #dbe3e8;
  --green: #2e7d52;
  --green-soft: #e7f3ed;
  --amber: #b87018;
  --amber-soft: #fff0d7;
  --red: #b63c42;
  --red-soft: #fae7e8;
  --stream-default: #68766f;
  --stream-bookkeeping: #31876a;
  --stream-annual-reports: #b87018;
  --stream-sales-tax-registrations: #7650a8;
  --stream-tax-filings: #b63c42;
  --stream-payroll-reporting: #2f6da7;
  --stream-entity-registrations: #a54e71;
  --shadow: 0 14px 42px rgba(20, 38, 61, 0.07);
  --shadow-sticky: 0 8px 26px rgba(20, 38, 61, 0.08);
  --radius-lg: 18px;
  --radius-md: 12px;
  --control-height: 42px;
  --row-pad-y: 14px;
  --row-pad-x: 18px;
  --text-2xs: 0.69rem;
  --text-xs: 0.73rem;
  --text-sm: 0.79rem;
  --text-md: 0.87rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  font-size: 18px;
  background: var(--surface-soft);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 6% -10%, rgba(47, 109, 167, 0.12), transparent 25rem),
    radial-gradient(circle at 96% 4%, rgba(101, 72, 156, 0.05), transparent 24rem),
    var(--surface-soft);
  font-family: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 50;
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--navy);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

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

.state-card {
  width: min(100%, 480px);
  padding: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  text-align: center;
}

.state-card--loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: left;
}

.state-card h1 {
  margin: 5px 0 12px;
  color: var(--navy);
  font-size: clamp(1.45rem, 4vw, 2rem);
  letter-spacing: -0.04em;
}

.state-card p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.state-card--loading p {
  margin: 0;
}

.state-mark,
.brand-mark {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--navy), var(--blue));
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(23, 55, 95, 0.2);
}

.state-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: 16px;
  font-size: 0.8rem;
}

.state-mark--error {
  background: var(--red);
}

.state-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.loading-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 3px solid #dbe4f4;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-mark--small {
  width: 24px;
  height: 24px;
}

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

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 clamp(20px, 4vw, 48px);
  border-bottom: 1px solid rgba(220, 227, 231, 0.92);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-sticky);
}

.app-header::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--blue), #78a4d4 52%, #7650a8);
  content: "";
}

.app-header .module-tabs {
  margin: 0;
  padding: 4px;
  border: 0;
  background: var(--surface-blue);
  box-shadow: none;
  flex: 0 0 auto;
}

.app-header .module-tabs a {
  padding: 8px 13px;
  font-size: 0.72rem;
}

.header-search {
  position: relative;
  flex: 1 1 220px;
  max-width: 340px;
  margin-left: auto;
}

.header-search input {
  width: 100%;
  min-height: var(--control-height);
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  outline: none;
  color: var(--ink);
  background: var(--surface-blue);
  font-size: var(--text-sm);
}

.header-search input:focus {
  border-color: var(--blue-light);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(74, 127, 208, 0.13);
}

.header-search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 45;
  max-height: min(70vh, 520px);
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 18px 44px rgba(17, 28, 51, 0.16);
}

.header-search-caption {
  margin: 0;
  padding: 10px 13px 6px;
  color: var(--muted);
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.header-search-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 13px;
  color: inherit;
  text-decoration: none;
}

.header-search-option:hover,
.header-search-option--active {
  background: var(--surface-blue);
}

.header-search-option-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.header-search-option-copy strong {
  overflow: hidden;
  color: var(--navy);
  font-size: var(--text-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-search-option-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: var(--text-2xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-search-empty {
  margin: 0;
  padding: 8px 13px 12px;
  color: var(--muted-light);
  font-size: var(--text-sm);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  font-size: 0.95rem;
}

.brand-name,
.brand-subtitle {
  display: block;
}

.brand-name {
  color: var(--navy);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.15;
}

.brand-subtitle {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-link,
.back-link {
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}

.header-link:hover,
.back-link:hover {
  text-decoration: underline;
}

.company-switcher-wrap select {
  max-width: 220px;
  min-height: 36px;
  padding: 0 34px 0 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: #fff;
  font-size: 0.72rem;
  font-weight: 600;
}

.account-menu-wrap {
  position: relative;
  flex: 0 0 auto;
}

.account-menu-button {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 9px 4px 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--navy);
  background: #fff;
  font: inherit;
  cursor: pointer;
}

.account-menu-button:hover,
.account-menu-button[aria-expanded="true"] {
  border-color: #b9c7d9;
  background: var(--surface-blue);
}

.account-menu-button > svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.account-menu-name {
  max-width: 130px;
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, var(--navy), var(--blue));
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.account-avatar--small {
  width: 30px;
  height: 30px;
  font-size: 0.62rem;
}

.account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-panel {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 60;
  width: min(330px, calc(100vw - 24px));
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 20px 48px rgba(17, 28, 51, 0.18);
}

.account-panel-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.account-panel-summary > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.account-panel-summary strong,
.account-panel-summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-panel-summary strong {
  color: var(--navy);
  font-size: 0.9rem;
}

.account-panel-summary div > span,
.account-panel-birthday {
  color: var(--muted);
  font-size: 0.72rem;
}

.account-panel-birthday {
  margin: 12px 0 0;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.account-panel-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.account-panel-actions .button {
  justify-content: center;
}

.app-main {
  width: min(1420px, calc(100% - 48px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.preview-banner {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 34px;
  padding: 13px 16px;
  border: 1px solid #ead8b7;
  border-radius: var(--radius-sm);
  background: rgba(255, 245, 223, 0.74);
}

.preview-banner span,
.role-badge,
.muted-badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.065em;
  line-height: 1;
  text-transform: uppercase;
}

.preview-banner span {
  flex: 0 0 auto;
  padding: 7px 9px;
  color: var(--amber);
  background: #fff;
}

.preview-banner p {
  margin: 0;
  color: #745e3c;
  font-size: 0.72rem;
  line-height: 1.5;
}

.module-tabs {
  display: flex;
  gap: 6px;
  margin: -10px 0 34px;
  padding: 5px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 6px 18px rgba(26, 39, 68, 0.025);
}

.module-tabs a {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}

.module-tabs a:hover {
  color: var(--navy);
  background: var(--surface-blue);
}

.module-tabs a[aria-current="page"] {
  color: #fff;
  background: var(--navy);
  box-shadow: 0 5px 13px rgba(26, 39, 68, 0.16);
}

.eyebrow {
  margin: 0;
  color: var(--blue);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-heading,
.workspace-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.page-heading h1,
.workspace-heading h1 {
  margin: 6px 0 8px;
  color: var(--navy);
  font-size: clamp(2rem, 5vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.page-heading > div > p:last-child,
.workspace-heading > div > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.role-badge {
  padding: 8px 10px;
  color: var(--blue);
  background: #eaf0fa;
}

.work-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 34px;
  min-height: 210px;
  padding: 34px 38px;
  overflow: hidden;
  border-radius: 18px;
  color: #fff;
  background:
    radial-gradient(circle at 92% 18%, rgba(93, 146, 224, 0.34), transparent 18rem),
    linear-gradient(135deg, var(--navy-deep), #233f6b 68%, #315d95);
  box-shadow: 0 20px 44px rgba(17, 28, 51, 0.17);
}

.work-hero::after {
  position: absolute;
  right: -80px;
  bottom: -115px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  content: "";
}

.work-hero .eyebrow {
  color: #a9c9f4;
}

.work-hero h1 {
  margin: 7px 0 9px;
  font-size: clamp(2.35rem, 5vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.work-hero-copy > p:last-child {
  max-width: 540px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  line-height: 1.55;
}

.work-hero-deadlines {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: end;
  gap: 25px;
  padding-right: 5px;
}

.work-hero-primary {
  display: grid;
  gap: 4px;
}

.work-hero-primary strong {
  font-size: 4rem;
  line-height: 0.82;
  letter-spacing: -0.08em;
}

.work-hero-primary span,
.work-hero-secondary span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.66rem;
  font-weight: 650;
}

.work-hero-secondary {
  display: grid;
  gap: 8px;
  padding-bottom: 1px;
}

.work-hero-secondary strong {
  display: inline-block;
  min-width: 52px;
  color: #fff;
  font-size: 0.82rem;
}

.work-hero-role {
  position: absolute;
  top: 20px;
  right: 22px;
  z-index: 2;
  color: #d9e9ff;
  background: rgba(255, 255, 255, 0.12);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin: 30px 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 7px 22px rgba(26, 39, 68, 0.035);
}

.filter-bar .field {
  flex: 0 1 170px;
  min-width: 130px;
}

.filter-bar .field--segments {
  flex: 0 0 auto;
  max-width: 100%;
  min-width: 0;
}

.filter-bar .field--directory-search {
  flex: 1 1 320px;
  min-width: 220px;
}

#clientStatusSegments {
  flex-wrap: wrap;
}

.filter-bar > .button {
  flex: 0 0 auto;
  margin-left: auto;
}

.field-caption {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.segment-count {
  min-width: 17px;
  padding: 2px 5px;
  border-radius: 999px;
  color: var(--muted);
  background: #edf0f4;
  font-size: 0.58rem;
  font-weight: 700;
  text-align: center;
}

.segmented-control-button--active .segment-count {
  color: var(--blue);
  background: #fff;
}

.field label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.field input,
.field select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #cfd8e3;
  border-radius: var(--radius-sm);
  outline: none;
  color: var(--ink);
  background: #fff;
  font-size: 0.79rem;
}

.field input:focus,
.field select:focus,
.company-switcher-wrap select:focus {
  border-color: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(74, 127, 208, 0.13);
}

.results-heading {
  min-height: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.results-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.directory-bulk-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.directory-bulk-actions > span {
  color: var(--navy);
  font-size: var(--text-xs);
  font-weight: 700;
}


.client-initial {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--navy);
  background: #edf2f9;
  font-size: 0.85rem;
  font-weight: 700;
}

.client-initial--table,
.client-initial--search {
  width: var(--avatar-md);
  height: var(--avatar-md);
  flex: 0 0 auto;
  border-radius: 10px;
  font-size: 0.68rem;
}

.client-initial--search {
  width: var(--avatar-sm);
  height: var(--avatar-sm);
  border-radius: 8px;
  font-size: 0.58rem;
}

.muted-badge {
  padding: 7px 8px;
  color: var(--muted);
  background: #f0f2f5;
}

/* Dense Compass-style client directory table */
.client-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 6px 18px rgba(26, 39, 68, 0.035);
}

.client-table {
  width: 100%;
  border-collapse: collapse;
}

.client-table th {
  padding: 12px var(--row-pad-x);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  background: #fbfcfd;
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: 0.075em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.client-table td {
  padding: var(--row-pad-y) var(--row-pad-x);
  border-top: 1px solid #edf0f3;
  font-size: var(--text-sm);
  vertical-align: middle;
}

.client-table .client-select-cell {
  width: 42px;
  padding-right: 4px;
  text-align: center;
}

.client-select-cell input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--blue);
  cursor: pointer;
}

.client-table tbody tr:first-child td {
  border-top: 0;
}

.client-row {
  cursor: pointer;
}

.client-row:hover td {
  background: #fbfcfe;
}

.client-row--selected td {
  background: #f1f6fd;
}

.client-row--selected:hover td {
  background: #eaf2fc;
}

.bulk-edit-summary {
  display: grid;
  gap: 10px;
}

.bulk-edit-summary > p {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.55;
}

.bulk-edit-client-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bulk-edit-client-list li {
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--navy);
  background: #fff;
  font-size: var(--text-2xs);
  font-weight: 700;
}

.client-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.client-cell-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.client-row-link {
  overflow: hidden;
  color: var(--navy);
  font-size: var(--text-md);
  font-weight: 700;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-row-link:hover {
  color: var(--blue);
}

.client-cell-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.client-cell-meta .status-badge {
  padding: 4px 7px;
  font-size: 0.56rem;
}

.cell-strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-empty {
  color: var(--muted-light);
  font-weight: 600;
}

.member-chip-list {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.member-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 160px;
  padding: 3px 9px 3px 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
}

.member-chip-avatar {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  background: var(--navy);
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.member-chip-name {
  overflow: hidden;
  color: var(--ink);
  font-size: var(--text-2xs);
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-chip--more {
  padding: 4px 9px;
  color: var(--muted);
  font-size: var(--text-2xs);
  font-weight: 700;
}

.count-cell {
  text-align: center;
}

.count-cell strong {
  color: var(--navy);
  font-size: var(--text-md);
}

.deadline-cell {
  display: grid;
  gap: 2px;
}

.deadline-cell strong {
  color: var(--navy);
  font-size: var(--text-sm);
}

.deadline-cell > span {
  overflow: hidden;
  max-width: 260px;
  color: var(--muted);
  font-size: var(--text-2xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deadline-cell--overdue strong,
.deadline-cell--overdue > span {
  color: var(--red);
}

.deadline-cell--upcoming strong,
.deadline-cell--upcoming > span {
  color: var(--blue);
}

.row-open-cell {
  width: 44px;
  text-align: right;
}

.row-open-mark {
  color: var(--muted-light);
  font-size: 0.9rem;
}

.client-row:hover .row-open-mark {
  color: var(--blue);
}

.task-client-link {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.task-client-link:hover {
  text-decoration: underline;
}

.content-state {
  min-height: 250px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 38px;
  border: 1px dashed #cbd4df;
  border-radius: var(--radius-md);
  color: var(--muted);
  text-align: center;
}

.content-state--loading {
  grid-auto-flow: column;
}

.content-state--error {
  background: rgba(253, 240, 238, 0.45);
}

.content-state h2 {
  margin: 3px 0 0;
  color: var(--navy);
  font-size: 1.05rem;
}

.content-state p {
  max-width: 480px;
  margin: 0 0 8px;
  font-size: 0.75rem;
  line-height: 1.6;
}

.empty-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--blue);
  background: #eaf0fa;
  font-size: 0.68rem;
  font-weight: 700;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

.pagination span {
  color: var(--muted);
  font-size: 0.72rem;
}

.back-link {
  display: inline-flex;
  margin-bottom: 24px;
}

.workspace-heading-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Compass-style client hero */
.client-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 26px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 96% 0, rgba(74, 127, 208, 0.08), transparent 16rem),
    #fff;
  box-shadow: 0 10px 30px rgba(26, 39, 68, 0.05);
}

.client-hero[data-client-status="active"] {
  background:
    radial-gradient(circle at 96% 0, rgba(45, 126, 92, 0.1), transparent 16rem),
    #f3faf7;
}

.client-hero[data-client-status="closing"] {
  border-color: #ead7ab;
  background:
    radial-gradient(circle at 96% 0, rgba(190, 122, 30, 0.12), transparent 16rem),
    #fff9ed;
}

.client-hero[data-client-status="closed"] {
  background:
    radial-gradient(circle at 96% 0, rgba(74, 127, 208, 0.1), transparent 16rem),
    #f3f6fb;
}

.client-hero[data-client-status="inactive"] {
  background: #f5f6f7;
}

.client-hero-main {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.client-hero-avatar {
  width: var(--avatar-lg);
  height: var(--avatar-lg);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--navy-deep), #2c4a7c);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.client-hero-copy {
  min-width: 0;
}

.client-hero-copy h1 {
  margin: 7px 0 6px;
  overflow: hidden;
  color: var(--navy);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-hero-copy > p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-hero-copy .client-hero-lifecycle {
  margin-top: 8px;
  color: #8a5a17;
  white-space: normal;
}

.client-hero-lifecycle-actions {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.client-hero-side {
  display: grid;
  gap: 12px;
  justify-items: end;
  flex: 0 0 auto;
}

.client-hero-chips {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.client-hero-chips .member-chip {
  padding: 5px 12px 5px 5px;
  background: var(--surface-blue);
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px 6px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-blue);
}

button.hero-chip {
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.hero-chip--editable:hover,
.hero-chip--editable:focus-visible {
  border-color: var(--blue-light);
  background: #eaf3fb;
}

.hero-chip .member-chip-avatar {
  width: 26px;
  height: 26px;
  font-size: 0.55rem;
}

.member-chip-avatar--entity {
  background: var(--blue);
}

.hero-chip-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.hero-chip-copy small {
  color: var(--muted-light);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-chip-copy strong {
  overflow: hidden;
  max-width: 150px;
  color: var(--ink);
  font-size: var(--text-2xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-partner-select {
  max-width: 190px;
  padding: 0;
  border: 0;
  color: var(--navy);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.hero-partner-select:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.tab-count {
  display: inline-block;
  min-width: 17px;
  margin-left: 7px;
  padding: 2px 5px;
  border-radius: 999px;
  color: var(--muted);
  background: #edf0f4;
  font-size: 0.58rem;
  font-weight: 700;
  text-align: center;
}

.workspace-tabs a[aria-current="page"] .tab-count {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

.workspace-tabs {
  display: flex;
  gap: 5px;
  margin: 30px 0 22px;
  padding: 5px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
}

.workspace-tabs a {
  flex: 0 0 auto;
  padding: 10px 15px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}

.workspace-tabs a:hover {
  color: var(--navy);
}

.workspace-tabs a[aria-current="page"] {
  color: #fff;
  background: var(--navy);
  box-shadow: 0 5px 13px rgba(26, 39, 68, 0.16);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 18px;
}

.metric-card,
.content-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 20px rgba(26, 39, 68, 0.035);
}

.metric-card {
  padding: 19px;
}

.metric-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.metric-card strong {
  color: var(--navy);
  font-size: 1.25rem;
  letter-spacing: -0.035em;
}

.task-metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 20px rgba(26, 39, 68, 0.035);
}

.task-metric {
  min-width: 0;
  padding: 17px 19px;
  border: 0;
  border-right: 1px solid var(--border);
  color: inherit;
  background: transparent;
  text-align: left;
}

button.task-metric {
  cursor: pointer;
}

.task-metric:last-child {
  border-right: 0;
}

button.task-metric:hover,
.task-metric--active {
  background: var(--surface-blue);
}

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

.task-metric span {
  display: block;
  margin-bottom: 7px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.task-metric strong {
  color: var(--navy);
  font-size: 1.18rem;
  letter-spacing: -0.035em;
}

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

.content-grid--wide-left {
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
}

.content-card {
  padding: 24px;
}

.content-card--full {
  grid-column: 1 / -1;
}

.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.card-heading h2 {
  margin: 0;
  color: var(--navy);
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.card-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.67rem;
}

.card-heading .action-button {
  margin-left: auto;
}

.card-heading .action-button + .action-button {
  margin-left: 0;
}

.action-button {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 0.62rem;
  white-space: nowrap;
}

.action-button--danger {
  color: var(--red);
  border-color: #edc8c4;
  background: var(--red-soft);
}

.action-button--danger:hover:not(:disabled) {
  color: #8f2d27;
  border-color: #dca49f;
  background: #fae5e2;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.schedule-list {
  display: grid;
  gap: 6px;
}

.expandable-collection-list--expanded {
  max-height: var(--expanded-max-height, 520px);
  padding-right: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.expandable-toggle {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 9px 12px;
  border: 1px dashed #c8d4e3;
  border-radius: 9px;
  color: var(--blue);
  background: #f8faff;
  font-size: 0.65rem;
  font-weight: 700;
  cursor: pointer;
}

.expandable-toggle:hover {
  border-color: #9eb3ce;
  background: #f0f5fc;
}

.expandable-toggle:focus-visible {
  outline: 3px solid rgba(74, 127, 208, 0.24);
  outline-offset: 2px;
}

.schedule-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  border-radius: 9px;
  background: #f7f9fc;
}

.schedule-copy {
  min-width: 0;
}

.schedule-generation {
  display: block;
  margin-top: 5px;
  color: var(--blue);
  font-size: 0.62rem;
  font-weight: 650;
}

.work-plan-introduction {
  margin-bottom: 18px;
}

.obligation-filter-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.obligation-filter-bar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.obligation-filter-bar select {
  min-width: 180px;
  min-height: 38px;
  padding: 7px 34px 7px 10px;
  border: 1px solid #cad6e5;
  border-radius: 9px;
  color: var(--navy);
  background: #fff;
  text-transform: none;
}

.obligation-filter-count {
  padding-bottom: 9px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 650;
}

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

.workstream-card {
  min-width: 0;
}

.workstream-card .card-heading {
  align-items: flex-start;
}

.workstream-card .card-heading p {
  flex: 1;
  line-height: 1.45;
}

.workstream-count {
  min-width: 25px;
  padding: 6px 8px;
  border-radius: 999px;
  color: var(--blue);
  background: #eaf0fa;
  font-size: 0.64rem;
  font-weight: 700;
  text-align: center;
}

.coverage-overview {
  margin-bottom: 18px;
}

.coverage-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: -2px 0 20px;
  overflow: hidden;
  border: 1px solid #e2e7ed;
  border-radius: 10px;
  background: #fafbfc;
}

.coverage-summary > div {
  padding: 14px 16px;
  border-right: 1px solid #e2e7ed;
}

.coverage-summary > div:last-child {
  border-right: 0;
}

.coverage-summary span,
.coverage-summary strong {
  display: block;
}

.coverage-summary span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.coverage-summary strong {
  color: var(--navy);
  font-size: 1.05rem;
}

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

.coverage-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid #e1e7ed;
  border-radius: 11px;
  background: #fbfcfd;
}

.coverage-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.coverage-card-heading p,
.coverage-card-heading h3 {
  margin: 0;
}

.coverage-card-heading p {
  color: var(--muted-light);
  font-size: 0.54rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.coverage-card-heading h3 {
  margin-top: 3px;
  color: var(--navy);
  font-size: 0.86rem;
}

.coverage-card-heading > strong {
  min-width: 28px;
  min-height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--blue);
  background: #eaf0fa;
  font-size: 0.62rem;
}

.coverage-tags {
  display: flex;
  gap: 5px;
  margin: 13px 0;
  overflow: hidden;
  flex-wrap: wrap;
}

.coverage-tag {
  padding: 5px 7px;
  border-radius: 999px;
  color: #5f6f85;
  background: #edf0f4;
  font-size: 0.53rem;
  font-weight: 700;
}

.coverage-tag--bookkeeping { color: #24684f; background: #e7f4ee; }
.coverage-tag--annual-reports { color: #85520e; background: #fff2dd; }
.coverage-tag--sales-tax-registrations { color: #62458c; background: #f1ebfa; }
.coverage-tag--tax-filings { color: #963c33; background: #fbecea; }
.coverage-tag--payroll-reporting { color: #245e86; background: #e8f2f8; }
.coverage-tag--entity-registrations { color: #52647d; background: #eaf0f6; }

.coverage-details {
  display: grid;
  gap: 8px;
  margin: 0;
}

.coverage-details > div {
  display: grid;
  grid-template-columns: 75px minmax(0, 1fr);
  gap: 8px;
}

.coverage-details dt,
.coverage-details dd {
  margin: 0;
  font-size: 0.6rem;
  line-height: 1.45;
}

.coverage-details dt {
  color: var(--muted);
}

.coverage-details dd {
  overflow: hidden;
  color: var(--ink);
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-note--attention {
  color: var(--amber);
}

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

.obligation-item {
  padding: 16px;
  border: 1px solid #e4e9ef;
  border-radius: 11px;
  background: #fbfcfd;
}

.obligation-item-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.obligation-responsibility,
.obligation-task-summary {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.55;
}

.obligation-record-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.obligation-record-facts > div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.obligation-record-facts .obligation-record-facts-wide { grid-column: 1 / -1; }
.obligation-record-facts dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.obligation-record-facts dd {
  margin: 0;
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.45;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.obligation-lifecycle-note {
  margin: 10px 0 0;
  padding: 9px 11px;
  border: 1px solid #ead7ab;
  border-radius: var(--radius-sm);
  color: #765019;
  background: #fff9ed;
  font-size: 0.65rem;
  line-height: 1.5;
}

.obligation-task-summary {
  margin-top: 4px;
  color: var(--blue);
  font-weight: 700;
}

.obligation-item .schedule-list {
  margin-top: 13px;
}

.obligation-item .expandable-collection {
  margin-top: 13px;
}

.obligation-item .expandable-collection .schedule-list {
  margin-top: 0;
}

.obligation-item-actions {
  margin-top: 13px;
}

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

.operation-note {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfcfd;
}

.operation-note p {
  margin: 8px 0 14px;
  color: var(--ink);
  font-size: 0.75rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

.operation-note-meta {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.detail-list {
  display: grid;
  grid-template-columns: minmax(120px, 0.4fr) minmax(0, 1fr);
  gap: 0;
  margin: 0;
}

.detail-list dt,
.detail-list dd {
  margin: 0;
  padding: 11px 0;
  border-bottom: 1px solid #edf0f3;
  font-size: 0.72rem;
  line-height: 1.55;
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  color: var(--ink);
  font-weight: 600;
  white-space: pre-line;
}

.detail-list dt:last-of-type,
.detail-list dd:last-of-type {
  border-bottom: 0;
}

.data-table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  padding: 13px 12px;
  border-bottom: 1px solid #edf0f3;
  color: var(--ink);
  font-size: 0.7rem;
  line-height: 1.45;
  vertical-align: top;
  white-space: pre-line;
}

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

.data-table strong {
  color: var(--navy);
}

.cell-secondary {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.63rem;
}

.task-work-board-card {
  padding: 0;
  overflow: hidden;
}

.task-work-board-card > .card-heading {
  min-height: 72px;
  margin: 0;
  padding: 19px 23px;
  border-bottom: 1px solid var(--border);
}

.task-work-board-card > .data-note {
  margin-right: 23px;
  margin-left: 23px;
}

.segmented-control {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid #d6dfe9;
  border-radius: 9px;
  background: #f3f5f8;
}

.segmented-control-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 6px 10px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 0.63rem;
  font-weight: 700;
  cursor: pointer;
}

.filter-bar .segmented-control-button {
  min-height: var(--control-height);
  padding: 8px 12px;
}

.segmented-control-button:hover,
.segmented-control-button--active {
  color: var(--navy);
  background: #fff;
  box-shadow: 0 2px 7px rgba(26, 39, 68, 0.09);
}

.task-timeline-board {
  display: grid;
}

.task-timeline-section + .task-timeline-section {
  border-top: 1px solid var(--border);
}

.task-timeline-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 17px 23px 10px;
  color: var(--navy);
  background: #fafbfc;
  font-size: 0.72rem;
  letter-spacing: -0.01em;
}

.task-timeline-heading span {
  display: inline-grid;
  min-width: 23px;
  min-height: 23px;
  place-items: center;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--muted);
  background: #edf0f4;
  font-size: 0.6rem;
}

.task-timeline-list {
  display: grid;
}

.task-timeline-row {
  --task-stream-color: #728095;
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(210px, 1fr) minmax(100px, 0.34fr) minmax(125px, 0.43fr) 105px 145px;
  align-items: center;
  gap: 14px;
  min-height: 96px;
  padding: 15px 20px 15px 18px;
  border-top: 1px solid #edf0f3;
  background: #fff;
}

.task-timeline-row::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--task-stream-color);
  content: "";
}

.task-timeline-row:hover {
  z-index: 1;
  background: #fbfcfe;
  box-shadow: 0 7px 22px rgba(26, 39, 68, 0.055);
}

.task-timeline-row--bookkeeping { --task-stream-color: #31876a; }
.task-timeline-row--annual-reports { --task-stream-color: #b97924; }
.task-timeline-row--sales-tax-registrations { --task-stream-color: #7d62ad; }
.task-timeline-row--tax-filings { --task-stream-color: #c25a4d; }
.task-timeline-row--payroll-reporting { --task-stream-color: #2f72a2; }
.task-timeline-row--entity-registrations { --task-stream-color: #697a93; }

.task-timeline-row--completed {
  opacity: 0.74;
}

.task-stream-monogram {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--task-stream-color);
  background: color-mix(in srgb, var(--task-stream-color) 11%, white);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.task-timeline-main {
  min-width: 0;
}

.task-timeline-title,
.task-timeline-subtitle {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-timeline-title {
  color: var(--navy);
  font-size: 0.75rem;
  line-height: 1.4;
}

.task-timeline-subtitle {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.62rem;
}

.task-timeline-context {
  display: flex;
  align-items: center;
  gap: 6px 11px;
  margin-top: 7px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.61rem;
  white-space: nowrap;
}

.task-timeline-context > span:not(.task-stream-label)::before,
.task-timeline-context > a::before {
  margin-right: 10px;
  color: #c1c9d3;
  content: "\00b7";
}

.task-stream-label {
  color: var(--task-stream-color);
  font-weight: 750;
}

.task-stream-label::before {
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-right: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.task-timeline-owner {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 650;
}

.task-timeline-owner > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-owner-avatar {
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--blue);
  background: #eaf0fa;
  font-size: 0.52rem;
  font-weight: 800;
}

.task-timeline-time,
.task-timeline-due,
.task-timeline-status {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.58rem;
  font-style: normal;
  line-height: 1.35;
}

.task-timeline-time strong,
.task-timeline-due strong {
  color: var(--ink);
  font-size: 0.66rem;
}

.task-timeline-time span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-due-relative--overdue {
  color: var(--red);
  font-weight: 750;
}

.task-review-due {
  color: #7047a3;
  font-size: 0.68rem;
  font-weight: 800;
}

.task-timeline-status {
  justify-items: start;
}

.task-timer-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid color-mix(in srgb, var(--green) 30%, var(--border));
  border-radius: 9px;
  color: color-mix(in srgb, var(--green) 82%, black);
  background: color-mix(in srgb, var(--green) 7%, white);
  font: inherit;
  font-size: 0.64rem;
  font-weight: 750;
  cursor: pointer;
}

.task-timer-button::before {
  margin-right: 6px;
  content: "\25B6";
  font-size: 0.55rem;
}

.task-timer-button:hover,
.task-timer-button:focus-visible {
  border-color: var(--green);
  background: color-mix(in srgb, var(--green) 13%, white);
  outline: none;
}

.task-timeline-status > span:last-child:not(.status-badge) {
  color: var(--muted);
  font-size: 0.55rem;
}

.task-timeline-muted {
  color: var(--muted-light);
  font-size: 0.6rem;
}

.status-badge {
  padding: 6px 8px;
  color: var(--amber);
  background: var(--amber-soft);
}

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

.status-badge--closing {
  color: #9a641b;
  background: #fff0cf;
}

.status-badge--closed {
  color: var(--blue);
  background: #edf3fc;
}

.status-badge--inactive {
  color: var(--muted);
  background: #eff1f4;
}

.status-badge--completed,
.status-badge--paid {
  color: var(--green);
  background: var(--green-soft);
}

.status-badge--sent {
  color: var(--blue);
  background: #edf3fc;
}

.status-badge--draft {
  color: var(--muted);
  background: #eff1f4;
}

.status-badge--overdue,
.status-badge--failed {
  color: var(--red);
  background: var(--red-soft);
}

.bar-list {
  display: grid;
  gap: 13px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) 2fr auto;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.68rem;
}

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

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--blue-light));
}

.empty-inline {
  padding: 34px 20px;
  border: 1px dashed #d5dce5;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.6;
  text-align: center;
}

.empty-inline--compact {
  padding: 18px 14px;
}

.data-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.55;
}

.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.73rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.button:disabled {
  cursor: default;
  opacity: 0.48;
}

.button--primary {
  color: #fff;
  background: var(--navy);
}

.button--primary:hover:not(:disabled) {
  background: #27395f;
}

.button--secondary {
  color: var(--navy);
  border-color: var(--border);
  background: #fff;
}

.button--secondary:hover:not(:disabled) {
  border-color: #b9c7d9;
  background: var(--surface-blue);
}

.button--quiet {
  min-height: 36px;
  color: var(--muted);
  border-color: var(--border);
  background: transparent;
}

.button--quiet:hover {
  color: var(--navy);
  background: var(--surface-blue);
}

.button--danger {
  color: #fff;
  background: var(--red);
}

.button--danger:hover:not(:disabled) {
  background: #942f29;
}

.button:focus-visible,
.brand:focus-visible,
.header-link:focus-visible,
.back-link:focus-visible,
.client-row-link:focus-visible,
.header-search input:focus-visible,
.header-search-option:focus-visible,
.module-tabs a:focus-visible,
.workspace-tabs a:focus-visible,
.task-client-link:focus-visible,
.modal-close:focus-visible {
  outline: 3px solid rgba(74, 127, 208, 0.28);
  outline-offset: 3px;
}

body.modal-open {
  overflow: hidden;
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  justify-content: flex-end;
  background: rgba(17, 28, 51, 0.58);
  backdrop-filter: blur(4px);
}

/* Right-side slide-over editor (Compass pattern) */
.operation-modal {
  width: min(100%, var(--slideover-width, 560px));
  height: 100%;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  background: #fff;
  box-shadow: -24px 0 70px rgba(17, 28, 51, 0.26);
  animation: slideover-in 0.26s ease;
}

@keyframes slideover-in {
  from { transform: translateX(60px); opacity: 0.4; }
  to { transform: translateX(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .operation-modal {
    animation: none;
  }
}

/* Focused first-use Client Operations surface */
.operation-modal {
  width: min(100%, 720px);
}

.page-heading-actions,
.client-hero-actions,
.tracker-connection-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.button--tracker {
  border: 1px solid var(--navy);
  color: #fff;
  background: var(--navy);
}

.button--tracker:hover {
  color: #fff;
  background: var(--navy-deep);
}

.overview-core-grid {
  align-items: stretch;
}

.assignment-focus-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--border);
}

.assignment-focus-row {
  min-height: 54px;
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.assignment-focus-role {
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 700;
}

.assignment-focus-members {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.assignment-focus-members .member-chip {
  padding-right: 5px;
}

.assignment-focus-members .action-button {
  min-height: 28px;
  margin-left: 3px;
  padding: 4px 8px;
}

.overview-section-selector {
  margin-top: 18px;
  padding-bottom: 18px;
}

.overview-section-buttons,
.obligation-workstream-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.overview-section-button,
.obligation-workstream-tab {
  min-height: 38px;
  flex: 0 0 auto;
  padding: 8px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 700;
}

.overview-section-button:hover,
.overview-section-button--active,
.obligation-workstream-tab:hover,
.obligation-workstream-tab--active {
  border-color: var(--blue-light);
  color: var(--navy);
  background: var(--surface-blue);
}

.overview-selected-section {
  margin-top: 18px;
}

.obligation-workstream-tabs {
  margin: 16px 0;
  padding: 2px 2px 8px;
}

.obligation-workstream-tab {
  border-radius: 9px;
}

.obligation-workstream-tab span {
  display: inline-grid;
  min-width: 20px;
  min-height: 20px;
  place-items: center;
  margin-left: 7px;
  border-radius: 999px;
  color: var(--muted);
  background: #edf0f4;
  font-size: 0.6rem;
}

.workstream-grid--selected {
  grid-template-columns: 1fr;
}

.secondary-disclosure {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
}

.secondary-disclosure > summary {
  padding: 14px 18px;
  color: var(--navy);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
}

.secondary-disclosure > .content-card {
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: none;
}

.client-work-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.client-work-toolbar .eyebrow,
.client-work-toolbar h2 {
  margin: 0;
}

.client-work-toolbar h2 {
  margin-top: 5px;
  color: var(--navy);
  font-size: 1.15rem;
}

.compact-select {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
}

.compact-select select,
.task-status-select {
  min-height: 36px;
  padding: 0 34px 0 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  font-size: 0.7rem;
  font-weight: 600;
}

.task-metric-strip {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.task-metric,
.task-metric:nth-child(2),
.task-metric:nth-child(-n + 2),
.task-metric:last-child {
  min-height: 98px;
  padding: 14px 15px;
  border: 1px solid var(--border);
  border-top: 4px solid var(--blue);
  border-radius: 12px;
  background: #fff;
}

.task-metric--due { border-top-color: var(--red); }
.task-metric--upcoming { border-top-color: var(--blue-light); }
.task-metric--blocked { border-top-color: var(--amber); }
.task-metric--review { border-top-color: #9a7bc4; }
.task-metric--sent { border-top-color: #7352ad; }

.task-metric--active {
  border-color: var(--navy);
  box-shadow: 0 0 0 2px rgba(26, 39, 68, 0.1);
}

.task-metric span {
  min-height: 30px;
  overflow: visible;
  color: var(--ink);
  font-size: 0.68rem;
  line-height: 1.35;
  text-overflow: initial;
  text-transform: none;
  white-space: normal;
}

.task-metric strong {
  font-size: 1.55rem;
}

.activity-list {
  border-top: 1px solid var(--border);
}

.activity-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.activity-kind {
  width: fit-content;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--blue);
  background: var(--surface-blue);
  font-size: 0.59rem;
  font-weight: 700;
  text-transform: uppercase;
}

.activity-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.activity-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-copy span,
.activity-row time {
  color: var(--muted);
  font-size: 0.65rem;
}

.activity-event-details {
  margin-top: 4px;
}

.activity-event-details > summary {
  width: fit-content;
  color: var(--blue);
  cursor: pointer;
  font-size: 0.64rem;
  font-weight: 700;
}

.activity-event-detail-body {
  display: flex;
  align-items: center;
  gap: 8px 12px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-blue);
}

.activity-event-detail-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.64rem;
}

@media (max-width: 1120px) {
  .task-metric-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-header {
    align-items: center;
  }

  .header-actions {
    align-items: center;
    flex-direction: row;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
  }

  .header-link,
  .company-switcher-wrap {
    display: block;
  }

  .company-switcher-wrap select {
    max-width: 150px;
  }

  .page-heading-actions,
  .client-hero-actions {
    justify-content: flex-start;
  }

  .client-table .count-cell,
  .client-table .row-open-cell {
    display: none !important;
  }

  .client-table td:not(.client-cell)::before {
    display: block;
    margin-bottom: 3px;
    color: var(--muted-light);
    font-size: 0.56rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .client-table td:nth-child(2)::before { content: "Entity"; }
  .client-table td:nth-child(3)::before { content: "Billing entity"; }
  .client-table td:nth-child(4)::before { content: "Partner"; }
  .client-table td:nth-child(6)::before { content: "Next deadline"; }

  .client-work-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .activity-row {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .activity-row time {
    grid-column: 2;
  }
}

@media (max-width: 560px) {
  .header-actions {
    width: 100%;
    justify-content: flex-start;
    order: 3;
  }

  .app-header .module-tabs {
    order: 4;
    width: 100%;
    overflow-x: auto;
  }

  .header-search {
    order: 5;
  }

  .task-metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-metric,
  .task-metric:nth-child(2),
  .task-metric:nth-child(-n + 2),
  .task-metric:last-child {
    min-height: 90px;
    border: 1px solid var(--border);
    border-top: 4px solid var(--blue);
  }

  .task-metric--due { border-top-color: var(--red); }
  .task-metric--upcoming { border-top-color: var(--blue-light); }
  .task-metric--blocked { border-top-color: var(--amber); }
  .task-metric--review { border-top-color: #9a7bc4; }
  .task-metric--sent { border-top-color: #7352ad; }

  .assignment-focus-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .operation-modal-actions {
    position: sticky;
    bottom: 0;
  }
}

.operation-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--navy-deep), #233f6b 78%, #2c4a7c);
}

.operation-modal-header .eyebrow {
  color: #a9c9f4;
}

.operation-modal-header h2 {
  margin: 6px 0 7px;
  color: #fff;
  font-size: 1.3rem;
  letter-spacing: -0.035em;
}

.operation-modal-header > div > p:last-child {
  max-width: 590px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
  line-height: 1.55;
}

.modal-close {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  font-size: 1.25rem;
  line-height: 1;
}

.modal-close:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.26);
}

#clientOperationsModalForm {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.operation-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 13px 15px;
  flex: 1;
  min-height: 0;
  padding: 19px 24px;
  overflow-y: auto;
}

.operation-field {
  min-width: 0;
}

.operation-field--wide,
.operation-field--checkbox {
  grid-column: 1 / -1;
}

.operation-field--section {
  grid-column: 1 / -1;
  padding-top: 7px;
  border-top: 1px solid var(--border);
}

.operation-field--section:first-child {
  padding-top: 0;
  border-top: 0;
}

.operation-field--section h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.86rem;
}

.operation-field--section p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.45;
}

.operation-field--action-group {
  grid-column: 1 / -1;
  margin-top: 3px;
  padding: 15px;
  border: 1px solid #ead4d4;
  border-radius: 11px;
  background: #fff9f9;
}

.operation-field--action-group h3 {
  margin: 0;
  color: var(--navy);
  font-size: 0.82rem;
}

.operation-field--action-group > p {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

.operation-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.operation-field > label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 700;
}

.operation-field > label span:not(.field-flag--required) {
  color: var(--muted-light);
  font-size: 0.61rem;
  font-weight: 600;
}

.operation-group-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 700;
}

.operation-group-label span:not(.field-flag--required) {
  color: var(--muted-light);
  font-size: 0.61rem;
  font-weight: 600;
}

.operation-option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  max-height: 230px;
  padding: 10px;
  overflow: auto;
  border: 1px solid #cfd8e3;
  border-radius: var(--radius-sm);
  background: var(--surface-blue);
}

.operation-option-search {
  margin-bottom: 8px;
}

.operation-option {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 6px 7px;
  border-radius: 7px;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.66rem;
  font-weight: 600;
}

.operation-option:hover {
  background: #fff;
}

.operation-option input {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--blue);
}

.operation-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operation-field input:not([type="checkbox"]),
.operation-field select,
.operation-field textarea {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid #cfd8e3;
  border-radius: var(--radius-sm);
  outline: none;
  color: var(--ink);
  background: #fff;
  font-size: 0.77rem;
}

.operation-field textarea {
  min-height: 105px;
  resize: vertical;
  line-height: 1.5;
}

.operation-field input:focus,
.operation-field select:focus,
.operation-field textarea:focus {
  border-color: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(74, 127, 208, 0.13);
}

.operation-field-hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.45;
}

.operation-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-blue);
  cursor: pointer;
}

.operation-checkbox input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin: 1px 0 0;
  accent-color: var(--blue);
}

.operation-checkbox strong,
.operation-checkbox span {
  display: block;
}

.operation-checkbox strong {
  color: var(--ink);
  font-size: 0.7rem;
}

.operation-checkbox span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.4;
}

.form-error {
  margin: 0 28px;
  padding: 11px 13px;
  border: 1px solid #f1c7c2;
  border-radius: var(--radius-sm);
  color: var(--red);
  background: var(--red-soft);
  font-size: 0.7rem;
  line-height: 1.45;
}

.operation-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 28px 20px;
  border-top: 1px solid var(--border);
  background: #fff;
}

.field-flag {
  color: var(--muted-light);
  font-size: 0.61rem;
  font-weight: 600;
}

.field-flag--required {
  color: var(--red);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Unsaved-changes confirmation (Compass three-button pattern) */
.unsaved-layer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 28, 51, 0.4);
}

.unsaved-dialog {
  width: min(100%, 430px);
  padding: 26px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 24px 70px rgba(17, 28, 51, 0.3);
}

.unsaved-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 50%;
  color: var(--amber);
  background: var(--amber-soft);
  font-size: 1rem;
  font-weight: 800;
}

.unsaved-eyebrow {
  margin: 0;
  color: var(--amber);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.unsaved-dialog h3 {
  margin: 6px 0 6px;
  color: var(--navy);
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.unsaved-dialog p:last-of-type {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

.unsaved-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.button--danger-outline {
  border: 1px solid #f1c7c2;
  color: var(--red);
  background: #fff;
}

.button--danger-outline:hover:not(:disabled) {
  background: var(--red-soft);
}

.operation-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 110;
  max-width: min(380px, calc(100% - 48px));
  padding: 13px 16px;
  border: 1px solid #bcdcca;
  border-radius: var(--radius-sm);
  color: var(--green);
  background: #f6fcf8;
  box-shadow: var(--shadow);
  font-size: 0.72rem;
  font-weight: 700;
}

.app-footer {
  width: min(1240px, calc(100% - 40px));
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: auto auto 0;
  padding: 22px 0 26px;
  border-top: 1px solid var(--border);
  color: var(--muted-light);
  font-size: 0.67rem;
  font-weight: 600;
}

@media (max-width: 1000px) {
  .app-header {
    flex-wrap: wrap;
  }

  .app-header .brand-subtitle {
    display: none;
  }

  .header-search {
    order: 4;
    flex: 1 1 100%;
    max-width: none;
  }

  .client-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .client-hero-side {
    justify-items: start;
  }

  .client-hero-chips {
    justify-content: flex-start;
  }

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

  .task-metric-strip,
  .coverage-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-metric:nth-child(2),
  .coverage-summary > div:nth-child(2) {
    border-right: 0;
  }

  .task-metric:nth-child(-n + 2),
  .coverage-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }

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

  .content-grid,
  .content-grid--wide-left,
  .workstream-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app-header {
    align-items: flex-start;
    padding: 14px 18px;
  }

  .header-actions {
    align-items: flex-end;
    flex-direction: column-reverse;
    gap: 7px;
  }

  .header-link,
  .company-switcher-wrap {
    display: none;
  }

  .app-main,
  .app-footer {
    width: min(100% - 28px, 1240px);
  }

  .preview-banner,
  .page-heading,
  .workspace-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .work-hero {
    grid-template-columns: 1fr;
    align-items: start;
    min-height: 0;
    padding: 30px 26px;
  }

  .work-hero-deadlines {
    justify-content: flex-start;
  }

  .task-timeline-row {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px 12px;
    padding-right: 16px;
  }

  .task-stream-monogram {
    grid-column: 1;
    grid-row: 1 / span 3;
  }

  .task-timeline-main {
    grid-column: 2;
    grid-row: 1;
  }

  .task-timeline-owner {
    grid-column: 2;
    grid-row: 2;
  }

  .task-timeline-time {
    grid-column: 2;
    grid-row: 3;
  }

  .task-timeline-due {
    grid-column: 3;
    grid-row: 1;
    text-align: right;
  }

  .task-timeline-status {
    grid-column: 3;
    grid-row: 2 / span 2;
    justify-items: end;
  }

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

  .filter-bar .field {
    flex: 1 1 45%;
  }

  .filter-bar .field--segments,
  .filter-bar > .button {
    flex: 1 1 100%;
    margin-left: 0;
  }

  /* Table rows collapse into stacked cards */
  .client-table thead {
    display: none;
  }

  .client-table,
  .client-table tbody,
  .client-table tr,
  .client-table td {
    display: block;
  }

  .client-table tr {
    padding: 6px 0;
  }

  .client-table tr + tr {
    border-top: 1px solid var(--border);
  }

  .client-table td {
    border-top: 0;
    padding: 5px var(--row-pad-x);
  }

  .client-table td:first-child {
    padding-top: 10px;
  }

  .client-table td:last-child {
    padding-bottom: 10px;
  }

  .count-cell {
    display: none;
  }

  .row-open-cell {
    display: none;
  }

  .deadline-cell > span {
    max-width: none;
  }

  .schedule-row,
  .obligation-item-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .state-card {
    padding: 30px 22px;
  }

  .filter-bar .field {
    flex: 1 1 100%;
  }

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

  .task-metric-strip,
  .coverage-summary {
    grid-template-columns: 1fr;
  }

  .task-metric,
  .task-metric:nth-child(2),
  .coverage-summary > div,
  .coverage-summary > div:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .task-metric:last-child,
  .coverage-summary > div:last-child {
    border-bottom: 0;
  }

  .work-hero-deadlines {
    align-items: start;
    flex-direction: column;
    gap: 16px;
  }

  .work-hero-primary strong {
    font-size: 3.25rem;
  }

  .task-work-board-card > .card-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .task-timeline-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .task-stream-monogram {
    width: 34px;
    height: 34px;
  }

  .task-timeline-due,
  .task-timeline-status {
    grid-column: 2;
    justify-items: start;
    text-align: left;
  }

  .task-timeline-due {
    grid-row: 4;
  }

  .task-timeline-status {
    grid-row: 5;
  }

  .obligation-filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .obligation-filter-bar select {
    width: 100%;
  }

  .obligation-filter-count {
    padding-bottom: 0;
  }

  .detail-list {
    grid-template-columns: 1fr;
  }

  .detail-list dt {
    padding-bottom: 1px;
    border-bottom: 0;
  }

  .detail-list dd {
    padding-top: 3px;
  }

  .operation-modal {
    width: 100%;
    border-left: 0;
  }

  .operation-modal-header,
  .operation-form-grid,
  .operation-modal-actions {
    padding-right: 19px;
    padding-left: 19px;
  }

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

  .operation-field--wide,
  .operation-field--checkbox,
  .operation-field--section {
    grid-column: auto;
  }

  .operation-option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-error {
    margin-right: 19px;
    margin-left: 19px;
  }

  .app-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* These responsive rules intentionally come last so the Tracker link and
   company switcher never disappear on narrow screens. */
@media (max-width: 1120px) {
  .task-metric-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .task-metric,
  .task-metric:nth-child(2),
  .task-metric:nth-child(-n + 2),
  .task-metric:last-child {
    border: 1px solid var(--border);
    border-top: 4px solid var(--blue);
  }

  .task-metric--due { border-top-color: var(--red); }
  .task-metric--upcoming { border-top-color: var(--blue-light); }
  .task-metric--blocked { border-top-color: var(--amber); }
  .task-metric--review { border-top-color: #9a7bc4; }
  .task-metric--sent { border-top-color: #7352ad; }
}

/* Compass comparison refinements: preserve the richer operating controls while
   reducing the amount of persistent chrome and making every work queue visible. */
.app-main {
  padding-top: 22px;
}

.preview-banner {
  margin-bottom: 24px;
  padding: 10px 13px;
}

.work-hero {
  min-height: 176px;
  padding: 27px 32px;
}

.work-hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.25rem);
}

.work-hero-primary strong {
  font-size: 3.3rem;
}

.filter-bar {
  margin-top: 22px;
}

.task-metric-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.task-metric,
.task-metric:nth-child(2),
.task-metric:nth-child(-n + 2),
.task-metric:last-child {
  min-height: 88px;
  padding: 12px 14px;
}

.task-metric--completed {
  border-top-color: var(--green);
}

@media (min-width: 821px) and (max-width: 1000px) {
  .app-header {
    flex-wrap: nowrap;
    gap: 9px;
    min-height: 60px;
    padding: 8px 16px;
  }

  .app-header .brand > span:last-child {
    display: none;
  }

  .app-header .module-tabs a {
    padding: 7px 10px;
  }

  .header-search {
    order: initial;
    flex: 1 1 150px;
    max-width: 210px;
    margin-left: 0;
  }

  .header-actions {
    gap: 6px;
  }

  .header-link {
    font-size: 0.68rem;
  }

  .company-switcher-wrap select {
    max-width: 135px;
  }

  .header-actions > .button {
    padding-right: 9px;
    padding-left: 9px;
  }
}

@media (max-width: 1120px) {
  .task-metric-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-header {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 9px 12px;
    padding: 10px 14px;
  }

  .header-actions {
    grid-column: 2;
    align-items: center;
    flex-direction: row;
    justify-content: flex-end;
    gap: 7px;
  }

  .app-header .module-tabs,
  .header-search {
    grid-column: 1 / -1;
    width: 100%;
    order: initial;
  }

  .preview-banner {
    align-items: center;
    flex-direction: row;
    gap: 9px;
    margin-bottom: 18px;
  }

  .work-hero {
    padding: 24px;
  }
}

@media (max-width: 560px) {
  .header-actions {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: flex-start;
  }

  .app-header .brand-subtitle {
    display: none;
  }

  .task-metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-banner p {
    font-size: 0.67rem;
  }
}

@media (max-width: 380px) {
  .task-metric-strip {
    grid-template-columns: 1fr;
  }
}

/* Canonical task collaboration */
.task-notifications-wrap {
  position: relative;
}

.header-notification-button {
  width: 38px;
  height: 38px;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--navy);
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
}

.header-notification-button svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-notification-button:hover,
.header-notification-button[aria-expanded="true"] {
  border-color: #b9c7d9;
  background: var(--surface-blue);
}

.notification-count {
  min-width: 18px;
  height: 18px;
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: var(--red);
  font-size: 0.54rem;
  font-weight: 800;
}

.task-notifications-panel {
  width: min(390px, calc(100vw - 28px));
  max-height: min(560px, calc(100vh - 90px));
  position: absolute;
  z-index: 80;
  top: calc(100% + 10px);
  right: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 22px 54px rgba(17, 28, 51, 0.2);
}

.task-notifications-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 17px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-blue);
}

.task-notifications-panel h2,
.task-notifications-panel .eyebrow {
  margin: 0;
}

.task-notifications-panel h2 {
  margin-top: 3px;
  font-size: 0.92rem;
}

.notification-read-all {
  min-height: 31px;
  padding: 0 9px;
  font-size: 0.62rem;
}

.task-notifications-list {
  max-height: 470px;
  overflow-y: auto;
}

.task-notification {
  width: 100%;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  padding: 13px 15px;
  border: 0;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.task-notification:hover,
.task-notification--unread {
  background: #f4f8fd;
}

.task-notification-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--blue);
  background: #e5eefb;
  font-size: 0.64rem;
  font-weight: 800;
}

.task-notification-copy {
  display: grid;
  gap: 4px;
}

.task-notification-copy strong {
  font-size: 0.67rem;
  line-height: 1.45;
}

.task-notification-copy time,
.notification-empty {
  color: var(--muted);
  font-size: 0.59rem;
}

.notification-empty {
  margin: 0;
  padding: 28px 20px;
  line-height: 1.5;
  text-align: center;
}

.task-timeline-title-button {
  width: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: transparent;
  font-family: inherit;
  font-weight: 700;
  text-align: left;
}

.task-timeline-title-button:hover {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.task-metric-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.task-metric--adjustments { border-top-color: #cf7d4b; }
.task-metric--completed { border-top-color: var(--green); }

.status-badge--adjustmentsrequested {
  color: #98532e;
  background: #fff0e7;
}

.operation-modal-content {
  flex: 0 1 52%;
  min-height: 160px;
  padding: 20px 28px;
  overflow-y: auto;
  border-bottom: 1px solid var(--border);
  background: #fbfcfe;
}

.task-detail-content {
  display: grid;
  gap: 16px;
}

.task-detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.task-detail-summary > div {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
}

.task-detail-summary > div > span:first-child {
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.task-detail-summary strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.67rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-adjustments-callout,
.task-collaboration-unavailable,
.task-conversation-empty {
  display: grid;
  gap: 5px;
  padding: 12px 13px;
  border: 1px solid #efc9ad;
  border-radius: 9px;
  color: #754124;
  background: #fff7f0;
  font-size: 0.66rem;
  line-height: 1.5;
}

.task-adjustments-callout span,
.task-collaboration-unavailable p,
.task-conversation-empty p {
  margin: 0;
}

.task-detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.task-detail-actions .button {
  min-height: 35px;
  padding: 0 11px;
  font-size: 0.64rem;
}

.task-conversation-section > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.task-conversation-section h3,
.task-conversation-section .eyebrow {
  margin: 0;
}

.task-conversation-section h3 {
  margin-top: 3px;
  font-size: 0.84rem;
}

.task-conversation {
  display: grid;
  gap: 10px;
}

.task-comment {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
}

.task-comment-avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--navy);
  font-size: 0.57rem;
  font-weight: 800;
}

.task-comment-body {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 3px 10px 10px;
  background: #fff;
}

.task-comment--adjustments_requested .task-comment-body {
  border-color: #efc9ad;
  background: #fffaf5;
}

.task-comment-body header {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.task-comment-body header strong {
  font-size: 0.66rem;
}

.task-comment-body time,
.task-comment-event {
  color: var(--muted);
  font-size: 0.56rem;
}

.task-comment-event {
  padding: 3px 5px;
  border-radius: 999px;
  color: var(--blue);
  background: var(--surface-blue);
  font-weight: 700;
}

.task-comment-body > p {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 0.67rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.task-comment-body .task-comment-mentions {
  color: var(--blue);
  font-size: 0.58rem;
}

.task-comment-files {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 9px;
}

.task-file-button {
  min-width: 0;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.task-file-button:hover {
  border-color: var(--blue-light);
  background: var(--surface-blue);
}

.task-file-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--blue);
  background: #e5eefb;
  font-size: 0.45rem;
  font-weight: 800;
}

.task-file-button > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.task-file-button strong,
.task-file-button small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-file-button strong { font-size: 0.61rem; }
.task-file-button small { color: var(--muted); font-size: 0.54rem; }

.operation-field input[type="file"] {
  padding: 7px;
  cursor: pointer;
}

.operation-field input[type="file"]::file-selector-button {
  min-height: 29px;
  margin-right: 10px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--navy);
  background: var(--surface-blue);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

@media (max-width: 1120px) {
  .task-metric-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .task-metric--adjustments { border-top-color: #cf7d4b; }
}

@media (max-width: 760px) {
  .task-notifications-panel {
    position: fixed;
    top: 72px;
    right: 14px;
  }

  .task-detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .operation-modal-content { padding-right: 19px; padding-left: 19px; }
}

@media (max-width: 560px) {
  .task-metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-metric--adjustments { border-top-color: #cf7d4b; }
  .task-comment-files { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .header-actions {
    align-items: center;
    flex-direction: row;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
  }

  .header-link,
  .company-switcher-wrap {
    display: block;
  }

  .company-switcher-wrap select {
    max-width: 150px;
  }

  .client-table .count-cell,
  .client-table .row-open-cell {
    display: none !important;
  }

  .client-table td:not(.client-cell)::before {
    display: block;
    margin-bottom: 3px;
    color: var(--muted-light);
    font-size: 0.56rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .client-table td:nth-child(2)::before { content: "Entity"; }
  .client-table td:nth-child(3)::before { content: "Billing entity"; }
  .client-table td:nth-child(4)::before { content: "Partner"; }
  .client-table td:nth-child(6)::before { content: "Next deadline"; }
}

@media (max-width: 560px) {
  .header-actions {
    width: 100%;
    justify-content: flex-start;
    order: 3;
  }

  .app-header .module-tabs {
    order: 4;
    width: 100%;
    overflow-x: auto;
  }

  .header-search {
    order: 5;
  }

  .task-metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-metric,
  .task-metric:nth-child(2),
  .task-metric:nth-child(-n + 2),
  .task-metric:last-child {
    min-height: 90px;
    border: 1px solid var(--border);
    border-top: 4px solid var(--blue);
  }

  .task-metric--due { border-top-color: var(--red); }
  .task-metric--upcoming { border-top-color: var(--blue-light); }
  .task-metric--blocked { border-top-color: var(--amber); }
  .task-metric--review { border-top-color: #9a7bc4; }
  .task-metric--sent { border-top-color: #7352ad; }
  .task-metric--completed { border-top-color: var(--green); }
}

@media (max-width: 560px) {
  .app-header .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .app-header .brand > span:last-child {
    display: none;
  }

  .header-actions {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
    order: initial;
  }

  .header-link {
    font-size: 0.66rem;
  }

  .company-switcher-wrap select {
    max-width: 112px;
  }

  .header-actions > .button {
    padding-right: 8px;
    padding-left: 8px;
  }

  .app-header .module-tabs,
  .header-search {
    order: initial;
  }

  .app-header .module-tabs {
    grid-row: 2;
  }

  .header-search {
    grid-row: 3;
  }

  .preview-banner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 360px) {
  .header-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .app-header .module-tabs {
    grid-row: 3;
  }

  .header-search {
    grid-row: 4;
  }
}

/* Compass information hierarchy, adapted to the Novalar blue identity. */
.preview-banner {
  width: fit-content;
  margin: 0 0 18px auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.preview-banner span {
  padding: 6px 10px;
  border: 1px solid #d6e3f1;
  color: var(--blue);
  background: #edf4fb;
  font-size: 0.61rem;
}

.preview-banner p,
.page-heading-actions .role-badge {
  display: none;
}

.page-heading h1,
.workspace-heading h1 {
  font-size: clamp(1.95rem, 4vw, 2.7rem);
}

.filter-bar--directory {
  display: grid;
  grid-template-columns: minmax(360px, 1.8fr) repeat(3, minmax(150px, 1fr));
  align-items: end;
}

.filter-bar--directory .field {
  min-width: 0;
}

.filter-bar--directory .field--directory-search {
  grid-column: 1 / -2;
  width: 100%;
}

.filter-bar--directory > .button {
  width: 100%;
  margin-left: 0;
}

.filter-bar--tasks {
  margin: 20px 0 16px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.work-hero {
  min-height: 154px;
  padding: 23px 28px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 92% 18%, rgba(111, 160, 218, 0.32), transparent 18rem),
    linear-gradient(135deg, var(--navy-deep), #234d7e 68%, #376fa9);
}

.work-hero h1 {
  margin: 5px 0 7px;
  font-size: clamp(2.05rem, 3.6vw, 2.85rem);
}

.work-hero-primary strong {
  font-size: 2.85rem;
}

.work-hero-copy > p:last-child {
  max-width: 610px;
}

.task-metric-strip {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 9px;
}

.task-metric,
.task-metric:nth-child(2),
.task-metric:nth-child(-n + 2),
.task-metric:last-child {
  min-height: 88px;
  padding: 12px 13px;
}

.task-metric span {
  min-height: 28px;
  font-size: 0.65rem;
}

.task-metric strong {
  font-size: 1.42rem;
}

.client-hero {
  padding: 22px 26px;
  border-radius: 16px;
}

.client-hero[data-client-status="active"] {
  background:
    radial-gradient(circle at 96% 0, rgba(47, 109, 167, 0.11), transparent 18rem),
    #f7fafc;
}

.client-hero-avatar {
  width: 62px;
  height: 62px;
  background: linear-gradient(145deg, var(--navy), var(--blue));
}

.workspace-tabs {
  gap: 28px;
  margin: 22px 0 20px;
  padding: 0 2px;
  overflow-x: auto;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}

.workspace-tabs a {
  position: relative;
  padding: 12px 1px 14px;
  border-radius: 0;
  background: transparent;
}

.workspace-tabs a::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--blue);
  content: "";
  opacity: 0;
}

.workspace-tabs a[aria-current="page"] {
  color: var(--navy);
  background: transparent;
  box-shadow: none;
}

.workspace-tabs a[aria-current="page"]::after {
  opacity: 1;
}

.workspace-tabs a[aria-current="page"] .tab-count {
  color: var(--blue);
  background: #e7f0fa;
}

.overview-core-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.entity-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.entity-detail {
  min-height: 92px;
  padding: 18px 20px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.entity-detail:nth-child(3n) {
  border-right: 0;
}

.entity-detail--wide {
  grid-column: 1 / -1;
  border-right: 0;
  border-bottom: 0;
}

.entity-detail dt {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.entity-detail dd {
  margin: 0;
  color: var(--navy);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.4;
}

.content-card {
  border-radius: 14px;
}

.card-heading h2 {
  font-size: 1rem;
}

.detail-list dt,
.assignment-focus-role {
  font-size: 0.72rem;
}

.detail-list dd {
  font-size: 0.82rem;
}

.work-plan-introduction {
  margin-bottom: 0;
  border-radius: 14px 14px 0 0;
  box-shadow: none;
}

.work-plan-introduction .data-note {
  margin-bottom: 0;
}

.obligation-workstream-tabs {
  gap: 26px;
  margin: 0;
  padding: 0 24px;
  border: 1px solid var(--border);
  border-top: 0;
  background: #fff;
}

.obligation-workstream-tab {
  position: relative;
  min-height: 48px;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.obligation-workstream-tab::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--blue);
  content: "";
  opacity: 0;
}

.obligation-workstream-tab:hover,
.obligation-workstream-tab--active {
  border-color: transparent;
  color: var(--navy);
  background: transparent;
}

.obligation-workstream-tab--active::after {
  opacity: 1;
}

.workstream-grid--selected {
  gap: 0;
}

.workstream-grid--selected > .content-card {
  border-top: 0;
  border-radius: 0 0 14px 14px;
  box-shadow: none;
}

.specialized-workstream > .card-heading {
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.standing-record-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.standing-record,
.tax-account-record,
.bookkeeping-service-record {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(20, 38, 61, 0.035);
}

.standing-record--sos {
  border-top: 4px solid var(--stream-entity-registrations);
}

.standing-record-heading,
.tax-account-heading,
.bookkeeping-service-record > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.standing-record-heading > div,
.tax-account-heading > div,
.bookkeeping-service-record > header > div {
  min-width: 0;
}

.standing-record-heading > div:first-child {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.standing-record h3,
.tax-account-record h4,
.bookkeeping-service-record h3 {
  margin: 0;
  color: var(--navy);
  font-size: 0.9rem;
  letter-spacing: -0.02em;
}

.standing-record-heading p,
.tax-account-heading p,
.bookkeeping-service-record header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.68rem;
}

.jurisdiction-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  color: #fff;
  background: var(--blue);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.035em;
}

.jurisdiction-mark--table {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.standing-record-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--border);
}

.standing-record-details > div {
  min-height: 70px;
  padding: 12px 14px;
  background: var(--surface-blue);
}

.standing-record-details dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.standing-record-details dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 700;
}

.standing-record > .obligation-item-actions,
.tax-account-record > .obligation-item-actions,
.bookkeeping-service-record > .obligation-item-actions {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.tax-account-groups {
  display: grid;
  gap: 10px;
}

.tax-account-group {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.tax-account-group > summary {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
}

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

.tax-account-group > summary::after {
  color: var(--muted);
  content: "+";
  font-size: 1rem;
  font-weight: 700;
}

.tax-account-group[open] > summary::after {
  content: "−";
}

.tax-account-group > summary > span:last-of-type {
  color: var(--muted);
  font-size: 0.68rem;
}

.tax-account-list {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--border);
  background: var(--surface-soft);
}

.tax-account-record {
  border-top: 4px solid var(--stream-sales-tax-registrations);
}

.filing-workstream .data-table-wrap {
  border: 1px solid var(--border);
  border-radius: 12px;
}

.filing-workstream .data-table th {
  white-space: nowrap;
}

.filing-workstream .data-table td {
  vertical-align: middle;
}

.filing-due-date {
  color: var(--navy);
  white-space: nowrap;
}

.bookkeeping-service-list {
  display: grid;
  gap: 14px;
}

.bookkeeping-service-record {
  border-top: 4px solid var(--stream-bookkeeping);
}

.bookkeeping-coverage {
  display: grid;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
}

.bookkeeping-coverage-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.bookkeeping-coverage-heading strong {
  color: var(--navy);
  font-size: 0.75rem;
}

.bookkeeping-coverage-heading span {
  color: var(--muted);
  font-size: 0.64rem;
  text-align: right;
}

.bookkeeping-coverage-periods {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.bookkeeping-coverage-period {
  padding: 6px 9px;
  border: 1px solid #d7dee9;
  border-radius: 999px;
  color: #5d6b7e;
  background: #fff;
  font-size: 0.64rem;
  font-weight: 700;
}

.bookkeeping-coverage-period--ready_for_work {
  border-color: #a9d5ff;
  color: #0c568e;
  background: #eef7ff;
}

.bookkeeping-coverage-period--in_progress {
  border-color: #f2ca7b;
  color: #81520a;
  background: #fff8e6;
}

.bookkeeping-coverage-period--in_review {
  border-color: #c8b4ee;
  color: #65449b;
  background: #f7f1ff;
}

.bookkeeping-coverage-period--waiting_for_client {
  border-color: #f0adad;
  color: #983b3b;
  background: #fff2f2;
}

.bookkeeping-coverage-period--completed {
  border-color: #a9d8bd;
  color: #276b46;
  background: #effaf3;
}

.bookkeeping-coverage-actions {
  padding-top: 2px;
}

.secondary-workstream-picker {
  border: 1px solid var(--border);
  border-top: 0;
  background: #fff;
}

.secondary-workstream-picker > summary {
  padding: 11px 24px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 700;
}

.secondary-workstream-buttons {
  display: flex;
  gap: 18px;
  padding: 0 24px 10px;
}

@media (max-width: 1260px) {
  .filter-bar--directory {
    grid-template-columns: minmax(330px, 1.6fr) repeat(2, minmax(150px, 1fr));
  }

  .filter-bar--directory .field--directory-search {
    grid-column: 1 / -2;
  }

  .task-metric-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .filter-bar--directory {
    display: flex;
  }

  .filter-bar--directory .field--directory-search,
  .filter-bar--directory > .button {
    width: auto;
  }

  .overview-core-grid {
    grid-template-columns: 1fr;
  }

  .entity-detail-grid {
    grid-template-columns: 1fr;
  }

  .entity-detail,
  .entity-detail:nth-child(3n) {
    border-right: 0;
  }

  .entity-detail--wide {
    grid-column: auto;
  }

  .obligation-workstream-tabs {
    gap: 18px;
    padding: 0 18px;
  }

  .standing-record-grid {
    grid-template-columns: 1fr;
  }

  .filing-workstream .data-table-wrap {
    overflow-x: auto;
  }
}

/* Task workspace: larger, calmer rows with visible collaboration and archive tools. */
.work-hero-tools {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: end;
  gap: 12px;
}

.button--work-hero {
  min-height: 42px;
  color: var(--navy);
  border-color: rgba(255, 255, 255, 0.82);
  background: #fff;
  box-shadow: 0 8px 20px rgba(11, 29, 58, 0.18);
}

.button--work-hero:hover:not(:disabled) {
  border-color: #fff;
  background: #f4f8ff;
}

.client-work-toolbar-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
}

.task-timeline-row {
  grid-template-columns: 46px minmax(240px, 1fr) 46px minmax(130px, 0.36fr) minmax(150px, 0.45fr) 118px 174px;
  gap: 15px;
  min-height: 108px;
  padding: 17px 22px 17px 19px;
}

.task-timeline-row--completed {
  opacity: 0.88;
}

.task-stream-monogram {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 0.68rem;
}

.task-timeline-title {
  font-size: 0.9rem;
  line-height: 1.35;
}

.task-timeline-subtitle {
  margin-top: 4px;
  font-size: 0.7rem;
}

.task-timeline-context {
  margin-top: 9px;
  font-size: 0.68rem;
}

.task-timeline-owner {
  font-size: 0.7rem;
}

.task-owner-avatar {
  width: 31px;
  height: 31px;
  font-size: 0.59rem;
}

.task-timeline-time,
.task-timeline-due,
.task-timeline-status {
  gap: 5px;
  font-size: 0.66rem;
}

.task-timeline-time strong,
.task-timeline-due strong {
  font-size: 0.76rem;
}

.task-timeline-due--upcoming strong,
.task-timeline-due--upcoming .task-due-relative {
  color: var(--blue);
}

.task-timeline-due--overdue strong,
.task-timeline-due--overdue .task-due-relative {
  color: var(--red);
}

.task-timeline-collaboration {
  display: grid;
  place-items: center;
}

.task-collaboration-indicator {
  min-width: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 8px;
  border: 1px solid #c9d9f1;
  border-radius: 12px;
  color: #315f9c;
  background: #eef5ff;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
}

.task-collaboration-indicator:hover,
.task-collaboration-indicator:focus-visible {
  border-color: var(--blue);
  background: #e3efff;
  outline: none;
}

.task-collaboration-paperclip {
  font-size: 0.9rem;
  line-height: 1;
}

.task-status-select {
  min-height: 42px;
  min-width: 158px;
  padding: 0 34px 0 14px;
  font-size: 0.76rem;
  font-weight: 750;
  text-align: center;
  text-align-last: center;
}

.task-priority,
.task-billing-state {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 0.59rem;
  font-weight: 800;
}

.task-priority--urgent,
.task-priority--high {
  color: #a64035;
  background: #fcece9;
}

.task-priority--low {
  color: #56677e;
  background: #eef1f5;
}

.task-billing-state--ready {
  color: #8c5a10;
  background: #fff1d3;
}

.task-billing-state--invoiced,
.task-billing-state--non-billable {
  color: #267056;
  background: #e7f5ef;
}

.task-billing-state--no-time,
.task-billing-state--unavailable {
  color: var(--muted);
  background: #eef1f5;
}

.task-archive-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(155px, auto));
  align-items: end;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid #d8e4f3;
  border-radius: 13px;
  background: #f7faff;
}

.task-archive-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.task-archive-heading > div {
  display: grid;
  gap: 3px;
}

.task-archive-heading strong {
  color: var(--navy);
  font-size: 0.78rem;
}

.task-archive-heading span:last-child {
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.45;
}

.task-archive-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-weight: 900;
}

@media (max-width: 1180px) {
  .task-timeline-row {
    grid-template-columns: 44px minmax(220px, 1fr) 44px minmax(125px, 0.38fr) 112px 168px;
  }

  .task-timeline-time {
    display: none;
  }

  .task-archive-filters {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .task-archive-heading {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .work-hero-tools {
    justify-items: start;
  }

  .client-work-toolbar,
  .client-work-toolbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .task-timeline-row {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px 12px;
  }

  .task-stream-monogram {
    grid-column: 1;
    grid-row: 1 / span 4;
  }

  .task-timeline-main {
    grid-column: 2;
    grid-row: 1;
  }

  .task-timeline-collaboration {
    grid-column: 3;
    grid-row: 1;
  }

  .task-timeline-owner {
    grid-column: 2 / span 2;
    grid-row: 2;
  }

  .task-timeline-due {
    grid-column: 2;
    grid-row: 3;
    text-align: left;
  }

  .task-timeline-status {
    grid-column: 2 / span 2;
    grid-row: 4;
    justify-items: start;
  }

  .task-status-select {
    width: min(100%, 240px);
  }

  .task-archive-filters {
    grid-template-columns: 1fr;
  }

  .task-archive-heading {
    grid-column: auto;
  }
}

/* Optional second step after onboarding: visible long enough to be useful,
   but never a permanent dashboard block. */
.guided-client-setup {
  margin-top: 18px;
  border-color: #c9dbee;
  background: linear-gradient(135deg, #f8fbff, #f1f7ff);
}

.guided-client-setup-status,
.guided-client-setup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.guided-client-setup-status {
  margin-top: 16px;
}

.guided-client-setup-actions {
  margin-top: 18px;
}

.guided-setup-chip {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 5px 10px;
  border: 1px solid #d9e3ee;
  border-radius: 999px;
  color: #5c6e85;
  background: #fff;
  font-size: 0.68rem;
  font-weight: 700;
}

.guided-setup-chip--complete {
  color: #267056;
  border-color: #bfe1d3;
  background: #eaf7f1;
}

.guided-setup-chip--complete::before {
  margin-right: 5px;
  content: "\2713";
  font-weight: 900;
}

.obligation-filter-bar {
  justify-content: flex-start;
}

.obligation-filter-count {
  margin-left: auto;
}

@media (max-width: 720px) {
  .guided-client-setup-actions .button {
    width: 100%;
  }

  .obligation-filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .obligation-filter-bar select {
    width: 100%;
  }

  .obligation-filter-count {
    margin-left: 0;
    padding-bottom: 0;
  }
}

/* Compass parity completion: readable density, stronger workstream identity,
   and compact compliance facts without dashboard clutter. */
.content-card {
  border-color: #d6e0e8;
  box-shadow: 0 10px 30px rgba(20, 38, 61, 0.055);
}

.content-card > .card-heading h2,
.specialized-workstream > .card-heading h2 {
  font-size: 1.05rem;
  letter-spacing: -0.025em;
}

.status-badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.overview-core-grid {
  gap: 18px;
}

.entity-detail-grid {
  border-color: #d6e1eb;
  background: #d6e1eb;
}

.entity-detail {
  min-height: 92px;
  padding: 18px 20px;
  background: linear-gradient(145deg, #fff, #f8fbfe);
}

.entity-detail dt {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

.entity-detail dd {
  margin-top: 7px;
  font-size: 0.94rem;
  line-height: 1.45;
}

.client-compliance-snapshot {
  overflow: hidden;
  border: 1px solid #cbddec;
  border-radius: 15px;
  background: linear-gradient(135deg, #f8fbff 0%, #eef6fd 100%);
}

.client-compliance-snapshot > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 20px;
  border-bottom: 1px solid #d8e5f0;
}

.client-compliance-snapshot h3,
.client-compliance-snapshot p {
  margin: 0;
}

.client-compliance-snapshot h3 {
  color: var(--navy);
  font-size: 0.9rem;
}

.client-compliance-snapshot p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.7rem;
}

.client-compliance-snapshot .text-link {
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
  text-decoration: none;
}

.client-compliance-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.client-compliance-snapshot-grid > div {
  min-height: 102px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 18px 20px;
  border-right: 1px solid #d8e5f0;
}

.client-compliance-snapshot-grid > div:last-child {
  border-right: 0;
}

.client-compliance-snapshot-grid span,
.client-compliance-snapshot-grid small {
  color: var(--muted);
  font-size: 0.66rem;
}

.client-compliance-snapshot-grid strong {
  color: var(--navy);
  font-size: 1rem;
  letter-spacing: -0.025em;
}

.standing-record-grid {
  grid-template-columns: 1fr;
}

.standing-record,
.tax-account-record,
.bookkeeping-service-record {
  padding: 22px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(20, 38, 61, 0.045);
}

.standing-record-heading {
  align-items: center;
  margin-bottom: 19px;
}

.standing-record h3,
.tax-account-record h4,
.bookkeeping-service-record h3 {
  font-size: 1rem;
}

.standing-record-heading p,
.tax-account-heading p,
.bookkeeping-service-record header p {
  font-size: 0.73rem;
}

.standing-record-details {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-color: #d7e2ed;
  background: #d7e2ed;
}

.standing-record-details > div {
  min-height: 82px;
  padding: 15px 17px;
  background: #f5f9fd;
}

.standing-record--sos .standing-record-details > div:nth-child(6) {
  grid-column: span 2;
}

.standing-record-details dt {
  font-size: 0.66rem;
}

.standing-record-details dd {
  margin-top: 6px;
  font-size: 0.88rem;
  line-height: 1.45;
}

/* Compact standing records keep the complete registration facts without
   turning each state into a dashboard-sized card. */
.standing-record--sos {
  padding: 18px 20px;
}

.standing-record--sos .standing-record-heading {
  margin-bottom: 14px;
}

.standing-record-details--sos-summary {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  margin-bottom: 9px;
  overflow: visible;
  border: 0;
  background: transparent;
}

.standing-record-details--sos-summary > div {
  min-height: 62px;
  padding: 11px 13px;
  border: 1px solid #d9e4ee;
  border-radius: 9px;
  background: #f7faff;
}

.registered-agent-compact {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(180px, 0.38fr);
  gap: 8px;
}

.registered-agent-compact > div {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 11px 13px;
  border: 1px solid #d9e4ee;
  border-radius: 9px;
  background: #fff;
}

.registered-agent-compact span {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.registered-agent-compact strong {
  overflow-wrap: anywhere;
  color: var(--navy);
  font-size: 0.82rem;
  line-height: 1.45;
}

.record-primary-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
}

.record-action-menu {
  position: relative;
  flex: 0 0 auto;
}

.record-action-menu > summary {
  width: 34px;
  min-height: 30px;
  display: grid;
  place-items: center;
  padding: 0 7px 5px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--navy);
  background: #fff;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  line-height: 1;
  list-style: none;
}

.record-action-menu > summary::-webkit-details-marker {
  display: none;
}

.record-action-menu > summary:hover,
.record-action-menu[open] > summary {
  border-color: #a9bfd5;
  background: var(--surface-blue);
}

.record-action-menu-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  width: max-content;
  min-width: 190px;
  display: grid;
  gap: 3px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(20, 38, 61, 0.16);
}

.record-action-menu-panel .action-button {
  width: 100%;
  justify-content: flex-start;
  border-color: transparent;
  background: transparent;
  text-align: left;
}

.record-action-menu-panel .action-button:hover:not(:disabled) {
  border-color: transparent;
  background: var(--surface-blue);
}

.record-action-menu-panel .action-button--danger {
  color: var(--red);
}

.card-heading > .record-action-menu {
  align-self: center;
}

.filing-state-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 145px;
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 700;
}

.filing-workstream .data-table th {
  padding-top: 14px;
  padding-bottom: 14px;
  font-size: 0.68rem;
}

.filing-workstream .data-table td {
  padding-top: 17px;
  padding-bottom: 17px;
  font-size: 0.77rem;
}

.filing-workstream .data-table td:nth-child(2) strong {
  color: var(--navy);
  font-size: 0.84rem;
}

.filing-workstream .data-table-wrap {
  overflow: visible;
}

.filing-workstream .data-table {
  min-width: 900px;
  table-layout: fixed;
}

.filing-workstream .data-table th:nth-child(1) { width: 150px; }
.filing-workstream .data-table th:nth-child(3) { width: 135px; }
.filing-workstream .data-table th:nth-child(4) { width: 150px; }
.filing-workstream .data-table th:nth-child(5) { width: 94px; }
.filing-workstream .data-table th:nth-child(6) { width: 156px; }

.filing-workstream .cell-secondary {
  max-width: 430px;
  line-height: 1.45;
}

.filing-record-actions {
  justify-content: flex-start;
  margin: 0;
  padding: 0;
  border: 0;
}

.filing-portal-action {
  min-height: 32px;
}

.filing-due-date {
  display: grid;
  gap: 3px;
}

.filing-due-date strong {
  font-size: 0.82rem;
}

.filing-due-date span {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
  overflow: visible;
  max-width: none;
  text-overflow: clip;
}

.filing-due-date.deadline-cell--overdue span,
.filing-due-date.deadline-cell--overdue strong {
  color: var(--red);
}

.registered-agent-history {
  margin: 14px 18px 0;
  border: 1px solid #dbe5ef;
  border-radius: 12px;
  background: #fbfdff;
}

.registered-agent-history > summary {
  padding: 12px 14px;
  color: var(--navy);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 800;
}

.registered-agent-history-list {
  display: grid;
  border-top: 1px solid #dbe5ef;
}

.registered-agent-history-list article {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 14px;
  border-bottom: 1px solid #e8eef4;
}

.registered-agent-history-list article:last-child {
  border-bottom: 0;
}

.registered-agent-history-list article > div {
  display: grid;
  gap: 3px;
}

.registered-agent-history-list strong {
  color: var(--navy);
  font-size: 0.72rem;
}

.registered-agent-history-list span {
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.5;
}

.registered-agent-history-dates {
  flex: 0 0 auto;
  white-space: nowrap;
  font-weight: 700;
}

.data-quality-panel,
.data-quality-complete {
  margin-top: 16px;
  border: 1px solid #d8e2ea;
  border-radius: 13px;
  background: #fff;
}

.data-quality-panel > summary,
.data-quality-complete {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 17px;
}

.data-quality-panel > summary {
  cursor: pointer;
  list-style: none;
}

.data-quality-panel > summary::-webkit-details-marker {
  display: none;
}

.data-quality-count,
.data-quality-complete > span:first-child {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  color: #995f14;
  background: #fff1d7;
  font-size: 0.76rem;
  font-weight: 850;
}

.data-quality-complete > span:first-child {
  color: var(--green);
  background: var(--green-soft);
}

.data-quality-panel summary span:last-child,
.data-quality-complete span:last-child {
  display: grid;
}

.data-quality-panel summary strong,
.data-quality-complete strong {
  color: var(--navy);
  font-size: 0.78rem;
}

.data-quality-panel summary small,
.data-quality-complete small {
  color: var(--muted);
  font-size: 0.66rem;
}

.data-quality-list {
  display: grid;
  border-top: 1px solid var(--border);
}

.data-quality-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 17px;
  border-bottom: 1px solid #edf1f4;
}

.data-quality-item:last-child {
  border-bottom: 0;
}

.data-quality-item > div {
  display: grid;
  gap: 2px;
}

.data-quality-item strong {
  color: var(--navy);
  font-size: 0.76rem;
}

.data-quality-item span {
  color: var(--muted);
  font-size: 0.66rem;
}

.task-timeline-row {
  grid-template-columns: 48px minmax(245px, 1fr) 48px minmax(115px, 0.35fr) minmax(145px, 0.44fr) 120px 180px;
  gap: 16px;
  min-height: 112px;
  padding: 18px 22px 18px 20px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--task-stream-color) 4%, white), #fff 23%);
}

.task-timeline-row::before {
  width: 6px;
}

.task-stream-monogram {
  width: 43px;
  height: 43px;
  font-size: 0.68rem;
}

.task-timeline-title {
  font-size: 0.9rem;
  font-weight: 800;
}

.task-timeline-subtitle {
  font-size: 0.7rem;
}

.task-timeline-context {
  margin-top: 9px;
  font-size: 0.69rem;
}

.task-timeline-owner {
  font-size: 0.75rem;
}

.task-owner-avatar {
  width: 34px;
  height: 34px;
  font-size: 0.65rem;
}

.task-timeline-time,
.task-timeline-due,
.task-timeline-status {
  font-size: 0.7rem;
}

.task-timeline-time strong,
.task-timeline-due strong {
  font-size: 0.82rem;
}

.task-status-select {
  min-width: 176px;
  min-height: 46px;
  padding: 0 36px 0 16px;
  font-size: 0.82rem;
  text-align: center;
  text-align-last: center;
}

.task-status-select option {
  text-align: center;
}

.task-priority,
.task-billing-state {
  padding: 5px 9px;
  font-size: 0.66rem;
}

.task-collaboration-indicator {
  min-width: 44px;
  min-height: 44px;
  font-size: 0.75rem;
}

.task-note-preview {
  display: grid;
  gap: 14px;
  padding: 4px 0 8px;
}

.task-note-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-note-preview-meta span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 0.67rem;
  font-weight: 800;
}

.task-note-preview-tab {
  padding: 7px 11px;
  border: 1px solid #cbd9e8;
  border-radius: 999px;
  color: var(--blue);
  background: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.task-note-preview-tab--active {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.task-note-preview-panel {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
}

.task-note-preview-panel[hidden] {
  display: none;
}

.task-note-preview-item {
  padding: 13px 15px;
  border: 1px solid #d9e4ee;
  border-radius: 11px;
  background: #f8fbfe;
}

.task-note-preview-item-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.68rem;
}

.task-note-preview-item p {
  margin: 8px 0 0;
  color: var(--navy);
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.task-attachment-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  border: 1px solid #d9e4ee;
  border-radius: 10px;
  color: var(--blue);
  background: #f8fbfe;
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
}

.task-attachment-link:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.task-attachment-link--unavailable {
  color: var(--muted);
  cursor: not-allowed;
}

.standing-record-details--bookkeeping {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
  overflow: visible;
  border: 0;
  background: transparent;
}

.standing-record-details--bookkeeping > div {
  min-height: 62px;
  border: 1px solid #d9e4ee;
  border-radius: 9px;
  background: #f7faff;
}

.bookkeeping-record-actions {
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
}

.task-note-preview > p {
  margin: 0;
  padding: 16px 18px;
  border: 1px solid #d9e4ee;
  border-radius: 12px;
  color: var(--navy);
  background: #f8fbfe;
  font-size: 0.82rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

.modal-layer--compact {
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.operation-modal--compact {
  width: min(100%, 520px);
  height: auto;
  max-height: min(720px, calc(100vh - 40px));
  overflow: hidden;
  border: 1px solid #c9d6e3;
  border-radius: 18px;
  box-shadow: 0 26px 80px rgba(17, 28, 51, 0.3);
}

.operation-modal--compact .operation-modal-header {
  padding: 22px 24px 18px;
}

.operation-modal--compact .operation-modal-content {
  flex: 0 1 auto;
  min-height: 0;
  padding: 20px 24px;
}

.operation-modal--compact #clientOperationsModalForm {
  flex: 0 0 auto;
}

.operation-modal--compact .operation-modal-actions {
  padding: 15px 24px 20px;
}

@media (max-width: 560px) {
  .modal-layer--compact {
    align-items: flex-end;
    padding: 12px;
  }

  .operation-modal--compact {
    width: 100%;
    max-height: calc(100vh - 24px);
    border-radius: 18px;
  }
}

@media (max-width: 1180px) {
  .task-timeline-row {
    grid-template-columns: 44px minmax(220px, 1fr) 44px minmax(125px, 0.38fr) 112px 168px;
  }
}

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

  .client-compliance-snapshot-grid > div:nth-child(2) {
    border-right: 0;
  }

  .client-compliance-snapshot-grid > div:nth-child(-n + 2) {
    border-bottom: 1px solid #d8e5f0;
  }

  .standing-record-details:not(.standing-record-details--sos-summary) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .standing-record--sos .standing-record-details > div:nth-child(6) {
    grid-column: auto;
  }

  .task-timeline-row {
    grid-template-columns: 44px minmax(220px, 1fr) 44px minmax(125px, 0.38fr) 112px 168px;
  }

  .filing-workstream .data-table-wrap {
    overflow-x: auto;
    overflow-y: visible;
  }
}

@media (max-width: 720px) {
  .client-compliance-snapshot > header,
  .data-quality-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .client-compliance-snapshot-grid,
  .standing-record-details:not(.standing-record-details--sos-summary) {
    grid-template-columns: 1fr;
  }

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

  .standing-record--sos {
    padding: 16px;
  }

  .standing-record-details--sos-summary {
    grid-template-columns: 1fr;
  }

  .task-timeline-row {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .client-compliance-snapshot-grid > div {
    border-right: 0;
    border-bottom: 1px solid #d8e5f0;
  }

  .client-compliance-snapshot-grid > div:last-child {
    border-bottom: 0;
  }
}

/* --------------------------------------------------------------------------
   Compass visual port

   Client Operations keeps the shared Novalar data and workflow model, while
   the presentation below restores the warmer, roomier Compass hierarchy.
   This section is intentionally visual-only: no records, permissions,
   automations, or Supabase behavior depend on these rules.
   -------------------------------------------------------------------------- */

:root {
  --navy: #173c31;
  --navy-deep: #102f27;
  --blue: #3277b7;
  --blue-light: #77a8d4;
  --ink: #14201c;
  --muted: #5c6963;
  --muted-light: #84908b;
  --surface: #fff;
  --surface-soft: #f3f4ef;
  --surface-blue: #f5f8f6;
  --border: #d9e0da;
  --border-strong: #c7d2ca;
  --green: #23745a;
  --green-soft: #dff1e9;
  --shadow: 0 16px 46px rgba(20, 35, 29, 0.075);
  --shadow-sticky: 0 8px 28px rgba(20, 35, 29, 0.08);
  --radius-lg: 22px;
  --radius-md: 15px;
  --control-height: 52px;
  --row-pad-y: 22px;
  --row-pad-x: 24px;
}

html {
  background: var(--surface-soft);
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 4% -8%, rgba(43, 126, 94, 0.12), transparent 30rem),
    radial-gradient(circle at 98% 2%, rgba(101, 72, 156, 0.055), transparent 26rem),
    var(--surface-soft);
}

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

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline-color: rgba(35, 116, 90, 0.3) !important;
}

/* Header and global navigation */
.app-header {
  min-height: 86px;
  gap: 30px;
  padding: 0 clamp(28px, 3.1vw, 64px);
  border-bottom-color: rgba(217, 224, 218, 0.94);
  background: rgba(255, 255, 255, 0.95);
}

.app-header::before {
  background: linear-gradient(90deg, var(--green), #7ab895 54%, #7650a8);
}

.brand {
  min-width: 226px;
  gap: 14px;
}

.brand-mark {
  position: relative;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 14px;
  color: transparent;
  background: linear-gradient(145deg, #173c31, #235f4b);
  box-shadow: 0 10px 24px rgba(23, 60, 49, 0.24);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  left: 11px;
  width: 29px;
  height: 7px;
  border-radius: 999px;
  background: #e5f4ec;
  content: "";
  transform: rotate(-36deg);
}

.brand-mark::before { top: 14px; }
.brand-mark::after { top: 27px; left: 17px; width: 20px; }

.brand-name {
  color: var(--ink);
  font-size: 1.13rem;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.brand-subtitle {
  color: var(--muted-light);
  font-size: 0.67rem;
  font-weight: 750;
  letter-spacing: 0.11em;
}

.app-header .module-tabs {
  align-self: stretch;
  gap: 34px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.app-header .module-tabs a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0 2px;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  font-size: 0.9rem;
  font-weight: 760;
}

.app-header .module-tabs a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  border-radius: 4px 4px 0 0;
  background: var(--green);
  content: "";
  opacity: 0;
}

.app-header .module-tabs a:hover,
.app-header .module-tabs a[aria-current="page"] {
  color: var(--ink);
  background: transparent;
  box-shadow: none;
}

.app-header .module-tabs a[aria-current="page"]::after {
  opacity: 1;
}

.header-search {
  max-width: 480px;
}

.header-search input {
  min-height: 54px;
  padding: 0 48px 0 20px;
  border-color: transparent;
  border-radius: 16px;
  color: var(--ink);
  background: #f5f7f3;
  font-size: 0.9rem;
}

.header-search input:focus {
  border-color: #8fc3aa;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(35, 116, 90, 0.11);
}

.header-search-results {
  top: calc(100% + 12px);
  padding: 10px;
  border-color: var(--border-strong);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(20, 35, 29, 0.17);
}

.header-search-caption {
  padding: 10px 14px 8px;
  color: var(--muted-light);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.header-search-option {
  min-height: 76px;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 13px;
}

.header-search-option:hover,
.header-search-option--active {
  background: #f1f6f3;
}

.header-search-option .client-initial--search {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 0.78rem;
}

.header-search-option-copy strong { font-size: 0.92rem; }
.header-search-option-copy span { margin-top: 3px; font-size: 0.76rem; }

.header-notification-button,
.account-menu-button {
  border-color: var(--border);
  background: #fff;
}

.header-notification-button {
  width: 46px;
  height: 46px;
  border-radius: 13px;
}

.account-menu-button {
  min-height: 50px;
  gap: 10px;
  padding: 5px 14px 5px 6px;
}

.account-avatar--small {
  width: 38px;
  height: 38px;
  background: linear-gradient(145deg, var(--forest, #173c31), var(--green));
}

.account-menu-name {
  max-width: 190px;
  color: var(--ink);
  font-size: 0.82rem;
}

.header-link {
  color: var(--green);
  font-size: 0.82rem;
}

.preview-banner {
  display: none;
}

.app-main {
  width: min(1760px, calc(100% - 72px));
  padding: 50px 0 80px;
}

.app-footer {
  color: var(--muted-light);
}

/* Shared typography, buttons and form controls */
.eyebrow {
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.15em;
}

.page-heading {
  align-items: center;
  margin-bottom: 30px;
}

.page-heading h1,
.workspace-heading h1 {
  margin: 10px 0 9px;
  color: var(--ink);
  font-size: clamp(3rem, 5vw, 4.45rem);
  font-weight: 570;
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.page-heading > div > p:last-child,
.workspace-heading > div > p:last-child {
  color: var(--muted);
  font-size: 0.98rem;
}

.button {
  min-height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 780;
}

.button--primary,
.button--tracker {
  border-color: var(--navy);
  background: var(--navy);
  box-shadow: 0 10px 24px rgba(23, 60, 49, 0.13);
}

.button--primary:hover:not(:disabled),
.button--tracker:hover {
  border-color: #235e4b;
  background: #235e4b;
}

.button--secondary,
.button--quiet {
  color: var(--ink);
  border-color: var(--border-strong);
  background: #fff;
}

.button--secondary:hover:not(:disabled),
.button--quiet:hover {
  color: var(--green);
  border-color: #9db9aa;
  background: #f3f8f5;
}

.field-caption,
.field label,
.compact-select,
.obligation-filter-bar label {
  color: var(--muted-light);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.085em;
}

.field input,
.field select,
.compact-select select,
.obligation-filter-bar select,
.task-status-select,
.operation-field input:not([type="checkbox"]),
.operation-field select,
.operation-field textarea {
  border-color: var(--border-strong);
  border-radius: 12px;
  color: var(--ink);
  background-color: #fff;
}

.field select,
.compact-select select,
.obligation-filter-bar select,
.task-status-select,
.operation-field select,
.hero-partner-select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #607069 50%),
    linear-gradient(135deg, #607069 50%, transparent 50%);
  background-position:
    calc(100% - 17px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

.field input,
.field select {
  min-height: var(--control-height);
  padding: 0 42px 0 16px;
  font-size: 0.86rem;
}

.field input { padding-right: 16px; }

.field input:focus,
.field select:focus,
.operation-field input:focus,
.operation-field select:focus,
.operation-field textarea:focus {
  border-color: #83b69e;
  box-shadow: 0 0 0 4px rgba(35, 116, 90, 0.1);
}

.segmented-control {
  gap: 4px;
  padding: 5px;
  border: 0;
  border-radius: 13px;
  background: #e8ece7;
}

.filter-bar .segmented-control-button,
.segmented-control-button {
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 780;
}

.segmented-control-button:hover,
.segmented-control-button--active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 5px 14px rgba(20, 35, 29, 0.09);
}

.segment-count {
  padding: 3px 6px;
  color: var(--muted);
  background: rgba(20, 32, 28, 0.075);
  font-size: 0.61rem;
}

.segmented-control-button--active .segment-count {
  color: var(--green);
  background: var(--green-soft);
}

/* Client directory */
.filter-bar {
  gap: 18px;
  margin: 0 0 24px;
  padding: 18px 20px;
  border-color: var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.filter-bar--directory {
  grid-template-columns: minmax(450px, 1.55fr) repeat(3, minmax(185px, 0.62fr));
  gap: 18px;
}

.filter-bar--directory .field--directory-search {
  grid-column: 1 / -2;
}

.filter-bar--directory > .button {
  min-height: var(--control-height);
}

.results-heading {
  min-height: 34px;
  margin: 0 2px 8px;
}

.results-heading p {
  color: var(--muted);
  font-size: 0.82rem;
}

.client-table-wrap {
  border-color: var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.client-table th {
  height: 60px;
  padding: 0 var(--row-pad-x);
  color: var(--muted-light);
  background: #f7f8f5;
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.095em;
}

.client-table td {
  height: 112px;
  padding: var(--row-pad-y) var(--row-pad-x);
  border-color: var(--border);
  font-size: 0.87rem;
}

.client-row:hover td {
  background: #f8fbf8;
}

.client-row--selected td,
.client-row--selected:hover td {
  background: #edf6f1;
}

.client-select-cell input {
  width: 19px;
  height: 19px;
  accent-color: var(--green);
}

.client-cell {
  gap: 16px;
  min-width: 280px;
}

.client-initial--table {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg, var(--navy), #2c6a55);
  font-size: 0.83rem;
  box-shadow: 0 8px 18px rgba(23, 60, 49, 0.15);
}

.client-row-link {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
}

.client-row-link:hover { color: var(--green); }

.client-cell-copy { gap: 6px; }

.client-cell-meta,
.cell-secondary,
.deadline-cell > span,
.member-chip-name {
  color: var(--muted-light);
  font-size: 0.76rem;
}

.client-cell-meta .status-badge {
  padding: 5px 8px;
  font-size: 0.6rem;
}

.cell-strong,
.deadline-cell strong {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 760;
}

.member-chip {
  gap: 9px;
  max-width: 210px;
  padding: 5px 12px 5px 5px;
  border: 0;
  background: transparent;
}

.member-chip-avatar {
  width: 38px;
  height: 38px;
  background: var(--navy);
  box-shadow: 0 7px 16px rgba(23, 60, 49, 0.15);
  font-size: 0.62rem;
}

.member-chip-name {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 740;
}

.count-cell strong {
  color: var(--ink);
  font-size: 1rem;
}

.row-open-mark {
  color: var(--muted-light);
  font-size: 1.35rem;
}

.client-row:hover .row-open-mark { color: var(--green); }

/* Work and task queues */
.work-hero {
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-height: auto;
  align-items: center;
  margin-bottom: 26px;
  padding: 0 2px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
}

.work-hero::after { display: none; }
.work-hero .eyebrow { color: var(--green); }

.work-hero h1 {
  margin: 7px 0 8px;
  color: var(--ink);
  font-size: clamp(2.65rem, 4vw, 3.8rem);
  font-weight: 610;
}

.work-hero-copy > p:last-child {
  color: var(--muted);
  font-size: 0.88rem;
}

.work-hero-deadlines {
  gap: 28px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.work-hero-primary strong {
  color: var(--ink);
  font-size: 2.6rem;
}

.work-hero-primary span,
.work-hero-secondary span {
  color: var(--muted);
  font-size: 0.7rem;
}

.work-hero-secondary strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.work-hero-role { display: none; }

.button--work-hero {
  color: #fff;
  border-color: var(--navy);
  background: var(--navy);
}

.filter-bar--tasks {
  align-items: center;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.filter-bar--tasks > .button { margin-left: auto; }

.task-metric-strip {
  grid-template-columns: repeat(8, minmax(138px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.task-metric,
.task-metric:nth-child(2),
.task-metric:nth-child(-n + 2),
.task-metric:last-child {
  min-height: 118px;
  padding: 18px 20px;
  border-color: var(--border);
  border-top-width: 5px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 9px 25px rgba(20, 35, 29, 0.045);
}

.task-metric--active {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(35, 116, 90, 0.1), var(--shadow);
}

.task-metric span {
  min-height: 38px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 780;
  line-height: 1.35;
}

.task-metric strong {
  color: var(--ink);
  font-size: 2rem;
}

.task-work-board-card {
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.task-work-board-card > .card-heading {
  min-height: 92px;
  padding: 24px 28px;
}

.task-work-board-card > .card-heading h2 {
  font-size: 1.2rem;
}

.task-timeline-section + .task-timeline-section {
  border-top: 10px solid var(--surface-soft);
}

.task-timeline-heading {
  justify-content: space-between;
  min-height: 54px;
  padding: 12px 26px;
  color: var(--ink);
  background: #f7f9f6;
  font-size: 0.76rem;
  font-weight: 820;
}

.task-timeline-heading--due {
  color: var(--red);
  background: #fff6f5;
}

.task-timeline-heading--upcoming {
  color: var(--blue);
  background: #f3f8fd;
}

.task-timeline-heading--waiting {
  color: var(--amber);
  background: #fff9ef;
}

.task-timeline-heading--completed {
  color: var(--green);
  background: #f1f8f4;
}

.task-timeline-heading span {
  min-width: 28px;
  min-height: 28px;
  color: inherit;
  background: rgba(20, 32, 28, 0.065);
  font-size: 0.66rem;
}

.task-timeline-row {
  grid-template-columns: 54px minmax(320px, 1.5fr) 52px minmax(170px, 0.65fr) minmax(168px, 0.7fr) 138px 210px;
  gap: 22px;
  min-height: 126px;
  padding: 22px 28px 22px 24px;
  border-top-color: var(--border);
  background: linear-gradient(90deg, color-mix(in srgb, var(--task-stream-color) 5%, white), #fff 28%);
}

.task-timeline-row::before { width: 7px; }

.task-timeline-row:hover {
  background: linear-gradient(90deg, color-mix(in srgb, var(--task-stream-color) 9%, white), #fbfdfb 34%);
  box-shadow: 0 8px 24px rgba(20, 35, 29, 0.06);
}

.task-stream-monogram {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  font-size: 0.75rem;
}

.task-timeline-title {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 820;
}

.task-timeline-subtitle {
  margin-top: 4px;
  font-size: 0.75rem;
}

.task-timeline-context {
  gap: 8px 12px;
  margin-top: 9px;
  font-size: 0.73rem;
}

.task-collaboration-indicator {
  min-width: 46px;
  min-height: 46px;
  border-color: #b9cfea;
  border-radius: 12px;
  color: var(--blue);
  background: #edf4fd;
  font-size: 0.8rem;
}

.task-timeline-owner {
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 0.78rem;
}

.task-timeline-owner > span:last-child {
  display: grid;
  gap: 1px;
}

.task-timeline-owner small {
  color: var(--muted-light);
  font-size: 0.61rem;
  font-weight: 780;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.task-timeline-owner strong {
  color: var(--ink);
  font-size: 0.78rem;
}

.task-owner-avatar {
  width: 40px;
  height: 40px;
  color: #fff;
  background: var(--navy);
  box-shadow: 0 7px 16px rgba(23, 60, 49, 0.15);
  font-size: 0.63rem;
}

.task-timeline-time,
.task-timeline-due,
.task-timeline-status {
  gap: 5px;
  color: var(--muted);
  font-size: 0.7rem;
}

.task-timeline-time strong,
.task-timeline-due strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.task-timeline-due--overdue strong,
.task-timeline-due--overdue span { color: var(--red); }

.task-timeline-due--upcoming strong,
.task-timeline-due--upcoming span { color: var(--blue); }

.task-status-select {
  min-width: 200px;
  min-height: 52px;
  padding: 0 42px 0 18px;
  border: 0;
  border-radius: 999px;
  color: #53605b;
  background-color: #edf0ee;
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
  text-align-last: center;
}

.task-timer-button {
  min-height: 34px;
  margin-top: 4px;
  border-radius: 999px;
  color: var(--green);
  background: #f1f8f4;
}

/* Client hero, tabs and overview */
.back-link {
  margin: 0 0 24px 2px;
  color: var(--muted);
  font-size: 0.82rem;
}

.client-hero {
  min-height: 190px;
  gap: 36px;
  padding: 34px 38px;
  border-color: var(--border);
  border-radius: 24px;
  background: linear-gradient(120deg, #fff 0%, #f8faf7 72%, #edf5f1 100%);
  box-shadow: var(--shadow);
}

.client-hero[data-client-status="active"] {
  background: linear-gradient(120deg, #fff 0%, #f7faf7 72%, #eaf4ef 100%);
}

.client-hero-main { gap: 26px; }

.client-hero-avatar {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  background: linear-gradient(145deg, var(--navy), #2f6d57);
  box-shadow: 0 14px 30px rgba(23, 60, 49, 0.2);
  font-size: 1.55rem;
}

.workspace-heading-line { gap: 12px; }

.client-hero-copy h1 {
  margin: 9px 0 8px;
  color: var(--ink);
  font-size: clamp(2.55rem, 4vw, 4rem);
  font-weight: 620;
}

.client-hero-copy > p {
  color: var(--muted);
  font-size: 0.92rem;
}

.client-hero-side { gap: 16px; }
.client-hero-chips { gap: 12px; }

.hero-chip,
.client-hero-chips .member-chip {
  min-height: 58px;
  gap: 11px;
  padding: 7px 17px 7px 7px;
  border-color: var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.hero-chip .member-chip-avatar {
  width: 40px;
  height: 40px;
  background: var(--navy);
  font-size: 0.62rem;
}

.member-chip-avatar--entity {
  color: var(--green);
  background: var(--green-soft) !important;
}

.hero-chip-copy small {
  color: var(--muted-light);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
}

.hero-chip-copy strong,
.hero-partner-select {
  max-width: 190px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
}

.hero-partner-select {
  padding-right: 28px;
  background-position: calc(100% - 10px) calc(50% - 2px), calc(100% - 5px) calc(50% - 2px);
}

.workspace-tabs {
  gap: 38px;
  margin: 30px 2px 28px;
  padding: 0;
  border-bottom-color: var(--border-strong);
}

.workspace-tabs a {
  padding: 10px 0 16px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 790;
}

.workspace-tabs a::after {
  height: 4px;
  background: var(--green);
}

.workspace-tabs a[aria-current="page"] { color: var(--ink); }

.workspace-tabs a[aria-current="page"] .tab-count {
  color: var(--green);
  background: var(--green-soft);
}

.content-card {
  border-color: var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.content-card:not(.task-work-board-card) {
  padding: 30px 32px;
}

.card-heading {
  margin-bottom: 24px;
}

.content-card > .card-heading h2,
.specialized-workstream > .card-heading h2,
.card-heading h2 {
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 800;
}

.card-heading p {
  color: var(--muted);
  font-size: 0.77rem;
}

.overview-core-grid { gap: 24px; }

.entity-detail-grid {
  border-color: var(--border);
  border-radius: 18px;
  background: var(--border);
}

.entity-detail {
  min-height: 118px;
  padding: 24px 26px;
  background: linear-gradient(145deg, #fff, #f9fbf8);
}

.entity-detail dt {
  color: var(--muted-light);
  font-size: 0.74rem;
  font-weight: 820;
  letter-spacing: 0.095em;
}

.entity-detail dd {
  margin-top: 10px;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 800;
}

.status-badge {
  min-height: 30px;
  padding: 6px 11px;
  font-size: 0.68rem;
}

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

/* Compliance and obligation surfaces */
.work-plan-introduction {
  padding: 32px 34px 26px !important;
  border-radius: 20px 20px 0 0;
  background: #fff;
}

.work-plan-introduction .card-heading {
  margin-bottom: 18px;
}

.work-plan-introduction .card-heading h2 {
  font-size: 1.55rem;
}

.work-plan-introduction .data-note {
  color: var(--muted);
  font-size: 0.82rem;
}

.obligation-filter-bar {
  gap: 18px;
  margin-top: 22px;
  padding-top: 22px;
}

.obligation-filter-bar select,
.compact-select select {
  min-width: 220px;
  min-height: 46px;
  padding: 0 42px 0 14px;
  font-size: 0.78rem;
}

.obligation-workstream-tabs {
  gap: 42px;
  padding: 0 32px;
  border-color: var(--border);
}

.obligation-workstream-tab {
  min-height: 64px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.obligation-workstream-tab::after { height: 4px; background: var(--green); }
.obligation-workstream-tab--active { color: var(--ink); }

.obligation-workstream-tab span {
  min-width: 24px;
  min-height: 24px;
  color: var(--muted);
  background: #e9ede9;
  font-size: 0.66rem;
}

.workstream-grid--selected > .content-card {
  padding: 30px 32px 34px;
  border-color: var(--border);
  border-radius: 0 0 20px 20px;
}

.specialized-workstream > .card-heading {
  align-items: center;
  padding-bottom: 22px;
  border-color: var(--border);
}

.standing-record-grid { gap: 18px; }

.standing-record,
.tax-account-record,
.bookkeeping-service-record {
  padding: 26px 28px;
  border-color: var(--border);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(20, 35, 29, 0.045);
}

.standing-record--sos {
  border-top: 5px solid var(--stream-entity-registrations);
}

.standing-record-heading,
.tax-account-heading,
.bookkeeping-service-record > header {
  align-items: center;
  margin-bottom: 22px;
}

.standing-record h3,
.tax-account-record h4,
.bookkeeping-service-record h3 {
  color: var(--ink);
  font-size: 1.12rem;
}

.standing-record-heading p,
.tax-account-heading p,
.bookkeeping-service-record header p {
  margin-top: 5px;
  font-size: 0.78rem;
}

.jurisdiction-mark {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  font-size: 0.8rem;
}

.standing-record-details--sos-summary {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.standing-record-details--sos-summary > div,
.standing-record-details--bookkeeping > div {
  min-height: 86px;
  padding: 16px 18px;
  border-color: var(--border);
  border-radius: 13px;
  background: #f6f8f5;
}

.standing-record-details dt {
  color: var(--muted-light);
  font-size: 0.69rem;
  font-weight: 820;
  letter-spacing: 0.085em;
}

.standing-record-details dd {
  margin-top: 8px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 780;
}

.registered-agent-compact {
  grid-template-columns: minmax(380px, 1fr) minmax(220px, 0.38fr);
  gap: 12px;
}

.registered-agent-compact > div {
  min-height: 96px;
  gap: 8px;
  padding: 17px 19px;
  border-color: var(--border);
  border-radius: 13px;
  background: #fff;
}

.registered-agent-compact span {
  color: var(--muted-light);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.registered-agent-compact strong {
  color: var(--ink);
  font-size: 0.88rem;
}

.record-primary-actions {
  margin-top: 18px;
  padding-top: 18px;
  border-color: var(--border);
}

.record-primary-actions .action-button,
.filing-record-actions .action-button {
  min-height: 42px;
  padding: 0 15px;
  border-radius: 11px;
  color: var(--green);
  border-color: #bfddcf;
  background: var(--green-soft);
  font-size: 0.72rem;
}

.record-action-menu > summary {
  width: 42px;
  min-height: 42px;
  border-color: var(--border-strong);
  border-radius: 11px;
}

.record-action-menu-panel {
  min-width: 210px;
  padding: 8px;
  border-radius: 13px;
  box-shadow: 0 18px 44px rgba(20, 35, 29, 0.16);
}

.record-action-menu-panel .action-button {
  min-height: 40px;
}

.tax-account-group {
  border-color: var(--border);
  border-radius: 16px;
}

.tax-account-group > summary {
  min-height: 76px;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 16px;
  padding: 14px 20px;
}

.tax-account-list {
  gap: 16px;
  padding: 18px;
  border-color: var(--border);
  background: #f5f7f3;
}

.filing-workstream .data-table-wrap {
  border-color: var(--border);
  border-radius: 16px;
}

.filing-workstream .data-table th {
  height: 58px;
  padding: 0 18px;
  color: var(--muted-light);
  background: #f7f8f5;
  font-size: 0.72rem;
  letter-spacing: 0.085em;
}

.filing-workstream .data-table td {
  height: 112px;
  padding: 20px 18px;
  border-color: var(--border);
  font-size: 0.82rem;
}

.filing-workstream .data-table td:nth-child(2) strong {
  color: var(--ink);
  font-size: 0.94rem;
}

.filing-state-cell {
  gap: 13px;
  color: var(--ink);
  font-size: 0.84rem;
}

.jurisdiction-mark--table {
  width: 42px;
  height: 42px;
  border-radius: 11px;
}

.filing-due-date strong { color: var(--ink); font-size: 0.9rem; }
.filing-due-date span { margin-top: 3px; font-size: 0.7rem; }

.data-quality-panel,
.data-quality-complete {
  border-radius: 16px;
}

/* Slide-over forms */
.modal-layer {
  background: rgba(20, 32, 28, 0.6);
  backdrop-filter: blur(6px);
}

.operation-modal {
  width: min(100%, 900px);
  border-left-color: rgba(255, 255, 255, 0.1);
  box-shadow: -28px 0 80px rgba(20, 32, 28, 0.28);
}

.operation-modal-header {
  gap: 32px;
  padding: 38px 44px 34px;
  background: linear-gradient(135deg, var(--navy-deep), #1b4b3c 80%, #27634f);
}

.operation-modal-header .eyebrow {
  color: #9ed7bb;
}

.operation-modal-header h2 {
  margin: 9px 0 10px;
  font-size: 2rem;
  font-weight: 650;
}

.operation-modal-header > div > p:last-child {
  max-width: 700px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.88rem;
  line-height: 1.6;
}

.modal-close {
  width: 48px;
  height: 48px;
  font-size: 1.65rem;
}

.operation-form-grid {
  gap: 24px 26px;
  padding: 32px 44px 44px;
}

.operation-field--section {
  padding-top: 24px;
  border-color: var(--border);
}

.operation-field--section h3 {
  color: var(--ink);
  font-size: 1.05rem;
}

.operation-field--section p {
  margin-top: 7px;
  font-size: 0.76rem;
}

.operation-field > label,
.operation-group-label {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 0.79rem;
  font-weight: 780;
}

.operation-field > label span:not(.field-flag--required),
.operation-group-label span:not(.field-flag--required),
.field-flag {
  font-size: 0.68rem;
}

.operation-field input:not([type="checkbox"]),
.operation-field select {
  min-height: 56px;
  padding: 0 46px 0 17px;
  font-size: 0.88rem;
}

.operation-field input:not([type="checkbox"]) { padding-right: 17px; }

.operation-field textarea {
  min-height: 128px;
  padding: 15px 17px;
  font-size: 0.88rem;
}

.operation-field-hint {
  margin-top: 8px;
  font-size: 0.7rem;
}

.operation-checkbox {
  min-height: 68px;
  gap: 12px;
  padding: 15px 17px;
  border-color: var(--border);
  border-radius: 13px;
  background: #f5f8f6;
}

.operation-checkbox strong { font-size: 0.8rem; }
.operation-checkbox span { font-size: 0.7rem; }

.operation-modal-actions {
  gap: 12px;
  padding: 20px 44px 26px;
  border-color: var(--border);
}

.operation-modal-actions .button {
  min-height: 54px;
  padding: 0 24px;
  font-size: 0.84rem;
}

.operation-modal--compact {
  width: min(100%, 600px);
  border-radius: 22px;
}

.operation-modal--compact .operation-modal-header {
  padding: 28px 30px 24px;
}

.operation-modal--compact .operation-modal-content,
.operation-modal--compact .operation-modal-actions {
  padding-right: 30px;
  padding-left: 30px;
}

/* Responsive Compass density */
@media (max-width: 1500px) {
  .app-main { width: min(1460px, calc(100% - 56px)); }

  .task-metric-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .task-timeline-row {
    grid-template-columns: 50px minmax(270px, 1.35fr) 48px minmax(150px, 0.6fr) minmax(145px, 0.62fr) 122px 190px;
    gap: 17px;
  }
}

@media (max-width: 1180px) {
  .app-header {
    gap: 18px;
    padding: 0 24px;
  }

  .brand { min-width: auto; }
  .app-header .module-tabs { gap: 18px; }
  .header-search { max-width: 340px; }

  .filter-bar--directory {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .filter-bar--directory .field--segments,
  .filter-bar--directory .field--directory-search {
    grid-column: 1 / -1;
  }

  .filter-bar--directory > .button { width: auto; }

  .task-timeline-row {
    grid-template-columns: 48px minmax(240px, 1fr) 48px minmax(150px, 0.55fr) 118px 180px;
  }

  .task-timeline-time { display: none; }
  .standing-record-details--sos-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .app-main { width: min(100% - 32px, 820px); padding-top: 28px; }

  .app-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 12px 18px;
  }

  .app-header .module-tabs,
  .header-search {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
  }

  .header-actions { grid-column: 2; justify-content: flex-end; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading h1 { font-size: 3.1rem; }
  .work-hero { grid-template-columns: 1fr; }
  .work-hero-deadlines { justify-self: stretch; }
  .task-metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .client-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .client-hero-side,
  .client-hero-chips { width: 100%; justify-items: start; justify-content: flex-start; }

  .task-timeline-row {
    grid-template-columns: 48px minmax(0, 1fr) 48px 126px 180px;
  }

  .task-timeline-owner { display: none; }
  .registered-agent-compact { grid-template-columns: 1fr; }
  .operation-modal { width: min(100%, 760px); }
}

@media (max-width: 720px) {
  .app-main { width: calc(100% - 24px); }
  .app-header { position: relative; }
  .header-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .header-link { display: inline-flex; }
  .account-menu-name { max-width: 130px; }
  .filter-bar--directory { grid-template-columns: 1fr; }
  .filter-bar--directory > *,
  .filter-bar--directory .field--segments,
  .filter-bar--directory .field--directory-search { grid-column: 1; }
  .filter-bar--directory > .button { width: 100%; }
  .client-hero { min-height: 0; padding: 24px; }
  .client-hero-avatar { width: 66px; height: 66px; border-radius: 17px; }
  .client-hero-copy h1 { white-space: normal; font-size: 2.25rem; }
  .workspace-tabs { gap: 26px; }
  .content-card:not(.task-work-board-card),
  .workstream-grid--selected > .content-card { padding: 22px 20px; }
  .entity-detail-grid { grid-template-columns: 1fr; }
  .entity-detail,
  .entity-detail:nth-child(3n) { border-right: 0; }
  .standing-record-details--sos-summary { grid-template-columns: 1fr; }
  .task-timeline-row {
    grid-template-columns: 46px minmax(0, 1fr) 48px;
    gap: 13px;
    padding: 18px 16px 18px 13px;
  }
  .task-timeline-due,
  .task-timeline-status { grid-column: 2 / -1; }
  .task-status-select { width: 100%; min-width: 0; }
  .operation-modal-header { padding: 26px 24px 22px; }
  .operation-form-grid { grid-template-columns: 1fr; padding: 24px; }
  .operation-field,
  .operation-field--wide,
  .operation-field--checkbox,
  .operation-field--section,
  .operation-field--action-group { grid-column: 1; }
  .operation-modal-actions { padding: 17px 24px 22px; }
}
