/* ===== from globals.css ===== */
/* Task Tracker. Named for what field crews actually carry: carbon-copy work order
   books. Blue carbon ink on white, canary quote copies, pink invoice copies, and
   the punched stub that follows a job from first call to paid. */

:root {
  --ink: #16233b;
  --ink-2: #44526a;
  --ink-3: #66748b;
  --night: #131c33;
  --night-2: #1f2b4a;
  --steel: #eef1f6;
  --steel-2: #e3e8f0;
  --paper: #ffffff;
  --line: #d9dfe9;
  --line-2: #bcc6d5;

  --carbon: #2742c4;
  --carbon-dark: #1b2f93;
  --carbon-wash: #e8ecfb;
  --canary: #fff3b0;
  --canary-deep: #ffd84d;
  --canary-ink: #6b5400;
  --pink: #ffdbe3;
  --pink-deep: #f48fa9;
  --pink-ink: #8f1d41;
  --goldenrod: #ffe3a1;
  --serial: #c4252f;

  --ok: #157347;
  --ok-wash: #dcf3e6;
  --warn: #975a00;
  --warn-wash: #fff0d4;
  --danger: #b3261e;
  --danger-wash: #fde5e3;
  --orange: #b4470c;
  --orange-wash: #ffe7d6;
  --purple: #7e2aa3;
  --purple-wash: #f3e3fb;

  --font-body-stack: var(--font-body), system-ui, sans-serif;
  --font-display-stack: var(--font-display), var(--font-body), system-ui, sans-serif;

  --radius: 8px;
  --radius-sm: 5px;
  --shadow-menu: 0 12px 32px -8px rgb(19 28 51 / 0.28), 0 2px 6px rgb(19 28 51 / 0.1);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--steel);
  color: var(--ink);
  font-family: var(--font-body-stack);
  font-size: 15px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display-stack);
  font-weight: 600;
  line-height: 1.15;
}

h1 {
  font-size: 30px;
  letter-spacing: -0.005em;
}

h2 {
  font-size: 18px;
}

h3 {
  font-size: 15px;
}

p {
  margin: 0;
}

a {
  color: var(--carbon);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

small {
  font-size: 12.5px;
}

:focus-visible {
  outline: 2px solid var(--carbon);
  outline-offset: 2px;
  border-radius: 3px;
}

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

.muted {
  color: var(--ink-3);
}

.strong {
  font-weight: 600;
}

.nowrap {
  white-space: nowrap;
}

.block {
  display: block;
}

.text-danger {
  color: var(--danger);
}

.text-warn {
  color: var(--warn);
}

.row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.row > .input {
  width: auto;
}

.row.between {
  justify-content: space-between;
}

.row-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stack-lg {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.stack-tight {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stack-tight-top {
  margin-top: 12px;
}

.spin {
  animation: spin 0.9s linear infinite;
}

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

/* ----- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 13px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font: 600 14px/1.2 var(--font-body-stack);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s;
}

.btn:hover {
  background: var(--steel);
  border-color: var(--ink-3);
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.btn-primary {
  background: var(--carbon);
  border-color: var(--carbon);
  color: #fff;
}

.btn-primary:hover {
  background: var(--carbon-dark);
  border-color: var(--carbon-dark);
}

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #8f1e18;
  border-color: #8f1e18;
}

.btn-quiet {
  border-color: transparent;
  background: transparent;
  color: var(--ink-2);
}

.btn-quiet:hover {
  background: var(--steel-2);
  border-color: transparent;
}

.btn-small {
  min-height: 30px;
  padding: 3px 10px;
  font-size: 13px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: none;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--steel-2);
  color: var(--ink);
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--carbon);
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.link-btn:hover {
  text-decoration: underline;
}

.danger-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--danger);
}

.link-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ----- forms */

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.field label,
.label-like {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
}

.field-hint {
  color: var(--ink-3);
  font-size: 12.5px;
}

.field-error {
  color: var(--danger);
  font-size: 13.5px;
}

.input {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.3 var(--font-body-stack);
}

textarea.input {
  resize: vertical;
}

.input:focus {
  outline: 2px solid var(--carbon);
  outline-offset: -1px;
  border-color: var(--carbon);
}

.input.num {
  text-align: right;
}

.input-quiet {
  border-color: var(--line);
  color: var(--ink-2);
  font-size: 13.5px;
  min-height: 32px;
}

input[type='color'].input {
  padding: 3px;
}

.select-inline {
  width: auto;
  min-width: 180px;
}

.input-icon {
  position: relative;
}

.input-icon > svg {
  position: absolute;
  left: 10px;
  top: 50%;
  translate: 0 -50%;
  color: var(--ink-3);
}

.input-icon .input {
  padding-left: 32px;
}

.check-field {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  cursor: pointer;
}

.check-field input {
  margin: 3px 0 0;
  width: 16px;
  height: 16px;
  accent-color: var(--carbon);
}

.check-field small {
  display: block;
  color: var(--ink-3);
}

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

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

.copy-row {
  display: flex;
  gap: 8px;
}

.hp {
  position: absolute;
  left: -9999px;
}

/* ----- badges */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--steel-2);
  color: var(--ink-2);
}

.badge-blue {
  background: var(--carbon-wash);
  color: var(--carbon-dark);
}

.badge-yellow {
  background: var(--canary);
  color: var(--canary-ink);
}

.badge-green {
  background: var(--ok-wash);
  color: var(--ok);
}

.badge-red {
  background: var(--danger-wash);
  color: var(--danger);
}

.badge-pink {
  background: var(--pink);
  color: var(--pink-ink);
}

.badge-purple {
  background: var(--purple-wash);
  color: var(--purple);
}

.badge-orange {
  background: var(--orange-wash);
  color: var(--orange);
}

/* ----- shell */

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 12px;
  background: var(--night);
  color: #d6dcea;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 6px;
  font: 700 20px/1 var(--font-display-stack);
  color: #fff;
}

.org-switch {
  position: relative;
}

.org-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #33405f;
  border-radius: var(--radius-sm);
  background: var(--night-2);
  color: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.org-button:hover {
  background: #2a3760;
}

.org-text {
  min-width: 0;
}

.org-text strong {
  display: block;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-text small {
  color: #a9b4cc;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 12px;
}

.nav-heading {
  padding: 0 8px 4px;
  color: #93a0bd;
  font-size: 12.5px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  color: #d6dcea;
  font-weight: 500;
}

.nav-link:hover {
  background: var(--night-2);
  color: #fff;
  text-decoration: none;
}

.nav-on,
.nav-on:hover {
  background: var(--canary-deep);
  color: var(--night);
  font-weight: 600;
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 12px;
}

.sidebar-scrim {
  display: none;
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 58px;
  padding: 0 22px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.menu-toggle {
  display: none;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 460px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  background: var(--steel);
  color: var(--ink-3);
}

.search:focus-within {
  outline: 2px solid var(--carbon);
  background: var(--paper);
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

/* The box shows focus (.search:focus-within); the field inside must not add a second ring. */
.search input:focus,
.search input:focus-visible {
  outline: 0;
}

.search kbd {
  padding: 0 5px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  font: 500 11.5px var(--font-body-stack);
}

.menu {
  position: absolute;
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-menu);
}

.search-menu {
  top: 42px;
  left: 0;
  right: 0;
  max-height: 60vh;
  overflow-y: auto;
}

.org-menu {
  top: calc(100% + 5px);
  left: 0;
  width: 270px;
}

.create,
.user-menu {
  position: relative;
}

.create-menu {
  top: calc(100% + 5px);
  right: 0;
  width: 170px;
}

.user-dropdown {
  top: calc(100% + 5px);
  right: 0;
  width: 240px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 9px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.menu-item:hover {
  background: var(--steel);
  text-decoration: none;
}

.menu-grow {
  flex: 1;
  min-width: 0;
}

.menu-grow small {
  display: block;
  color: var(--ink-3);
}

.menu-split {
  margin-top: 4px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding-top: 9px;
}

.menu-item-danger {
  color: var(--danger);
}

.menu-item-danger:hover {
  background: var(--danger-wash);
}

.menu-divider {
  margin: 4px 0;
  border-top: 1px solid var(--line);
}

.dispatch-menu {
  position: fixed;
  z-index: 50;
  min-width: 190px;
  font-size: 14px;
}

.menu-note {
  padding: 7px 9px;
  color: var(--ink-2);
  font-size: 13.5px;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border-radius: 50%;
  color: #fff;
  font-weight: 600;
  line-height: 1;
}

.avatar-empty {
  width: 26px;
  height: 26px;
  background: none;
  border: 1.5px dashed var(--line-2);
}

.avatars {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}

.avatar-btn {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 50%;
}

.timer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px 2px 12px;
  border-radius: 99px;
  background: var(--orange-wash);
  color: var(--orange);
  font-size: 13.5px;
}

.timer-dot,
.dot-live {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--orange);
}

@media (prefers-reduced-motion: no-preference) {
  .timer-dot,
  .dot-live {
    animation: pulse 1.8s ease-in-out infinite;
  }
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

.dot-road {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 2px;
  background: var(--purple);
}

.demo-banner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 14px;
  padding: 5px 16px;
  background: var(--canary);
  color: var(--canary-ink);
  font-size: 13.5px;
}

.demo-banner .link-btn {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
}

.content {
  flex: 1;
  width: 100%;
  max-width: 1460px;
  margin: 0 auto;
  padding: 24px 26px 60px;
}

.full-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

/* ----- page structure */

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 18px;
}

