@font-face {
  font-family: "Google Sans Flex";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/static/fonts/google-sans-flex-normal.ttf") format("truetype");
}

.workflow-route-page {
  display: grid;
  gap: 16px;
}

.route-heading {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 0;
}

.workflow-route-layout {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
}

.workflow-route-frame {
  background: #f3f0ea;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 860px;
  width: 100%;
}

.workflow-route-upcoming,
.workflow-calendar-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 14px;
}

.route-summary-row,
.calendar-event-row {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 12px;
}

.route-summary-row div,
.calendar-event-row div {
  display: grid;
  gap: 3px;
}

.route-summary-row span,
.calendar-event-row span,
.calendar-event-row small {
  color: var(--muted);
  font-size: 0.84rem;
}

.route-summary-row a {
  color: var(--ink);
  text-decoration: none;
}

.route-summary-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.workflow-route-detail,
.route-detail-days {
  display: grid;
  gap: 16px;
}

.route-detail-summary,
.route-detail-day {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.route-detail-summary {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.route-detail-summary div {
  display: grid;
  gap: 4px;
}

.route-detail-summary span,
.route-detail-day p,
.route-detail-stops span,
.route-detail-stops small {
  color: var(--muted);
}

.route-detail-day-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.route-detail-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.route-detail-metrics span {
  background: var(--surface-2);
  border-radius: 999px;
  color: var(--soft-ink);
  font-size: 0.8rem;
  font-weight: 900;
  padding: 5px 9px;
}

.route-detail-stops {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.route-detail-stops li {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}

.route-detail-stops div {
  display: grid;
  gap: 4px;
}

.calendar-heading-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.workflow-calendar-month {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 0;
  overflow: hidden;
}

.calendar-inspection-form {
  margin-bottom: 16px;
}

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

.calendar-inspection-form .field-wide,
.calendar-inspection-form button {
  grid-column: 1 / -1;
}

.calendar-event-edit {
  width: min(100%, 520px);
}

.calendar-event-edit summary {
  color: var(--ink);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 900;
}

.calendar-event-edit form {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
}

.calendar-event-edit .field-wide,
.calendar-event-edit button {
  grid-column: 1 / -1;
}

.calendar-month-title {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  font-size: 1.15rem;
  font-weight: 900;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  padding: 14px;
}

.calendar-month-title strong {
  text-align: center;
}

.calendar-month-actions {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  justify-content: flex-end;
}

.calendar-month-nav {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: inline-flex;
  font-size: 1.3rem;
  font-weight: 900;
  height: 36px;
  justify-content: center;
  line-height: 1;
  text-decoration: none;
  width: 36px;
}

.calendar-month-nav:hover {
  background: var(--surface-3);
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays div {
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  padding: 9px 10px;
  text-transform: uppercase;
}

.calendar-day {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 9px;
}

.calendar-day:nth-child(7n) {
  border-right: 0;
}

.calendar-day.outside-month {
  background: #f7f8f6;
  color: var(--muted);
}

.calendar-day.today {
  box-shadow: inset 0 0 0 2px #2f7d63;
}

.calendar-day-number {
  align-items: center;
  display: inline-flex;
  font-size: 0.86rem;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.calendar-day.today .calendar-day-number {
  background: #2f7d63;
  border-radius: 999px;
  color: #fff;
}

.calendar-day-events {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.calendar-event-pill {
  background: #e9f0ec;
  border: 1px solid #d5e2dc;
  border-radius: 7px;
  color: #1f332b;
  display: grid;
  gap: 1px;
  min-height: 42px;
  padding: 6px 7px;
  text-decoration: none;
}

.calendar-event-pill.route_break {
  background: #f6edd7;
  border-color: #e9d8ab;
}

.calendar-event-pill.route_overnight {
  background: #e8eef7;
  border-color: #d3deee;
}

.calendar-event-pill time {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.calendar-event-pill span {
  font-size: 0.76rem;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-overflow {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.workflow-calendar-list h2 {
  margin: 0;
}

.workflow-estimate-list,
.workflow-estimate-form,
.workflow-estimate-section,
.estimate-document-preview {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.estimate-row,
.estimate-phase-row,
.estimate-allocation-row,
.estimate-travel-row {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 10px;
  padding: 10px 12px;
  text-decoration: none;
}

.estimate-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.estimate-row-main {
  color: var(--ink);
  display: grid;
  gap: 3px;
  min-width: 0;
  text-decoration: none;
}

.estimate-row-total {
  font-weight: 900;
}

.estimate-row form {
  margin: 0;
}

.estimate-phase-row {
  grid-template-columns: minmax(0, 1fr) 90px 80px 110px;
}

.estimate-allocation-row {
  grid-template-columns: minmax(0, 1fr) 120px 120px 120px;
}

.estimate-travel-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.estimate-row div,
.estimate-phase-row div,
.estimate-allocation-row div {
  display: grid;
  gap: 3px;
}

.estimate-row span,
.estimate-phase-row span,
.estimate-allocation-row span {
  color: var(--muted);
  font-size: 0.84rem;
}

.estimate-form-grid,
.estimate-summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.estimate-action-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.estimate-phase-edit-list {
  display: grid;
  gap: 12px;
}

.estimate-travel-edit-list {
  display: grid;
  gap: 10px;
}

.estimate-phase-edit-row {
  align-items: end;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-areas:
    "name billing hours rate fixed total remove"
    "desc desc desc desc desc desc desc";
  grid-template-columns: minmax(220px, 1fr) 120px 96px 120px 120px 110px auto;
  padding: 12px;
}

.estimate-travel-edit-row {
  align-items: end;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 180px minmax(220px, 1fr) 140px auto;
  padding: 12px;
}

.estimate-travel-edit-row .field {
  min-width: 0;
}

.estimate-travel-edit-row .travel-delete-button {
  white-space: nowrap;
}

.estimate-phase-edit-row .field {
  min-width: 0;
}

.estimate-phase-edit-row .phase-name-field {
  grid-area: name;
}

.estimate-phase-edit-row .phase-billing-field {
  grid-area: billing;
}

.estimate-phase-edit-row .phase-hours-field {
  grid-area: hours;
}

.estimate-phase-edit-row .phase-rate-field {
  grid-area: rate;
}

.estimate-phase-edit-row .phase-fixed-field {
  grid-area: fixed;
}

.estimate-phase-edit-row .phase-description-field {
  grid-area: desc;
}

.estimate-phase-edit-row .phase-fixed-field,
.estimate-phase-edit-row.is-fixed .phase-hourly-field {
  display: none;
}

.estimate-phase-edit-row.is-fixed .phase-fixed-field {
  display: grid;
}

.estimate-phase-edit-total {
  display: grid;
  gap: 4px;
  grid-area: total;
  padding-bottom: 8px;
}

.estimate-phase-edit-row .phase-delete-button {
  grid-area: remove;
  white-space: nowrap;
}

.estimate-phase-edit-total span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.estimate-phase-edit-total strong {
  font-size: 0.95rem;
}

.workflow-note {
  background: #fff7e8;
  border: 1px solid #efd4a6;
  border-radius: 8px;
  color: #7a4b12;
  font-weight: 800;
  margin: 0;
  padding: 10px 12px;
}

.estimate-terms-section summary {
  cursor: pointer;
  font-weight: 900;
}

.estimate-terms-section p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 0;
}

.pac-container {
  z-index: 10000;
}

.estimate-details {
  display: grid;
  gap: 8px 14px;
  grid-template-columns: max-content minmax(0, 1fr);
  margin: 0;
}

.estimate-details dt {
  color: var(--muted);
  font-weight: 900;
}

.estimate-details dd {
  margin: 0;
}

.workflow-invoices-section {
  gap: 14px;
}

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

.invoice-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.invoice-card-head,
.invoice-card-footer {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

.invoice-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.invoice-card-actions form {
  margin: 0;
}

.invoice-metadata-form {
  display: grid;
  gap: 12px;
}

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

.invoice-form-grid .wide {
  grid-column: span 2;
}

.checkbox-line {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 800;
  gap: 8px;
}

.checkbox-line input {
  height: 16px;
  width: 16px;
}

.client-list-actions {
  align-items: center;
  justify-content: flex-end;
  z-index: 5;
}

.job-list-actions {
  align-items: center;
  justify-content: flex-end;
  z-index: 5;
}

.client-list-actions.open {
  z-index: 300;
}

.job-list-actions.open {
  z-index: 300;
}

.client-list-actions .context-menu form {
  margin: 0;
}

.job-list-actions .context-menu form {
  margin: 0;
}

.danger-button {
  color: #9f1d17;
}

.danger-button:hover {
  border-color: #e1a29d;
  color: #7a120e;
}

.workflow-list-filter-form {
  align-items: end;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
}

.workflow-list-filter-form .field {
  min-width: 220px;
}

.dashboard-workspace {
  display: grid;
  gap: 18px;
}

.dashboard-heading {
  margin-bottom: 0;
}

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

.dashboard-metric-card,
.dashboard-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.dashboard-metric-card {
  display: grid;
  gap: 6px;
  min-height: 118px;
  padding: 16px;
}

.dashboard-metric-card span,
.dashboard-breakdown-row span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-metric-card strong {
  color: var(--ink);
  font-size: 1.65rem;
  line-height: 1.1;
}

.dashboard-metric-card small,
.dashboard-breakdown-row small {
  color: var(--muted);
  font-size: 0.86rem;
}

.dashboard-main-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
}

.dashboard-card {
  min-width: 0;
  padding: 16px;
}

.dashboard-card-wide {
  grid-column: 1 / -1;
}

.dashboard-actions-card {
  padding: 0;
}

.dashboard-actions-card .workflow-action-dashboard {
  background: transparent;
  border: 0;
  box-shadow: none;
  margin: 0;
}

.dashboard-list,
.dashboard-breakdown {
  display: grid;
  gap: 8px;
}

.dashboard-list-row,
.dashboard-breakdown-row {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 11px 12px;
  text-decoration: none;
}

.dashboard-list-row:hover {
  background: var(--surface-3);
}

.dashboard-list-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.dashboard-list-row strong,
.dashboard-list-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-list-row span,
.dashboard-list-row time {
  color: var(--muted);
  font-size: 0.84rem;
}

.dashboard-breakdown-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.dashboard-breakdown-row strong {
  color: var(--ink);
}

@media (max-width: 760px) {
  .estimate-row,
  .estimate-phase-row,
  .estimate-allocation-row,
  .estimate-phase-edit-row,
  .estimate-travel-edit-row {
    grid-template-areas: none;
    grid-template-columns: 1fr;
  }

  .estimate-phase-edit-row .phase-name-field,
  .estimate-phase-edit-row .phase-billing-field,
  .estimate-phase-edit-row .phase-hourly-field,
  .estimate-phase-edit-row .phase-fixed-field,
  .estimate-phase-edit-row .phase-description-field,
  .estimate-phase-edit-total,
  .estimate-phase-edit-row .phase-delete-button {
    grid-area: auto;
  }

  .invoice-form-grid .wide {
    grid-column: auto;
  }

  .workflow-list-filter-form {
    align-items: stretch;
    flex-direction: column;
  }

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

  .dashboard-list-row,
  .dashboard-breakdown-row {
    align-items: start;
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1180px) {
  .workflow-route-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

@media (max-width: 760px) {
  .route-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-heading-actions {
    justify-content: flex-start;
  }

  .calendar-month-title {
    grid-template-columns: auto 1fr auto;
    gap: 8px;
  }

  .calendar-month-title strong {
    font-size: 1rem;
  }

  .calendar-month-actions .quiet-button {
    padding-left: 10px;
    padding-right: 10px;
  }

  .calendar-weekdays {
    display: none;
  }

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

  .calendar-inspection-form form,
  .calendar-event-edit form {
    grid-template-columns: 1fr;
  }

  .calendar-day {
    border-right: 0;
    min-height: 96px;
  }

  .calendar-day.outside-month {
    display: none;
  }
}

@font-face {
  font-family: "Google Sans Flex";
  font-style: normal;
  font-weight: 700 799;
  font-display: block;
  src: url("/static/fonts/google-sans-flex-700.ttf") format("truetype");
}

@font-face {
  font-family: "Google Sans Flex";
  font-style: normal;
  font-weight: 800 899;
  font-display: block;
  src: url("/static/fonts/google-sans-flex-800.ttf") format("truetype");
}

@font-face {
  font-family: "Google Sans Flex";
  font-style: normal;
  font-weight: 900;
  font-display: block;
  src: url("/static/fonts/google-sans-flex-900.ttf") format("truetype");
}

:root {
  color-scheme: light;
  --ink: #20272b;
  --soft-ink: #4d5a61;
  --muted: #718087;
  --line: #d9e0dd;
  --line-strong: #c4ceca;
  --bg: #eef2ef;
  --surface: #fbfcfa;
  --surface-2: #f5f7f4;
  --surface-3: #eef3ef;
  --nav: #26343a;
  --accent: #2e6f73;
  --accent-2: #8f6b3e;
  --good: #3f7652;
  --warn: #996b2d;
  --sans: "Google Sans Flex", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink);
  background: var(--bg);
}

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

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 212px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: var(--nav);
  color: #eef3ef;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-close,
.mobile-nav-toggle {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: none;
  align-items: center;
  justify-content: center;
  color: #eef3ef;
  background: transparent;
}

.mobile-shell-header {
  display: none;
}

.mobile-shell-title {
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.15;
}

.mobile-shell-title span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-close:hover,
.sidebar-close:focus-visible {
  background: #34484f;
  outline: 0;
}

.sidebar-close svg,
.mobile-nav-toggle svg {
  width: 18px;
  height: 18px;
}

.mobile-nav-toggle {
  color: var(--ink);
  background: transparent;
  border: 0;
  box-shadow: none;
}

.mobile-nav-toggle:hover,
.mobile-nav-toggle:focus-visible {
  color: var(--accent);
  outline: 0;
}

.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 115;
  display: none;
  background: rgba(32, 39, 43, 0.28);
}

.brand {
  font-size: 17px;
  line-height: 1.1;
  font-weight: 800;
}

.brand span {
  display: block;
  margin-top: 4px;
  font-size: 9px;
  font-weight: 700;
  color: #b8c6c3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.side-nav {
  display: grid;
  gap: 5px;
}

.nav-group {
  display: grid;
  gap: 3px;
}

.side-nav a,
.logout-link {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #dfe8e4;
  text-decoration: none;
  border-radius: 8px;
  padding: 7px 8px;
  font-weight: 700;
}

.side-nav a.active,
.side-nav a:hover,
.logout-link:hover {
  background: #34484f;
  color: #ffffff;
}

.side-nav svg,
.logout-link svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.sub-nav {
  display: grid;
  gap: 2px;
}

.sub-nav a {
  min-height: 32px;
  padding: 7px 8px;
  color: #dfe8e4;
  font-size: inherit;
}

.queue {
  margin-top: auto;
  display: grid;
  gap: 8px;
  color: #c8d4d1;
  font-size: 11px;
}

.queue strong {
  color: #ffffff;
  font-size: 17px;
  font-weight: 850;
}

.logout-link {
  margin-top: 4px;
  border-top: 1px solid rgba(223, 232, 228, 0.14);
  border-radius: 0;
  padding-top: 12px;
}

.main {
  min-width: 0;
  padding: 14px;
}

.topbar {
  width: min(1320px, 100%);
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.search input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  min-width: 0;
  color: var(--ink);
}

.top-actions,
.split-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.primary-button,
.quiet-button {
  min-height: 32px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

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

.quiet-button {
  color: var(--soft-ink);
  background: var(--surface);
  border: 1px solid var(--line);
}

.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.page-head h1 {
  font-size: 28px;
  line-height: 1.05;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.workspace {
  width: min(1320px, 100%);
  margin: 0;
  background: transparent;
}

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

.list-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 6px 0 12px;
  border-bottom: 1px solid var(--line);
}

.list-count {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.list-count strong {
  color: var(--ink);
  font-size: 16px;
}

.list-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
}

.filter-chip {
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--soft-ink);
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 850;
  white-space: nowrap;
}

.filter-chip.active,
.filter-chip:hover {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}

.job-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 6px 0 8px;
}

.crumb {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.job-number-kicker {
  color: var(--soft-ink);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

h1,
h2,
h3 {
  margin: 0;
  color: #1d292d;
}

h1 {
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.02;
}

.editable-title {
  display: grid;
  gap: 8px;
}

.title-display {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.title-display h1 {
  min-width: 0;
}

.job-title-status {
  justify-self: end;
  align-self: end;
  color: var(--muted);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 800;
  line-height: 1.02;
  text-align: right;
}

.title-edit-button {
  width: 28px;
  height: 28px;
  margin-top: 1px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--soft-ink);
  background: transparent;
  border: 1px solid transparent;
  flex: 0 0 auto;
}

.title-edit-button:hover,
.title-edit-button:focus-visible {
  color: var(--accent);
  background: #e8eeee;
  border-color: var(--line);
  outline: 0;
}

.title-edit-button svg {
  width: 15px;
  height: 15px;
}

.title-edit-form {
  display: none;
  gap: 7px;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.editable-title.editing .title-display {
  display: none;
}

.editable-title.editing .title-edit-form {
  display: grid;
}

.title-edit-form input {
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  padding: 7px 9px;
  font-size: clamp(18px, 2.4vw, 28px);
  font-weight: 800;
  line-height: 1.15;
  outline-color: var(--accent);
}

.status-stack {
  display: grid;
  gap: 8px;
  justify-items: end;
  align-content: start;
}

.status-pill {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: #245035;
  background: #dfece2;
  font-size: 10px;
  font-weight: 900;
  border: 1px solid #bfd3c5;
  line-height: 1;
}

.deadline {
  text-align: right;
  color: var(--soft-ink);
  font-size: 10px;
  line-height: 1.35;
}

.deadline strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
}

.tabs-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  padding: 0;
  background: transparent;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.tabs {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  padding: 0;
  background: transparent;
}

.tabs-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  padding-left: 10px;
}

.tab {
  min-height: 32px;
  padding: 0 11px;
  color: var(--soft-ink);
  background: transparent;
  border-bottom: 3px solid transparent;
  font-weight: 900;
  white-space: nowrap;
}

.tab[aria-selected="true"] {
  color: var(--accent);
  background: rgba(251, 252, 250, 0.72);
  border-color: var(--accent);
}

.tab-panels {
  padding: 10px 0;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.panel-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.9fr;
  gap: 16px;
  align-items: start;
}

.section {
  border-top: 1px solid var(--line);
  padding-top: 13px;
  margin-top: 13px;
}

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

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-bottom: 10px;
}

.panel#scope .section-head {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  font-size: 16px;
}

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

.field-divider {
  grid-column: 1 / -1;
  width: 100%;
  height: 1px;
  border: 0;
  background: var(--line);
  margin: 2px 0;
}

.field,
.note-field {
  min-width: 0;
}

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

.check-grid {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  column-gap: 16px;
  row-gap: 7px;
  flex-wrap: wrap;
}

.check-row {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--soft-ink);
  background: transparent;
  font-weight: 850;
}

.check-row input {
  width: auto;
  min-width: 0;
  margin: 0;
  flex: 0 0 auto;
}

.field .check-row input[type="checkbox"] {
  width: 13px;
  height: 13px;
  padding: 0;
}

.field .check-row {
  margin: 0;
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  flex: 0 0 auto;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  color: var(--soft-ink);
  font-size: 11px;
  text-transform: none;
  line-height: 1.2;
}

.field label.check-row {
  display: inline-flex;
  margin-bottom: 0;
}

.check-row span {
  display: inline;
}

[hidden] {
  display: none !important;
}

.live-edit-form .live-save-button,
.live-edit-form .live-cancel-button {
  display: none;
}

.live-edit-form.editing .live-save-button,
.live-edit-form.editing .live-cancel-button {
  display: inline-flex;
}

.live-edit-form.editing .live-edit-button {
  display: none;
}

.live-edit-form:not(.editing) .field input,
.live-edit-form:not(.editing) .field select,
.live-edit-form:not(.editing) .field textarea {
  color: var(--ink);
  background: #edf1ee;
  border-color: #d8dfdb;
  opacity: 1;
}

.live-edit-form:not(.editing) .field input:disabled,
.live-edit-form:not(.editing) .field select:disabled,
.live-edit-form:not(.editing) .field textarea:disabled {
  -webkit-text-fill-color: var(--ink);
  cursor: default;
}

.live-edit-form:not(.editing) .check-row {
  background: transparent;
}

.live-edit-form:not(.editing) .check-row input {
  pointer-events: none;
}

.live-edit-form.dirty .section-head h2::after {
  content: "Unsaved";
  margin-left: 8px;
  color: var(--warn);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.details {
  display: grid;
  grid-template-columns: minmax(110px, 0.45fr) minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
}

.details dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.details dd {
  margin: 0;
  color: var(--ink);
  line-height: 1.35;
}

.files-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.files-list li {
  min-height: 28px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  color: var(--soft-ink);
}

.relationship-group {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.relationship-group h3 {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.internal-note-form {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.internal-note-form label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.internal-note-form textarea {
  min-height: 96px;
}

.internal-note-form .primary-button {
  width: fit-content;
}

.email-activity {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.email-activity.internal-note {
  border-left: 3px solid var(--accent);
}

.email-activity-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.email-activity h3 {
  font-size: 14px;
}

.email-activity-head span,
.email-activity p {
  color: var(--soft-ink);
}

.email-activity-meta {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 5px 10px;
  margin: 0;
  padding: 9px;
  border-radius: 6px;
  background: var(--surface-2);
}

.email-activity-meta dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.email-activity-meta dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.email-activity-full summary {
  width: fit-content;
  color: var(--accent);
  cursor: pointer;
  font-weight: 850;
}

.email-activity-full pre {
  margin: 10px 0 0;
  padding: 12px;
  overflow: auto;
  border-radius: 6px;
  color: var(--ink);
  background: #eef2ef;
  font: inherit;
  white-space: pre-wrap;
}

.inline-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  margin-top: 10px;
}

.contact-actions form {
  margin: 0;
}

.scope-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.scope-edit-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.scope-notes form {
  display: grid;
  gap: 8px;
}

.rail-head form {
  margin: 0;
}

.section table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.section th,
.section td {
  padding: 8px 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.section th {
  color: var(--muted);
  background: var(--surface-2);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.section tr:last-child td {
  border-bottom: 0;
}

.error {
  margin: 0;
  color: #8a2e28;
  font-weight: 800;
}

.status-message {
  margin: 0 0 10px;
  color: var(--good);
  font-weight: 850;
  line-height: 1.4;
}

.field label,
.field > span,
.note-field label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.paragraph-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.paragraph-head label {
  margin-bottom: 0;
}

.paragraph-save {
  display: none;
  min-height: 24px;
  padding: 0 8px;
}

.note-field.dirty .paragraph-save {
  display: inline-flex;
}

.job-description-field {
  margin-bottom: 13px;
}

.field input,
.field select,
.note-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  padding: 7px 8px;
  outline-color: var(--accent);
}

.readonly-value,
.readonly-textarea {
  width: 100%;
  min-height: 33px;
  display: flex;
  align-items: center;
  border: 1px solid #e2e8e5;
  border-radius: 7px;
  background: #f4f7f5;
  color: var(--ink);
  padding: 7px 8px;
  font-weight: 750;
}

.readonly-textarea {
  min-height: 92px;
  align-items: flex-start;
  margin: 0;
  line-height: 1.45;
  white-space: pre-wrap;
}

.field-cluster .save-field-cluster {
  display: none;
}

.field-cluster.editing .edit-field-cluster {
  display: none;
}

.field-cluster.editing .save-field-cluster {
  display: inline-flex;
}

.field-cluster:not(.editing) .field input,
.field-cluster:not(.editing) .field select {
  color: var(--ink);
  background: #f4f7f5;
  border-color: #e2e8e5;
  cursor: default;
}

.field-cluster.editing .field input,
.field-cluster.editing .field select {
  color: var(--ink);
  background: #ffffff;
  border-color: var(--line);
  opacity: 1;
}

.lookup-field {
  position: relative;
}

.contact-item .lookup-field {
  margin: 4px 0;
}

.lookup-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  display: none;
  max-height: 126px;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(36, 46, 45, 0.14);
}

.lookup-field.open .lookup-results {
  display: block;
}

.lookup-option {
  width: 100%;
  min-height: 30px;
  display: block;
  padding: 7px 8px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  font-weight: 750;
}

.lookup-option:hover,
.lookup-option:focus-visible {
  background: var(--surface-2);
  outline: 0;
}

.note-field textarea {
  min-height: 92px;
  resize: vertical;
}

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

.scope-block {
  display: grid;
  gap: 8px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.scope-block:first-child {
  padding-top: 0;
  border-top: 0;
}

.scope-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.scope-title-view {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.scope-label {
  min-width: 0;
  font-size: 14px;
  font-weight: 850;
}

.scope-title-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.scope-assigned {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.scope-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.scope-paragraph-save {
  display: none;
  min-height: 24px;
  padding: 0 8px;
}

.scope-block.scope-dirty .scope-paragraph-save,
.scope-block:has(.scope-notes.dirty) .scope-paragraph-save {
  display: inline-flex;
}

.scope-icon {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--soft-ink);
  background: transparent;
  border: 0;
  font-size: 16px;
  font-weight: 850;
  line-height: 1;
}

.scope-icon:hover,
.scope-icon:focus-visible {
  color: var(--accent);
  outline: 0;
}

.scope-icon svg {
  width: 14px;
  height: 14px;
}

.scope-edit {
  display: none;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 7px;
  width: 100%;
  align-items: end;
}

.scope-edit-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.scope-block.editing .scope-title-view {
  display: none;
}

.scope-block.editing .scope-edit {
  display: grid;
}

.scope-title input,
.scope-edit input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  padding: 7px 8px;
  font-weight: 850;
  outline-color: var(--accent);
}

.scope-notes-save-form {
  margin: 0;
}

.live-scope-add-form,
.live-deliverable-add-form {
  margin-top: 10px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(32, 39, 43, 0.28);
}

.modal-backdrop.active {
  display: flex;
}

.modal {
  width: fit-content;
  max-width: min(100%, calc(100vw - 36px));
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(36, 46, 45, 0.18);
  padding: 14px;
}

.modal h2 {
  margin-bottom: 12px;
  font-size: 16px;
}

.workflow-danger-modal {
  width: min(420px, calc(100vw - 36px));
  display: grid;
  gap: 10px;
}

.workflow-success-modal {
  width: min(340px, calc(100vw - 36px));
  display: grid;
  gap: 10px;
}

.workflow-danger-modal h2 {
  margin-bottom: 0;
  color: #8a2e28;
  font-size: 18px;
}

.workflow-success-modal h2 {
  margin-bottom: 0;
  font-size: 18px;
}

.workflow-success-modal p {
  margin: 0;
  color: var(--soft-ink);
  line-height: 1.45;
}

.workflow-danger-modal p {
  margin: 0;
  color: var(--soft-ink);
  line-height: 1.45;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  white-space: nowrap;
}

.modal-form {
  display: grid;
  gap: 14px;
}

.modal-field-grid {
  min-width: min(420px, calc(100vw - 72px));
  grid-template-columns: 1fr;
}

#time-entry-modal .modal-field-grid,
#time-stopped-modal .modal-field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#time-entry-modal textarea,
#time-stopped-modal textarea {
  width: 100%;
  max-width: 100%;
  resize: vertical;
}

.time-note-section {
  min-width: min(420px, calc(100vw - 72px));
}

.scope-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 16px;
  align-items: stretch;
}

.scope-layout .note-field,
.scope-layout .rail-block {
  height: 100%;
}

.scope-layout .note-field textarea {
  min-height: 132px;
  height: 100%;
}

.scope-notes textarea {
  min-height: 132px;
}

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

.rail-block {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  padding: 11px;
}

.rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.rail-block h3,
.rail-head h3 {
  margin-bottom: 7px;
  font-size: 14px;
}

.rail-head h3 {
  margin-bottom: 0;
}

.add-inline {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: transparent;
  border: 0;
  font-size: 17px;
  font-weight: 850;
  line-height: 1;
}

.add-inline:disabled {
  color: var(--muted);
  opacity: 0.45;
  cursor: default;
}

.metric-list,
.contact-list,
.timeline {
  display: grid;
  gap: 7px;
}

.rail-block .contact-list {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.share-link-card {
  display: grid;
  gap: 9px;
}

.share-link-card .rail-head {
  margin-bottom: 0;
}

.share-link-empty {
  display: grid;
  gap: 8px;
}

.share-link-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.share-link-card.has-link .share-link-empty {
  display: none;
}

.share-link-list {
  display: grid;
  gap: 11px;
}

.share-link-list[hidden] {
  display: none;
}

.share-link-item {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.share-link-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.share-link-url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
  align-items: center;
}

.share-link-menu {
  justify-content: flex-end;
}

.share-link-url {
  min-width: 0;
  overflow: hidden;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-link-url:hover,
.share-link-url:focus-visible {
  text-decoration: underline;
  outline: 0;
}

.share-copy-button.copied {
  color: #197345;
  background: rgba(25, 115, 69, 0.1);
}

.share-link-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.share-link-meta strong {
  color: var(--soft-ink);
  font-size: 11px;
}

.share-link-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  color: #197345;
  background: rgba(25, 115, 69, 0.12);
  font-size: 10px;
  font-weight: 900;
}

.share-link-requested-pill {
  display: none;
  color: #9f2f28;
  background: rgba(159, 47, 40, 0.12);
}

.share-link-item.disable-requested .share-link-requested-pill {
  display: inline-flex;
}

.share-link-item.revoked .share-link-status-pill {
  color: var(--muted);
  background: rgba(101, 112, 108, 0.12);
}

.share-link-item.revoked .share-link-url {
  color: var(--muted);
}

.share-link-revoked-pill {
  display: none;
}

.share-link-item.revoked .share-link-url-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.share-link-item.revoked .share-copy-button,
.share-link-item.revoked .share-link-menu,
.share-link-item.revoked .share-link-meta .share-link-status-pill {
  display: none;
}

.share-link-item.revoked .share-link-revoked-pill {
  display: inline-flex;
}

.share-link-actions {
  display: flex;
  justify-content: flex-start;
  padding-top: 2px;
}

.share-link-actions[hidden] {
  display: none;
}

.share-link-card.has-link .share-link-actions {
  display: inline-flex;
}

.phase-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.phase-status-card .live-cancel-button,
.phase-status-card .live-save-button,
.phase-status-card .phase-edit {
  display: none;
}

.phase-status-card.editing .phase-view,
.phase-status-card.editing .live-edit-button {
  display: none;
}

.phase-status-card.editing .phase-edit {
  display: grid;
  gap: 8px;
}

.phase-status-card.editing .live-cancel-button,
.phase-status-card.editing .live-save-button {
  display: inline-flex;
}

.pill-stack {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.muted-value {
  color: var(--muted);
  font-weight: 850;
}

.workflow-next-step {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
}

.workflow-next-step > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.workflow-next-step p {
  color: var(--text);
  line-height: 1.45;
  margin: 0;
}

.workflow-next-step form {
  margin: 0;
}

.workflow-customer-note,
.workflow-customer-note-panel {
  border-left: 3px solid #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  color: var(--text);
}

.workflow-customer-note {
  margin: 0;
  padding: 10px 12px;
  line-height: 1.45;
}

.workflow-customer-note-panel {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px;
}

.workflow-customer-note-panel span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.workflow-customer-note-panel p {
  margin: 0;
  line-height: 1.45;
}

.workflow-action-dashboard {
  margin-bottom: 16px;
}

.workflow-action-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.workflow-action-card {
  align-items: start;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.workflow-action-card h3 {
  font-size: 1rem;
  margin: 8px 0 2px;
}

.workflow-action-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.workflow-action-card p {
  color: var(--muted);
  margin: 0 0 8px;
}

.workflow-action-card strong {
  display: block;
  line-height: 1.4;
}

.workflow-action-card form {
  margin: 0;
}

.metric,
.contact-item {
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}

.metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.metric:last-child,
.contact-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.metric span,
.contact-item span,
.event span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.metric strong,
.contact-item strong,
.event strong {
  font-size: 11px;
}

.contact-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.contact-actions,
.contact-edit-actions {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
}

.contact-link {
  display: inline-block;
  margin-top: 4px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  text-decoration: none;
}

.contact-link:hover,
.contact-link:focus-visible {
  text-decoration: underline;
  outline: 0;
}

.contact-edit-row {
  display: none;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  margin-top: 4px;
}

.live-contact-edit-form {
  align-items: end;
}

.contact-item.editing .contact-link,
.contact-item.editing .contact-meta,
.contact-item.editing .contact-actions {
  display: none;
}

.contact-item.editing .contact-edit-row {
  display: grid;
}

.live-contact-item .lookup-control {
  margin: 0;
}

.metric input,
.contact-item input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  padding: 5px 6px;
  outline-color: var(--accent);
}

.metric span input {
  font-weight: 700;
}

.metric strong input {
  text-align: right;
  font-weight: 850;
}

.deliverable-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}

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

.deliverable-name {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.deliverable-label {
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.deliverable-edit {
  display: none;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
  width: 100%;
}

.deliverable-row.editing .deliverable-label,
.deliverable-row.editing .edit-deliverable,
.deliverable-row.editing .live-deliverable-edit {
  display: none;
}

.deliverable-row.editing .deliverable-edit {
  display: grid;
}

.deliverable-edit input,
.deliverable-status-select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  padding: 5px 6px;
  outline-color: var(--accent);
}

.deliverable-status {
  min-height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  color: var(--soft-ink);
  background: #e8eee9;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.deliverable-status-wrap {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.deliverable-status-form {
  display: none;
  grid-template-columns: minmax(90px, 1fr) auto auto;
  gap: 6px;
  align-items: center;
}

.deliverable-row.status-editing .deliverable-status {
  display: none;
}

.deliverable-row.status-editing .deliverable-status-form {
  display: grid;
}

.table {
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: var(--surface);
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.table-pagination-top {
  margin-bottom: 8px;
}

.table-pagination-bottom {
  margin-top: 8px;
}

.table-pagination .quiet-button {
  min-height: 28px;
  padding: 0 8px;
}

.table-pagination .quiet-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.table-row {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr 0.8fr;
  gap: 9px;
  align-items: center;
  padding: 9px;
  border-top: 1px solid var(--line);
}

.table-row:first-child {
  border-top: 0;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.list-table .table-row {
  grid-template-columns: minmax(180px, 1.45fr) minmax(130px, 0.95fr) minmax(105px, 0.8fr) minmax(180px, 1.2fr) minmax(70px, 0.55fr) minmax(80px, 0.65fr) auto;
}

.client-table .table-row {
  grid-template-columns: minmax(190px, 1.4fr) minmax(160px, 1fr) minmax(115px, 0.75fr) minmax(190px, 1.15fr) minmax(80px, 0.55fr) 34px;
}

.client-table {
  overflow: visible;
}

.client-jobs-table .table-row {
  grid-template-columns: minmax(220px, 1.55fr) minmax(95px, 0.7fr) minmax(140px, 0.9fr) minmax(130px, 0.85fr) minmax(80px, 0.6fr);
}

.jobs-table .table-row {
  grid-template-columns: minmax(230px, 1.55fr) minmax(140px, 0.95fr) minmax(95px, 0.65fr) minmax(140px, 0.9fr) minmax(130px, 0.85fr) minmax(95px, 0.7fr) minmax(80px, 0.6fr) 34px;
}

.jobs-table {
  overflow: visible;
}

.document-table .table-row {
  grid-template-columns: minmax(128px, 0.6fr) minmax(230px, 1.7fr) minmax(120px, 0.8fr) minmax(90px, 0.65fr) minmax(80px, 0.55fr) 34px;
}

.document-table {
  overflow: visible;
}

.portal-visibility-form {
  display: inline-flex;
}

.portal-visibility-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 850;
}

.portal-visibility-toggle input {
  inline-size: 16px;
  block-size: 16px;
  margin: 0;
}

.table-row[hidden] {
  display: none;
}

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

.file-row strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-row a {
  min-width: 0;
  overflow: hidden;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-row a:hover,
.file-row a:focus-visible {
  text-decoration: underline;
  outline: 0;
}

.file-link {
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  color: var(--accent);
  background: transparent;
  padding: 0;
  font-weight: 850;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-link:hover,
.file-link:focus-visible {
  text-decoration: underline;
  outline: 0;
}

.file-row span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 8px;
  color: var(--soft-ink);
  background: #e8eee9;
  font-size: 10px;
  font-weight: 850;
}

.chip.good {
  color: #245035;
  background: #dfece2;
}

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

.time-summary div {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.time-summary span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.time-summary strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.time-table {
  overflow: visible;
}

.time-table .time-row {
  grid-template-columns: minmax(86px, 0.65fr) minmax(80px, 0.58fr) minmax(80px, 0.58fr) minmax(86px, 0.62fr) minmax(160px, 1.25fr) minmax(92px, 0.62fr) 42px 34px;
}

.time-table.with-user .time-row {
  grid-template-columns: minmax(120px, 0.8fr) minmax(86px, 0.58fr) minmax(80px, 0.52fr) minmax(80px, 0.52fr) minmax(86px, 0.58fr) minmax(155px, 1.05fr) minmax(92px, 0.58fr) 42px 34px;
}

.time-table.with-job .time-row {
  grid-template-columns: minmax(190px, 1.15fr) minmax(86px, 0.54fr) minmax(80px, 0.5fr) minmax(80px, 0.5fr) minmax(86px, 0.54fr) minmax(150px, 0.95fr) minmax(92px, 0.55fr) 42px 34px;
}

.time-table.with-job.with-user .time-row {
  grid-template-columns: minmax(190px, 1.05fr) minmax(115px, 0.66fr) minmax(86px, 0.5fr) minmax(80px, 0.46fr) minmax(80px, 0.46fr) minmax(86px, 0.5fr) minmax(145px, 0.82fr) minmax(92px, 0.5fr) 42px 34px;
}

.time-note-cell {
  min-width: 0;
  overflow: hidden;
  color: var(--soft-ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.time-mobile-label {
  display: none;
}

.mobile-card-label {
  display: none;
}

.time-mobile-value {
  display: contents;
}

.mobile-card-value {
  display: contents;
}

.time-invoiced-pill {
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  color: var(--muted);
  background: #e7e9e6;
  font-size: 10px;
  font-weight: 900;
  opacity: 0.55;
}

.time-invoiced-pill.active {
  color: #17472a;
  background: #cde7d4;
  opacity: 1;
}

.time-invoiced-pill:disabled {
  cursor: default;
}

.time-play-button {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: #2f7d4b;
}

.time-play-button svg {
  width: 14px;
  height: 14px;
}

.time-play-button:disabled {
  opacity: 0.35;
  cursor: default;
}

.time-tracker-button {
  min-height: 30px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  color: #ffffff;
  background: #2f7d4b;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.time-tracker-icon,
.time-tracker-icon svg {
  width: 16px;
  height: 16px;
}

.time-tracker-live {
  display: none;
  align-items: center;
  gap: 6px;
}

.time-tracker-button.tracking {
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line-strong);
}

.time-tracker-button.tracking .time-tracker-icon,
.time-tracker-button.tracking .time-tracker-idle {
  display: none;
}

.time-tracker-button.tracking .time-tracker-live {
  display: inline-flex;
}

.tracking-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #d93025;
  animation: tracking-pulse 1.2s ease-in-out infinite;
}

@keyframes tracking-pulse {
  0%, 100% {
    opacity: 0.45;
    transform: scale(0.82);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

.time-stopped-total {
  width: fit-content;
  margin: 2px 0 12px;
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--ink);
  background: var(--surface-2);
  font-size: 20px;
  font-weight: 900;
}

.form-error {
  min-height: 18px;
  margin: 0;
  color: #a13b2f;
  font-size: 11px;
  font-weight: 850;
}

.floating-time-card {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 220;
  display: none;
  grid-template-columns: minmax(0, 1fr) 34px 34px;
  gap: 8px;
  align-items: center;
  width: min(360px, calc(100vw - 28px));
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(36, 46, 45, 0.2);
}

.floating-time-card.active {
  display: grid;
}

.floating-time-card div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.floating-time-card strong {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.floating-time-card span {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floating-time-card b {
  color: var(--soft-ink);
  font-size: 12px;
}

.floating-stop,
.floating-open {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.floating-stop {
  color: #ffffff;
  background: #b3261e;
}

.floating-open {
  color: #ffffff;
  background: var(--accent);
}

.floating-stop svg,
.floating-open svg {
  width: 17px;
  height: 17px;
}

.empty-state {
  display: none;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  padding: 18px;
  color: var(--muted);
  background: rgba(251, 252, 250, 0.58);
  font-weight: 750;
  text-align: center;
}

.empty-state.active {
  display: block;
}

.row-menu-cell {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.ellipsis-button {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--soft-ink);
  background: transparent;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.ellipsis-button:hover,
.ellipsis-button:focus-visible,
.row-menu-cell.open .ellipsis-button {
  color: var(--accent);
  background: var(--surface-2);
  outline: 0;
}

.context-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 150;
  display: none;
  min-width: 126px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(36, 46, 45, 0.16);
}

.row-menu-cell.open .context-menu {
  display: block;
}

.context-menu button {
  width: 100%;
  min-height: 32px;
  display: block;
  padding: 7px 10px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  font-weight: 800;
}

.context-menu a {
  width: 100%;
  min-height: 32px;
  display: block;
  padding: 7px 10px;
  color: var(--ink);
  text-align: left;
  font-weight: 800;
  text-decoration: none;
}

.context-menu button:hover,
.context-menu button:focus-visible,
.context-menu a:hover,
.context-menu a:focus-visible {
  background: var(--surface-2);
  outline: 0;
}

.file-upload-button {
  cursor: pointer;
}

.file-upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.upload-hint {
  margin: -2px 0 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.upload-status {
  min-height: 16px;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
}

.upload-status.error {
  color: #a33b31;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
}

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

.photo-thumb-button {
  width: 100%;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  aspect-ratio: 4 / 3;
  box-shadow: 0 1px 2px rgba(36, 46, 45, 0.06);
}

.photo-thumb-button:hover,
.photo-thumb-button:focus-visible {
  border-color: var(--accent);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(30, 101, 92, 0.12);
}

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

.photo-card-meta {
  display: grid;
  gap: 2px;
  padding-top: 7px;
}

.photo-card-meta strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-card-meta span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.photo-card > .quiet-button {
  margin-top: 7px;
  min-height: 26px;
  padding: 4px 8px;
  font-size: 9px;
}

.file-lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  padding: 18px;
  background: rgba(16, 24, 27, 0.72);
}

.file-lightbox.active {
  display: grid;
  place-items: center;
}

.file-lightbox-panel {
  width: min(1120px, 100%);
  height: min(86vh, 900px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(223, 232, 228, 0.28);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
}

.file-lightbox-bar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.file-lightbox-bar h2 {
  font-size: 14px;
}

.file-lightbox-bar span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.file-preview-surface {
  position: relative;
  min-height: 0;
  overflow: auto;
  display: grid;
  place-items: start center;
  padding: 20px;
  background: #dfe5e1;
}

.file-preview-image {
  display: none;
  max-width: 100%;
  max-height: calc(86vh - 92px);
  object-fit: contain;
  border-radius: 7px;
  box-shadow: 0 12px 28px rgba(36, 46, 45, 0.24);
}

.file-preview-frame {
  display: none;
  width: 100%;
  height: 100%;
  min-height: calc(86vh - 92px);
  border: 0;
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(36, 46, 45, 0.16);
}

.file-lightbox.photo-mode .file-preview-surface {
  place-items: center;
  background: #1d2426;
}

.file-lightbox.photo-mode .file-preview-image {
  display: block;
}

.file-lightbox.photo-mode .document-preview-page {
  display: none;
}

.file-lightbox.document-mode .file-preview-image {
  display: none;
}

.file-lightbox.document-preview-available .file-preview-surface {
  padding: 0;
  place-items: stretch;
  background: #ffffff;
}

.file-lightbox.document-preview-available .file-preview-frame {
  display: block;
}

.file-lightbox.document-preview-available .document-preview-page {
  display: none;
}

.public-share-body {
  min-height: 100vh;
  background: #f6f8f6;
}

.public-share-shell {
  width: min(1180px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 24px 0 34px;
}

.public-share-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px;
  align-items: start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.public-share-header h1 {
  margin: 3px 0 5px;
  font-size: clamp(28px, 5vw, 48px);
}

.public-share-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.public-share-link-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.public-share-link-panel > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.public-share-link-panel > strong {
  color: var(--soft-ink);
  font-size: 12px;
}

.public-share-empty {
  width: min(620px, 100%);
  margin: 12vh auto 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.portal-app {
  min-height: 100vh;
  background: #f4f6f9;
  color: #1e293b;
}

.portal-app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 16px 32px;
  background: #1e3a5f;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.portal-brand-subtext {
  display: block;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-brand-title {
  margin: 0;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
}

.portal-header-right,
.portal-user-profile,
.portal-user-info {
  display: flex;
  align-items: center;
}

.portal-header-right {
  gap: 24px;
}

.portal-header-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.portal-header-nav a {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 850;
  padding: 7px 10px;
  text-decoration: none;
}

.portal-header-nav a:hover,
.portal-header-nav a:focus {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.portal-user-profile {
  gap: 12px;
}

.portal-avatar {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #cbd5e1;
  color: #cbd5e1;
}

.portal-user-info {
  flex-direction: column;
  align-items: flex-start;
}

.portal-user-name {
  font-size: 14px;
  font-weight: 800;
}

.portal-user-role {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}

.portal-logout {
  padding: 8px 14px;
  border: 1px solid #475569;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.portal-logout:hover {
  background: rgba(255, 255, 255, 0.1);
}

.portal-dashboard-container {
  width: min(1400px, calc(100vw - 48px));
  margin: 32px auto;
}

.portal-auth-shell {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(280px, 440px) minmax(320px, 460px);
  gap: 48px;
  min-height: 100vh;
  padding: 48px;
  background: #f4f6f9;
}

.portal-auth-brand {
  color: #1e293b;
}

.portal-auth-brand span {
  color: #2b4c7e;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.portal-auth-brand h1 {
  margin: 10px 0 12px;
  color: #1e3a5f;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
}

.portal-auth-brand p {
  max-width: 36rem;
  color: #64748b;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}

.portal-login-panel {
  width: 100%;
  margin: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 20px 45px rgba(30, 58, 95, 0.12);
  padding: 32px;
}

.portal-login-form {
  display: grid;
  gap: 18px;
}

.portal-login-head p {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 900;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.portal-login-head h2 {
  color: #1e293b;
  font-size: 1.55rem;
  margin: 0;
}

.portal-login-fields {
  display: grid;
  gap: 14px;
}

.portal-login-fields .field {
  margin: 0;
}

.portal-login-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.portal-remember-row {
  align-items: center;
  color: #475569;
  display: inline-flex;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 850;
}

.portal-remember-row input {
  width: 16px;
  height: 16px;
  accent-color: #1e3a5f;
}

.portal-login-row a,
.portal-login-link {
  color: #1e3a5f;
  font-size: 0.9rem;
  font-weight: 900;
  text-decoration: none;
}

.portal-login-row a:hover,
.portal-login-link:hover {
  text-decoration: underline;
}

.portal-login-submit {
  justify-content: center;
  min-height: 44px;
  width: 100%;
}

.portal-login-note {
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.45;
  margin: 0;
}

.portal-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.portal-kpi-card,
.portal-main-content,
.portal-panel-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.portal-kpi-card {
  padding: 20px;
}

.portal-invoice-frame {
  background: #f8fafc;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  display: block;
  height: min(78vh, 920px);
  margin: 16px 0;
  min-height: 640px;
  width: 100%;
}

.portal-highlight-warning {
  border-left: 4px solid #f59e0b;
}

.portal-kpi-value {
  color: #1e3a5f;
  font-size: 28px;
  font-weight: 900;
}

.portal-kpi-label {
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.portal-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
}

.portal-main-content {
  padding: 24px;
}

.portal-job-detail {
  display: grid;
  gap: 18px;
}

.portal-task-detail {
  display: grid;
  gap: 18px;
}

.portal-task-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.portal-task-head h2 {
  margin: 4px 0;
  color: #1e293b;
  font-size: 24px;
}

.portal-task-head p {
  margin: 0;
  color: #64748b;
  font-weight: 800;
}

.portal-back-link,
.portal-task-link {
  color: #1e3a5f;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

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

.portal-task-link {
  display: inline-block;
  margin-top: 6px;
}

.portal-task-form {
  display: grid;
  gap: 14px;
}

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

.portal-task-complete {
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.portal-task-complete strong {
  display: block;
  color: #1e3a5f;
  font-size: 15px;
}

.portal-task-complete p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.portal-content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.portal-content-header h2 {
  margin: 0;
  color: #1e293b;
  font-size: 20px;
}

.portal-table-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.portal-search-box {
  position: relative;
}

.portal-search-box span {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-weight: 900;
}

.portal-search-box input,
.portal-filter-select {
  height: 36px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #1e293b;
  font-size: 13px;
}

.portal-search-box input {
  width: 220px;
  padding: 8px 8px 8px 32px;
}

.portal-filter-select {
  padding: 8px;
}

.portal-table-wrapper {
  overflow-x: auto;
}

.portal-case-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.portal-case-table th {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.portal-case-table td {
  padding: 16px;
  border-bottom: 1px solid #e2e8f0;
  color: #1e293b;
  font-size: 14px;
  vertical-align: middle;
}

.portal-case-table tr:hover {
  background: #f8fafc;
}

.portal-row-highlight {
  background: #fffbeb;
}

.portal-case-name {
  color: #1e3a5f;
  font-weight: 900;
  text-decoration: none;
}

.portal-case-name:hover {
  text-decoration: underline;
}

.portal-matter-id,
.portal-milestone-date,
.portal-time-ago {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.portal-job-id {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #1e293b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
}

.portal-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.portal-badge-success {
  background: #dcfce7;
  color: #15803d;
}

.portal-badge-warning {
  background: #fef3c7;
  color: #b45309;
}

.portal-badge-info {
  background: #e0f2fe;
  color: #0369a1;
}

.portal-badge-secondary {
  background: #f1f5f9;
  color: #475569;
}

.portal-milestone-text {
  font-weight: 800;
}

.portal-btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 11px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #fff;
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.portal-btn-action:hover {
  border-color: #1e3a5f;
  color: #1e3a5f;
}

.portal-btn-primary-action {
  border: 0;
  background: #1e3a5f;
  color: #fff;
}

.portal-btn-primary-action:hover {
  background: #2b4c7e;
  color: #fff;
}

.portal-sidebar-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.portal-panel-card {
  padding: 20px;
}

.portal-panel-header h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: #1e3a5f;
  font-size: 16px;
}

.portal-estimate-document {
  width: min(100%, 8.5in);
  margin: 0 auto;
  padding: 0.58in;
  background: #fff;
  border: 1px solid #d8dee7;
  color: #202935;
  box-shadow: 0 16px 38px rgba(30, 58, 95, 0.12);
}

.portal-estimate-doc-header {
  border-bottom: 2px solid #3f6578;
  margin-bottom: 22px;
  padding-bottom: 18px;
}

.portal-estimate-doc-header p {
  color: #404a55;
  font-size: 0.85rem;
  font-weight: 900;
  margin: 0 0 12px;
}

.portal-estimate-doc-header h1 {
  color: #111827;
  font-size: 1.7rem;
  margin: 0 0 14px;
}

.portal-estimate-doc-header h2 {
  color: #1f496b;
  font-size: 1.1rem;
  margin: 0 0 10px;
}

.portal-estimate-doc-header span {
  color: #5b6673;
  font-size: 0.9rem;
}

.portal-estimate-doc-section {
  margin-top: 24px;
}

.portal-estimate-doc-section h2 {
  border-bottom: 1px solid #8f9aa7;
  color: #111827;
  font-size: 1.08rem;
  margin: 0 0 12px;
  padding-bottom: 7px;
}

.portal-estimate-doc-section p {
  color: #333d49;
  line-height: 1.55;
  margin: 0 0 10px;
}

.portal-estimate-doc-section table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.portal-estimate-doc-section th {
  background: #edf1f5;
  border: 1px solid #a8b2bf;
  color: #1f2937;
  font-weight: 900;
  padding: 9px;
  text-align: left;
}

.portal-estimate-doc-section td {
  border: 1px solid #d0d7e0;
  padding: 9px;
  vertical-align: top;
}

.portal-estimate-doc-section td div {
  color: #5b6673;
  line-height: 1.45;
  margin-top: 4px;
}

.portal-estimate-property-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portal-estimate-property-grid div {
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid #d0d7e0;
  background: #fafafa;
}

.portal-estimate-property-grid span {
  color: #5b6673;
  display: block;
  font-size: 0.76rem;
  font-weight: 900;
  margin-bottom: 4px;
}

.portal-estimate-property-grid strong {
  color: #111827;
  font-size: 0.9rem;
}

.portal-estimate-terms {
  break-before: page;
}

.portal-estimate-terms h3 {
  color: #111827;
  font-size: 0.95rem;
  margin: 14px 0 6px;
}

.portal-estimate-terms p {
  font-size: 0.82rem;
  line-height: 1.48;
}

.portal-action-list,
.portal-activity-feed {
  margin: 0;
  padding: 0;
  list-style: none;
}

.portal-action-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  margin-bottom: 8px;
  border-radius: 6px;
}

.portal-alert-warning {
  background: #fffbeb;
  color: #92400e;
}

.portal-action-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(146, 64, 14, 0.12);
  font-weight: 900;
}

.portal-action-text strong {
  display: block;
  font-size: 13px;
}

.portal-action-text p,
.portal-feed-content p {
  margin: 0;
  font-size: 13px;
}

.portal-feed-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.portal-feed-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: #2b4c7e;
}

.portal-empty-panel {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 1024px) {
  .portal-workspace-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .portal-auth-shell {
    align-items: start;
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 16px;
  }

  .portal-login-panel {
    padding: 24px 18px;
  }

  .portal-login-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-app-header,
  .portal-header-right {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-dashboard-container {
    width: min(100% - 24px, 1400px);
    margin: 18px auto;
  }

  .portal-main-content {
    padding: 16px;
  }

  .portal-estimate-document {
    padding: 18px;
  }

  .portal-estimate-property-grid {
    grid-template-columns: 1fr;
  }

  .portal-estimate-doc-section {
    overflow-x: auto;
  }

  .portal-search-box input {
    width: min(100%, 260px);
  }
}

.public-overview-grid {
  margin-bottom: 16px;
}

.public-description {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.public-description p {
  margin: 0;
  color: var(--soft-ink);
  line-height: 1.5;
}

.public-photos-section .photo-card > .quiet-button {
  width: 100%;
  justify-content: center;
}

.public-download-zip {
  position: relative;
  z-index: 1;
  min-height: 36px;
  touch-action: manipulation;
}

.public-download-zip.is-loading {
  pointer-events: none;
}

.public-download-zip.is-loading::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: zip-download-spin 700ms linear infinite;
}

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

.public-photos-section .photo-card-menu {
  justify-content: flex-start;
  margin-top: 7px;
}

.workflow-settings-panel {
  max-width: 900px;
}

.workflow-settings-head {
  max-width: 900px;
}

.page-subtitle {
  margin-top: 4px;
  color: var(--soft-ink);
  line-height: 1.45;
}

.workflow-timezone-row {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.workflow-timezone-row p {
  margin: 0 0 7px;
  color: var(--soft-ink);
  line-height: 1.45;
}

.workflow-password-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.workflow-password-input {
  position: relative;
  display: block;
}

.workflow-password-input input {
  padding-right: 38px;
}

.workflow-password-input button {
  position: absolute;
  top: 50%;
  right: 6px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  transform: translateY(-50%);
}

.workflow-password-input button:hover,
.workflow-password-input button:focus-visible {
  color: var(--accent);
  outline: 0;
}

.workflow-password-input svg {
  width: 16px;
  height: 16px;
}

.workflow-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 900px) minmax(240px, 320px);
  gap: 16px;
  align-items: start;
}

.workflow-user-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 180px auto;
  gap: 9px;
  align-items: end;
}

.workflow-user-table {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.workflow-user-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.3fr) 150px 110px minmax(220px, auto);
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.workflow-user-row:first-child {
  border-top: 0;
}

.workflow-user-head {
  min-height: 34px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.workflow-user-row.inactive {
  background: #f3f5f2;
}

.workflow-user-identity {
  min-width: 0;
}

.workflow-user-identity strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-user-identity span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-user-row select {
  width: 100%;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  padding: 4px 8px;
  outline-color: var(--accent);
}

.workflow-user-status {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.workflow-user-status.active {
  color: #ffffff;
  background: var(--good);
}

.workflow-user-status.inactive {
  color: var(--muted);
  background: #e2e7e3;
}

.workflow-user-status.pending {
  color: #ffffff;
  background: var(--warn);
}

.workflow-user-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.workflow-user-actions .quiet-button {
  min-height: 28px;
  font-size: 10px;
}

.workflow-user-muted {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.workflow-admin-notes {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.workflow-admin-notes h2 {
  font-size: 16px;
}

.workflow-task-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 140;
  display: grid;
  justify-items: end;
  gap: 8px;
}

.workflow-task-pill {
  max-width: min(420px, calc(100vw - 28px));
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(32, 39, 43, 0.18);
  font-weight: 850;
}

.workflow-task-priority {
  min-height: 21px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  color: #ffffff;
  background: #a54242;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.workflow-task-panel {
  width: min(420px, calc(100vw - 28px));
  display: none;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(32, 39, 43, 0.22);
}

.workflow-task-widget.open .workflow-task-panel {
  display: grid;
  gap: 10px;
}

.workflow-task-widget.open .workflow-task-pill {
  display: none;
}

.workflow-task-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.workflow-task-panel-head h2 {
  font-size: 16px;
}

.workflow-task-panel-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.workflow-task-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.workflow-task-form input {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 9px;
  color: var(--ink);
  background: #ffffff;
}

.workflow-task-list {
  display: grid;
  gap: 7px;
}

.workflow-task-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.workflow-task-card.dragging {
  opacity: 0.5;
}

.workflow-task-card.done {
  opacity: 0.55;
}

.workflow-task-card.done strong {
  text-decoration: line-through;
}

.workflow-task-check {
  width: 18px;
  height: 18px;
  border: 2px solid var(--line-strong);
  border-radius: 5px;
  background: #ffffff;
}

.workflow-task-card.done .workflow-task-check {
  border-color: var(--good);
  background: var(--good);
}

.workflow-task-card strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-task-card span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.workflow-task-drag {
  cursor: grab;
  text-transform: uppercase;
}

.workflow-login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}

.workflow-login-shell {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: center;
}

.workflow-login-brand {
  display: grid;
  gap: 14px;
}

.workflow-login-brand .brand {
  color: var(--ink);
}

.workflow-login-brand .brand span {
  color: var(--muted);
}

.workflow-login-brand h1 {
  max-width: 520px;
  font-size: 40px;
  line-height: 1;
}

.workflow-login-brand p {
  max-width: 480px;
  color: var(--soft-ink);
  font-size: 15px;
  line-height: 1.45;
}

.workflow-login-form {
  width: 100%;
  max-width: 480px;
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(32, 39, 43, 0.12);
}

.workflow-login-form h2 {
  font-size: 18px;
}

.workflow-login-link {
  justify-self: center;
  color: var(--accent);
  font-weight: 850;
  text-decoration: none;
}

.workflow-login-link:hover,
.workflow-login-link:focus-visible {
  text-decoration: underline;
  outline: 0;
}

.workflow-login-note {
  margin: 0;
  color: var(--soft-ink);
  font-size: 11px;
  line-height: 1.45;
}

.photo-carousel-button {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 38px;
  height: 52px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 7px;
  color: #ffffff;
  background: rgba(16, 24, 27, 0.58);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-50%);
}

.photo-carousel-button:hover,
.photo-carousel-button:focus-visible {
  background: rgba(16, 24, 27, 0.78);
  outline: 0;
}

.photo-carousel-button:disabled {
  opacity: 0.34;
  pointer-events: none;
}

.photo-carousel-prev {
  left: 16px;
}

.photo-carousel-next {
  right: 16px;
}

.file-lightbox.photo-mode .photo-carousel-button {
  display: inline-flex;
}

.document-preview-page {
  width: min(720px, 100%);
  min-height: 960px;
  padding: 58px 60px;
  background: #ffffff;
  border: 1px solid #cfd8d4;
  box-shadow: 0 12px 28px rgba(36, 46, 45, 0.16);
}

.document-preview-type {
  width: fit-content;
  min-width: 58px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 34px;
  border-radius: 6px;
  color: #ffffff;
  background: var(--accent);
  font-weight: 900;
}

.document-preview-lines {
  display: grid;
  gap: 16px;
}

.document-preview-lines span {
  height: 10px;
  border-radius: 999px;
  background: #d9e0dd;
}

.document-preview-lines span:nth-child(1) {
  width: 78%;
  height: 18px;
  margin-bottom: 8px;
  background: #b9c7c2;
}

.document-preview-lines span:nth-child(2) {
  width: 92%;
}

.document-preview-lines span:nth-child(3) {
  width: 86%;
}

.document-preview-lines span:nth-child(4) {
  width: 94%;
}

.document-preview-lines span:nth-child(5) {
  width: 68%;
}

.document-preview-lines span:nth-child(6) {
  width: 82%;
}

@media (max-width: 1200px) {
  .workflow-login-shell {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .workflow-login-brand {
    width: 100%;
    max-width: 480px;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  body.nav-open {
    overflow: hidden;
  }

  .mobile-shell-header {
    width: min(1320px, 100%);
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
  }

  .mobile-nav-toggle,
  .sidebar-close {
    display: inline-flex;
  }

  body.nav-open .mobile-nav-toggle {
    opacity: 0;
    pointer-events: none;
  }

  body.nav-open .mobile-nav-backdrop {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 120;
    width: min(300px, calc(100vw - 28px));
    max-width: 300px;
    height: 100vh;
    max-height: 100vh;
    padding: 16px 14px;
    gap: 18px;
    transform: translateX(100%);
    transition: transform 180ms ease;
    box-shadow: -18px 0 42px rgba(25, 34, 38, 0.22);
    will-change: transform;
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .side-nav {
    display: grid;
    overflow-x: visible;
  }

  .panel-grid,
  .job-header,
  .scope-layout {
    grid-template-columns: 1fr;
  }

  .job-header {
    gap: 5px;
  }

  .job-title-status {
    justify-self: start;
    align-self: start;
    font-size: clamp(22px, 3vw, 34px);
    line-height: 1.02;
    text-align: left;
  }

  .status-stack {
    justify-items: start;
  }

  .table-row {
    grid-template-columns: 1fr;
  }

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

  .client-table .table-row {
    grid-template-columns: 1fr;
  }

  .client-jobs-table .table-row {
    grid-template-columns: 1fr;
  }

  .jobs-table .table-row {
    grid-template-columns: 1fr;
  }

  .document-table .table-row {
    grid-template-columns: 1fr;
  }

  .time-table .time-row,
  .time-table.with-job .time-row,
  .time-table.with-user .time-row,
  .time-table.with-job.with-user .time-row {
    grid-template-columns: 1fr;
  }

  .time-table .time-row:not(.table-head) {
    gap: 0;
    padding: 0;
    border-top: 1px solid var(--line);
  }

  .table {
    display: grid;
    gap: 8px;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .table-row.mobile-card:not(.table-head) {
    gap: 0;
    padding: 0;
    overflow: visible;
    border: 1px solid rgba(190, 202, 196, 0.72);
    border-radius: 7px;
    background: var(--surface);
  }

  .table-row.mobile-card:not(.table-head) > div {
    min-height: 34px;
    display: grid;
    grid-template-columns: minmax(94px, 0.42fr) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border-top: 1px solid rgba(190, 202, 196, 0.45);
  }

  .table-row.mobile-card:not(.table-head) > div:first-child {
    border-top: 0;
  }

  .table-row.mobile-card:not(.table-head) .row-menu-cell {
    justify-content: stretch;
  }

  .table-row.mobile-card:not(.table-head) .mobile-card-label,
  .table-row.mobile-card:not(.table-head) .time-mobile-label {
    display: block;
    color: var(--muted);
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .table-row.mobile-card:not(.table-head) .mobile-card-value,
  .table-row.mobile-card:not(.table-head) .time-mobile-value {
    display: block;
    min-width: 0;
    color: var(--ink);
    font-weight: 800;
  }

  .time-table .time-row:not(.table-head) .time-note-cell {
    white-space: normal;
    text-overflow: clip;
  }

  .table-row.mobile-card:not(.table-head) .file-row {
    gap: 10px;
  }

  .table-row.mobile-card:not(.table-head) .file-row .time-mobile-value,
  .table-row.mobile-card:not(.table-head) .file-row .mobile-card-value {
    display: grid;
    gap: 2px;
  }

  .time-summary {
    grid-template-columns: 1fr;
  }

  .public-share-header {
    grid-template-columns: 1fr;
  }

  .public-share-link-panel {
    width: 100%;
  }

  .table-row:first-child {
    display: none;
  }
}

@media (max-width: 660px) {
  .tabs-shell {
    flex-wrap: wrap;
    gap: 6px;
    padding-bottom: 6px;
  }

  .tabs {
    flex-basis: 100%;
    overflow-x: hidden;
  }

  .tabs-action {
    width: 100%;
    justify-content: flex-start;
    padding-left: 0;
  }

  .tab {
    flex: 1 1 auto;
    padding-inline: 4px;
    font-size: 11px;
    text-align: center;
  }

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

  .page-head {
    align-items: stretch;
    flex-direction: column;
  }

  .workflow-timezone-row,
  .workflow-admin-layout,
  .workflow-user-add-form {
    grid-template-columns: 1fr;
  }

  .workflow-login-brand h1 {
    font-size: 32px;
  }

  .workflow-user-table {
    gap: 9px;
    overflow: visible;
    border: 0;
    border-radius: 0;
  }

  .workflow-user-head {
    display: none;
  }

  .workflow-user-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
  }

  .workflow-user-row > div {
    display: grid;
    gap: 4px;
  }

  .workflow-user-row > div::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .workflow-user-actions {
    justify-content: flex-start;
  }

  .workflow-task-widget {
    right: 14px;
    bottom: 14px;
  }

  .workflow-task-panel,
  .workflow-task-pill {
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
  }

  .file-lightbox {
    padding: 8px;
  }

  .file-lightbox-panel {
    height: 92vh;
  }

  .document-preview-page {
    min-height: 760px;
    padding: 38px 28px;
  }
}
