:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #21332f;
  background: #f6f7f5;
  font-synthesis: none;
  --green: #244c40;
  --muted: #7b8781;
  --line: #e5e9e3;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #8dbda8;
  outline-offset: 3px;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 246px;
  background: #172f2b;
  color: #e6eee9;
  padding: 34px 22px;
  display: flex;
  flex-direction: column;
}
.brand {
  font-size: 29px;
  font-weight: 750;
  letter-spacing: -1.2px;
  display: flex;
  align-items: center;
}
.brand-mark {
  background: #dcf1ba;
  color: #1c3b31;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 28px;
  margin-right: 10px;
}
.brand-dot {
  color: #d0e7a7;
}
.workspace {
  display: flex;
  gap: 11px;
  padding: 19px 10px;
  background: #ffffff08;
  border: 1px solid #ffffff12;
  border-radius: 10px;
  margin: 36px 0 32px;
}
.workspace-icon {
  background: #ffffff12;
  border-radius: 7px;
  padding: 9px;
  font-size: 12px;
  font-weight: 700;
}
.workspace strong,
.profile strong {
  font-size: 13px;
}
.workspace small,
.profile small {
  display: block;
  color: #9eb1a8;
  font-size: 11px;
  margin-top: 6px;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: #91a59a;
  margin: 0 12px 15px;
}
nav {
  display: grid;
  gap: 4px;
}
nav a {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: #b8c9bf;
}
nav a > span {
  font-size: 20px;
  width: 22px;
}
nav a.active {
  background: #d9edb7;
  color: #203b2d;
  font-weight: 650;
}
nav a:hover:not(.active) {
  background: #ffffff0a;
}
nav b {
  margin-left: auto;
  background: #ffffff50;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11px;
}
.sidebar-bottom {
  margin-top: auto;
}
.demo {
  border: 1px solid #ffffff17;
  padding: 13px 10px;
  border-radius: 8px;
  font-size: 11px;
}
.demo small {
  display: block;
  margin: 7px 0 0 13px;
  color: #9eb1a8;
  font-size: 10px;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #c5df9d;
  border-radius: 100%;
  margin-right: 5px;
}
.profile {
  display: flex;
  gap: 11px;
  align-items: center;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid #ffffff16;
}
.avatar {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #e1e8dc;
  color: #3c5341;
  width: 38px;
  height: 38px;
  font-size: 12px;
  font-weight: 650;
}
.avatar.small {
  width: 32px;
  height: 32px;
}
main {
  margin-left: 246px;
}
.topbar {
  height: 77px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 38px;
  background: #fafbf9;
  font-size: 12px;
  color: #7b8781;
}
.topbar strong {
  color: #384c41;
  font-weight: 500;
}
.crumb {
  margin: 0 14px;
  color: #b5bdb5;
}
.topbar > div {
  display: flex;
  align-items: center;
  gap: 24px;
}
.top-date {
  font-size: 11px;
}
#app {
  padding: 37px 38px 45px;
  max-width: 1800px;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 31px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 2px;
  font-weight: 650;
  color: #7b8b7c;
  margin-bottom: 12px;
}
h1 {
  font-size: 29px;
  letter-spacing: -1px;
  line-height: 1.25;
  margin: 0;
  font-weight: 650;
}
.page-heading p {
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 0;
}
.primary,
.secondary {
  border: 0;
  border-radius: 7px;
  padding: 12px 17px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  white-space: nowrap;
}
.primary {
  background: var(--green);
  color: #fff;
}
.primary:hover {
  background: #163b2e;
}
.primary:disabled {
  opacity: 0.55;
  cursor: wait;
}
.primary > span {
  font-size: 18px;
  line-height: 16px;
}
.secondary {
  background: #eef1eb;
  color: #425647;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 27px;
}
.metrics article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 22px;
}
.metrics article > span {
  font-size: 12px;
  color: #6d7d72;
}
.metrics article > strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 29px;
  font-weight: 650;
  letter-spacing: -1px;
  margin: 17px 0 11px;
}
.metrics strong small {
  font-size: 18px;
  color: #88967d;
  font-weight: 400;
}
.metrics p {
  margin: 0;
  color: #909990;
  font-size: 10px;
}
.overview-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 23px;
  margin-bottom: 25px;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 23px 24px;
  gap: 10px;
}
.panel-heading h2 {
  font-size: 14px;
  margin: 0;
  font-weight: 650;
}
.panel-heading p {
  font-size: 11px;
  margin: 7px 0 0;
  color: var(--muted);
}
.panel-heading a {
  font-size: 11px;
  color: #45664e;
  white-space: nowrap;
}
.task-list {
  padding: 0 24px 10px;
}
.task-row {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 13px;
  border: 0;
  border-top: 1px solid #eef0eb;
  background: none;
  padding: 18px 0;
  width: 100%;
}
.task-row:hover {
  background: #f9fbf7;
}
.task-check {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #dde4d9;
  border-radius: 7px;
  color: #7b8d73;
  flex-shrink: 0;
}
.task-row > div {
  flex: 1;
}
.task-row strong {
  font-size: 12px;
  font-weight: 550;
}
.task-row small {
  display: block;
  font-size: 10px;
  color: #929b91;
  margin-top: 6px;
}
.tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  color: #557255;
  background: #eef4e9;
  border: 1px solid #e0ead9;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.tag.electric {
  color: #957840;
  background: #fbf5e6;
  border-color: #f1e6c8;
}
.summary-row {
  display: flex;
  align-items: center;
  padding: 14px 24px;
  border-top: 1px solid #f0f2ed;
  gap: 10px;
  font-size: 11px;
}
.summary-row > span:nth-child(2) {
  flex: 1;
}
.summary-row b {
  font-size: 10px;
  background: #f0f3eb;
  border-radius: 4px;
  padding: 3px 7px;
  color: #89957e;
  margin-right: 10px;
}
.summary-row strong {
  font-size: 11px;
  font-weight: 550;
  min-width: 65px;
  text-align: right;
}
/* Stage colours carry their own prefix: plain names such as "visit" are
   used by other components (the visit card on "Heute"). */
.stage-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #98a6ad;
  flex-shrink: 0;
}
.stage-dot.stage-visit {
  background: #c0a474;
}
.stage-dot.stage-offer {
  background: #859dbc;
}
.stage-dot.stage-won {
  background: #6e9874;
}
.stage-dot.stage-lost {
  background: #c38f87;
}
.insight {
  display: flex;
  gap: 13px;
  background: #f1f5e9;
  border-top: 1px solid #e6ebdc;
  padding: 21px 24px;
}
.insight > span {
  color: #799a58;
  font-size: 24px;
}
.insight strong {
  font-size: 11px;
  font-weight: 600;
}
.insight p {
  font-size: 10px;
  line-height: 1.7;
  color: #7c8b70;
  margin: 7px 0 0;
}
.table-scroll {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 11px;
}
th {
  font-size: 9px;
  font-weight: 550;
  color: #8b9689;
  background: #fafbf8;
  border-block: 1px solid var(--line);
  padding: 13px 23px;
  white-space: nowrap;
}
td {
  padding: 19px 23px;
  border-bottom: 1px solid #eef1eb;
  line-height: 1.5;
}
tr:last-child td {
  border-bottom: 0;
}
td strong {
  font-size: 11px;
  font-weight: 550;
}
td small {
  display: block;
  font-size: 10px;
  color: #899587;
  margin-top: 4px;
}
.project-status {
  border: 1px solid #e1e7dc;
  border-radius: 5px;
  background: #f4f7ef;
  padding: 7px 10px;
  color: #547447;
  font-size: 10px;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}