.page-head-text {
  min-width: 0;
}

.page-sub {
  margin-top: 4px;
  color: var(--ink-2);
}

.back-link {
  display: inline-block;
  margin-bottom: 5px;
  color: var(--ink-2);
  font-size: 13.5px;
}

.back-link::before {
  content: '‹ ';
}

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

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 small {
  margin-left: 6px;
  color: var(--ink-3);
  font: 400 13px var(--font-body-stack);
}

.panel-actions {
  display: flex;
  gap: 8px;
  flex: none;
}

.panel-link {
  font-size: 13.5px;
}

.panel-body {
  padding: 16px;
}

.panel-flush {
  padding: 0;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 14px;
}

.toolbar .tabs {
  margin-bottom: 0;
}

.toolbar-search {
  flex: 1;
  min-width: 220px;
  max-width: 340px;
}

.tabs {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--ink-2);
  font: 500 14px var(--font-body-stack);
  cursor: pointer;
}

.tab:hover {
  background: var(--steel-2);
}

.tab-on,
.tab-on:hover {
  background: var(--ink);
  color: #fff;
}

.tab-count {
  min-width: 20px;
  padding: 0 5px;
  border-radius: 99px;
  background: rgb(68 82 106 / 0.14);
  font-size: 12px;
  text-align: center;
}

.tab-on .tab-count {
  background: rgb(255 255 255 / 0.22);
}

.empty {
  padding: 34px 20px;
  text-align: center;
}

.empty h3 {
  font-size: 17px;
}

.empty p {
  margin-top: 5px;
  color: var(--ink-2);
}

.empty-action {
  margin-top: 13px;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 30px;
  color: var(--ink-3);
}

.error-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  background: var(--danger-wash);
  color: var(--danger);
}

/* ----- tables */

.table-scroll {
  overflow-x: auto;
}

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

.table th {
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--steel-2);
  vertical-align: top;
}

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

.table tbody tr:hover {
  background: #f7f8fb;
}

.table small {
  display: block;
  color: var(--ink-3);
}

.table small.row-inline {
  display: flex;
}

.num {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
}

.row-link {
  cursor: pointer;
}

.row-off {
  opacity: 0.55;
}

.cell-action {
  text-align: right;
  white-space: nowrap;
}

/* ----- the journey stub */

.stub {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
}

.stub-step {
  position: relative;
  min-width: 0;
  border-left: 1.5px dashed var(--line-2);
}

.stub-step:first-child {
  border-left: 0;
}

.stub-step > a,
.stub-step:not(:has(a)) {
  color: inherit;
}

.stub-step > a {
  display: block;
}

.stub-step > a:hover {
  text-decoration: none;
  background: var(--steel);
}

.stub-step .stub-hole {
  display: block;
  width: 15px;
  height: 15px;
  margin: 9px auto 3px;
  border: 1.5px solid var(--line-2);
  border-radius: 50%;
  background: var(--paper);
}

.stub-label {
  display: block;
  padding: 0 4px 8px;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}

/* Done: a green tick on a green-washed cell. Filled means finished. */
.stub-done {
  background: var(--ok-wash);
}

.stub-done .stub-hole {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin: 8px auto 2px;
  border-color: var(--ok);
  background: var(--ok);
  color: var(--paper);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.stub-done .stub-label {
  color: var(--ink);
}

/* Now: "you are here". Outlined, not filled, with a tag that says so. */
.stub-now {
  box-shadow: inset 0 0 0 2px var(--carbon);
  background: var(--paper);
}

.stub-now .stub-hole {
  border: 2.5px solid var(--carbon);
  background: var(--carbon-wash);
}

.stub-now .stub-label {
  color: var(--carbon-dark);
  font-weight: 700;
}

.stub-tag {
  display: block;
  width: max-content;
  margin: 3px auto 0;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--carbon);
  color: var(--paper);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 16px;
  text-transform: uppercase;
}

/* Still to come: faded. */
.stub-todo .stub-label {
  color: var(--ink-3);
  font-weight: 400;
}

.stub-todo .stub-hole {
  border-color: var(--line);
}

/* ----- printed forms */

.sheet {
  position: relative;
  min-width: 0;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-top: 6px solid var(--carbon);
  border-radius: 3px;
  background: var(--paper);
}

.sheet-quote {
  border-top-color: var(--canary-deep);
  background: linear-gradient(#fffcea, var(--paper) 170px);
}

.sheet-invoice {
  border-top-color: var(--pink-deep);
  background: linear-gradient(#fff4f6, var(--paper) 170px);
}

.sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1.5px solid var(--ink);
}

.sheet-org {
  font: 700 22px/1.1 var(--font-display-stack);
}

.sheet-head p {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 13.5px;
  white-space: pre-line;
}

.sheet-title {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  text-align: right;
}

.sheet-title span:first-child {
  color: var(--ink-2);
  font-weight: 500;
}

.serial {
  color: var(--serial);
  font: 700 22px/1.1 var(--font-display-stack);
  letter-spacing: 0.01em;
}

.sheet-parties {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px 20px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.sheet-parties h3 {
  margin-bottom: 3px;
  color: var(--ink-3);
  font: 600 13px var(--font-body-stack);
}

.sheet-parties p {
  overflow-wrap: anywhere;
}

.sheet-instructions {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.sheet-instructions h3 {
  margin-bottom: 3px;
  color: var(--ink-3);
  font: 600 13px var(--font-body-stack);
}

.lines {
  width: 100%;
  border-collapse: collapse;
}

.lines th {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

.lines td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--steel-2);
  vertical-align: top;
}

.lines th:first-child,
.lines td:first-child {
  padding-left: 0;
}

.lines th:last-child,
.lines td:last-child {
  padding-right: 0;
}

.lines small {
  display: block;
  color: var(--ink-3);
}

.totals {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: min(100%, 320px);
  margin: 14px 0 0 auto;
}

.totals > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.totals dt {
  color: var(--ink-2);
}

.totals dd {
  margin: 0;
}

.totals-grand {
  padding-top: 6px;
  border-top: 1.5px solid var(--ink);
  font-size: 19px;
  font-weight: 700;
}

.totals-grand dt {
  color: var(--ink);
}

.sheet-terms {
  margin-top: 16px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 13.5px;
  white-space: pre-line;
}

/* ----- line items */

.line-editor {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.line-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.line-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 76px 110px 50px 96px 32px;
  gap: 10px;
  align-items: start;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--steel-2);
}

.line-main {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.line-num {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--ink-3);
  font-size: 12.5px;
}

.line-tax {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--ink-3);
  font-size: 12.5px;
  flex-direction: column-reverse;
  justify-content: flex-end;
}

