:root {
  --ink: #17231f;
  --muted: #66736e;
  --line: #dfe5e2;
  --paper: #fff;
  --bg: #f3f6f4;
  --green: #1e654d;
  --green-dark: #124535;
  --orange: #d9792b;
  --red: #b7413e;
  --blue: #377b91;
  --purple: #74538e;
  --shadow: 0 8px 30px rgba(22, 43, 35, 0.07);
}
* {
  box-sizing: border-box;
}
body.dhcrm-app {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
.dh-topbar {
  height: 72px;
  padding: 0 34px;
  background: #173f33;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 42px;
}
.dh-brand {
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
}
.dh-brand span {
  color: #a9d4bd;
}
.dh-brand small {
  display: block;
  margin-top: 7px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: #d5e6dd;
}
.dh-topbar nav {
  display: flex;
  align-self: stretch;
}
.dh-topbar nav a {
  display: flex;
  align-items: center;
  padding: 0 18px;
  color: #e1ede7;
  text-decoration: none;
  font-weight: 650;
}
.dh-topbar nav a:hover {
  background: rgba(255, 255, 255, 0.08);
}
.dh-user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.dh-user a {
  color: #cfe1d8;
}
.dh-mobile-nav {
  display: none;
}
.dh-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px 34px 70px;
}
.dh-shell-plain {
  max-width: none;
  padding: 0;
}
.dh-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 27px;
}
.dh-heading h1 {
  font-size: 32px;
  letter-spacing: -0.025em;
  margin: 0;
}
.dh-heading p {
  margin: 4px 0 0;
  color: var(--muted);
}
.dh-kicker {
  color: var(--green) !important;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.dh-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 0;
  border-radius: 7px;
  padding: 11px 17px;
  background: var(--green);
  color: #fff !important;
  text-decoration: none;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}
