.d-root,
.t-root {
  --f-ink:#14202b;
  --f-muted:#5b6672;
  --f-line:#e1e5ea;
  --f-paper:#f5f7f8;
  --f-accent:#0f766e;
  --f-accent-ink:#0b5d56;
  --f-hvac:#b45309;
  --f-hvac-bg:#fdf0dc;
  --f-plumb:#1d4ed8;
  --f-plumb-bg:#e1e9fd;
  --f-enroute:#a15c00;
  --f-enroute-bg:#fff1d6;
  --f-done:#15803d;
  --f-done-bg:#e3f5e8;
  color: var(--f-ink);
  background: var(--f-paper);
}
.f-link {
  background: none;
  border: 0;
  color: var(--f-accent);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 2px;
}
.f-link:hover {
  text-decoration: underline;
}
.f-secondary {
  border: 1px solid #c9d0d7;
  background: #fff;
  border-radius: 8px;
  padding: 0 14px;
  min-height: 38px;
  font-size: 14px;
  font-weight: 600;
  color: var(--f-ink);
}
.f-secondary:hover {
  background: #f0f3f5;
}
.f-sig {
  display: block;
  width: 100%;
  max-width: 260px;
  height: auto;
}
.f-invoice {
  background: #fff;
  border: 1px solid var(--f-line);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 14px;
  min-width: 0;
}
.f-inv-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.f-inv-top > div,
.f-inv-bill > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.f-inv-co {
  font-size: 16px;
}
.f-inv-meta {
  text-align: right;
}
.f-inv-meta strong {
  font-size: 16px;
}
.f-inv-bill {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--f-line);
  border-bottom: 1px solid var(--f-line);
}
.f-inv-k {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--f-muted);
}
.f-inv-lines {
  display: flex;
  flex-direction: column;
}
.f-inv-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px 84px 88px;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--f-line);
  font-variant-numeric: tabular-nums;
}
.f-inv-row span:nth-child(n+2) {
  text-align: right;
}
.f-inv-head {
  font-size: 12px;
  font-weight: 700;
  color: var(--f-muted);
}
.f-inv-sum {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-left: auto;
  width: min(100%, 340px);
  font-variant-numeric: tabular-nums;
}
.f-inv-sum > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.f-inv-total {
  font-size: 18px;
  font-weight: 700;
  padding-top: 6px;
  border-top: 2px solid var(--f-ink);
}
.f-inv-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
.f-inv-signed {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-bottom: 1px solid var(--f-line);
  padding-bottom: 4px;
  min-width: 200px;
}
.f-inv-signed .f-sig {
  max-width: 220px;
}
.f-inv-note {
  font-size: 12.5px;
  color: var(--f-muted);
}
.f-inv-print {
  align-self: flex-start;
}
@media print {
  body.f-printing * {
    visibility: hidden;
  }
  body.f-printing .f-print-target,
  body.f-printing .f-print-target * {
    visibility: visible;
  }
  body.f-printing .f-print-target {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    border: 0;
    padding: 0;
  }
  body.f-printing .f-inv-print {
    display: none;
  }
}
.d-root {
  padding: 18px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: calc(100vh - 100px);
}
.d-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--f-accent);
}
.d-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.2;
}
.d-sub {
  font-size: 13.5px;
  color: var(--f-muted);
}
.d-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.d-kpi {
  background: #fff;
  border: 1px solid var(--f-line);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.d-kpi-k {
  font-size: 12px;
  font-weight: 600;
  color: var(--f-muted);
}
.d-kpi-v {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.d-work {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.d-card {
  background: #fff;
  border: 1px solid var(--f-line);
  border-radius: 12px;
  padding: 14px;
  min-width: 0;
  scroll-margin-top: 72px;
}
.d-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.d-card-head h2 {
  font-size: 15px;
  font-weight: 700;
}
.d-muted {
  color: var(--f-muted);
  font-size: 13px;
}
.d-hint {
  font-size: 13px;
  color: var(--f-muted);
  margin: -4px 0 10px;
}
.d-queue {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}
.d-queue > .d-card-head,
.d-queue > .d-hint,
.d-queue > p {
  flex-basis: 100%;
}
.d-job {
  flex: 1 1 190px;
  max-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  font-size: 13px;
  padding: 10px 12px;
  border: 1px solid var(--f-line);
  border-left: 4px solid #94a3b8;
  border-radius: 8px;
  background: #fff;
  color: var(--f-ink);
  cursor: grab;
}
.d-job:hover {
  background: #f7f9fa;
}
.d-job.on {
  border-color: var(--f-accent);
  box-shadow: 0 0 0 1px var(--f-accent);
  background: #eefaf8;
}
.d-job-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.d-job strong {
  font-size: 13.5px;
  line-height: 1.3;
}
.d-tag {
  flex: none;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
}
.d-tag-hvac {
  background: var(--f-hvac-bg);
  color: var(--f-hvac);
}
.d-tag-plumbing {
  background: var(--f-plumb-bg);
  color: var(--f-plumb);
}
.d-grid {
  display: grid;
  grid-template-columns: 150px repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--f-line);
  border-left: 1px solid var(--f-line);
}
.d-grid > * {
  border-right: 1px solid var(--f-line);
  border-bottom: 1px solid var(--f-line);
}
.d-corner,
.d-col {
  font-size: 12px;
  font-weight: 700;
  color: var(--f-muted);
  padding: 8px;
  background: #f8fafb;
}
.d-col.today {
  color: var(--f-accent-ink);
  background: #e9f6f4;
}
.d-tech {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px;
  font-size: 13px;
  min-width: 0;
}
.d-me {
  align-self: flex-start;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--f-accent-ink);
  background: #e1f3f0;
  border-radius: 4px;
  padding: 1px 6px;
}
.d-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  min-height: 96px;
  min-width: 0;
}
.d-cell.over {
  background: #e9f6f4;
  outline: 2px dashed var(--f-accent);
  outline-offset: -3px;
}
.d-block {
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 0;
  font-size: 11.5px;
  line-height: 1.3;
  padding: 5px 7px;
  border: 0;
  border-left: 3px solid var(--f-accent);
  border-radius: 5px;
  background: #eef6f5;
  color: var(--f-ink);
  min-width: 0;
}
.d-block strong {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.d-block span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.d-block-time {
  color: var(--f-muted);
  font-variant-numeric: tabular-nums;
}
.d-block-enroute {
  background: var(--f-enroute-bg);
  border-left-color: var(--f-enroute);
}
.d-block-done {
  background: var(--f-done-bg);
  border-left-color: var(--f-done);
}
.d-block.on {
  box-shadow: 0 0 0 2px var(--f-accent);
}
.d-block-scheduled {
  cursor: grab;
}
.d-drop {
  border: 1px dashed var(--f-accent);
  background: #f2fbf9;
  color: var(--f-accent-ink);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  min-height: 32px;
}
.d-drop:hover:not(:disabled) {
  background: #e1f3f0;
}
.d-drop.full {
  border-color: #d4d9de;
  background: #f6f7f8;
  color: #8b949c;
  cursor: default;
}
.d-load {
  margin-top: auto;
  font-size: 11px;
  color: var(--f-muted);
  font-variant-numeric: tabular-nums;
}
.d-days {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 6px;
}
.d-day {
  flex: none;
  border: 1px solid var(--f-line);
  background: #fff;
  border-radius: 18px;
  padding: 0 14px;
  min-height: 36px;
  font-size: 13px;
  font-weight: 600;
  color: var(--f-muted);
}
.d-day.on {
  background: var(--f-ink);
  border-color: var(--f-ink);
  color: #fff;
}
.d-day-name {
  font-size: 13px;
  font-weight: 700;
  margin: 4px 0 2px;
}
.d-row-narrow {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  border-top: 1px solid var(--f-line);
}
.d-row-narrow .d-cell {
  min-height: 64px;
}
.d-inv-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 14px;
  align-items: start;
}
.d-inv-table {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--f-line);
  border-radius: 8px;
  overflow: hidden;
}
.d-inv-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 64px 78px;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  font-size: 13px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--f-line);
  background: #fff;
  color: var(--f-ink);
  width: 100%;
  font-variant-numeric: tabular-nums;
}
.d-inv-row span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.d-inv-who {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.d-inv-row:last-child {
  border-bottom: 0;
}
button.d-inv-row:hover {
  background: #f7f9fa;
}
.d-inv-row.on {
  background: #eefaf8;
}
.d-inv-head {
  font-size: 12px;
  font-weight: 700;
  color: var(--f-muted);
  background: #f8fafb;
}
.d-mono {
  font-family:
    "JetBrains Mono",
    ui-monospace,
    Consolas,
    monospace;
  font-size: 12px;
}
.d-strong {
  font-weight: 700;
}
.d-flash {
  animation: d-flash 1.8s ease;
}
@keyframes d-flash {
  0%, 40% {
    background: #d9f2ec;
  }
  100% {
    background: #fff;
  }
}
@media (max-width:1023px) {
  .d-root {
    padding: 14px 14px 40px;
  }
  .d-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .d-job {
    max-width: none;
    flex-basis: 100%;
  }
  .d-inv-wrap {
    grid-template-columns: minmax(0, 1fr);
  }
  .d-inv-row {
    grid-template-columns: 72px minmax(0, 1fr) 70px;
  }
  .d-inv-row > span:nth-child(3) {
    display: none;
  }
  .f-invoice {
    padding: 14px;
  }
  .f-inv-row {
    grid-template-columns: minmax(0, 1fr) 34px 70px 74px;
    font-size: 13px;
  }
}
.t-root {
  min-height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
}
.t-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--f-ink);
  color: #fff;
}
.t-who {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.t-who > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.t-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--f-accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  flex: none;
}
.t-sub {
  font-size: 12.5px;
  color: #b8c3cc;
}
.t-co {
  font-size: 11.5px;
  color: #b8c3cc;
  text-align: right;
  max-width: 120px;
  line-height: 1.3;
}
.t-body {
  padding: 14px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.t-h2 {
  font-size: 15px;
  font-weight: 700;
}
.t-empty {
  color: var(--f-muted);
  font-size: 14px;
  padding: 12px;
  background: #fff;
  border: 1px dashed #cfd6dc;
  border-radius: 10px;
}
.t-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.t-job {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--f-line);
  border-left: 4px solid var(--f-accent);
  border-radius: 10px;
  background: #fff;
  color: var(--f-ink);
  font-size: 14px;
}
.t-job strong {
  font-size: 15.5px;
}
.t-job-enroute {
  border-left-color: var(--f-enroute);
}
.t-job-done {
  border-left-color: var(--f-done);
  opacity: .85;
}
.t-job-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.t-time {
  font-size: 13px;
  font-weight: 700;
  color: var(--f-muted);
  font-variant-numeric: tabular-nums;
}
.t-chip {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: #e1f3f0;
  color: var(--f-accent-ink);
}
.t-chip-enroute {
  background: var(--f-enroute-bg);
  color: var(--f-enroute);
}
.t-chip-done {
  background: var(--f-done-bg);
  color: var(--f-done);
}
.t-detail {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.t-back {
  align-self: flex-start;
  background: none;
  border: 0;
  color: var(--f-accent);
  font-weight: 600;
  font-size: 14px;
  padding: 6px 0;
  min-height: 36px;
}
.t-title {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.2;
}
.t-muted {
  color: var(--f-muted);
  font-size: 13px;
}
.t-where {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--f-line);
  border-radius: 10px;
  font-size: 14.5px;
}
.t-primary {
  background: var(--f-accent);
  color: #fff;
  border: 0;
  border-radius: 10px;
  min-height: 50px;
  font-size: 16px;
  font-weight: 700;
  width: 100%;
}
.t-primary:hover:not(:disabled) {
  background: var(--f-accent-ink);
}
.t-primary:disabled {
  background: #cfd6dc;
  color: #6b7680;
  cursor: default;
}
.t-hint {
  font-size: 13px;
  color: var(--f-muted);
}
.t-status {
  font-size: 14px;
  font-weight: 700;
  color: var(--f-enroute);
  background: var(--f-enroute-bg);
  padding: 10px 12px;
  border-radius: 10px;
}
.t-status-done {
  color: var(--f-done);
  background: var(--f-done-bg);
}
.t-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--f-line);
  border-radius: 12px;
  padding: 14px;
}
.t-section h3 {
  font-size: 14px;
  font-weight: 700;
}
.t-check {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  border: 0;
  background: none;
  padding: 8px 2px;
  min-height: 44px;
  font-size: 15px;
  color: var(--f-ink);
  border-top: 1px solid var(--f-line);
}
.t-check:disabled {
  color: #8b949c;
  cursor: default;
}
.t-box {
  width: 22px;
  height: 22px;
  flex: none;
  border: 2px solid #9aa5b0;
  border-radius: 5px;
  position: relative;
  background: #fff;
}
.t-check.on .t-box {
  background: var(--f-accent);
  border-color: var(--f-accent);
}
.t-check.on .t-box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.t-check.on:disabled .t-box {
  background: #8fb8b2;
  border-color: #8fb8b2;
}
.f-pad {
  position: relative;
  border: 1px solid #c9d0d7;
  border-radius: 10px;
  background: #fcfdfd;
}
.f-pad-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 3/1;
  touch-action: none;
  cursor: crosshair;
}
.f-pad-line {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 24%;
  border-bottom: 1px solid #c9d0d7;
  pointer-events: none;
}
.f-pad-hint {
  position: absolute;
  left: 16px;
  bottom: 8%;
  font-size: 12px;
  color: #8b949c;
  pointer-events: none;
}
.f-pad .f-link {
  position: absolute;
  right: 8px;
  top: 4px;
}
.t-sig {
  max-width: 240px;
}
.t-invoiced {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--f-done-bg);
  color: #0f5a2b;
  font-size: 14px;
}
@media (prefers-reduced-motion: reduce) {
  .d-flash {
    animation: none;
  }
}