.line-amount {
  padding-top: 26px;
  font-weight: 600;
  text-align: right;
}

.line-row .icon-btn {
  margin-top: 21px;
}

.line-empty {
  padding: 4px 0;
}

.line-add {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.line-add select {
  flex: 1;
  min-width: 220px;
  max-width: 380px;
}

.line-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  margin-top: 6px;
}

.line-adjust {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 150px));
  gap: 12px;
  align-content: start;
}

.line-foot .totals {
  margin: 0;
}

/* ----- pickers */

.picked {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  padding: 4px 6px 4px 11px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
}

.picked small {
  display: block;
  color: var(--ink-3);
}

.pick-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 6px;
  margin-top: 4px;
}

.pick-row {
  display: flex;
  flex-direction: column;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.pick-row:hover {
  border-color: var(--carbon);
  background: var(--carbon-wash);
}

.pick-row small {
  color: var(--ink-3);
}

.assign-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.assign-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px 4px 5px;
  border: 1px solid var(--line-2);
  border-radius: 99px;
  cursor: pointer;
  font-weight: 500;
}

.assign-chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.assign-chip:has(input:focus-visible) {
  outline: 2px solid var(--carbon);
  outline-offset: 2px;
}

.assign-on {
  border-color: var(--carbon);
  background: var(--carbon-wash);
}

.day-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
  padding: 0;
  border: 0;
}

.day-picker legend {
  margin-bottom: 5px;
  padding: 0;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
}

.day-chip {
  position: relative;
  padding: 5px 11px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.day-chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.day-chip:has(input:focus-visible) {
  outline: 2px solid var(--carbon);
  outline-offset: 2px;
}

.day-on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.checklist-edit {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist-edit li {
  display: flex;
  gap: 6px;
}

/* ----- dialogs */

.modal {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: var(--ink);
  box-shadow: 0 30px 70px -18px rgb(19 28 51 / 0.45);
}

.modal-wide {
  width: min(860px, calc(100vw - 24px));
}

.modal::backdrop {
  background: rgb(19 28 51 / 0.45);
}

.modal-frame {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 32px);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 13px 13px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-body {
  padding: 16px 18px;
  overflow-y: auto;
}

.modal-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
}

.preview-img {
  display: block;
  max-width: 100%;
  margin: 0 auto;
}

.toasts {
  inset: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  position: fixed;
  z-index: 100;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(380px, calc(100vw - 36px));
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--night);
  color: #fff;
  box-shadow: var(--shadow-menu);
}

.toast-error {
  background: var(--danger);
}

.detail-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
}

.detail-list > div {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 10px;
}

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

.detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.detail-list.compact {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.detail-text {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--steel);
  white-space: pre-line;
}

.role-list > div {
  grid-template-columns: 130px minmax(0, 1fr);
}

/* ----- records side panels */

.note-form {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
}

.note-list,
.activity-list,
.file-list,
.site-list,
.plain-list,
.contact-list,
.checklist,
.attention {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.note-list {
  margin-top: 12px;
}

.note-list li {
  padding: 9px 0;
  border-top: 1px solid var(--steel-2);
}

.note-list p {
  white-space: pre-line;
}

.note-list footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 3px;
  color: var(--ink-3);
  font-size: 12.5px;
}

.activity-list {
  gap: 9px;
}

.activity-list small {
  color: var(--ink-3);
}

.file-list {
  gap: 2px;
}

.file-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--steel-2);
}

.file-list li > svg {
  flex: none;
  color: var(--ink-3);
}

.file-name {
  flex: 1;
  min-width: 100px;
  overflow-wrap: anywhere;
}

.file-list small {
  order: 5;
  width: 100%;
  padding-left: 24px;
  color: var(--ink-3);
}

.site-list {
  gap: 2px;
}

.site-list li {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--steel-2);
}

.site-list li:last-child {
  border-bottom: 0;
}

.site-list li > svg {
  flex: none;
  margin-top: 2px;
  color: var(--ink-3);
}

.site-list li > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.contact-list {
  gap: 7px;
}

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  overflow-wrap: anywhere;
}

.contact-list svg {
  flex: none;
  margin-top: 3px;
  color: var(--ink-3);
}

.plain-list {
  gap: 9px;
}

.checklist {
  gap: 8px;
}

.access-note {
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--canary);
  color: var(--canary-ink);
  font-size: 13.5px;
}

.visit-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.visit-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--steel-2);
}

.visit-list li:last-child {
  border-bottom: 0;
}

.visit-when {
  min-width: 170px;
}

.visit-when small {
  display: block;
  color: var(--ink-3);
}

.visit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

.visit-off {
  opacity: 0.5;
}

/* ----- site editing */

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

.pin-map {
  height: 320px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--steel-2);
}

.pin-icon span {
  display: block;
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--carbon);
  box-shadow: 0 1px 4px rgb(19 28 51 / 0.5);
}

/* ----- dashboard */

.dash {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dash-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.dash-head h1 {
  font-size: 34px;
}

/* The ticket: five connected stubs, perforated between stages, in the colours of the
   carbon copies each stage produces. */
.ticket {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  filter: drop-shadow(0 1px 1px rgb(19 28 51 / 0.1));
}

.ticket-part {
  --stub: var(--paper);
  --notch: 9px;
  position: relative;
  min-width: 0;
  background: radial-gradient(circle at 100% 50%, var(--steel) var(--notch), transparent calc(var(--notch) + 0.5px)) no-repeat,
    radial-gradient(circle at 0 50%, var(--steel) var(--notch), transparent calc(var(--notch) + 0.5px)) no-repeat, var(--stub);
}

.ticket-part + .ticket-part {
  border-left: 2px dashed rgb(22 35 59 / 0.28);
}

.ticket-part:first-child {
  border-radius: var(--radius) 0 0 var(--radius);
  background: radial-gradient(circle at 100% 50%, var(--steel) var(--notch), transparent calc(var(--notch) + 0.5px)) no-repeat, var(--stub);
}

.ticket-part:last-child {
  border-radius: 0 var(--radius) var(--radius) 0;
  background: radial-gradient(circle at 0 50%, var(--steel) var(--notch), transparent calc(var(--notch) + 0.5px)) no-repeat, var(--stub);
}

.ticket-requests {
  --stub: var(--paper);
}

.ticket-quotes {
  --stub: var(--canary);
}

.ticket-schedule {
  --stub: #d9e0fb;
}

.ticket-invoice {
  --stub: var(--goldenrod);
}

.ticket-paid {
  --stub: var(--pink);
}

.ticket-part > a {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 2px 8px;
  height: 100%;
  padding: 16px 20px 15px;
  color: var(--ink);
}

.ticket-part > a:hover {
  text-decoration: none;
  background: rgb(22 35 59 / 0.05);
}

.ticket-part > a > svg {
  grid-column: 2;
  grid-row: 1;
  color: var(--ink-2);
}

.ticket-value {
  grid-column: 1;
  grid-row: 1;
  font: 700 44px/0.95 var(--font-display-stack);
  letter-spacing: -0.01em;
}

.ticket-label {
  grid-column: 1 / -1;
  font-weight: 600;
}

.ticket-note {
  grid-column: 1 / -1;
  color: var(--ink-2);
}

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.today-board {
  --who: 186px;
}

.today-hours {
  position: relative;
  height: 18px;
  margin-left: var(--who);
  color: var(--ink-3);
  font-size: 12px;
}

.today-hours span {
  position: absolute;
  translate: -50% 0;
  white-space: nowrap;
}

.today-hours span:first-child {
  translate: 0 0;
}

.today-row {
  display: grid;
  grid-template-columns: var(--who) minmax(0, 1fr);
  align-items: center;
  min-height: 56px;
  border-top: 1px solid var(--steel-2);
}

.today-who {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding-right: 10px;
}

.today-who span:last-child {
  min-width: 0;
}

.today-who strong {
  display: block;
  font-weight: 600;
}

.today-who small {
  display: block;
  color: var(--ink-3);
}

.today-track {
  position: relative;
  height: 56px;
}

.hour-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--steel-2);
}

