:root {
  --ink: #263e32;
  --muted: #6f7d72;
  --paper: #fffefa;
  --bg: #f4f5ef;
  --line: #dde3d9;
  --green: #31513e;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    14px/1.5 system-ui,
    -apple-system,
    sans-serif;
}
header {
  height: 72px;
  padding: 0 4vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
header > div {
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand {
  font:
    29px Georgia,
    serif;
  color: var(--ink);
  text-decoration: none;
}
.brand span {
  font: 10px system-ui;
  letter-spacing: 2px;
  margin-left: 8px;
}
#mode {
  font-size: 12px;
  color: var(--muted);
}
main {
  max-width: 1600px;
  margin: auto;
  padding: 32px 40px 120px;
}
.title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  margin: 0 0 8px;
}
h1 {
  font:
    32px Georgia,
    serif;
  margin: 0;
}
h2 {
  font:
    25px Georgia,
    serif;
  margin: 0 0 16px;
}
.muted {
  color: var(--muted);
}
button,
select,
input,
textarea {
  font: inherit;
  color: inherit;
}
button {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  background: var(--paper);
}
button:hover {
  background: #eaf0e5;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.primary:hover {
  background: #253f2f;
}
.link {
  border: 0;
  background: none;
  padding: 6px 0;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 12px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
}
select,
input[type="datetime-local"] {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 10px;
  border-radius: 6px;
  font-size: 14px;
}
select {
  min-width: 220px;
}
.tools {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin-top: 24px;
}
.status-filter {
  margin-left: auto;
}
#notice {
  min-height: 24px;
  margin: 16px 0;
  color: #7b5a29;
}
.table-heading {
  display: flex;
  justify-content: space-between;
  margin: 12px 0;
  font-size: 12px;
}
.sheet {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 950px;
}
th {
  text-align: left;
  background: #e9eee4;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 13px 16px;
}
td {
  vertical-align: top;
  padding: 18px 16px;
  border-top: 1px solid var(--line);
}
tr.selected {
  background: #f0f5e9;
}
.check {
  width: 48px;
}
.contact-col {
  width: 205px;
}
.last-col {
  width: 135px;
}
.state-col {
  width: 155px;
}
input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--green);
  cursor: pointer;
}
.contact-name {
  display: block;
  font-weight: 600;
}
.company,
.stage-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.stage-label {
  text-transform: capitalize;
}
.row-actions {
  display: flex;
  gap: 14px;
  margin-top: 12px;
}
.subject,
.message {
  display: block;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 7px;
  font-size: 13px;
}
.subject {
  font-weight: 600;
  margin-top: -7px;
}
.message {
  resize: vertical;
  line-height: 1.65;
  min-height: 156px;
  height: 174px;
  overflow: auto;
}
.subject:hover,
.message:hover {
  border-color: var(--line);
}
.subject:focus,
.message:focus {
  outline: 2px solid #92aa83;
  background: white;
}
button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid #92aa83;
  outline-offset: 2px;
}
.badge {
  display: inline-block;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  background: #edf0e7;
  white-space: nowrap;
}
.badge.sent {
  background: #dcebdc;
}
.badge.scheduled {
  background: #e2eaf0;
}
.badge.attention {
  background: #f5ead7;
}
.state-note {
  font-size: 11px;
  color: var(--muted);
  margin: 8px 0;
}
.last-date {
  font-size: 12px;
}
.pagination {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  font-size: 12px;
}
.pagination button {
  padding: 6px 12px;
}
.batch-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 4vw;
  background: var(--paper);
  border-top: 1px solid var(--line);
  box-shadow: 0 -5px 20px #263e3206;
  z-index: 5;
}
.batch-bar > div {
  display: flex;
  gap: 12px;
  align-items: center;
}
#destination {
  color: var(--muted);
  font-size: 12px;
  margin-left: 8px;
}
dialog {
  max-width: 650px;
  width: 90%;
  max-height: 85vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px;
  background: var(--paper);
  color: var(--ink);
}
dialog::backdrop {
  background: #1f332965;
}
.dialog-top,
.dialog-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.dialog-actions {
  justify-content: flex-end;
  margin-top: 22px;
}
#context-body pre {
  white-space: pre-wrap;
  font: inherit;
  font-size: 13px;
  padding: 14px;
  background: var(--bg);
  border-radius: 6px;
}
#context-body small {
  color: var(--muted);
}
#time-label {
  margin-top: 18px;
}
#batch-error {
  color: #a4472c;
}
#empty {
  text-align: center;
  padding: 50px;
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
@media (max-width: 850px) {
  main {
    padding: 24px 16px 130px;
  }
  .tools {
    flex-wrap: wrap;
  }
  .status-filter {
    margin-left: 0;
  }
  header {
    padding: 12px 16px;
    height: auto;
    gap: 12px;
  }
  #mode {
    max-width: 180px;
    display: block;
  }
  .batch-bar {
    padding: 12px 16px;
  }
  .batch-bar > div {
    flex-wrap: wrap;
  }
  #destination {
    display: none;
  }
  h1 {
    font-size: 27px;
  }
}
/* Keep the working table, rather than the heading, dominant on a laptop. */
header {
  height: 56px;
}
main {
  padding-top: 20px;
}
.title h1 {
  font-size: 28px;
}
.title .muted {
  margin: 7px 0;
}
.eyebrow {
  margin-bottom: 5px;
}
.tools {
  margin-top: 14px;
}
#notice {
  min-height: 18px;
  margin: 8px 0;
  font-size: 12px;
}
.table-heading {
  margin: 8px 0;
}
td {
  padding: 12px 16px;
}
.message {
  height: 148px;
  min-height: 130px;
}
.row-actions {
  margin-top: 8px;
}