.search {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 13px;
  min-width: 290px;
}
.search > span {
  font-size: 20px;
  color: #8a9789;
}
.search input {
  border: 0;
  outline: none;
  background: transparent;
  font-size: 12px;
  width: 100%;
  color: #304b39;
}
.toolbar select {
  border: 1px solid var(--line);
  background: white;
  border-radius: 7px;
  padding: 12px;
  color: #5b6e5c;
  font-size: 11px;
}
.toolbar-note {
  margin-left: auto;
  color: #929c90;
  font-size: 10px;
}
.board {
  display: grid;
  grid-template-columns: repeat(5, minmax(210px, 1fr));
  gap: 17px;
  overflow: auto;
  padding-bottom: 20px;
}
.column {
  background: #eff2ec;
  border: 1px solid #e5e9e0;
  border-radius: 9px;
  padding: 16px 12px;
  min-height: 470px;
}
.column-title {
  display: flex;
  gap: 8px;
  align-items: center;
}
.column-title h2 {
  font-size: 11px;
  font-weight: 600;
  margin: 0;
  flex: 1;
}
.column-title b {
  font-size: 10px;
  padding: 3px 6px;
  background: #e4e9df;
  border-radius: 4px;
  color: #7a8871;
}
.column-total {
  font-size: 10px;
  color: #8a9683;
  margin: 10px 0 18px 15px;
}
.column-cards {
  display: grid;
  gap: 12px;
}
.lead-card {
  text-align: left;
  border: 1px solid #e0e6db;
  border-radius: 8px;
  background: #fff;
  padding: 15px 13px;
  box-shadow: 0 2px 3px #24331a03;
  min-width: 0;
  width: 100%;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.lead-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px #24331a0a;
}
.lead-card h3 {
  font-size: 12px;
  line-height: 1.5;
  margin: 12px 0 5px;
  font-weight: 600;
}
.lead-card p {
  font-size: 10px;
  color: #8e9889;
  margin: 0;
  line-height: 1.5;
}
.card-value {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin: 17px 0;
}
.card-footer {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-top: 11px;
  border-top: 1px solid #edf0e8;
  color: #899580;
  font-size: 9px;
}
.card-footer > span:nth-child(2) {
  flex: 1;
  line-height: 1.5;
}
.mini-avatar {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf0e5;
  color: #738061;
  flex-shrink: 0;
}
.add-card {
  width: 100%;
  margin-top: 12px;
  background: transparent;
  border: 1px dashed #cbd6c2;
  border-radius: 6px;
  padding: 11px;
  color: #7e8b73;
  font-size: 10px;
}
.column-empty {
  padding: 32px 10px;
  text-align: center;
  font-size: 10px;
  color: #9aa592;
  border: 1px dashed #dce3d6;
  border-radius: 7px;
}
.customer-link {
  background: none;
  border: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 0;
  color: inherit;
}
.customer-avatar {
  display: grid;
  place-items: center;
  background: #eff3e8;
  color: #6a8056;
  border-radius: 8px;
  width: 33px;
  height: 33px;
  font-size: 12px;
  flex-shrink: 0;
}
.neutral-tag {
  background: #f2f4ef;
  border-radius: 4px;
  padding: 5px 8px;
  color: #7c8974;
  font-size: 10px;
}
.muted {
  color: var(--muted);
  font-size: 11px;
}
.count {
  background: #f0f3ec;
  color: #849079;
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 10px;
  margin-left: 8px;
}
.empty {
  padding: 32px;
  text-align: center;
  color: #87937d;
  font-size: 12px;
}
.loading {
  padding: 80px 25px;
  text-align: center;
  color: #71836f;
}
dialog {
  border: 1px solid #dce3d7;
  border-radius: 14px;
  padding: 28px;
  max-width: 620px;
  width: calc(100% - 32px);
  color: #253f30;
  box-shadow: 0 20px 80px #0b291e30;
}
dialog::backdrop {
  background: #142f2866;
  backdrop-filter: blur(3px);
}
.modal-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}
.modal-heading h2 {
  font-size: 21px;
  margin: 0;
  letter-spacing: -0.5px;
}
.modal-heading p {
  font-size: 12px;
  color: var(--muted);
  margin: 9px 0 0;
}
.close {
  border: 0;
  background: #f1f4ed;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 22px;
  color: #7c8a74;
  flex-shrink: 0;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 15px;
}
.field > span {
  font-size: 11px;
  font-weight: 550;
  color: #62755b;
}
.field input,
.field select,
.field textarea {
  border: 1px solid #dce4d6;
  border-radius: 6px;
  padding: 11px;
  font-size: 12px;
  color: #334d37;
  background: #fcfdfb;
  min-width: 0;
  width: 100%;
}
.field textarea {
  resize: vertical;
}
.form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.form-error {
  color: #a34236;
  font-size: 12px;
}
.detail-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 22px;
}
.detail-info {
  background: #f5f7f1;
  padding: 17px;
  border-radius: 7px;
  margin: 15px 0 24px;
  font-size: 12px;
}
.detail-info strong {
  font-size: 10px;
  color: #7e8c74;
}
.detail-info p {
  line-height: 1.8;
  margin: 6px 0 14px;
}
.detail-info small {
  color: #87917b;
  font-size: 10px;
  line-height: 1.7;
  display: block;
}
.customer-history > div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.customer-history span {
  color: #899780;
}
#toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translate(-50%, 20px);
  padding: 13px 22px;
  background: #203e30;
  color: white;
  border-radius: 8px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  box-shadow: 0 6px 20px #162b2525;
  z-index: 10;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (min-width: 1600px) {
  .metrics article {
    padding: 27px;
  }
  .overview-grid {
    grid-template-columns: 1.5fr 1fr;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 205px;
    padding: 30px 15px;
  }
  main {
    margin-left: 205px;
  }
  #app {
    padding: 30px 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  h1 {
    font-size: 24px;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .toolbar-note {
    display: none;
  }
}
@media (max-width: 700px) {
  .sidebar {
    position: static;
    width: 100%;
    padding: 16px;
  }
  .brand {
    font-size: 24px;
  }
  .workspace,
  .nav-label,
  .sidebar-bottom {
    display: none;
  }
  nav {
    display: flex;
    margin-top: 17px;
    gap: 5px;
  }
  nav a {
    padding: 9px 10px;
    font-size: 11px;
    gap: 5px;
  }
  nav a > span {
    font-size: 15px;
    width: 16px;
  }
  nav b {
    display: none;
  }
  main {
    margin-left: 0;
  }
  .topbar {
    height: 52px;
    padding: 0 18px;
  }
  .top-date {
    display: none;
  }
  #app {
    padding: 25px 16px;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
  h1 {
    font-size: 24px;
  }
  .page-heading p {
    line-height: 1.7;
  }
  .metrics {
    gap: 10px;
  }
  .metrics article {
    padding: 17px 13px;
  }
  .metrics article > strong {
    font-size: 24px;
  }
  .metrics article > span {
    font-size: 10px;
  }
  .metrics p {
    font-size: 9px;
    line-height: 1.5;
  }
  .panel-heading {
    padding: 20px 16px;
  }
  .task-list {
    padding: 0 16px 10px;
  }
  .task-row small {
    line-height: 1.6;
  }
  .task-row .tag {
    display: none;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .search {
    flex: 1;
    min-width: 200px;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  dialog {
    padding: 22px;
  }
  .customer-history > div {
    flex-direction: column;
    gap: 5px;
  }
  .panel-heading > .muted {
    display: none;
  }
}

[hidden] {
  display: none !important;
}
.signed-out .sidebar,
.signed-out .topbar {
  display: none;
}
.signed-out main {
  margin: 0;
}
.auth-card {
  max-width: 480px;
  margin: 5vh auto;
  padding: 35px;
}
.auth-card > p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 25px;
}
.auth-card button {
  width: 100%;
}
.legal-links {
  color: var(--muted);
  font-size: 13px;
  margin-top: 18px;
  text-align: center;
}
.legal-links a {
  color: inherit;
}
.read-only .write-action,
.read-only .add-card {
  display: none;
}
.offer-item {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  background: #fafbf9;
}
.item-numbers {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr 1fr;
  gap: 10px;
}
.offer-summary {
  margin-left: auto;
  max-width: 280px;
  padding: 16px;
}
.offer-summary p {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 13px;
}
.offer-summary p:last-child {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  font-size: 17px;
}
.offer-actions {
  flex-wrap: wrap;
}
.offer-notes {
  white-space: pre-wrap;
  line-height: 1.7;
  font-size: 13px;
}
dialog:has(.offer-document),
dialog:has(#offer-form) {
  max-width: 850px;
}
nav {
  max-height: 55vh;
  overflow: auto;
}
@media (max-width: 700px) {
  nav {
    flex-wrap: wrap;
    max-height: none;
  }
  .item-numbers {
    grid-template-columns: 1fr 1fr;
  }
  .auth-card {
    padding: 24px;
  }
  .offer-actions > * {
    flex: 1;
  }
  .signed-out #app {
    padding: 16px;
  }
}
@media print {
  body > aside,
  body > main,
  #toast,
  dialog .close,
  dialog .form-footer,
  dialog .no-print,
  dialog .form-error {
    display: none !important;
  }
  body {
    background: white;
  }
  dialog[open] {
    position: absolute;
    inset: 0;
    display: block !important;
    width: 100%;
    max-width: none !important;
    max-height: none;
    overflow: visible;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }
  dialog::backdrop {
    display: none;
  }
  .table-scroll {
    overflow: visible;
  }
  tr {
    break-inside: avoid;
  }
  .offer-document {
    color: black;
  }
  .offer-document th,
  .offer-document td {
    padding: 10px;
  }
  .modal-heading {
    margin-top: 20px;
  }
}

.import-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  line-height: 1.7;
  margin: 16px 0;
}
.import-choice input {
  margin-top: 4px;
}
.settings-panel {
  padding: 26px;
  margin-bottom: 22px;
  max-width: 950px;
}
.settings-panel h2 {
  font-size: 18px;
}
.company-logo {
  display: block;
  max-width: 190px;
  max-height: 76px;
  object-fit: contain;
  margin: 0 0 18px;
}
.version-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}
details {
  margin: 16px 0;
  font-size: 12px;
}
summary {
  cursor: pointer;
  color: var(--green);
}
.sidebar {
  overflow: auto;
}
.sidebar-bottom {
  padding-top: 20px;
}
.form-error:empty {
  display: none;
}