.dh-button:hover {
  background: var(--green-dark);
}
.dh-button-secondary {
  background: #e6eeea;
  color: var(--green-dark) !important;
}
.dh-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  margin-bottom: 25px;
}
.dh-stat {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  padding: 21px 23px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--green);
}
.dh-stat span,
.dh-stat small {
  display: block;
  color: var(--muted);
}
.dh-stat strong {
  display: block;
  margin: 4px 0;
  font-size: 35px;
  line-height: 1.15;
}
.dh-stat-orange {
  border-color: var(--orange);
}
.dh-stat-red {
  border-color: var(--red);
}
.dh-stat-blue {
  border-color: var(--blue);
}
.dh-stat-purple {
  border-color: var(--purple);
}
.dh-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}
.dh-card h2 {
  font-size: 19px;
  margin: 0 0 16px;
}
.dh-card-title {
  display: flex;
  justify-content: space-between;
}
.dh-card-title h2 {
  margin-bottom: 0;
}
.dh-card-title p {
  margin: 3px 0 20px;
  color: var(--muted);
}
.dh-table-wrap {
  overflow-x: auto;
  margin: -8px -12px;
}
.dh-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 850px;
}
.dh-table th {
  padding: 12px;
  text-align: left;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--line);
}
.dh-table td {
  padding: 15px 12px;
  border-bottom: 1px solid #edf0ee;
  vertical-align: middle;
}
.dh-table tr:last-child td {
  border-bottom: 0;
}
.dh-table tbody tr {
  cursor: pointer;
}
.dh-table tbody tr:hover {
  background: #f8faf9;
}
.dh-table td a {
  color: var(--ink);
  text-decoration: none;
}
.dh-table td small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}
.dh-badge {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e9efec;
  color: #385448;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}
.dh-status-new {
  background: #fff0e2;
  color: #9b5018;
}
.dh-status-booked {
  background: #e1f2e9;
  color: #14613f;
}
.dh-status-closed_lost,
.dh-status-closed_no_response {
  background: #f1eded;
  color: #6d5655;
}
.dh-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.dh-filters input {
  min-width: 320px;
}
.dh-filters a {
  color: var(--green);
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd5d0;
  border-radius: 7px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(30, 101, 77, 0.12);
  border-color: var(--green);
}
label {
  display: block;
  font-weight: 650;
  color: #35453f;
}
label input,
label select,
label textarea {
  display: block;
  margin-top: 6px;
  font-weight: 400;
}
.dh-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
}
.dh-prose {
  white-space: normal;
  font-size: 16px;
  line-height: 1.7;
}
.dh-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.dh-details span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dh-details strong {
  display: block;
  margin-top: 3px;
}
.dh-stack {
  display: grid;
  gap: 16px;
}
.dh-contact {
  margin: 0;
}
.dh-contact dt {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 14px;
}
.dh-contact dt:first-child {
  margin-top: 0;
}
.dh-contact dd {
  margin: 3px 0;
}
.dh-contact a {
  color: var(--green);
}
.dh-note-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}
.dh-note-form textarea {
  grid-row: 1/3;
}
.dh-timeline {
  padding-top: 20px;
}
.dh-timeline article {
  position: relative;
  display: grid;
  grid-template-columns: 17px 1fr;
  gap: 10px;
  padding-bottom: 23px;
}
.dh-timeline article:before {
  content: "";
  position: absolute;
  left: 6px;
  top: 14px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
.dh-timeline article:last-child:before {
  display: none;
}
.dh-timeline-dot {
  position: relative;
  z-index: 1;
  width: 13px;
  height: 13px;
  margin-top: 4px;
  background: var(--green);
  border: 3px solid #d8e9e1;
  border-radius: 50%;
}
.dh-timeline p {
  margin: 5px 0;
}
.dh-timeline small {
  color: var(--muted);
}
.dh-back {
  display: inline-block;
  color: var(--green);
  margin-bottom: 14px;
  text-decoration: none;
}
.dh-empty {
  text-align: center;
  padding: 48px 20px;
}
.dh-empty h3 {
  margin-bottom: 4px;
}
.dh-empty p,
.dh-muted {
  color: var(--muted);
}
.dh-setup {
  max-width: 780px;
}
.dh-setup label {
  margin-top: 16px;
}
.dh-setup code {
  background: #edf2ef;
  padding: 2px 5px;
  border-radius: 4px;
}
.dh-check-list {
  display: grid;
  gap: 10px;
}
.dh-login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(145deg, #113a2e, #245c49);
}
.dh-login-card {
  width: min(430px, 100%);
  background: #fff;
  border-radius: 14px;
  padding: 38px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
}
.dh-wordmark {
  font-weight: 850;
  letter-spacing: 0.08em;
  color: #183e33;
}
.dh-wordmark span {
  color: #4d8c70;
}
.dh-login-card h1 {
  font-size: 30px;
  margin: 22px 0 0;
}
.dh-login-card form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}
.dh-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
}
.dh-check input {
  width: auto;
  margin: 0;
}
.dh-small-link {
  display: inline-block;
  margin-top: 20px;
  color: var(--green);
}
.dh-alert {
  padding: 10px 12px;
  border-radius: 6px;
  margin-top: 15px;
}
.dh-alert-error {
  background: #fae8e6;
  color: #882e2b;
}
.dh-alert-success {
  background: #e1f2e9;
  color: #14613f;
}
.dh-alert-info {
  background: #e8f1f4;
  color: #285f70;
  margin: 0 0 20px;
}
.dh-heading-actions,
.dh-inline-actions,
.dh-email-actions,
.dh-form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dh-heading-actions .dh-badge {
  min-height: 42px;
  padding-inline: 14px;
}
.dh-badge-waiting {
  margin: 5px 0 0 5px;
  background: #f8e7e4;
  color: #8c312e;
}
.dh-waiting-banner,
.dh-handled-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: -6px 0 22px;
  padding: 17px 20px;
  border-radius: 9px;
}
.dh-waiting-banner {
  background: #9f3834;
  color: #fff;
}
.dh-waiting-banner strong,
.dh-waiting-banner span {
  display: block;
}
.dh-waiting-banner span {
  opacity: 0.85;
  margin-top: 2px;
}
.dh-button-light {
  background: #fff;
  color: #7d2926 !important;
  white-space: nowrap;
}
.dh-handled-banner {
  background: #edf1ef;
  color: #52605b;
}
.dh-text-button {
  width: auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--green);
  text-decoration: underline;
  font: inherit;
  cursor: pointer;
}
.dh-activity-title {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.dh-email-direction {
  display: inline-flex;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 750;
}
.dh-email-in {
  background: #f9e5e2;
  color: #8b332f;
}
.dh-email-out {
  background: #dfefe8;
  color: #1c6248;
}
.dh-email-actions {
  margin-top: 8px;
  font-size: 13px;
}
.dh-email-actions a,
.dh-text-link {
  color: var(--green);
}
.dh-record-form {
  max-width: 960px;
}
.dh-record-form h2:not(:first-of-type) {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.dh-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}
.dh-span-2 {
  grid-column: span 2;
}
.dh-form-actions {
  justify-content: flex-end;
  margin-top: 24px;
}
.dh-filter-check {
  width: auto;
  white-space: nowrap;
  padding: 10px 8px;
}
.dh-email-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.dh-connection {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.dh-connection strong,
.dh-connection small {
  display: block;
}
.dh-connection small {
  color: var(--muted);
}
.dh-connection-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #2f9b69;
  box-shadow: 0 0 0 4px #dff1e8;
}
.dh-account-list > div {
  display: flex;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.dh-account-list span {
  color: var(--muted);
}
.dh-unmatched-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.dh-unmatched-list h3 {
  margin: 8px 0 4px;
}
.dh-unmatched-list p {
  margin: 0 0 5px;
  color: var(--muted);
}
.dh-unmatched-list form {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dh-payment-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.dh-payment-stats .dh-stat strong {
  font-size: 30px;
}
.dh-payment-table {
  min-width: 1180px;
}
.dh-payment-table tbody tr {
  cursor: default;
}
.dh-payment-table td:first-child {
  width: 62px;
  text-align: center;
}
.dh-payment-table td:last-child {
  text-align: right;
}
.dh-payment-toggle label {
  display: inline-flex;
  cursor: pointer;
}
.dh-payment-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.dh-payment-check {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border: 2px solid #aebbb5;
  border-radius: 6px;
  background: #fff;
}
.dh-payment-toggle input:checked + .dh-payment-check {
  border-color: var(--green);
  background: var(--green);
}
.dh-payment-toggle input:checked + .dh-payment-check:after {
  content: "✓";
  color: #fff;
  font-weight: 800;
}
.dh-payment-toggle input:focus-visible + .dh-payment-check {
  outline: 3px solid rgba(55, 123, 145, 0.25);
  outline-offset: 2px;
}
.dh-bank-mask {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.dh-supplier-field {
  position: relative;
}
.dh-field-help {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.dh-supplier-results {
  position: absolute;
  z-index: 20;
  top: calc(100% - 18px);
  left: 0;
  right: 0;
  overflow: hidden;
  border: 1px solid #cbd5d0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(22, 43, 35, 0.15);
}
.dh-supplier-results button,
.dh-supplier-empty {
  width: 100%;
  display: block;
  padding: 11px 13px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
  font: inherit;
}
.dh-supplier-results button {
  cursor: pointer;
}
.dh-supplier-results button:hover,
.dh-supplier-results button:focus {
  background: #f1f6f3;
  outline: 0;
}
.dh-supplier-results button:last-child {
  border-bottom: 0;
}
.dh-supplier-results strong,
.dh-supplier-results small {
  display: block;
}
.dh-supplier-results small,
.dh-supplier-empty {
  color: var(--muted);
  font-size: 12px;
}
.dh-security-note {
  margin: 22px 0 0;
  padding: 12px 14px;
  border-radius: 7px;
  background: #f1f5f3;
  color: var(--muted);
  font-size: 13px;
}
.dh-task-form {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 14px;
  align-items: end;
}
.dh-task-description {
  grid-column: 1 / -1;
}
.dh-task-list {
  display: grid;
  gap: 11px;
}
.dh-task {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 15px;
  border: 1px solid var(--line);
  border-left: 4px solid #aeb9b3;
  border-radius: 8px;
  background: #fff;
}
.dh-task.is-overdue {
  border-left-color: var(--red);
  background: #fff8f7;
}
.dh-task.dh-task-system {
  border-left-color: #d47a16;
  background: #fffaf1;
}
.dh-task-main p {
  margin: 8px 0;
}
.dh-task-main small {
  color: var(--muted);
}
.dh-task-badge {
  display: inline-flex;
  margin-left: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef1ef;
  color: #46544e;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}
.dh-task-badge.urgency-high,
.dh-task-badge.overdue {
  background: #fee4e2;
  color: #a7322d;
}
.dh-task-badge.urgency-medium {
  background: #fff0d2;
  color: #80510a;
}
.dh-task-badge.urgency-low {
  background: #e1f2e9;
  color: #14613f;
}
.dh-task-badge.system {
  background: #e8f1f4;
  color: #285f70;
}
.dh-task-actions {
  display: grid;
  gap: 10px;
  min-width: 270px;
}
.dh-task-actions form {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.dh-task-actions input[type="date"] {
  width: 150px;
  margin: 0;
}
.dh-task-complete {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}
.dh-task-complete input {
  width: auto;
  margin: 0;
}
.dh-task-filter {
  display: flex;
  align-items: end;
  gap: 10px;
  margin-bottom: 18px;
}
.dh-task-filter select {
  min-width: 180px;
}
.dh-task-form select[multiple] {
  min-height: 82px;
}
.dh-task-form label small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}
.dh-task-progress {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}
.dh-task-assignees {
  margin-top: 6px;
}
.dh-task-notes {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}
.dh-task-notes article {
  padding: 12px 14px;
  border-left: 3px solid var(--green);
  border-radius: 4px;
  background: #f6f8f7;
}
.dh-task-notes article small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}
.dh-task-notes article p {
  margin: 8px 0 0;
}
@media (max-width: 1050px) {
  .dh-task-form {
    grid-template-columns: 1fr 1fr;
  }
  .dh-task-description {
    grid-column: 1 / -1;
  }
  .dh-task {
    grid-template-columns: 1fr;
  }
  .dh-task-actions {
    min-width: 0;
  }
  .dh-task-actions form {
    justify-content: flex-start;
  }
}
@media (max-width: 900px) {
  .dh-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .dh-two-col {
    grid-template-columns: 1fr;
  }
  .dh-email-grid {
    grid-template-columns: 1fr;
  }
  .dh-topbar nav {
    display: none;
  }
  .dh-mobile-nav {
    display: flex;
    overflow-x: auto;
    background: #fff;
    border-bottom: 1px solid var(--line);
  }
  .dh-mobile-nav a {
    padding: 12px 20px;
    color: var(--green);
    text-decoration: none;
    font-weight: 700;
  }
  .dh-user span {
    display: none;
  }
}
@media (max-width: 600px) {
  .dh-topbar {
    padding: 0 18px;
  }
  .dh-shell {
    padding: 26px 16px 55px;
  }
  .dh-stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .dh-stat {
    padding: 16px;
  }
  .dh-heading {
    display: block;
  }
  .dh-heading > .dh-button,
  .dh-heading > .dh-badge {
    margin-top: 14px;
  }
  .dh-heading-actions,
  .dh-waiting-banner,
  .dh-handled-banner {
    margin-top: 14px;
  }
  .dh-filters {
    align-items: stretch;
    flex-direction: column;
  }
  .dh-filters input {
    min-width: 0;
  }
  .dh-details {
    grid-template-columns: 1fr;
  }
  .dh-note-form {
    grid-template-columns: 1fr;
  }
  .dh-note-form textarea {
    grid-row: auto;
  }
  .dh-login-card {
    padding: 28px 23px;
  }
  .dh-form-grid {
    grid-template-columns: 1fr;
  }
  .dh-span-2 {
    grid-column: auto;
  }
  .dh-unmatched-list article {
    grid-template-columns: 1fr;
  }
  .dh-unmatched-list form,
  .dh-waiting-banner,
  .dh-handled-banner {
    align-items: stretch;
    flex-direction: column;
  }
  .dh-payment-stats {
    grid-template-columns: 1fr;
  }
  .dh-task-form {
    grid-template-columns: 1fr;
  }
  .dh-task-description {
    grid-column: auto;
  }
  .dh-task-actions form,
  .dh-task-filter {
    align-items: stretch;
    flex-direction: column;
  }
  .dh-task-actions input[type="date"],
  .dh-task-filter select {
    width: 100%;
  }
}