.now-line {
  position: absolute;
  z-index: 4;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--serial);
  pointer-events: none;
}

.today-block {
  position: absolute;
  top: 6px;
  bottom: 6px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 8px;
  padding: 1px 7px;
  border-left: 4px solid var(--tech);
  border-radius: 3px;
  background: color-mix(in srgb, var(--tech) 14%, white);
  color: var(--ink);
  overflow: hidden;
  font-size: 12.5px;
  line-height: 1.25;
  white-space: nowrap;
}

.today-block:hover {
  z-index: 3;
  text-decoration: none;
  background: color-mix(in srgb, var(--tech) 24%, white);
}

.today-block strong {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}

.today-block span {
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
}

.today-unassigned {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--danger);
}

.status-completed.today-block,
.status-completed.day-card,
.status-completed.week-card,
.status-completed.month-chip {
  background: repeating-linear-gradient(135deg, #f1f3f7, #f1f3f7 5px, #e7eaf1 5px, #e7eaf1 10px);
  border-left-color: color-mix(in srgb, var(--tech) 50%, #bcc6d5);
}

.status-in_progress.today-block,
.status-in_progress.day-card,
.status-in_progress.week-card {
  background: color-mix(in srgb, var(--tech) 30%, white);
  box-shadow: inset 0 0 0 1px var(--tech);
}

.attention {
  gap: 8px;
}

.attention li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.attention svg {
  flex: none;
  margin-top: 3px;
}

.attention-danger svg {
  color: var(--danger);
}

.attention-warn svg {
  color: var(--warn);
}

.money-big {
  font: 700 36px/1 var(--font-display-stack);
}

.money-compare {
  margin-top: 3px;
  color: var(--ink-2);
  font-size: 13.5px;
}

.spark {
  margin-top: 12px;
}

.spark-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 62px;
}

.spark-slot {
  display: flex;
  align-items: flex-end;
  flex: 1;
  height: 100%;
}

.spark-bar {
  width: 100%;
  border-radius: 3px 3px 0 0;
  background: #b9c4f0;
}

.spark-slot:hover .spark-bar {
  background: var(--carbon-dark);
}

.spark-now {
  background: var(--carbon);
}

.spark-note {
  display: block;
  margin-top: 5px;
  color: var(--ink-3);
}

/* ----- technician's day */

.field-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.field-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.field-card.status-in_progress {
  border-color: var(--orange);
  box-shadow: inset 4px 0 0 var(--orange);
}

.field-card.status-completed {
  background: #f7f8fb;
}

.field-time strong {
  display: block;
  font: 700 21px/1.1 var(--font-display-stack);
}

.field-time small {
  color: var(--ink-3);
}

.field-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
}

.field-main .strong {
  font-size: 16.5px;
}

.field-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 134px;
}

.field-actions .badge {
  align-self: flex-end;
}

/* ----- schedule */

.schedule {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.schedule-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
}

.schedule-bar .tabs {
  margin: 0 0 0 auto;
}

.schedule-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.schedule-title {
  margin-left: 6px;
  font: 600 18px var(--font-display-stack);
}