/* Invoices */
.neutral-tag.warning {
  background: #fbefe0;
  color: #986c28;
}
.neutral-tag.paid {
  background: #e6f2e9;
  color: #2f6b4a;
}
.neutral-tag.cancelled {
  text-decoration: line-through;
}
.invoice-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  width: 100%;
  padding: 13px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: inherit;
  font-size: 11px;
  text-align: left;
}
.invoice-row span {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #899780;
}
.percent-helper {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.percent-helper .field {
  flex: 1;
  min-width: 200px;
}
td small,
.offer-document td small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.team-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
/* Short screens: keep every navigation entry visible without scrolling. */
nav {
  flex-shrink: 0;
}
@media (max-height: 780px) {
  .sidebar {
    padding-top: 22px;
  }
  .workspace,
  .nav-label {
    display: none;
  }
  .sidebar nav {
    margin-top: 18px;
    max-height: none;
  }
  .sidebar-bottom {
    padding-top: 10px;
  }
}
@media (max-height: 900px) {
  .sidebar .demo {
    display: none;
  }
  .workspace {
    margin: 20px 0 18px;
  }
  nav a {
    padding: 4px 14px;
  }
  nav a > span {
    font-size: 15px;
    line-height: 18px;
  }
}
.site-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.site-form .field {
  flex: 1;
}
.offer-document td:first-child,
.offer-item textarea {
  white-space: pre-line;
}
.offer-item textarea {
  resize: vertical;
}
.item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.offer-item.title-row {
  background: #eef3ea;
  border-color: #cfdcc8;
}
tr.title-line td {
  background: #f5f7f1;
}
.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.row-move {
  display: flex;
  gap: 4px;
}
.reminders p {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin: 6px 0;
}
.reminders a {
  text-decoration: underline;
}
.reminders button {
  margin-top: 8px;
}
.export-panel {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.export-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
/* Customer file */
.metrics.compact {
  margin-bottom: 18px;
  gap: 10px;
}
.metrics.compact article {
  padding: 14px;
}
.metrics.compact article > strong {
  font-size: 19px;
  letter-spacing: -0.4px;
  margin: 9px 0 6px;
}
.timeline p {
  display: flex;
  gap: 14px;
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.timeline span {
  color: #899780;
  min-width: 74px;
}
.customer-master {
  margin-top: 22px;
}
.customer-master summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 14px;
}
@media (max-width: 700px) {
  .metrics.compact {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* Text blocks */
.text-picker {
  display: block;
  margin: -8px 0 18px auto;
  max-width: 280px;
  border: 1px solid #dce4d6;
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 11px;
  color: #425647;
  background: #f4f7f1;
}
/* Maintenance contracts */
.inline-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #62755b;
}
.inline-field input {
  border: 1px solid #dce4d6;
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 11px;
  background: #fcfdfb;
}
/* E-mail */
.link-button {
  border: 0;
  background: none;
  padding: 0;
  color: #2f6b4a;
  font-size: inherit;
  text-decoration: underline;
  cursor: pointer;
}
/* Bank reconciliation */
.bank-table td {
  vertical-align: top;
}
.bank-table select {
  max-width: 260px;
  border: 1px solid #dce4d6;
  border-radius: 6px;
  padding: 6px;
  font-size: 11px;
}
.warning-text {
  color: #a5642a;
}
/* Calendar */
.calendar-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.calendar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.calendar-nav strong {
  margin-left: 8px;
  font-size: 13px;
}
#calendar-person {
  border: 1px solid #dce4d6;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  background: #fff;
}
.week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.day {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.day.weekend {
  background: #f7f9f5;
}
.day.today {
  border-color: #2f6b4a;
  box-shadow: inset 0 3px 0 #2f6b4a;
}
.day-head {
  display: flex;
  justify-content: space-between;
  width: 100%;
  border: 0;
  background: none;
  padding: 2px 2px 6px;
  color: #62755b;
  font-size: 11px;
  cursor: pointer;
}
.day-head strong {
  color: #334d37;
}
.day .muted {
  text-align: center;
  margin: 6px 0;
}
.appointment {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  text-align: left;
  border: 0;
  border-left: 3px solid #2f6b4a;
  border-radius: 6px;
  background: #eef4ec;
  padding: 6px 7px;
  font-size: 10.5px;
  color: #334d37;
  cursor: pointer;
}
.appointment time {
  color: #62755b;
  font-size: 10px;
}
.appointment small {
  color: #7a8a72;
  font-size: 10px;
}
.appointment.done {
  opacity: 0.6;
}
.appointment.cancelled {
  text-decoration: line-through;
  opacity: 0.5;
}
.appointment .people {
  display: flex;
  gap: 3px;
  margin-top: 2px;
}
.appointment .people b {
  background: #2f6b4a;
  color: #fff;
  border-radius: 8px;
  padding: 1px 5px;
  font-size: 9px;
  font-weight: 600;
}
.people-picker {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  margin: 0 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.people-picker legend {
  font-size: 11px;
  color: #62755b;
  padding: 0 4px;
}
@media (max-width: 1150px) {
  .week {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .day {
    min-height: 0;
  }
}
@media (max-width: 700px) {
  .week {
    grid-template-columns: 1fr;
  }
}
/* Work reports */
.form-grid.compact {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.signature-box {
  position: relative;
  margin-bottom: 12px;
}
.signature-box canvas {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 1;
  border: 2px dashed #b9c8b3;
  border-radius: 10px;
  background: #fff;
  touch-action: none;
  cursor: crosshair;
}
.signature-box span {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  color: #9aa894;
  font-size: 12px;
  pointer-events: none;
}
.signature-view {
  margin-top: 18px;
}
.signature-view img {
  max-width: 260px;
  max-height: 90px;
  display: block;
  border-bottom: 1px solid #334d37;
}
.signature-view p {
  font-size: 11px;
  color: #62755b;
}
/* Calendar subscription */
.feed-panel {
  margin-top: 22px;
  padding: 22px 26px;
  font-size: 12px;
}
.feed-panel h2 {
  font-size: 18px;
}
.feed-link,
.feed-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 10px 0;
}
.feed-link input {
  flex: 1;
  min-width: 220px;
  border: 1px solid #dce4d6;
  border-radius: 6px;
  padding: 9px;
  font-size: 11px;
  background: #fcfdfb;
}
.feed-actions select {
  border: 1px solid #dce4d6;
  border-radius: 6px;
  padding: 8px;
  font-size: 12px;
}
.feed-help {
  font-size: 11.5px;
  line-height: 1.7;
  color: #425647;
  padding-left: 18px;
}
/* Photos and files */
.attachments {
  margin: 18px 0 8px;
}
.attachments-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11px;
  color: #62755b;
}
.upload-actions {
  display: flex;
  gap: 6px;
}
.upload-button {
  cursor: pointer;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12px;
}
.attachment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.attachment-grid figure {
  position: relative;
  margin: 0;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f4ee;
  border: 1px solid var(--line);
}
.attachment-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.file-tile {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  height: 100%;
  padding: 8px;
  font-size: 10px;
  color: #334d37;
  word-break: break-word;
  text-decoration: none;
}
.file-tile span {
  font-weight: 700;
  color: #b04a3a;
  font-size: 13px;
}
.attachment-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 12px;
  background: #ffffffd9;
  color: #8a2f22;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
/* Payments */
.payments b {
  font-weight: 650;
}
.payment-form {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.payment-form .primary {
  margin-top: 8px;
}
/* Analytics */
.analytics-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.analytics-bar select {
  border: 1px solid #dce4d6;
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 12px;
  background: #fff;
}
.analytics-chart {
  margin-bottom: 22px;
  padding-bottom: 16px;
}
.chart {
  display: block;
  width: 100%;
  height: auto;
  padding: 0 16px;
}
.chart text {
  font-size: 10px;
  fill: #7a8a72;
}
.chart .grid {
  stroke: #e7ece3;
  stroke-width: 1;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  font-size: 11px;
  color: #62755b;
}
.legend svg {
  margin-right: 5px;
  vertical-align: -1px;
}
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 22px;
}
.analytics-grid .panel {
  margin: 0;
}
tr.late td {
  color: #a5642a;
}
tr.sum td {
  font-weight: 650;
}
@media (max-width: 900px) {
  .analytics-grid {
    grid-template-columns: 1fr;
  }
}
/* Tasks */
nav b:empty {
  display: none;
}
.overview-grid.even {
  grid-template-columns: 1fr 1fr;
}
.task-items {
  display: flex;
  flex-direction: column;
}
.task-items.padded {
  padding: 0 24px 12px;
}
.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #eef0eb;
  padding: 10px 0;
}
.task-group .task-items {
  padding: 0 24px 8px;
}
.task-tick {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1.5px solid #b9c7b2;
  border-radius: 50%;
  background: #fff;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}
.task-tick:hover {
  border-color: #2f6b4a;
  background: #eef4ec;
}
.task-item.done .task-tick {
  background: #2f6b4a;
  border-color: #2f6b4a;
}
.task-body {
  flex: 1;
  min-width: 0;
  text-align: left;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
}
.task-body strong {
  font-size: 12.5px;
  font-weight: 550;
}
.task-body small {
  display: block;
  margin-top: 4px;
  font-size: 10.5px;
  color: #929b91;
}
.task-item.late .task-body small {
  color: #a5642a;
}
.task-item.done .task-body strong {
  text-decoration: line-through;
  color: #8a9586;
}
.task-quick {
  display: flex;
  gap: 4px;
}
.task-quick button {
  padding: 5px 8px;
  font-size: 10.5px;
}
.task-group {
  margin-bottom: 16px;
}
.task-section {
  margin: 18px 0;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.section-heading h3 {
  margin: 0;
}
.task-section .task-items {
  margin-top: 6px;
}
.task-items .more {
  padding: 10px 0 0;
  font-size: 12px;
}
.task-chip {
  width: 100%;
  text-align: left;
  border: 1px dashed #b9c7b2;
  border-radius: 6px;
  background: #fff;
  padding: 5px 7px;
  font-size: 10.5px;
  color: #334d37;
  cursor: pointer;
}
#task-person,
#task-status {
  border: 1px solid #dce4d6;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  background: #fff;
}
@media (max-width: 1150px) {
  .overview-grid.even {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .task-group .task-items,
  .task-items.padded {
    padding: 0 16px 8px;
  }
  .task-quick {
    display: none;
  }
}
/* Costs and post-calculation */
.costing {
  margin: 18px 0;
}
.costing .section-heading {
  flex-wrap: wrap;
}
.costing-body {
  margin: 10px 0;
}
.costing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}
.costing-grid .margin {
  grid-column: 1 / -1;
}
.costing-grid strong {
  white-space: nowrap;
}
.costing-grid > div {
  background: #f7f9f5;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
}
.costing-grid p {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 6px 0;
  font-size: 12px;
}
.costing-grid small {
  display: block;
  color: #929b91;
  font-size: 10px;
  margin-top: 2px;
}
.costing-grid .margin strong {
  font-size: 15px;
}
.margin.positive {
  background: #e6f2e9;
}
.margin.warning {
  background: #fbefe0;
}
.margin.negative,
td.negative {
  color: #a33a2a;
}
.margin.negative {
  background: #f8e4e0;
}
.padded {
  padding: 0 24px 16px;
}
.costs-panel .panel-heading {
  flex-wrap: wrap;
  gap: 12px;
}
.einvoice {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.einvoice-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.einvoice-info {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 14px;
  font-size: 12px;
  margin: 12px 0;
}
.einvoice-info dt {
  color: #7c8974;
}
.einvoice-info dd {
  margin: 0;
}
.einvoice td small {
  display: block;
  color: #929b91;
}
@media (max-width: 900px) {
  .costing-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .padded {
    padding: 0 16px 14px;
  }
}
#cost-form .money-fields,
#cost-form .hour-fields {
  grid-column: 1 / -1;
}
#costing-table,
.costs-panel {
  margin-top: 22px;
}
/* Measurements (Aufmaß) */
dialog:has(#measurement-form) {
  max-width: 900px;
}
.measurement-form code {
  background: #f2f4ef;
  border-radius: 4px;
  padding: 1px 5px;
}
#measure-positions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 12px 0;
}
.measure-position {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0;
  background: #fcfdfb;
}
.measure-head,
.measure-line {
  display: grid;
  gap: 8px;
  align-items: center;
}
.measure-head {
  grid-template-columns: 24px minmax(0, 1fr) 70px 110px 28px;
}
.measure-line {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr) 110px 28px;
  margin: 6px 0 0 32px;
}
.measure-position input,
.measure-position select {
  border: 1px solid #dce4d6;
  border-radius: 6px;
  padding: 8px 9px;
  font: inherit;
  font-size: 12.5px;
  background: #fff;
  min-width: 0;
}
.measure-head [data-m="description"] {
  font-weight: 600;
}
.measure-line [data-l="formula"] {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.measure-number {
  font-weight: 700;
  color: #62755b;
  text-align: center;
}
.measure-line output {
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-size: 12.5px;
  color: #334d37;
}
.measure-line output.invalid {
  color: #a33a2a;
  font-weight: 700;
}
.measure-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0 0 32px;
}
.measure-total {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.icon-button {
  border: 0;
  background: none;
  color: #8a9586;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}
.icon-button:hover {
  color: #a33a2a;
}
@media (max-width: 700px) {
  .measure-head {
    grid-template-columns: 20px minmax(0, 1fr) minmax(0, 1fr) 28px;
    grid-template-areas: "number text text remove" ". unit price .";
  }
  .measure-number {
    grid-area: number;
  }
  .measure-head [data-m="description"] {
    grid-area: text;
  }
  .measure-head [data-m="unit"] {
    grid-area: unit;
  }
  .measure-head [data-m="price"] {
    grid-area: price;
  }
  .measure-head .icon-button {
    grid-area: remove;
  }
  .measure-line {
    grid-template-columns: minmax(0, 1fr) 80px 28px;
    margin-left: 0;
    padding-top: 6px;
    border-top: 1px dashed #e3e8df;
  }
  .measure-line [data-l="note"] {
    grid-column: 1 / -1;
  }
  .measure-foot {
    margin-left: 0;
  }
}
.equipment-panel {
  margin-top: 22px;
}
.invoice-row strong small {
  display: block;
  font-weight: 400;
  color: #929b91;
  margin-top: 3px;
}
tr.muted td {
  opacity: 0.6;
}
/* Global search */
.search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  color: #7b8781;
  font-size: 12px;
  cursor: pointer;
  min-width: 220px;
}
.search-trigger kbd {
  margin-left: auto;
  font-family: inherit;
  font-size: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  color: #929b91;
}
dialog:has(.global-search) {
  max-width: 640px;
  align-self: flex-start;
  margin-top: 8vh;
}
.global-search {
  display: flex;
  gap: 10px;
  align-items: center;
}
.global-search .search {
  flex: 1;
}
#search-results {
  margin-top: 12px;
  max-height: 60vh;
  overflow: auto;
}
#search-results h4 {
  margin: 14px 0 4px;
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #7c8974;
}
.search-hit {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 8px;
  background: none;
  padding: 8px 10px;
  cursor: pointer;
  color: inherit;
}
.search-hit strong {
  display: block;
  font-size: 13px;
  font-weight: 550;
}
.search-hit small {
  color: #929b91;
  font-size: 11px;
}
.search-hit:hover,
.search-hit.selected {
  background: #eef4ec;
}
/* Phone: tab bar at the bottom, full navigation on demand */
.tabbar {
  display: none;
}
@media (max-width: 700px) {
  .search-trigger {
    min-width: 0;
    padding: 8px 10px;
  }
  .search-trigger .search-label,
  .search-trigger kbd {
    display: none;
  }
  .sidebar nav {
    display: none;
  }
  body.menu-open .sidebar nav {
    display: flex;
  }
  .tabbar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    inset: auto 0 0 0;
    z-index: 20;
    background: #172f2b;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    gap: 2px;
  }
  .tabbar a,
  .tabbar button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    border: 0;
    background: none;
    color: #c9d6cf;
    font: inherit;
    font-size: 10px;
    padding: 5px 2px;
    border-radius: 8px;
    cursor: pointer;
  }
  .tabbar span {
    font-size: 18px;
    line-height: 1;
  }
  .tabbar a.active,
  body.menu-open .tabbar button {
    background: #d9edb7;
    color: #203b2d;
  }
  main {
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
  }
  #toast {
    bottom: calc(80px + env(safe-area-inset-bottom));
  }
}
.topbar > span {
  white-space: nowrap;
}
@media (max-width: 1300px) {
  .top-date {
    display: none;
  }
  .topbar > div {
    gap: 12px;
  }
}
.nav-extra {
  display: none;
}
@media (max-width: 700px) {
  .crumb-root,
  .crumb,
  .topbar [data-action="password"] {
    display: none;
  }
  .topbar > div {
    gap: 8px;
  }
  body.menu-open .nav-extra {
    display: flex;
    align-items: center;
    gap: 5px;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    font-size: 11px;
    padding: 9px 10px;
    cursor: pointer;
  }
}
@media (max-width: 700px) {
  .search-trigger > span:first-child {
    font-size: 17px;
    line-height: 1;
  }
}
.account-section {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.forgot-link {
  display: block;
  margin: 16px auto 0;
  font-size: 12px;
}
body.signed-out .tabbar {
  display: none;
}
.qr-setup {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin: 10px 0 14px;
}
.qr-setup img {
  width: 180px;
  height: 180px;
  image-rendering: pixelated;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.qr-setup code,
.recovery-codes code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  letter-spacing: 0.5px;
}
.recovery-codes ol {
  columns: 2;
  font-size: 13px;
}
ol.steps {
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.6;
}
.girocode {
  text-align: center;
}
.girocode img {
  width: min(320px, 80vw);
  height: auto;
  image-rendering: pixelated;
}
.girocode-amount {
  font-size: 26px;
  font-weight: 700;
  margin: 6px 0;
}
.girocode .einvoice-info {
  text-align: left;
  max-width: 420px;
  margin: 14px auto 0;
}
.field-hint {
  display: block;
  margin-top: 5px;
  font-size: 10.5px;
  color: #929b91;
  line-height: 1.5;
}
/* Contact persons */
.contact-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fcfdfb;
  font-size: 12px;
}
.contact-card .link-button {
  text-align: left;
  text-decoration: none;
  color: inherit;
}
.contact-card small {
  color: #929b91;
}
.contact-card span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}
.contact-card a {
  color: #2f6b4a;
  text-decoration: none;
}
/* Photo markup */
.attachment-grid figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 4px 6px;
  background: #000000a0;
  color: #fff;
  font-size: 10px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.attachment-mark {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 13px;
  background: #ffffffd9;
  color: #2f6b4a;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
#photo-editor {
  width: min(1000px, 96vw);
  max-width: none;
}
.photo-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 10px 0;
}
.photo-tools [data-photo-tool].selected {
  background: #2f6b4a;
  color: #fff;
}
.photo-colors {
  display: flex;
  gap: 6px;
  margin: 0 6px;
}
.photo-color {
  width: 28px;
  height: 28px;
  border-radius: 14px;
  border: 2px solid #c9d2c4;
  background: var(--swatch);
  cursor: pointer;
}
.photo-color.selected {
  border-color: #172f2b;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px #172f2b;
}
.photo-stage {
  background: #1d2420;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  padding: 6px;
}
#photo-canvas {
  max-width: 100%;
  max-height: 62vh;
  touch-action: none;
  cursor: crosshair;
}
/* Wholesale catalogs */
.catalog-search {
  position: relative;
}
.catalog-results {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  max-height: 320px;
  overflow: auto;
  margin: -6px 0 12px;
  box-shadow: 0 10px 30px #0b291e1f;
}
.catalog-hit {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #eef0eb;
  padding-right: 10px;
}
.catalog-pick {
  flex: 1;
  text-align: left;
  border: 0;
  background: none;
  padding: 8px 10px;
  cursor: pointer;
  color: inherit;
}
.catalog-pick:hover {
  background: #eef4ec;
}
.catalog-pick strong {
  display: block;
  font-size: 12.5px;
}
.catalog-pick small,
.datanorm-preview td small,
#catalog-panel td small {
  display: block;
  color: #929b91;
  font-size: 10.5px;
}
.catalog-hit .link-button {
  white-space: nowrap;
  font-size: 11px;
}
.catalog-results .muted {
  padding: 8px 10px;
}
#catalog-panel {
  margin-top: 22px;
}
/* Address suggestions while typing */
.address-field {
  position: relative;
}
.address-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 30;
  margin: 4px 0 0;
  padding: 4px 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px #0b291e2e;
  max-height: 320px;
  overflow: auto;
}
.address-suggestions [data-address-pick] {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  padding: 9px 12px;
  min-height: 40px;
  cursor: pointer;
  font-size: 13px;
  color: #334d37;
}
.address-suggestions [data-address-pick] strong {
  font-weight: 600;
}
.address-suggestions [data-address-pick] span {
  color: #62755b;
}
.address-suggestions [data-address-pick] small {
  color: #8a9a84;
}
.address-suggestions [data-address-pick]:hover,
.address-suggestions [aria-selected="true"] {
  background: #eef5ea;
}
.address-credit {
  padding: 6px 12px 4px;
  font-size: 10px;
  color: #8a9a84;
  border-top: 1px solid #eef0eb;
  margin-top: 4px;
}
/* Online offers: optional positions, customer link, views */
.optional-choice {
  display: none;
}
#offer-form .optional-choice,
#package-form .optional-choice {
  display: flex;
}
.optional-line td {
  color: #7d8c78;
}
/* Long texts (e.g. from GAEB) keep their lines. */
.items-table td:nth-child(2) {
  white-space: pre-line;
}
/* Accepting an offer: the base position or one of its alternatives. */
.alternative-choice {
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.alternative-choice legend {
  padding: 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: #56665e;
}
.optional-line small {
  color: #986c28;
}
.view-tag {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #62755b;
}
.view-tag.recent {
  color: #986c28;
  font-weight: 600;
}
.section-heading .view-tag {
  display: inline;
  margin: 0;
}
.online-offer {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #dce4d6;
  border-radius: 10px;
  background: #fafcf9;
}
.online-offer h3 {
  margin: 0;
}
.link-row {
  display: flex;
  gap: 8px;
  margin: 10px 0;
}
.link-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid #dce4d6;
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 12px;
  color: #334d37;
  background: #fff;
}
.online-offer .item-actions {
  align-items: center;
}
.signature-thumb {
  max-width: 220px;
  max-height: 70px;
  background: #fff;
  border: 1px solid #eef0eb;
  border-radius: 6px;
}
.online-message {
  display: grid;
  gap: 2px;
  padding-top: 8px;
  border-top: 1px solid #eef0eb;
}
.online-message span {
  white-space: pre-line;
}
.neutral-tag.online {
  background: #fbf1df;
  color: #8a5a12;
}
@media (max-width: 640px) {
  .link-row {
    flex-direction: column;
  }
}
.notice-line {
  margin: 8px 0;
  padding: 9px 12px;
  border-radius: 8px;
  background: #fbf1df;
  color: #8a5a12;
  font-size: 12px;
}
/* Nachfass-Serie */
.follow-up-step {
  border: 1px solid #dce4d6;
  border-radius: 8px;
  padding: 12px 14px 4px;
  margin: 0 0 14px;
}
.follow-up-step legend {
  font-weight: 600;
  font-size: 12px;
  color: #334d37;
  padding: 0 4px;
}
.follow-up {
  margin: 18px 0;
}
.follow-up-plan {
  list-style: none;
  margin: 8px 0 12px;
  padding: 0;
  border: 1px solid #eef0eb;
  border-radius: 8px;
}
.follow-up-plan li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding: 10px 12px;
  border-top: 1px solid #eef0eb;
  font-size: 12px;
}
.follow-up-plan li:first-child {
  border-top: 0;
}
.follow-up-plan strong {
  min-width: 90px;
}
.follow-up-plan .inactive,
.follow-up-plan .skipped {
  color: #8a9a84;
}
.follow-up-plan .ready span:first-of-type,
.follow-up-plan .failed span:first-of-type {
  color: #986c28;
  font-weight: 600;
}
.follow-up-plan .sent span:first-of-type {
  color: #3c7a52;
}
.follow-up-actions {
  margin-left: auto;
  display: flex;
  gap: 12px;
}
/* Lost reasons */
.sales-panel h3 {
  font-size: 13px;
  margin: 18px 0 10px;
}
.reason-bars {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.reason-bars li {
  display: grid;
  grid-template-columns: minmax(120px, 1.2fr) 2fr auto auto;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.reason-bar {
  height: 10px;
  border-radius: 5px;
  background: #eef0eb;
  overflow: hidden;
}
.reason-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 5px;
  background: #c9884a;
}
.reason-bars small {
  color: #7d8c78;
  min-width: 70px;
  text-align: right;
}
@media (max-width: 640px) {
  .reason-bars li {
    grid-template-columns: 1fr auto;
  }
  .reason-bar,
  .reason-bars small {
    grid-column: 1 / -1;
  }
}
.archived-packages summary {
  cursor: pointer;
  font-weight: 600;
  padding: 4px 0;
}
/* Phones: no automatic zoom into form fields (iOS zooms below 16 px) */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (max-width: 700px), (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea {
    font-size: 16px !important;
  }
}
/* Phones: table rows as cards, the main cell on top, the other cells with
   their column name in two columns (labels set by labelTables in app.js). */
@media (max-width: 700px) {
  .table-scroll {
    overflow: visible;
  }
  .table-scroll table,
  .table-scroll tbody {
    display: block;
    width: 100%;
  }
  .table-scroll thead {
    display: none;
  }
  .table-scroll tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
    padding: 14px 16px;
    border-bottom: 1px solid #eef1eb;
  }
  .table-scroll tr:last-child {
    border-bottom: 0;
  }
  .table-scroll td {
    display: block;
    padding: 0;
    border: 0;
    min-width: 0;
    font-size: 12px;
    overflow-wrap: anywhere;
  }
  .table-scroll td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: 10px;
    font-weight: 550;
    color: #8b9689;
  }
  .table-scroll td.cell-main,
  .table-scroll td:not([data-label]),
  .table-scroll td[colspan] {
    grid-column: 1 / -1;
  }
  .table-scroll td.cell-main {
    order: -1;
    font-size: 13px;
  }
  .table-scroll td.cell-main::before {
    content: none !important;
  }
  .table-scroll td.cell-main strong {
    font-size: 13px;
  }
  .table-scroll td.empty {
    text-align: center;
    padding: 12px 0;
  }
  .table-scroll tr.title-line {
    background: #f4f7ef;
  }
  /* Positions: compact, three columns; titles as "1 Heizkörper tauschen". */
  .table-scroll .items-table tr {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px 12px;
  }
  .table-scroll .items-table tr.title-line {
    display: flex;
    gap: 10px;
    font-size: 13px;
  }
  .table-scroll .items-table tr.title-line td::before {
    content: none;
  }
  .table-scroll .items-table tr.title-line td.cell-main {
    order: 0;
  }
  .table-scroll tr.sum {
    background: #fafbf8;
  }
}
/* Pages instead of pop-up windows: the dialog #modal fills the work area
   next to the sidebar (phones: the whole screen) and scrolls by itself. */