.journey-summary {
  background: #edf1e8;
  padding: 16px;
  border-radius: 8px;
  line-height: 1.6;
}
.touchpoint {
  border-left: 2px solid #b7c7b9;
  padding: 0 0 20px 18px;
  margin: 0 0 0 5px;
}
.touchpoint p {
  line-height: 1.55;
  white-space: pre-wrap;
  margin: 8px 0;
}
.touchpoint strong {
  font-size: 14px;
}
#context-body > a {
  color: #315745;
}

.context-stats {
  display: flex;
  gap: 35px;
  margin: 22px 0 12px;
  padding: 18px;
  background: #edf1e8;
  border-radius: 8px;
}
.context-stats strong {
  display: block;
  font-size: 26px;
}
.context-stats span {
  display: block;
  font-size: 13px;
  margin-top: 4px;
}
.hubspot-link {
  display: inline-block;
  margin: 6px 0;
}
.discussion-points {
  padding-left: 20px;
  line-height: 1.6;
}
.discussion-points li {
  margin-bottom: 12px;
}

.workspace-nav {
  display: flex;
  gap: 8px;
  margin: 0 0 25px;
  border-bottom: 1px solid #d8dfd4;
  padding-bottom: 12px;
}
.workspace-nav a {
  padding: 10px 22px;
  text-decoration: none;
  color: #385448;
  border-radius: 7px;
}
.workspace-nav a.current {
  background: #dfe8d8;
  font-weight: 700;
}
#workspace-sender {
  margin: 0 0 20px;
}

.order-col {
  width: 150px;
}
.partner-ltv {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-top: 10px;
}
.order-amount {
  display: block;
  font-size: 13px;
}
.partners-workspace table {
  min-width: 1150px;
}
.partners-workspace .contact-col {
  width: 225px;
}
.partners-workspace .last-col {
  width: 125px;
}

.sender-confirmation {
  padding: 16px;
  margin: 20px 0;
  border: 1px solid #91a396;
  border-radius: 8px;
  background: #f0f4ed;
}
.sender-confirmation-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.sender-confirmation-check input {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.sort-heading {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.sort-heading span {
  font-size: 16px;
}
.sort-heading:focus-visible {
  outline: 2px solid #41634f;
  outline-offset: 4px;
}
.ltv-col {
  width: 130px;
}
.partners-workspace table {
  min-width: 1280px;
}

#messaging-dialog {
  max-width: 900px;
}
#messaging-dialog label {
  display: block;
  margin: 16px 0;
}
#messaging-dialog textarea,
#messaging-dialog input {
  display: block;
  width: 100%;
  margin-top: 8px;
  box-sizing: border-box;
}
#messaging-dialog textarea {
  padding: 12px;
  line-height: 1.5;
  resize: vertical;
}

#queue-panel {
  margin: 16px 0 24px;
  padding: 16px 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}
#queue-panel h3 {
  margin: 0 0 12px;
}
#queue-panel .dialog-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.queue-progress {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 14px;
}