.schedule-body {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.schedule-body-solo {
  grid-template-columns: minmax(0, 1fr);
}

.unscheduled {
  position: sticky;
  top: 70px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: calc(100vh - 92px);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.unscheduled-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 5px;
  overflow-y: auto;
}

.wait-card {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 10px;
  border: 1px solid var(--line-2);
  border-top: 4px solid var(--canary-deep);
  border-radius: 3px;
  background: #fffdf2;
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  line-height: 1.3;
  text-align: left;
  cursor: grab;
  touch-action: none;
}

.wait-card:hover {
  border-color: var(--ink-3);
  border-top-color: var(--canary-deep);
}

.wait-card strong {
  font-weight: 600;
}

.wait-card small {
  color: var(--ink-3);
}

.wait-card em {
  font-style: normal;
  font-weight: 600;
  text-transform: capitalize;
}

.board-wrap {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.row-label {
  position: sticky;
  left: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 170px;
  padding: 8px 10px;
  border-right: 1px solid var(--line);
  background: var(--paper);
}

.row-label strong {
  display: block;
  font-weight: 600;
  line-height: 1.2;
}

.row-label small {
  display: block;
  color: var(--ink-3);
  line-height: 1.2;
}

.day-board {
  width: max-content;
  min-width: 100%;
}

.day-head {
  position: sticky;
  top: 0;
  z-index: 7;
  display: flex;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.day-corner {
  position: sticky;
  left: 0;
  z-index: 8;
  flex: none;
  width: 170px;
  border-right: 1px solid var(--line);
  background: var(--paper);
}

.day-hours {
  display: flex;
  width: var(--board-width);
}

.day-hours span {
  flex: none;
  padding: 6px 0 6px 5px;
  border-left: 1px solid var(--steel-2);
  color: var(--ink-3);
  font-size: 12.5px;
}

.day-row {
  display: flex;
  border-bottom: 1px solid var(--line);
}

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

.day-track {
  position: relative;
  flex: none;
  width: var(--board-width);
}

.drop-on {
  background: var(--carbon-wash) !important;
}

.drop-preview {
  position: absolute;
  top: 3px;
  bottom: 3px;
  border: 2px dashed var(--carbon);
  border-radius: 4px;
  pointer-events: none;
}

.day-card,
.week-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 3px 7px;
  border: 0;
  border-left: 4px solid var(--tech);
  border-radius: 3px;
  background: color-mix(in srgb, var(--tech) 14%, white);
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  line-height: 1.25;
  text-align: left;
  cursor: grab;
  touch-action: none;
  overflow: hidden;
}

.day-card {
  position: absolute;
  z-index: 2;
  height: 57px;
}

.day-card:hover,
.week-card:hover {
  background: color-mix(in srgb, var(--tech) 24%, white);
}

.day-card strong,
.week-card strong {
  width: 100%;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-top {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-2);
  white-space: nowrap;
}

.card-sub {
  width: 100%;
  overflow: hidden;
  color: var(--ink-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-resize {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 8px;
  cursor: ew-resize;
}

.card-resize:hover {
  background: rgb(22 35 59 / 0.15);
}

.status-completed.day-card,
.status-completed.week-card,
.status-completed.month-chip {
  cursor: default;
}

.dragging {
  opacity: 0.3;
}

.drag-ghost {
  position: fixed;
  z-index: 200;
  display: flex;
  flex-direction: column;
  padding: 6px 10px;
  border-left: 4px solid var(--carbon);
  border-radius: 4px;
  background: var(--paper);
  box-shadow: var(--shadow-menu);
  font-size: 13px;
  rotate: 1.5deg;
  pointer-events: none;
}

.drag-ghost strong {
  font-weight: 600;
}

.drag-ghost span {
  color: var(--ink-2);
}

.week-board {
  min-width: 880px;
}

.week-row {
  display: grid;
  grid-template-columns: 150px repeat(7, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

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

.week-head {
  position: sticky;
  top: 0;
  z-index: 7;
  background: var(--paper);
}

.week-row .row-label {
  width: 150px;
}

.week-corner {
  position: sticky;
  left: 0;
  border-right: 1px solid var(--line);
  background: var(--paper);
}

.week-day {
  padding: 7px 8px;
  border-right: 1px solid var(--steel-2);
  color: var(--ink-2);
  font-size: 13px;
}

.week-day strong {
  color: var(--ink);
  font-size: 15px;
}

.week-day.week-today {
  background: var(--canary);
}

.week-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 74px;
  padding: 4px;
  border-right: 1px solid var(--steel-2);
}

.week-cell:last-child,
.week-day:last-child {
  border-right: 0;
}

.week-cell.week-today {
  background: #fffdf1;
}

.week-card {
  flex: none;
  width: 100%;
  min-width: 0;
}

.month-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  min-width: 910px;
}

.month-name {
  padding: 7px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
}

.month-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 106px;
  padding: 4px;
  border-right: 1px solid var(--steel-2);
  border-bottom: 1px solid var(--steel-2);
}

.month-cell.week-today {
  background: #fffdf1;
}

.month-out {
  background: #f7f8fb;
}

.month-out .month-date {
  color: var(--ink-3);
}

.month-date {
  align-self: flex-start;
  padding: 0 5px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--ink);
  font: 600 13px var(--font-body-stack);
  cursor: pointer;
}

.month-date:hover {
  background: var(--steel-2);
}

.month-chip {
  width: 100%;
  padding: 1px 5px;
  border: 0;
  border-left: 3px solid var(--tech);
  border-radius: 2px;
  background: color-mix(in srgb, var(--tech) 14%, white);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: grab;
  touch-action: none;
}

.month-more {
  padding-left: 5px;
  font-size: 12px;
}

/* ----- map */

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
  align-items: start;
}

.map-stage {
  position: sticky;
  top: 70px;
  min-width: 0;
}

.crew-map {
  height: calc(100vh - 200px);
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: #e8ebf1;
  background-image: linear-gradient(#dde2eb 1px, transparent 1px), linear-gradient(90deg, #dde2eb 1px, transparent 1px);
  background-size: 48px 48px;
  overflow: hidden;
  z-index: 0;
}

.map-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.map-side section {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.map-side h2 {
  margin-bottom: 8px;
}

.crew-list,
.stop-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.crew-list li {
  display: flex;
  align-items: center;
  gap: 4px;
  border-top: 1px solid var(--steel-2);
}

.crew-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  flex: 1;
  min-width: 0;
  padding: 8px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.crew-row:disabled {
  cursor: default;
}

.crew-row:not(:disabled):hover strong {
  color: var(--carbon);
}

.crew-text {
  min-width: 0;
}

.crew-text strong {
  display: block;
  font-weight: 600;
}

.crew-text small {
  display: block;
  color: var(--ink-2);
  line-height: 1.3;
}

.stop-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 2px 8px;
  padding: 7px 0;
  border-top: 1px solid var(--steel-2);
}

.stop-time {
  min-width: 52px;
  font-weight: 600;
}

.stop-text {
  flex: 1;
  min-width: 140px;
}

.stop-text small {
  display: block;
  color: var(--ink-3);
}

.job-pin-mark {
  display: inline-block;
  padding: 1px 6px;
  border: 1.5px solid var(--tech);
  border-radius: 99px;
  background: #fff;
  color: var(--ink);
  font: 600 11.5px/1.5 var(--font-body-stack);
  white-space: nowrap;
  box-shadow: 0 1px 3px rgb(19 28 51 / 0.35);
}

.job-pin-mark.status-completed {
  background: #eef1f6;
  color: var(--ink-3);
}

.job-pin-mark.status-in_progress {
  background: var(--tech);
  color: #fff;
}

.crew-pin span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  font: 700 12px var(--font-body-stack);
  box-shadow: 0 2px 8px rgb(19 28 51 / 0.5);
}

/* ----- reports */

.report-filters .field {
  flex-direction: row;
  align-items: center;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chip {
  padding: 5px 12px;
  border: 1px solid var(--line-2);
  border-radius: 99px;
  background: var(--paper);
  color: var(--ink-2);
  font: 500 13.5px var(--font-body-stack);
  cursor: pointer;
}

.chip:hover {
  border-color: var(--ink-3);
}

.chip-on,
.chip-on:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.span-2 {
  grid-column: 1 / -1;
}

.report-kpis {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.kpi {
  display: flex;
  flex-direction: column;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.kpi span {
  color: var(--ink-2);
  font-size: 13.5px;
}

.kpi strong {
  font: 700 28px/1.15 var(--font-display-stack);
}

.kpi small {
  color: var(--ink-3);
}

.chart {
  margin: 0;
}

.chart-legend {
  display: flex;
  gap: 16px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
  font-size: 13.5px;
}

.chart-legend li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chart-legend span {
  width: 11px;
  height: 11px;
  border-radius: 2px;
}

.chart-frame {
  position: relative;
}

.chart-frame svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-grid {
  stroke: var(--steel-2);
  stroke-width: 1;
}

.chart-tick {
  fill: var(--ink-3);
  font: 12px var(--font-body-stack);
}

.chart-tip {
  position: absolute;
  top: 4px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--night);
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
  pointer-events: none;
  translate: -50% 0;
}

.chart-tip span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chart-tip i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.chart-table {
  margin-top: 8px;
}

.chart-table summary {
  color: var(--carbon);
  cursor: pointer;
  font-size: 13.5px;
}

.bars {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 92px;
  align-items: center;
  gap: 10px;
}

.bar-label {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.bar-label small {
  display: block;
  color: var(--ink-3);
}

.bar-track {
  height: 11px;
  border-radius: 4px;
  background: var(--steel);
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: 0 4px 4px 0;
}

.bar-value {
  text-align: right;
  font-weight: 600;
}

.settings-body {
  max-width: 880px;
}

/* ----- sign-in */

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  min-height: 100vh;
}

.auth-art {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 26px;
  padding: 34px 46px;
  background: var(--night);
  color: #fff;
}

.auth-brand {
  font: 700 24px var(--font-display-stack);
}

.auth-ticket {
  max-width: 400px;
  padding: 24px 28px;
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  rotate: -1.4deg;
  box-shadow: 0 24px 50px -18px rgb(0 0 0 / 0.6);
  border-top: 7px solid var(--canary-deep);
}

.auth-ticket-title {
  margin-bottom: 14px;
  font: 700 25px/1.1 var(--font-display-stack);
}

.auth-ticket ol {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-ticket li {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink-3);
  font-weight: 500;
}

.auth-ticket li span {
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--line-2);
  border-radius: 50%;
}

.auth-ticket li.punched {
  color: var(--ink);
}

.auth-ticket li.punched span {
  border-color: var(--night);
  background: var(--night);
}

.auth-ticket li.current {
  color: var(--ink);
  font-weight: 700;
}

.auth-ticket li.current span {
  border: 2.5px solid var(--night);
  background: var(--canary-deep);
}

.auth-line {
  max-width: 420px;
  color: #c8d0e2;
  font-size: 17px;
}

.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: var(--paper);
}

.auth-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(100%, 400px);
}

.auth-alt {
  color: var(--ink-2);
}