dialog.page {
  position: fixed;
  inset: 0 0 0 246px;
  z-index: 40;
  width: auto;
  max-width: none;
  height: auto;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #f6f7f5;
  overflow: auto;
  overscroll-behavior: contain;
}
dialog.page #modal-content {
  max-width: 980px;
  margin: 28px auto 40px;
  padding: 28px 34px 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}
body.page-open {
  overflow: hidden;
}
dialog.page .modal-heading {
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 14px;
  border: 0;
  border-radius: 8px;
  background: #eef2ea;
  color: #2f4a3a;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.back:hover {
  background: #e3eadd;
}
/* The actions stay at hand at the bottom of long pages. */
dialog.page .form-footer {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: 24px -34px 0;
  padding: 14px 34px calc(14px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid var(--line);
  border-radius: 0 0 14px 14px;
}
dialog.page:has(.offer-document),
dialog.page:has(#offer-form) {
  max-width: none;
}
.global-search .back {
  flex: none;
}
@media (max-width: 1150px) {
  dialog.page {
    left: 205px;
  }
  dialog.page #modal-content {
    margin: 20px 20px 32px;
    padding: 24px 24px 0;
  }
  dialog.page .form-footer {
    margin: 24px -24px 0;
    padding-inline: 24px;
  }
}
@media (max-width: 700px) {
  dialog.page {
    left: 0;
    z-index: 60;
    background: #fff;
  }
  dialog.page #modal-content {
    margin: 0;
    padding: calc(12px + env(safe-area-inset-top)) 16px 0;
    border: 0;
    border-radius: 0;
  }
  dialog.page .modal-heading {
    margin-bottom: 18px;
  }
  dialog.page .modal-heading h2 {
    font-size: 19px;
  }
  dialog.page .form-footer {
    margin: 20px -16px 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-radius: 0;
    flex-wrap: wrap;
  }
  dialog.page .form-footer > * {
    flex: 1 1 auto;
  }
}
@media print {
  dialog.page {
    position: absolute;
    background: #fff;
  }
  dialog.page #modal-content {
    margin: 0;
    padding: 0;
    border: 0;
  }
  .back,
  .tabbar {
    display: none !important;
  }
}

