/* Dashboard uses Balance's register tokens without changing other modules. */
#leadDashboardPanel {
  container: lead-dashboard / inline-size;
  min-width: 0;
  padding: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 18px;
}
#leadDashboardPanel .lead-dashboard-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 8px 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
#leadDashboardPanel .lead-dashboard-toolbar h2 {
  margin: 0 auto 0 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  letter-spacing: 0;
}
#leadDashboardPanel :is(input, button) {
  box-sizing: border-box;
  height: 32px;
  min-height: 32px;
  border-radius: 4px;
  padding: 0 10px;
  font-family: inherit;
  font-size: 13px;
  line-height: 18px;
  letter-spacing: 0;
  box-shadow: none;
}
#leadDashboardPanel .lead-dashboard-month-control { flex: 0 0 124px; }
#leadDashboardPanel .lead-dashboard-month-control .month-button {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
}
#leadDashboardPanel .lead-dashboard-month-control .period-menu {
  left: 0;
  right: auto;
  width: 160px;
  max-height: min(420px, calc(100dvh - 160px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  box-shadow: none;
}
#leadDashboardPanel .lead-dashboard-month-control .period-menu[hidden] { display: none !important; }
#leadDashboardPanel .lead-dashboard-month-year {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  text-align: center;
  gap: 4px;
}
#leadDashboardPanel .lead-dashboard-month-year button { display: grid; place-items: center; width: 32px; margin: 0; padding: 0; }
#leadDashboardPanel [data-lead-month-year="-1"] .dropdown-chevron-icon { transform: rotate(90deg); }
#leadDashboardPanel [data-lead-month-year="1"] .dropdown-chevron-icon { transform: rotate(-90deg); }
#leadDashboardPanel .lead-dashboard-month-control .period-option { width: 100%; margin: 0; }
#leadDashboardPanel .lead-dashboard-month-control .period-option.is-active { background: var(--brand-selected); }
#leadDashboardPanel .lead-dashboard-month-control button:not(:disabled):hover { background: var(--brand-hover); }
#leadDashboardPanel .lead-dashboard-month-control button:disabled { background: #f5f6f7; color: #929ba2; cursor: default; }
#leadDashboardPanel .lead-dashboard-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  padding: 0;
}
#leadDashboardPanel .lead-dashboard-refresh svg { width: 16px; height: 16px; }
#leadDashboardPanel .lead-dashboard-updated { color: var(--muted); min-width: 108px; }
#leadDashboardPanel .lead-dashboard-error:empty { display: none; }
#leadDashboardPanel .lead-dashboard-error { color: #b42318; margin: 0 0 8px; padding: 8px 12px; }
#leadDashboardPanel .lead-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  height: var(--lead-dashboard-grid-height, calc(100dvh - 160px));
  min-height: 320px;
}
#leadDashboardPanel .lead-dashboard-module {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  box-sizing: border-box;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--table-header-line, var(--line));
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
}
html body .app #clients #leadDashboardPanel .lead-dashboard-module h3 {
  display: flex;
  align-items: center;
  min-height: 32px;
  margin: 0;
  padding: 6px 10px;
  border-bottom: 1px solid var(--table-header-line);
  border-radius: 3px 3px 0 0;
  background: var(--table-header-fill, var(--brand-hover));
  color: var(--table-header-text, var(--text)) !important;
  font-size: 13px;
  font-weight: 600 !important;
  line-height: 18px;
  letter-spacing: 0;
}
#leadDashboardPanel .lead-dashboard-scroll {
  max-width: 100%;
  border-radius: 0 0 3px 3px;
}
#leadDashboardPanel :is(.lead-dashboard-scroll, .lead-dashboard-recommendations, .lead-dashboard-alerts) {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
#leadDashboardPanel .lead-dashboard-table {
  width: 100% !important;
  min-width: 320px !important;
  max-width: none !important;
  border-collapse: collapse;
  table-layout: auto !important;
  font-size: var(--table-font-size, 13px);
  line-height: 18px;
  letter-spacing: 0;
}
html body .app #clients #leadDashboardPanel .lead-dashboard-table :is(th, td) {
  height: var(--table-row-height, 29px) !important;
  min-height: var(--table-row-height, 29px) !important;
  padding: 5px var(--table-cell-x, 10px) !important;
  border: 0;
  border-bottom: 1px solid var(--table-row-line) !important;
  background: #fff !important;
  color: var(--text) !important;
  font-size: 13px !important;
  line-height: 18px !important;
  text-overflow: clip !important;
  vertical-align: middle;
}
html body .app #clients #leadDashboardPanel .lead-dashboard-table thead th {
  border-bottom-color: var(--table-header-line) !important;
  background: var(--table-header-fill) !important;
  color: var(--table-header-text) !important;
  font-weight: 600 !important;
  white-space: normal !important;
}
html body .app #clients #leadDashboardPanel .lead-dashboard-table thead th { white-space: nowrap !important; }
html body .app #clients #leadDashboardPanel .lead-dashboard-table tbody th {
  text-align: left !important;
  font-weight: 400 !important;
  white-space: normal !important;
}
#leadDashboardPanel .lead-dashboard-table th:first-child { text-align: left; width: 36%; }
html body .app #clients #leadDashboardPanel .lead-dashboard-table .num {
  text-align: right !important;
  font-variant-numeric: tabular-nums lining-nums !important;
}
#leadDashboardPanel .lead-dashboard-table td { white-space: nowrap !important; }
html body .app #clients #leadDashboardPanel .lead-dashboard-table tbody tr:last-child :is(th, td) { border-bottom-color: transparent !important; }
html body .app #clients #leadDashboardPanel .lead-dashboard-table tbody tr:hover > :is(th, td) { background: var(--brand-hover) !important; }
#leadDashboardPanel :is(.lead-dashboard-recommendations, .lead-dashboard-alerts) { margin: 0; padding: 0 10px; list-style: none; }
#leadDashboardPanel :is(.lead-dashboard-recommendations, .lead-dashboard-alerts) li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--table-row-line);
}
#leadDashboardPanel :is(.lead-dashboard-recommendations, .lead-dashboard-alerts) li:last-child { border-bottom: 0; }
#leadDashboardPanel .lead-dashboard-recommendations li { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
#leadDashboardPanel :is(.lead-dashboard-recommendations, .lead-dashboard-alerts) li > div { flex: 1 1 0; min-width: 0; }
#leadDashboardPanel :is(.lead-dashboard-recommendations, .lead-dashboard-alerts) :is(strong, span) { display: block; overflow-wrap: anywhere; }
#leadDashboardPanel :is(.lead-dashboard-recommendations, .lead-dashboard-alerts) strong { color: var(--text); font-weight: 600; }
#leadDashboardPanel :is(.lead-dashboard-recommendations, .lead-dashboard-alerts) span { color: var(--muted); margin-top: 4px; }
#leadDashboardPanel .lead-dashboard-alerts .lead-dashboard-agenda-day { border: 0; padding: 12px 0 4px; }
#leadDashboardPanel .lead-dashboard-alerts .lead-dashboard-agenda-day:first-child { padding-top: 8px; }
#leadDashboardPanel .lead-dashboard-agenda-day h4 { margin: 0; color: var(--text); font: 600 13px/18px var(--font-main); font-weight: 600 !important; }
#leadDashboardPanel .lead-dashboard-alerts .lead-dashboard-agenda-event { padding: 4px 0; flex-wrap: wrap; gap: 4px 8px; }
#leadDashboardPanel .lead-dashboard-agenda-event > .lead-dashboard-agenda-detail { flex: 1 1 180px; }
#leadDashboardPanel .lead-dashboard-agenda-event > .lead-dashboard-agenda-tools {
  display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 4px; max-width: 100%;
}
#leadDashboardPanel .lead-dashboard-agenda-tools button { margin: 0; white-space: nowrap; }
#leadDashboardPanel .lead-dashboard-agenda-tools button:disabled {
  background: #f5f6f7; color: #929ba2; cursor: default;
}
html body .app #leadDashboardPanel .lead-dashboard-agenda-event .lead-dashboard-overdue {
  display: block; margin: 0 0 4px; color: #b42318 !important; font-weight: 600;
}
html body .app #leadDashboardPanel .lead-dashboard-action-error { color: #b42318 !important; }
html body .app #leadDashboardPanel :is(.lead-dashboard-agenda-link, .lead-dashboard-agenda-text) {
  display: block;
  width: 100%;
  min-width: 0;
  height: auto !important;
  min-height: 32px;
  margin: 0;
  padding: 7px 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--text) !important;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  font: 400 13px/18px var(--font-main);
  box-shadow: none !important;
}
html body .app #leadDashboardPanel .lead-dashboard-agenda-link:hover { background: var(--brand-hover) !important; }
#leadDashboardPanel .lead-dashboard-agenda-event span { display: inline; margin: 0; color: var(--text); }
#leadDashboardPanel .lead-dashboard-agenda-event .lead-dashboard-agenda-action { display: inline-block; }
#leadDashboardPanel .lead-dashboard-agenda-link:focus-visible { outline-offset: -2px; }
#leadDashboardPanel [data-lead-upcoming-retry] { display: block; margin-top: 8px; }
#leadDashboardPanel .lead-dashboard-recommendations button { white-space: nowrap; }
#leadDashboardPanel .lead-dashboard-alerts .lead-dashboard-alert-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 2px 8px;
}
#leadDashboardPanel .lead-dashboard-alert-contact {
  grid-column: 2;
  justify-self: end;
  align-self: end;
  margin: 0;
  white-space: nowrap;
}
#leadDashboardPanel .lead-dashboard-alert-entry time {
  font-variant-numeric: tabular-nums; font-size: 12px; line-height: 18px;
  text-align: right; white-space: nowrap; color: var(--muted);
}
#leadDashboardPanel .lead-dashboard-alert-event { grid-column: 1; }
#leadDashboardPanel .lead-dashboard-alert-event span { margin: 0; }
html body .app #leadDashboardPanel .lead-dashboard-alert-kind { color: #b42318 !important; }
#leadDashboardPanel .lead-dashboard-alert-status { flex-wrap: wrap; }
#leadDashboardPanel :is(input, button, [tabindex]):focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }
#leadDashboardPanel :is(.lead-dashboard-scroll, .lead-dashboard-recommendations, .lead-dashboard-alerts):focus-visible { outline-offset: -2px; }
@container lead-dashboard (max-width: 1000px) {
  #leadDashboardPanel .lead-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
  }
}
@container lead-dashboard (max-width: 680px) {
  #leadDashboardPanel .lead-dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-auto-rows: 320px;
    height: auto;
    min-height: 0;
  }
}
@container lead-dashboard (max-width: 480px) {
  #leadDashboardPanel .lead-dashboard-module { --table-cell-x: 8px; }
  #leadDashboardPanel .lead-dashboard-toolbar { gap: 4px 8px; }
  #leadDashboardPanel .lead-dashboard-toolbar h2 { flex-basis: 100%; margin-bottom: 4px; }
  #leadDashboardPanel .lead-dashboard-updated { flex-basis: 100%; }
}
.lead-dashboard-event-dialog {
  box-sizing: border-box;
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  margin: auto;
  padding: 16px;
  border: 1px solid var(--line-strong, #dde3e6);
  border-radius: 4px;
  background: #fff;
  color: var(--text, #202628);
  box-shadow: none;
  font: 400 13px/18px var(--font-main);
}
.lead-dashboard-event-dialog::backdrop { background: rgb(32 38 40 / 25%); }
.lead-dashboard-event-dialog form { display: grid; gap: 8px; margin: 0; }
.lead-dashboard-event-dialog h2 { margin: 0; font-size: 16px; line-height: 22px; letter-spacing: 0; }
.lead-dashboard-event-dialog p { margin: 0 0 8px; overflow-wrap: anywhere; }
.lead-dashboard-event-dialog label { display: block; margin: 0; font-size: 13px; line-height: 18px; }
.lead-dashboard-event-dialog :is(input, button) {
  box-sizing: border-box; height: 32px; min-height: 32px; margin: 0;
  padding: 0 10px; border: 1px solid var(--line-strong, #dde3e6); border-radius: 4px;
  background: #fff; color: var(--text, #202628); box-shadow: none;
  font: 400 13px/18px var(--font-main); letter-spacing: 0;
}
.lead-dashboard-event-dialog input { width: 100%; min-width: 0; max-width: 100%; }
.lead-dashboard-event-dialog footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
html body dialog#leadDashboardEventDialog button { background: #fff !important; border-color: #dde3e6 !important; color: var(--text, #202628) !important; }
html body dialog#leadDashboardEventDialog button:not(:disabled):hover { background: var(--brand-hover, #f1faf7) !important; }
html body dialog#leadDashboardEventDialog .lead-dashboard-event-save:not(:disabled) { background: var(--brand-primary, #008574) !important; border-color: var(--brand-primary, #008574) !important; color: #fff !important; }
html body dialog#leadDashboardEventDialog .lead-dashboard-event-save:not(:disabled):hover { background: var(--brand-primary-hover, #066d67) !important; }
html body dialog#leadDashboardEventDialog :is(input, button):disabled { background: #f5f6f7 !important; color: #929ba2 !important; cursor: default; }
.lead-dashboard-event-dialog :is(input, button):focus-visible { outline: 2px solid var(--brand-primary, #008574); outline-offset: 2px; }
html body dialog#leadDashboardEventDialog .lead-dashboard-event-error { color: #b42318 !important; }
.lead-dashboard-event-error:empty { display: none; }