.demo-accounts {
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.demo-accounts h2 {
  margin-bottom: 8px;
  font-size: 15px;
}

.demo-accounts ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.demo-account {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 8px 11px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.demo-account:hover {
  border-color: var(--carbon);
  background: var(--carbon-wash);
}

.demo-account small {
  color: var(--ink-3);
}

/* ----- customer-facing pages */

.portal {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(100%, 820px);
  margin: 0 auto;
  padding: 26px 16px 50px;
}

.portal-narrow {
  width: min(100%, 580px);
}

.portal-answer h2 {
  margin-bottom: 6px;
}

.portal-print {
  justify-content: center;
}

.sent-note {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 0;
  text-align: center;
  color: var(--ok);
}

.sent-note h1 {
  color: var(--ink);
}

.sent-note p {
  color: var(--ink-2);
}

/* ----- small screens */

@media (max-width: 1180px) {
  .two-col,
  .dash-grid,
  .map-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .map-stage {
    position: static;
  }

  .crew-map {
    height: 60vh;
  }
}

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

  .sidebar {
    position: fixed;
    z-index: 60;
    top: 0;
    left: 0;
    width: 260px;
    translate: -100% 0;
    transition: translate 0.18s ease;
  }

  .sidebar-open {
    translate: 0 0;
  }

  .sidebar-scrim {
    position: fixed;
    z-index: 55;
    inset: 0;
    display: block;
    border: 0;
    background: rgb(19 28 51 / 0.45);
  }

  .menu-toggle {
    display: inline-flex;
  }

  .ticket {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    filter: none;
  }

  .ticket-part,
  .ticket-part:first-child,
  .ticket-part:last-child {
    border-left: 0 !important;
    border-radius: var(--radius);
    background: var(--stub);
  }

  .ticket-part:last-child {
    grid-column: 1 / -1;
  }

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

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

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

  .auth-art {
    display: none;
  }
}

@media (max-width: 760px) {
  .content {
    padding: 16px 14px 50px;
  }

  .topbar {
    padding: 0 10px;
    gap: 6px;
  }

  .search kbd,
  .timer span:not(.timer-dot) {
    display: none;
  }

  h1,
  .dash-head h1 {
    font-size: 26px;
  }

  .form-grid,
  .form-grid-3,
  .site-editor {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .unscheduled {
    position: static;
    max-height: 260px;
  }

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

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

  .stub-label {
    font-size: 11px;
  }

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

  .line-main {
    grid-column: 1 / -1;
  }

  .line-amount {
    grid-column: 1 / 3;
    padding-top: 0;
    text-align: left;
  }

  .line-row .icon-btn {
    margin-top: 0;
  }

  .today-board {
    --who: 112px;
  }

  .today-who small,
  .today-who .avatar {
    display: none;
  }

  .sheet {
    padding: 16px 14px;
  }

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

  .bar-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

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

  .sidebar,
  .topbar,
  .demo-banner,
  .page-actions,
  .back-link,
  .stub,
  .no-print,
  .toasts {
    display: none !important;
  }

  .shell,
  .two-col {
    display: block;
  }

  .content {
    padding: 0;
    max-width: none;
  }

  .page-head {
    display: none;
  }

  /* Quotes, invoices and work orders print on letter paper with the PDF's margins.
     A named page, so other printouts (reports) keep the browser's orientation choice. */
  @page document {
    size: letter;
    margin: 14mm 12mm;
  }

  body:has(.sheet) {
    page: document;
  }

  .sheet {
    border: 0;
    padding: 0;
    background: #fff;
  }

  .panel:not(:has(.sheet)) {
    display: none;
  }
}

/* ----- smart tables */

.dt-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.dt-bar .input-icon {
  flex: 1;
  min-width: 180px;
  max-width: 320px;
}

.dt-bar select.input {
  width: auto;
  min-width: 130px;
}

.dt-spacer {
  flex: 1;
}

.dt-menu-box {
  position: relative;
}

.dt-columns {
  top: calc(100% + 4px);
  right: 0;
  width: 220px;
  max-height: 320px;
  overflow-y: auto;
  gap: 4px;
  padding: 8px 10px;
}

.dt-bulk {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--carbon-wash);
  border-bottom: 1px solid var(--line);
}

.dt-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.dt-sort:hover {
  color: var(--ink);
}

.dt-check {
  width: 34px;
  padding-right: 0 !important;
}

.dt-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--carbon);
}

.dt-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 14px;
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 13.5px;
}

.dt-foot select.input {
  width: auto;
  min-height: 30px;
  padding: 2px 6px;
  font-size: 13.5px;
}

/* ----- picking a record, with add and edit in place */

.rp {
  position: relative;
  display: flex;
  gap: 5px;
  align-items: stretch;
}

.rp-box {
  position: relative;
  flex: 1;
  min-width: 0;
}

.rp-box .input {
  padding-right: 30px;
}

.rp-clear {
  position: absolute;
  top: 50%;
  right: 3px;
  translate: 0 -50%;
  width: 26px;
  height: 26px;
}

.rp-menu {
  top: calc(100% + 3px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
}

.rp-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.rp-option small {
  color: var(--ink-3);
}

.rp-option[aria-selected='true'] {
  background: var(--carbon-wash);
}

.rp-btn {
  width: 38px;
  height: auto;
  min-height: 38px;
  border: 1px solid var(--line-2);
  background: var(--paper);
}

.record-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
}

.record-link .icon-btn {
  width: 22px;
  height: 22px;
  color: var(--ink-3);
}
/* ===== from css/records.css ===== */
/* ----- customers, job sites, products and vendor orders */

.record-image {
  display: block;
  flex: none;
  object-fit: cover;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--carbon-wash);
}

.record-image-medium {
  width: 72px;
  height: 72px;
}

.record-image-large {
  width: 100%;
  max-width: 320px;
  height: 180px;
}

.record-image-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--carbon, #2742c4);
  border-style: dashed;
}

.record-photo {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.image-picker {
  display: flex;
  align-items: center;
  gap: 14px;
}

.image-picker-button {
  cursor: pointer;
}

.image-picker-button.is-busy {
  opacity: 0.6;
  pointer-events: none;
}

.match-box {
  padding: 10px 13px;
  border: 1px solid var(--canary-deep);
  border-radius: var(--radius-sm);
  background: var(--canary);
  color: var(--canary-ink);
}

.match-box ul {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.match-box li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
}

.match-box small {
  display: block;
}

.record-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
}

.record-banner > div {
  flex: 1;
  min-width: 0;
}

.record-banner > svg {
  flex: none;
  margin-top: 2px;
}

.record-banner-overdue {
  background: var(--danger-wash);
  color: var(--danger);
}

.record-banner-outstanding {
  background: var(--warn-wash);
  color: var(--warn);
}

.record-banner-links {
  margin: 5px 0 0;
  padding: 0;
  list-style: none;
}

.record-banner-links a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
}

.quick-pick {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 4px;
  margin: -2px -4px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.quick-pick svg {
  flex: none;
  opacity: 0.45;
}

.quick-pick:hover {
  background: var(--carbon-wash);
}

.quick-pick:hover svg {
  opacity: 1;
}

.quick-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.quick-field > .field {
  width: 100%;
}

.panel-note {
  padding: 14px 16px;
}
/* ===== from css/documents.css ===== */
/* Quotes, work orders, invoices, sharing and email. */

/* A document line: a numbered card. The head picks the product and group; the body
   holds what the customer reads, then the money in one row of fixed-width boxes. */
.doc-lines {
  display: flex;
  flex-direction: column;
  gap: 12px;
  counter-reset: doc-line;
}

.doc-line {
  counter-increment: doc-line;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
}

.doc-line:focus-within {
  border-color: var(--line-2);
  box-shadow: 0 1px 6px rgb(19 28 51 / 0.07);
}

.doc-line-head {
  display: flex;
  align-items: end;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--steel);
}

.doc-line-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-width: 26px;
  height: 26px;
  margin-bottom: 6px;
  padding: 0 6px;
  border-radius: 13px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.doc-line-num::before {
  content: counter(doc-line);
}

.doc-line-product {
  flex: 1 1 280px;
}

.doc-line-group {
  flex: 0 1 220px;
}

.doc-line-remove {
  margin-bottom: 3px;
}

.doc-line-remove:hover {
  background: var(--danger-wash);
  color: var(--danger);
}

.doc-line-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
}

.doc-line-text {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 10px;
}

.doc-line-name {
  font-weight: 600;
}

.doc-line-body .field label,
.doc-line-total .label-like {
  color: var(--ink-3);
  font-size: 12.5px;
}