/* Tablets (sidebar plus work area): the top bar must not overflow. */
@media (max-width: 1150px) {
  .top-date,
  .crumb-root,
  .crumb,
  .search-trigger kbd {
    display: none;
  }
  .topbar > div {
    gap: 10px;
  }
}
@media (max-width: 900px) {
  .search-trigger .search-label {
    display: none;
  }
}
/* Headings of panels with buttons wrap on phones. */
@media (max-width: 700px) {
  .panel-heading,
  .panel-heading .upload-actions,
  .section-heading {
    flex-wrap: wrap;
  }
}
/* Fingers (touch screens): tap targets of at least about 40 px. */
@media (pointer: coarse) {
  .close {
    width: 40px;
    height: 40px;
  }
  .task-tick {
    width: 34px;
    height: 34px;
  }
  .import-choice {
    align-items: center;
    min-height: 40px;
    margin: 8px 0;
  }
  .import-choice input[type="checkbox"],
  .import-choice input[type="radio"] {
    width: 22px;
    height: 22px;
    margin-top: 0;
    flex: none;
  }
  .day-head {
    min-height: 40px;
    align-items: center;
  }
  .link-button {
    min-height: 36px;
  }
  .panel-heading a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
  }
  .table-scroll td.cell-main .customer-link {
    min-height: 40px;
  }
  select,
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]) {
    min-height: 40px;
  }
}
/* Plantafel: a row per team member, appointments moved by dragging. */
.mode-switch {
  display: inline-flex;
}
.mode-switch button {
  border-radius: 0;
}
.mode-switch button:first-child {
  border-radius: 8px 0 0 8px;
}
.mode-switch button:last-child {
  border-radius: 0 8px 8px 0;
  margin-left: -1px;
}
.mode-switch button.active {
  background: #244c40;
  border-color: #244c40;
  color: #fff;
}
.board-scroll {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.plan-board {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  table-layout: fixed;
}
.plan-board th,
.plan-board td {
  border-bottom: 1px solid #eef0eb;
  border-right: 1px solid #eef0eb;
  vertical-align: top;
  text-align: left;
}
.plan-board thead th {
  padding: 10px;
  font-size: 12px;
  color: #56665e;
  background: #f9fbf7;
}
.plan-board thead th:first-child,
.plan-board tbody th {
  width: 150px;
}
.plan-board thead th.today {
  color: #244c40;
  font-weight: 700;
}
.plan-board tbody th {
  padding: 10px;
  font-size: 13px;
  color: #21332f;
}
.plan-board tbody th small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}
.board-cell {
  padding: 6px;
  min-height: 70px;
  height: 70px;
}
.board-cell.today {
  background: #f8fbf6;
}
.board-cell.over {
  background: #e8f3ea;
  outline: 2px dashed #6ba57b;
  outline-offset: -3px;
}
.board-chip {
  display: grid;
  gap: 1px;
  width: 100%;
  margin-bottom: 5px;
  padding: 5px 7px;
  border: 1px solid #cfe0d3;
  border-left: 3px solid #4f8a5f;
  border-radius: 6px;
  background: #f4faf5;
  text-align: left;
  font-size: 11px;
  color: inherit;
  cursor: grab;
}
.board-chip time {
  font-variant-numeric: tabular-nums;
  color: #56665e;
}
.board-chip strong {
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.board-chip small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.board-chip.done {
  opacity: 0.6;
}
.board-chip.clash {
  border-color: #d58c80;
  border-left-color: #b4412f;
  background: #fdf1ef;
}
.board-chip.dragging {
  opacity: 0.4;
}
.board-add {
  width: 100%;
  min-height: 24px;
  border: 1px dashed transparent;
  border-radius: 6px;
  background: none;
  color: transparent;
  cursor: pointer;
}
.board-cell:hover .board-add {
  border-color: #cfd8cc;
  color: #7b8d73;
}
@media (pointer: coarse) {
  .board-add {
    border-color: #e1e7de;
    color: #9aa79a;
  }
}
/* Time tracking: the clock on "Heute" and the week on "Zeiten". */
.clock-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.clock-card.running {
  border-color: #9cc5a6;
  background: #f4faf5;
}
.clock-card.on-break {
  border-color: #e3cf9c;
  background: #fdf9ee;
}
.clock-state {
  display: flex;
  align-items: center;
  gap: 12px;
}
.clock-state > div {
  display: grid;
  gap: 3px;
}
.clock-state strong {
  font-size: 15px;
}
.clock-state small {
  font-size: 12px;
  color: #6d7d72;
}
.clock-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #c9d1c6;
  flex-shrink: 0;
}
.running .clock-dot {
  background: #2f8f4e;
  box-shadow: 0 0 0 4px #2f8f4e22;
}
.on-break .clock-dot {
  background: #c9952b;
}
.clock-hint {
  color: #986c28 !important;
  margin: 0;
  font-size: 12px;
}
.clock-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.clock-actions select {
  max-width: 260px;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
}
.clock-actions .link-button {
  font-size: 12px;
}
.time-week {
  padding: 4px 24px 12px;
}
.time-day {
  padding: 14px 0;
  border-top: 1px solid #eef0eb;
}
.time-day:first-child {
  border-top: 0;
}
.time-day header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 14px;
  font-size: 13px;
}
.time-day.today header strong::after {
  content: " · heute";
  color: #2f8f4e;
  font-weight: 500;
}
.time-day header span {
  color: #56665e;
}
.time-entry {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 2px 12px;
  width: 100%;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-left: 4px solid #9cc5a6;
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  color: inherit;
}
.time-entry.break {
  border-left-color: #e3cf9c;
}
.time-entry span {
  grid-row: span 2;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.time-entry strong {
  font-size: 13px;
  font-weight: 600;
}
.time-entry small {
  font-size: 11px;
  color: #7f8b84;
}
@media (max-width: 700px) {
  .clock-card {
    padding: 14px;
  }
  .clock-actions,
  .clock-actions select {
    width: 100%;
    max-width: none;
  }
  .time-week {
    padding: 4px 16px 10px;
  }
  .time-entry {
    grid-template-columns: 1fr;
  }
  .time-entry span {
    grid-row: auto;
  }
}
/* Offline mode: status at the bottom, waiting changes. */
#net-status {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  max-width: calc(100vw - 36px);
  padding: 9px 14px;
  border: 0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 20px #162b2530;
  background: #203e30;
  color: #fff;
}
#net-status.offline {
  background: #5b4a1f;
}
#net-status.failed {
  background: #8a2f22;
}
#net-status[hidden] {
  display: none;
}
.pending-note {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fbf3dd;
  color: #5b4a1f;
  font-size: 12px;
}
.attachment-grid figure.pending img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pending-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 5px;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
}
.queue-list {
  display: grid;
  margin: 16px 0;
}
.queue-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid #eef0eb;
}
.queue-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}
.queue-error {
  color: #8a2f22;
}
.queue-actions {
  display: flex;
  gap: 8px;
}
@media (max-width: 700px) {
  #net-status {
    right: 12px;
    bottom: calc(78px + env(safe-area-inset-bottom));
  }
}
@media print {
  #net-status {
    display: none !important;
  }
}
/* "Heute": own appointments and the sales steps of the day. */
.day-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.day-summary a {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: inherit;
  text-decoration: none;
}
.day-summary a:hover {
  background: #f9fbf7;
}
.day-summary strong {
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.5px;
  overflow-wrap: anywhere;
}
.day-summary span {
  font-size: 12px;
  color: #6d7d72;
}
.day-panel {
  margin-bottom: 22px;
}
.day-panel .panel-heading select {
  max-width: 180px;
}
.visits,
.steps {
  padding: 0 24px 12px;
}
.visits > .muted {
  padding: 14px 0 4px;
  border-top: 1px solid #eef0eb;
  margin: 0;
}
.visit {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid #eef0eb;
}
.visit-time {
  flex-shrink: 0;
  width: 58px;
  display: grid;
  align-content: start;
  gap: 2px;
}
.visit-time strong {
  font-size: 16px;
  font-weight: 650;
}
.visit-time small {
  font-size: 11px;
  color: var(--muted);
}
.visit-body {
  flex: 1;
  min-width: 0;
}
.visit-title strong {
  font-size: 14px;
}
.visit-body p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #56665e;
}
.visit-notes {
  white-space: pre-line;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.visit-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.visit-actions .quick-actions {
  margin: 0;
}
.visit.done {
  opacity: 0.7;
}
.step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #eef0eb;
}
.step-body {
  flex: 1;
  min-width: 0;
  display: grid;
  justify-items: start;
  gap: 5px;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  color: inherit;
}
.step-body strong {
  font-size: 13px;
  font-weight: 600;
}
.step-body small {
  font-size: 11px;
  color: #7f8b84;
}
.step-value {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.step-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.steps .more {
  margin: 12px 0 4px;
}
@media (max-width: 700px) {
  .day-summary {
    gap: 8px;
  }
  .day-summary a {
    padding: 12px;
  }
  .day-summary strong {
    font-size: 17px;
  }
  .day-summary span {
    font-size: 11px;
  }
  .visits,
  .steps {
    padding: 0 16px 8px;
  }
  .visit {
    gap: 12px;
  }
  .visit-time {
    width: 46px;
  }
  .step {
    flex-wrap: wrap;
  }
  .step-body {
    flex-basis: 60%;
  }
  .step-actions {
    width: 100%;
    flex-wrap: wrap;
  }
}
/* Next appointments: route straight from the overview. */
.upcoming-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #eef0eb;
}
.upcoming-row .task-row {
  border-top: 0;
}
.route-link,
.call-link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #2f4a3a;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.route-link:hover,
.call-link:hover {
  background: #f4f7ef;
}
/* On site: call, write, route. */
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.quick-actions a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #2f4a3a;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.quick-actions a:hover {
  background: #f4f7ef;
}

