:root {
  /* amoCRM Tasks, --leads_select_item_active in the saved light theme. */
  --trade-selected: #4c8bf7;
  accent-color: var(--trade-selected);
}
body {
  min-width: 0;
  margin: 0;
  background: #fff;
  color: #363b44;
  font:
    15px/1.4 'PT Sans',
    Arial,
    sans-serif;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
a[href] {
  color: inherit;
  text-decoration: none;
}
[hidden] {
  display: none !important;
}
#app {
  display: flex;
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  flex-direction: column;
}
.boot-message,
.page-error {
  margin: 24px;
}
.page-error h2 {
  font-size: 19px;
}
#app[aria-busy='true'] {
  cursor: progress;
}
.cal-toolbar {
  flex-shrink: 0;
}
.cal-toolbar .cal-toolbar-actions:empty {
  display: none;
}
.cal-search-box .cal-icon {
  flex-shrink: 0;
}
.cf-preset-button:hover {
  color: #363b44;
}
.cf-preset-row.is-active .cf-preset-button,
.period-choice.current,
.trade-tab.selected,
.scenario-step[aria-pressed='true'] {
  color: var(--trade-selected);
}
.actions-wrap {
  position: relative;
}
.trade-menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 5px);
  right: 0;
  width: max-content;
  max-width: min(310px, calc(100vw - 18px));
  padding: 4px 0;
  border: 1px solid #d9dfe5;
  background: #fff;
  box-shadow: 0 3px 12px #26313b12;
}
.menu-item {
  display: block;
  width: 100%;
  color: inherit;
  background: #fff;
  border: 0;
  padding: 10px 14px;
  text-align: left;
}
.menu-item:hover,
.scenario-step:hover {
  background: #f5f5f5;
}
.campaign-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  gap: 10px 22px;
  border-bottom: 1px solid var(--cal-border);
  padding: 14px 23px;
}
.campaign-title h2,
.section-title h2 {
  font-size: 18px;
  line-height: 1.3;
  margin: 0;
}
.campaign-title p,
.section-title p {
  margin: 3px 0 0;
  color: #7b858f;
  font-size: 14px;
}
.period-choices {
  display: inline-flex;
  gap: 0;
  border: 1px solid #e8eaeb;
  border-radius: 4px;
  overflow: hidden;
}
.period-choice {
  border: 0;
  border-right: 1px solid #e8eaeb;
  background: #fff;
  color: inherit;
  padding: 6px 13px;
  min-height: 32px;
}
.period-choice:last-child {
  border-right: 0;
}
.period-choice.current {
  font-weight: 700;
  background: #f5f5f5;
}
.trade-tabs {
  display: flex;
  align-items: stretch;
  flex: none;
  gap: 22px;
  padding: 0 22px;
  border-bottom: 1px solid #d9dfe5;
}
.trade-tab {
  border: 0;
  padding: 11px 4px;
  background: #fff;
  color: #6d7780;
  min-height: 42px;
}
.trade-tab.selected {
  font-weight: 700;
}
.trade-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.team-report {
  background: #f5f5f5;
}
.team-table-owner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.table-scroll {
  overflow-x: auto;
}
.trade-table {
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}
.trade-table th,
.trade-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--cal-border);
}
.trade-table th {
  border-bottom-color: #d9dde2;
  background: #f8f9fa;
  color: #707984;
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
}
.trade-table td {
  height: 51px;
  font-variant-numeric: tabular-nums;
}
.trade-table th:first-child,
.trade-table td:first-child {
  padding-left: 23px;
}
.trade-table tbody tr:has(.row-link):hover {
  background: #f7f9fb;
}
.trade-table .empty {
  text-align: center;
  color: #84909c;
  padding-block: 35px;
}
.row-link,
.text-control {
  border: 0;
  white-space: normal;
  text-align: left;
  background: transparent;
  padding: 0;
  color: #45484d;
}
.row-link:focus-visible,
.text-control:focus-visible,
.trade-tab:focus-visible,
.period-choice:focus-visible,
.cal-filter-panel .cf-preset-button:focus-visible {
  outline: 1px solid #707378;
  outline-offset: -2px;
}
.row-link {
  font-weight: 700;
}
.row-link:hover,
.text-control:hover {
  color: #24282e;
}
.text-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
}
.text-control .cal-icon {
  width: 16px;
  height: 16px;
}
.place {
  font-weight: 700;
}
.status-pill {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid #d5dade;
  border-radius: 3px;
  background: #f6f7f8;
  white-space: nowrap;
  font-size: 13px;
}
.status-pill[data-state='earned'] {
  background: #edf5ef;
  border-color: #c7dece;
  color: #416a4a;
}
.status-pill[data-state='review'] {
  background: #fff4d7;
  border-color: #e6d49c;
  color: #805f25;
}
.owner-crumb {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 23px;
  background: #f9fafb;
  border-bottom: 1px solid var(--cal-border);
}
.compact-card {
  width: 100%;
  max-width: 660px;
  padding: 9px 12px 12px;
  min-width: 0;
}
.compact-head,
.detail-top,
.client-facts,
.bar-line,
.bar-caption,
.shipment-total,
.review-actions,
.settings-footer,
.field-pair,
.journal-item > div {
  display: flex;
  align-items: center;
  gap: 10px;
}
.compact-head {
  justify-content: space-between;
}
.compact-head h1,
.compact-card > h1 {
  font-size: 16px;
  margin: 0;
  overflow-wrap: anywhere;
}
.compact-head .text-control {
  flex: none;
  font-size: 13px;
}
.compact-campaign,
.compact-owner {
  margin: 3px 0;
  font-size: 14px;
  line-height: 1.25;
}
.compact-owner {
  color: #69747e;
}
.compact-owner strong {
  color: #363b44;
  font-weight: 400;
}
.balance {
  margin: 11px 0 2px;
}
.bar-line {
  gap: 12px;
}
.segments {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  min-width: 0;
  flex: 1;
  gap: 3px;
}
.segments i {
  height: 9px;
  background: #e0e5e3;
  border-radius: 2px;
}
.segments i.full {
  background: #58a570;
}
.bar-line b {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 15px;
}
.bar-caption {
  flex-wrap: wrap;
  justify-content: space-between;
  color: #61707a;
  margin-top: 3px;
  gap: 2px 8px;
  font-size: 13px;
}
.bar-caption strong {
  color: #363b44;
  font-weight: 400;
}
.compact-note,
.quiet {
  color: #717d88;
  font-size: 14px;
}
.compact-note {
  margin: 5px 0 0;
}
.detail-top {
  justify-content: space-between;
  border-bottom: 1px solid var(--cal-border);
  padding: 4px 22px;
  min-height: 49px;
  flex: none;
}
.detail-top .cal-toolbar-actions {
  padding: 0;
}
.client-title {
  padding: 15px 23px 12px;
}
.client-title p {
  color: #78838d;
  margin: 0;
}
.client-title h1 {
  margin: 2px 0 5px;
  font-size: 23px;
}
.client-facts {
  flex-wrap: wrap;
  gap: 3px 15px;
  font-size: 14px;
  color: #6c7781;
}
.detail-columns {
  display: grid;
  grid-template-columns: minmax(370px, 1.4fr) minmax(270px, 1fr);
  max-width: 1250px;
  align-items: start;
}
.metric-list {
  margin: 0;
  padding: 12px 22px 18px;
}
.metric-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid var(--cal-border);
  padding: 10px 0;
}
.metric-list dd {
  font-variant-numeric: tabular-nums;
  text-align: right;
  margin: 0;
}
.metric-list > div:nth-child(3) dd,
.metric-list > div:nth-child(5) dd,
.metric-list > div:nth-child(6) dd {
  font-weight: 700;
}
.client-aside {
  padding: 22px;
  border-left: 1px solid var(--cal-border);
  min-width: 0;
}
.client-aside .section-title:not(:first-child) {
  margin-top: 24px;
}
.client-aside .section-title h2 {
  font-size: 16px;
}
.people-list {
  margin: 9px 0;
  padding-left: 0;
  list-style: none;
}
.people-list li {
  margin-top: 4px;
}
.shipment-total {
  justify-content: flex-end;
  flex-wrap: wrap;
  padding: 14px 23px;
  background: #f8f9fa;
}
.shipment-total strong {
  margin-right: auto;
}
.shipment-detail summary {
  cursor: pointer;
}
.doc-cell small {
  display: block;
  color: #707b85;
}
.shipment-detail .trade-table {
  font-size: 13px;
}
.shipment-detail .trade-table td {
  height: 33px;
}
.review-box {
  margin: 15px 0;
  padding: 12px;
  background: #fffbef;
}
.review-actions {
  flex-wrap: wrap;
  margin-top: 8px;
}
.trade-drawer {
  display: flex;
  flex-direction: column;
  background: #fff;
}
.deal-accounting { margin: 18px clamp(12px, 2vw, 24px); }
.deal-accounting ul { list-style: none; padding: 0; margin: 0; }
.deal-accounting li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 8px 0; border-top: 1px solid var(--cal-border); }
.deal-accounting li small { display: block; }
.deal-accounting li > small:empty { display: none; }
.trade-drawer .trade-tabs {
  padding: 0 16px;
  gap: 15px;
}
.trade-drawer .cal-panel-header,
.trade-dialog .cal-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--cal-border);
  flex: none;
}
.trade-drawer .cal-panel-header h2,
.trade-dialog .cal-panel-header h2 {
  font-size: 18px;
  margin: 0;
}
.settings-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 18px 20px;
}
.settings-footer {
  flex: 0 0 auto;
  justify-content: flex-end;
  border-top: 1px solid var(--cal-border);
  padding: 10px 18px;
  min-height: 54px;
}
.settings-footer:empty {
  display: none;
}
.settings-group {
  display: grid;
  gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid var(--cal-border);
}
.settings-group h3 {
  margin: 0;
  font-size: 16px;
}
.field-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #727d88;
  font-size: 14px;
  min-width: 0;
}
.field-pair {
  align-items: flex-start;
}
.field-pair > * {
  flex: 1;
  min-width: 0;
}
.settings-group .cp-input,
.rule-fields .cp-input {
  width: 100%;
}
.override-fields,
.rule-fields {
  display: grid;
  gap: 10px;
}
.override-fields:empty {
  display: none;
}
.rule {
  padding: 13px 0;
  border-bottom: 1px solid var(--cal-border);
}
.rule summary {
  cursor: pointer;
  font-weight: 700;
}
.rule[open] .rule-fields {
  margin-top: 12px;
}
.rule-fields textarea,
.review-box textarea {
  height: auto;
  min-height: 58px;
  resize: vertical;
}
.form-status {
  color: #4b6f53;
  margin: 0 auto 0 0;
}
.form-status.error,
.error {
  color: #a54035;
}
.journal-item {
  border-bottom: 1px solid var(--cal-border);
  padding: 8px 0;
}
.journal-item > div {
  justify-content: space-between;
  gap: 6px;
}
.journal-item p {
  margin: 5px 0;
}
.journal-item time,
.journal-item small {
  color: #75808a;
}
.field-wrap .cal-single,
.filter-options .cf-input {
  width: 100%;
}
.filter-options {
  margin-bottom: 18px;
}
.cf-positions {
  display: flex;
  flex-direction: column;
}
.trade-dialog {
  border: 1px solid #d9dfe5;
  border-radius: 3px;
  padding: 0;
  width: min(440px, calc(100vw - 24px));
  max-height: 90dvh;
  color: inherit;
}
.client-contact-page{max-width:540px;margin:26px auto;padding:0 20px;color:#2e3640}
.client-contact-page h2{margin:0 0 14px;font:700 20px/1.3 "PT Sans",Arial,sans-serif}
.client-contact-form{display:grid;gap:12px;padding:0 0 12px;color:#2e3640}
.trade-dialog .client-contact-form{padding:16px 20px}
.client-contact-form label{display:grid;gap:5px;font:400 15px/1.2 "PT Sans",Arial,sans-serif}
.client-contact-form input{width:100%;height:36px}
.client-contact-form input:focus{outline:none;box-shadow:none;background:#f7f7f8}
.client-contact-form button:focus-visible{outline:none;box-shadow:none;text-decoration:underline}
.client-contact-form p{margin:0;color:#596169;font:400 14px/1.4 "PT Sans",Arial,sans-serif}
.client-contact-actions{display:flex;align-items:center;gap:12px}
.trade-dialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
}
.dialog-content {
  padding: 16px;
  display: grid;
  gap: 8px;
}
.dialog-content > p {
  margin: 0;
}
.scenario-step {
  background: white;
  color: inherit;
  border: 1px solid #d9dfe5;
  border-radius: 3px;
  text-align: left;
  padding: 9px 12px;
}
.bot-message {
  padding: 14px;
  background: #f5f8f6;
  border-radius: 4px;
}
.bot-message p {
  margin: 8px 0;
}
@media (max-width: 720px) {
  .detail-columns {
    display: flex;
    flex-direction: column;
  }
  .metric-list,
  .client-aside {
    width: 100%;
  }
  .client-aside {
    border: 0;
    border-top: 1px solid var(--cal-border);
  }
  .campaign-bar {
    padding: 10px 14px;
  }
  .trade-tabs {
    padding: 0 14px;
  }
  .trade-table td,
  .trade-table th {
    padding: 9px 10px;
  }
  .trade-table th:first-child,
  .trade-table td:first-child {
    padding-left: 14px;
  }
  .client-title,
  .metric-list,
  .client-aside,
  .detail-top {
    padding-inline: 14px;
  }
}
@media (max-width: 500px) {
  .cal-filter-panel.is-compact {
    display: flex;
    flex-direction: column;
    overflow: auto;
    height: auto;
    max-height: 75dvh;
  }
  .cal-filter-panel.is-compact .cf-sidebar,
  .cal-filter-panel.is-compact .cf-conditions,
  .cal-filter-panel.is-compact .cf-positions {
    overflow: visible;
  }
  .cal-filter-panel.is-compact .cf-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 0 8px;
  }
  .cal-filter-panel.is-compact .cf-preset-button {
    white-space: normal;
  }
  .cal-filter-panel.is-compact .cf-footer {
    position: sticky;
    bottom: 0;
  }
  .trade-drawer .trade-tabs {
    gap: 8px;
  }
  .bar-line {
    gap: 7px;
  }
}

.trade-table tr.is-clickable {
  cursor: pointer;
}
.progress-mapping {
  display: grid;
  gap: 6px;
  justify-items: start;
}
.progress-mapping .field-wrap {
  width: 100%;
}
.bot-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#app.deal-card-embedded {
  height: auto;
  display: flow-root;
}
.deal-card-actions {
  display: flex;
  gap: 12px;
  padding: 0 12px 8px;
}