.doc-line-money {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

.doc-line-qty {
  flex: 0 0 80px;
}

.doc-line-dollars {
  flex: 0 0 120px;
}

.doc-line-markup {
  flex: 0 0 96px;
}

.doc-line-tax {
  flex: 0 1 170px;
  min-width: 130px;
}

.doc-line-total {
  display: flex;
  flex-direction: column;
  align-items: end;
  gap: 5px;
  margin-left: auto;
  padding-left: 12px;
}

.doc-line-total .line-amount {
  min-height: 38px;
  padding: 0;
  display: flex;
  align-items: center;
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* A "$" before or "%" after the number, inside the box. */
.affix {
  position: relative;
  display: block;
}

.affix::before,
.affix::after {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  color: var(--ink-3);
  font-size: 14px;
  pointer-events: none;
}

.affix[data-before]::before {
  content: attr(data-before);
  left: 10px;
}

.affix[data-before] .input {
  padding-left: 22px;
}

.affix[data-after]::after {
  content: attr(data-after);
  right: 10px;
}

.affix[data-after] .input {
  padding-right: 26px;
}

.lines .line-group th {
  text-align: left;
  padding-top: 12px;
  font-weight: 600;
}

@media (max-width: 640px) {
  .doc-line-head {
    flex-wrap: wrap;
  }

  .doc-line-num {
    order: -1;
  }

  .doc-line-remove {
    margin-left: auto;
    order: -1;
  }

  .doc-line-product,
  .doc-line-group {
    flex: 1 1 100%;
  }

  .doc-line-text {
    grid-template-columns: minmax(0, 1fr);
  }

  .doc-line-qty,
  .doc-line-dollars,
  .doc-line-markup,
  .doc-line-tax {
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
  }

  .doc-line-total {
    flex: 1 1 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0 0;
    border-top: 1px dashed var(--line);
  }

  .doc-line-total .line-amount {
    grid-column: auto;
    min-height: 0;
  }
}

.staged {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preview-pdf {
  display: block;
  width: 100%;
  height: 70vh;
  border: 1px solid var(--line);
}

.preview-video {
  display: block;
  width: 100%;
  max-height: 70vh;
}

.token-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.token-btn {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.token-btn:hover {
  border-color: currentColor;
}

.token-btn:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 1px;
}

.mail-preview summary {
  cursor: pointer;
}

.pre-line {
  white-space: pre-line;
}

.notice-line {
  padding: 10px 12px;
  border-left: 3px solid var(--warn);
  background: var(--warn-wash);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat-tile {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.stat-tile strong {
  display: block;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.stat-tile small {
  display: block;
}

.quick-select {
  max-width: 170px;
  padding-top: 3px;
  padding-bottom: 3px;
}

.risk-note {
  margin-top: 6px;
}

.hours-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
/* ===== from css/field.css ===== */
/* Check-ins, todos, notes, notifications, recurring work, the dashboard's personal
   cards, and the schedule and map additions. */

/* ----- rich text */

.rich-text {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.rich-text p {
  margin: 0 0 4px;
}

.rich-text ul,
.rich-text ol {
  margin: 4px 0;
  padding-left: 22px;
  white-space: normal;
}

.rich-text a {
  color: var(--carbon);
  text-decoration: underline;
}

.rich-text-cell {
  display: -webkit-box;
  max-width: 460px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.field-label {
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
}

.rte {
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.rte:focus-within {
  border-color: var(--carbon);
  box-shadow: 0 0 0 2px var(--carbon-wash);
}

.rte-tools {
  display: flex;
  gap: 2px;
  padding: 3px 4px;
  border-bottom: 1px solid var(--line);
}

.rte-link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-bottom: 1px solid var(--line);
  background: var(--steel);
}

.rte-link .input {
  flex: 1 1 160px;
  min-width: 0;
}

.rte-link .field-error {
  flex-basis: 100%;
  margin: 0;
}

.rte-box {
  min-height: 72px;
  padding: 8px 10px;
  outline: none;
  font-size: 14.5px;
}

.rte-box:empty::before {
  content: attr(data-placeholder);
  color: var(--ink-3);
}

.note-form-rich {
  align-items: stretch;
}

.note-form-rich > .btn {
  align-self: flex-end;
}

.note-list .rich-text {
  margin-bottom: 4px;
}

/* ----- the notification bell */

.bell {
  position: relative;
}

.bell-btn {
  position: relative;
}

.bell-count {
  position: absolute;
  top: -3px;
  right: -4px;
  min-width: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--serial);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}

.bell-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 60;
  width: min(360px, calc(100vw - 24px));
  max-height: 70vh;
  overflow-y: auto;
}

.bell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}

.bell-item {
  align-items: flex-start;
  width: 100%;
  text-align: left;
}

.bell-unread {
  background: var(--carbon-wash);
  font-weight: 600;
}

.bell-item small {
  display: block;
  font-weight: 400;
}

.notice-unread {
  font-weight: 600;
}

.notice-unread small {
  font-weight: 400;
}

/* ----- check in */

.check-in {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.check-in-on {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
}

.check-in-text {
  display: flex;
  flex: 1 1 140px;
  flex-direction: column;
  min-width: 0;
}

.check-in-text strong {
  font-family: var(--font-display-stack);
  font-size: 22px;
  line-height: 1.1;
}

.check-in p {
  margin: 0;
}

/* ----- dashboard */

.dash-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

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

.quick-label {
  margin-right: 2px;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
}

.next-job {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.next-job p {
  margin: 0;
}

.next-job-when {
  color: var(--carbon-dark);
  font-family: var(--font-display-stack);
  font-size: 17px;
  font-weight: 600;
}

.todo-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.todo-list li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.todo-list .link-btn,
.todo-open {
  color: var(--ink);
  font-weight: 500;
  text-align: left;
}

.todo-list small {
  color: var(--ink-3);
}

.status-bars,
.queue-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.status-bars a {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(50px, 1.2fr) auto;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
}

.status-bars a:hover .status-bar-name {
  text-decoration: underline;
}

.status-bar-track {
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--steel-2);
}

.status-bar-track span {
  display: block;
  height: 100%;
  border-radius: 4px;
}

.queue-list {
  margin-bottom: 10px;
}

.queue-list a {
  color: var(--ink);
}

.queue-list strong {
  display: inline-block;
  min-width: 22px;
  color: var(--pink-ink);
  font-family: var(--font-display-stack);
  font-size: 17px;
}

/* ----- lists */

.input-compact {
  min-height: 30px;
  padding: 3px 6px;
  font-size: 13.5px;
}

.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-list li {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
}

.category-dot {
  width: 11px;
  height: 11px;
  margin-right: 5px;
  border-radius: 50%;
}

.category-name {
  flex: 1;
}

.history-panel .dt-bar {
  padding: 8px 10px;
}

.history-panel .table {
  font-size: 13.5px;
}

.process-result {
  margin-bottom: 14px;
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  border-left: 4px solid var(--carbon);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.process-result p,
.process-result ul {
  margin: 0 0 5px;
}

/* ----- timesheet rows */

.sheet-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sheet-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(170px, 1fr) minmax(190px, 1.4fr) minmax(150px, 1.2fr) 34px;
  align-items: start;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.sheet-row-end {
  display: flex;
  justify-content: flex-end;
  padding-top: 26px;
}

@media (max-width: 760px) {
  .sheet-row {
    grid-template-columns: 1fr;
  }

  .sheet-row-end {
    padding-top: 0;
  }
}

/* ----- schedule */

.off-hours {
  position: absolute;
  top: 0;
  bottom: 0;
  background: repeating-linear-gradient(135deg, rgb(19 28 51 / 0.05) 0 6px, rgb(19 28 51 / 0.09) 6px 12px);
  pointer-events: none;
}

.card-event {
  --tech: #6b5400 !important;
  border-left-style: dashed !important;
  background: var(--canary) !important;
}

.backlog-search {
  margin: 6px 0;
}

.backlog-hit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 8px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-size: 13px;
}

.backlog-hit small {
  display: block;
  color: var(--ink-3);
}

/* ----- maps */

.site-pin span {
  display: block;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 3px;
  background: var(--carbon);
  box-shadow: 0 1px 4px rgb(19 28 51 / 0.45);
  transform: rotate(45deg);
}

.record-map {
  height: 220px;
  border-radius: var(--radius-sm);
  background: var(--steel);
}

.map-layers {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.route-stops {
  margin: 0 0 8px;
  padding-left: 20px;
}

.route-stops li {
  margin-bottom: 2px;
}

.route-stops li > span {
  margin-right: 4px;
}

.route-stops .icon-btn {
  display: inline-flex;
  vertical-align: middle;
}

.route-answer {
  margin: 8px 0 0;
}
/* ===== from css/platform.css ===== */
/* Settings */
.pf-settings {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.pf-settings-nav {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pf-settings-heading {
  margin: 0 0 4px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
}

.pf-settings-tab {
  display: block;
  width: 100%;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--ink-2);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.pf-settings-tab:hover {
  background: var(--steel-2);
}

.pf-settings-on,
.pf-settings-on:hover {
  background: var(--carbon-wash);
  color: var(--carbon-dark);
  font-weight: 600;
}

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

  .pf-settings-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .pf-settings-tab {
    display: inline-block;
    width: auto;
  }
}

.pf-table-hint {
  margin: 0;
  padding: 10px 16px;
}

.pf-swatch {
  width: 34px;
  height: 24px;
  padding: 1px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--paper);
  cursor: pointer;
}

.icon-btn[aria-disabled='true'] {
  opacity: 0.35;
  cursor: not-allowed;
}

/* A plain statement of something that isn't available or wasn't done */
.pf-note {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--canary-deep);
  border-radius: var(--radius-sm);
  background: var(--canary);
  color: var(--canary-ink);
}

.pf-note a {
  color: inherit;
  font-weight: 600;
}

.pf-note-gap {
  margin-bottom: 14px;
}

.pf-logo {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-start;
}

.pf-logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 170px;
  height: 100px;
  padding: 8px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.pf-logo-box img {
  max-width: 100%;
  max-height: 100%;
}

/* Plans */
.pf-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.pf-plan {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.pf-plan h3,
.pf-plan p {
  margin: 0;
}

.pf-plan-on {
  border-color: var(--carbon);
  background: var(--carbon-wash);
}

/* Sign-in */
.pf-auth-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 12px;
  font-size: 14px;
}

.pf-google {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.pf-language {
  max-width: 180px;
  margin-top: 14px;
}

/* Setup wizard */
.pf-onboarding {
  display: grid;
  gap: 16px;
  max-width: 720px;
}

.pf-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: pf-step;
}

.pf-steps li {
  counter-increment: pf-step;
  color: var(--ink-3);
}

.pf-steps li::before {
  content: counter(pf-step) '. ';
}

.pf-steps .link-btn {
  color: inherit;
}

.pf-step-on {
  color: var(--carbon-dark);
  font-weight: 600;
}

.pf-step-done {
  color: var(--ok);
}

.pf-changes {
  margin: 0;
  padding-left: 18px;
  line-height: 1.6;
}

/* Help panel */
.pf-help-tab,
.pf-help {
  position: fixed;
  bottom: 16px;
  z-index: 30;
}

.pf-help-right {
  right: 16px;
}

.pf-help-left {
  left: 16px;
}

/* Clear of the sidebar on wide screens, where it's always showing */
@media (min-width: 1000px) {
  .pf-help-left {
    left: 256px;
  }
}

.pf-help-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-2);
  font: inherit;
  font-size: 14px;
  box-shadow: var(--shadow-menu);
  cursor: pointer;
}

.pf-help {
  width: min(320px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-menu);
  font-size: 14px;
}

.pf-help header,
.pf-help footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pf-help h2 {
  margin: 0;
  font-size: 15px;
}

.pf-help ul {
  margin: 8px 0 10px;
  padding-left: 18px;
  line-height: 1.45;
}

@media print {
  .pf-help-tab,
  .pf-help {
    display: none;
  }
}

/* Status filters shown as links, a personal preference */
.pf-filter-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  font-size: 14px;
}

.pf-filter-links button[aria-current='true'] {
  font-weight: 700;
  text-decoration: underline;
}

/* The top bar must fit a phone: search gives way first, then Create loses its word. */
@media (max-width: 760px) {
  .search {
    flex: 1 1 0;
    min-width: 0;
  }

  .topbar-right {
    gap: 4px;
    flex: none;
  }

  .create > .btn {
    padding: 6px 8px;
    font-size: 0;
    gap: 0;
  }
}
/* ===== from css/reports.css ===== */
/* ----- report catalog and report screens */

.report-section-title {
  margin: 26px 0 10px;
  font: 700 19px/1.2 var(--font-display-stack);
}

.report-section-title:first-of-type {
  margin-top: 4px;
}

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

.report-catalog {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.report-catalog-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.report-catalog-list li + li {
  border-top: 1px solid var(--line);
}

.report-catalog-list a {
  display: block;
  padding: 10px 16px;
  color: inherit;
  text-decoration: none;
}

.report-catalog-list a:hover strong {
  text-decoration: underline;
}

.report-catalog-list strong {
  display: block;
  font-weight: 600;
}

.report-catalog-list small {
  display: block;
  color: var(--ink-2);
  font-size: 13.5px;
}

.report-table-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 18px;
  margin-bottom: 14px;
}

.report-table-filters .preset-row {
  align-self: center;
}

.report-table-notice {
  margin: 0 0 12px;
  color: var(--ink-2);
}

.report-table-count {
  color: var(--ink-2);
  font-size: 13.5px;
  white-space: nowrap;
}

@media (max-width: 800px) {
  .report-catalog {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* ===== from css/integrations.css ===== */
/* ----- AI command center */

.ai-privacy {
  margin: 0;
  padding: 9px 12px;
  border-left: 3px solid var(--carbon);
  background: var(--carbon-wash);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
}

.ai-warning {
  margin: 0;
  padding: 8px 12px;
  background: var(--canary);
  color: var(--canary-ink);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
}

.ai-warning ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

.ai-warning p {
  margin: 0;
}

.ai-presets,
.ai-matches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-presets .btn {
  text-align: left;
  height: auto;
  white-space: normal;
}

.ai-matches .btn {
  height: auto;
  white-space: normal;
}

.ai-matches small {
  font-weight: 400;
  opacity: 0.8;
}

.ai-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--carbon);
  border-radius: var(--radius);
  background: var(--paper);
}

.ai-card > p {
  margin: 0;
}

.ai-card-blocked {
  border-left-color: var(--canary-deep);
}

.ai-card-done {
  border-left-color: var(--ok);
}

.ai-card-failed {
  border-left-color: var(--danger);
}

.ai-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ai-card-pick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  font-size: 15px;
}

.ai-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 14px;
  align-items: start;
}

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

.ai-field-label {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

.ai-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-line {
  display: grid;
  grid-template-columns: minmax(150px, 2fr) minmax(130px, 2fr) 90px 110px auto;
  gap: 8px;
  align-items: end;
}

.ai-result-table .num {
  text-align: right;
}

.ai-draft-button {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.ai-new-record {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-sm);
}

.ai-new-record .form-grid {
  width: 100%;
}

@media (max-width: 720px) {
  .ai-line {
    grid-template-columns: 1fr 1fr;
  }
}

/* ----- knowledge base */

.kb-grid {
  display: grid;
  grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.kb-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.kb-list li + li {
  border-top: 1px solid var(--line);
}

.kb-pick {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.kb-pick:hover {
  background: var(--steel);
}

.kb-pick-on {
  background: var(--carbon-wash);
  font-weight: 600;
}

.kb-pick small {
  display: block;
  color: var(--ink-3);
  font-weight: 400;
}

.kb-chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kb-msg {
  max-width: 85%;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.kb-msg p {
  margin: 0;
}

.kb-msg-mine {
  align-self: flex-end;
  border-color: transparent;
  background: var(--carbon-wash);
}

.kb-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.kb-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.kb-end {
  height: 0;
}

.kb-ask {
  display: flex;
  gap: 8px;
}

.kb-ask .input {
  flex: 1;
  min-width: 0;
}

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

  .kb-msg {
    max-width: 100%;
  }
}

/* ----- QuickBooks */

.qb-log {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
}

.qb-log li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 12px;
  padding: 6px 9px;
  background: var(--steel);
  border-radius: var(--radius-sm);
  overflow-wrap: anywhere;
}

.qb-log small {
  color: var(--ink-3);
}

.qb-log-bad {
  background: var(--danger-wash) !important;
}

.qb-details summary {
  cursor: pointer;
  font-weight: 600;
}

.qb-link {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.qb-link .field {
  flex: 1;
  min-width: 0;
}

.qb-progress {
  width: 100%;
  height: 12px;
  accent-color: var(--carbon);
}