/* Article suggestions in the text of a position. */
.item-suggest {
  position: absolute;
  left: 16px;
  right: 16px;
  z-index: 30;
  margin-top: -6px;
  max-height: 340px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px #0b291e1f;
}
.item-suggest h4 {
  margin: 0;
  padding: 8px 12px 2px;
  color: #929b91;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.suggest-hit {
  display: flex;
  align-items: baseline;
  gap: 12px;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.suggest-hit:hover,
.suggest-hit.active {
  background: #eef4ec;
}
.suggest-hit span {
  flex: 1;
  min-width: 0;
}
.suggest-hit small {
  color: #929b91;
  font-size: 11px;
}
.suggest-hit b {
  white-space: nowrap;
  font-weight: 600;
}

/* Technicians (Monteur): no prices, totals or commercial actions. The
   server sends no amounts and keeps the office's prices when they save. */
.technician .office-action,
.technician .offer-item .field:has([data-item="price"]),
.technician .measure-position [data-m="price"],
.technician .import-choice:has([name="showPrices"]),
.technician #offer-totals,
.technician .item-suggest b {
  display: none !important;
}
/* Two tiles on "Heute" (appointments, tasks) instead of three. */
.technician .day-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Checklists (Prüfprotokolle): template editor, filling in the report,
   results and the measured values of an equipment. */
.template-point {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px auto auto;
  grid-template-areas:
    "label kind move remove"
    "extra extra extra extra";
  gap: 6px 8px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #eef0eb;
}
.template-point [data-p="label"] {
  grid-area: label;
  min-width: 0;
}
.template-point [data-p="kind"] {
  grid-area: kind;
}
.template-point .row-move {
  grid-area: move;
}
.template-point [data-point-remove] {
  grid-area: remove;
}
.template-extra {
  grid-area: extra;
  display: flex;
  gap: 6px;
}
.template-extra [data-p="hint"] {
  flex: 1;
  min-width: 0;
}
.template-measure {
  display: flex;
  gap: 6px;
}
.template-measure input {
  width: 84px;
}
.template-point:not([data-kind="measure"]) .template-measure {
  display: none;
}
@media (max-width: 700px) {
  .template-point {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "label label label"
      "kind move remove"
      "extra extra extra";
  }
  .template-extra {
    flex-wrap: wrap;
  }
  .template-measure input {
    width: 70px;
  }
}
.checklist-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px 4px;
  margin: 0 0 14px;
  background: #fcfdfb;
}
.checklist-card legend {
  font-weight: 700;
  padding: 0 6px;
}
.cl-summary {
  margin: 0 0 4px;
  color: #5d6b5f;
  font-size: 12.5px;
}
.cl-summary.has-defects {
  color: #9c2f24;
  font-weight: 600;
}
.cl-point {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 14px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid #eef0eb;
}
.cl-label strong {
  display: block;
  font-weight: 600;
  font-size: 13.5px;
}
.cl-label small {
  display: block;
  color: #929b91;
  font-size: 11px;
}
.cl-choices {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.cl-choice {
  position: relative;
}
.cl-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.cl-choice span {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.cl-choice input:checked + span {
  background: #e5f0e3;
  border-color: #6e9874;
  font-weight: 600;
}
.cl-choice input[value="defect"]:checked + span {
  background: #f8e3e0;
  border-color: #c0675c;
  color: #9c2f24;
}
.cl-choice input[value="na"]:checked + span {
  background: #eef0eb;
  border-color: #a8b1a6;
}
.cl-choice input:focus-visible + span {
  outline: 2px solid #6e9874;
  outline-offset: 1px;
}
.cl-measure {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cl-measure [data-cl="value"] {
  width: 96px;
}
.cl-measure small {
  color: #929b91;
}
.cl-na {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #5d6b5f;
}
.cl-point textarea[data-cl="text"],
.cl-note {
  grid-column: 1 / -1;
  width: 100%;
}
/* A note only for defects or when there is one already. */
.cl-point:not([data-result="defect"]) .cl-note:placeholder-shown {
  display: none;
}
.cl-point[data-result="defect"] .cl-label strong,
.cl-point[data-result="defect"] [data-cl="value"],
.cl-point[data-result="invalid"] [data-cl="value"] {
  color: #9c2f24;
}
.cl-point[data-result="defect"] [data-cl="value"],
.cl-point[data-result="invalid"] [data-cl="value"] {
  border-color: #c0675c;
}
.cl-point[data-result="ok"] [data-cl="value"] {
  border-color: #6e9874;
}
.checklist-result {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 12px 0;
}
.checklist-result span {
  display: block;
  color: #5d6b5f;
}
.checklist-result.has-defects {
  border-color: #e2b6b0;
  background: #fdf3f1;
}
.checklist-result ul {
  margin: 6px 0 0 18px;
  padding: 0;
  color: #9c2f24;
}
.measure-history td.defect {
  color: #9c2f24;
  font-weight: 600;
}
@media (max-width: 700px) {
  .cl-point {
    grid-template-columns: 1fr;
  }
}

/* Signed-in devices (Geräteverwaltung). */
.device-list {
  margin: 8px 0 12px;
}
.device-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eef0eb;
}
.device-row > div {
  flex: 1;
  min-width: 0;
}
.device-row strong {
  display: block;
}
.device-row small {
  display: block;
  color: #7d877c;
}
.device-icon {
  font-size: 20px;
}

/* PDF preview over the page (offers, invoices). */
#pdf-preview {
  width: min(1000px, 96vw);
  height: 94vh;
  max-height: 94vh;
  max-width: 96vw;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
}
#pdf-preview[open] {
  display: flex;
  flex-direction: column;
}
#pdf-preview::backdrop {
  background: rgb(0 0 0 / 55%);
}
.pdf-preview-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.pdf-preview-bar strong {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#pdf-preview iframe {
  flex: 1;
  width: 100%;
  border: 0;
  background: #525659;
}
@media (max-width: 700px) {
  #pdf-preview {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
}
