/* ig-outreach.css — "Customers to message today".
 *
 * The accent is the platform's lime in BOTH modes, at the owner's request.
 * Lime on white cannot carry text, so in light mode it is a FILL (buttons,
 * the chosen chip) with dark ink on it, and the text accent is its own dark
 * olive. In dark mode the lime is both.
 */
[data-crm-outreach-host] { position: relative; }

.crm-out {
  --out-ink: #1d1b1c;
  --out-muted: #55606c;
  --out-line: #e8ebe4;
  --out-card: #ffffff;
  --out-soft: #f6f7f3;
  --out-lime: #d4fb08;
  --out-accent: #5b6b00;
  --out-on-lime: #111111;
  --out-warn: var(--crm-alert-ink, #c8243b);
  --out-ok: #1f7a3a;

  position: absolute;
  inset: 0;
  z-index: 60;
  overflow: auto;
  padding: 22px 24px 30px;
  background: var(--out-soft);
  color: var(--out-ink);
  font-size: 13px;
  text-align: start;
}

:root.dark .crm-out, .dark .crm-out, [data-theme="dark"] .crm-out {
  --out-ink: #e8eaed;
  --out-muted: #9aa3af;
  --out-line: #2c3138;
  --out-card: #1b1e23;
  --out-soft: #15181c;
  --out-accent: #d4fb08;
  --out-warn: var(--crm-alert-ink, #c8243b);
  --out-ok: #6ee7a0;
}

.crm-out * { box-sizing: border-box; }
.crm-out button, .crm-out a, .crm-out input, .crm-out select, .crm-out textarea { font: inherit; }

.crm-out__head { margin-bottom: 14px; }
.crm-out__title { margin: 0 0 4px; font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
.crm-out__sub { margin: 0; max-width: 82ch; font-size: 13px; line-height: 1.7; color: var(--out-muted); }

.crm-out__tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.crm-out__tile { padding: 11px 13px; border: 1px solid var(--out-line); border-radius: 8px; background: var(--out-card); }
.crm-out__v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.crm-out__l { font-size: 12px; color: var(--out-muted); margin-top: 3px; }

.crm-out__bar {
  display: flex; flex-wrap: wrap; gap: 7px; align-items: center;
  padding: 9px 11px; margin-bottom: 10px;
  border: 1px solid var(--out-line); border-radius: 8px; background: var(--out-card);
}
.crm-out .crm-out__chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; margin: 0; border: 1px solid var(--out-line); border-radius: 999px;
  background: transparent; color: var(--out-muted); font-size: 12.5px; cursor: pointer; white-space: nowrap;
}
.crm-out .crm-out__chip b { font-weight: 700; font-variant-numeric: tabular-nums; }
.crm-out .crm-out__chip:hover { border-color: var(--out-accent); color: var(--out-accent); }
.crm-out .crm-out__chip.is-on {
  border-color: color-mix(in srgb, var(--out-lime) 80%, #000);
  background: var(--out-lime); color: var(--out-on-lime); font-weight: 600;
}
.crm-out__sp { flex: 1 1 auto; }

/* The dashboard stretches every `input[type]` through a selector with a dozen
   :not() clauses; `.reset-base` is that selector's own escape hatch. */
.crm-out .crm-out__in {
  width: auto; flex: 0 0 auto; height: 32px; margin: 0; padding: 4px 9px;
  border: 1px solid var(--out-line); border-radius: 8px;
  background: var(--out-card); color: var(--out-ink); font-size: 12.5px;
}
.crm-out .crm-out__btn {
  height: 32px; padding: 0 14px; margin: 0; border: 1px solid var(--out-line); border-radius: 8px;
  background: var(--out-card); color: var(--out-ink); font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.crm-out .crm-out__btn:hover { border-color: var(--out-accent); color: var(--out-accent); }
.crm-out .crm-out__file { display: none; }

.crm-out__offer {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px;
  padding: 9px 11px; border: 1px dashed var(--out-line); border-radius: 8px; background: var(--out-card);
}
.crm-out__lbl { font-size: 12.5px; font-weight: 600; }
.crm-out .crm-out__offerin { flex: 1 1 260px; max-width: 460px; }
.crm-out__hint { font-size: 11.5px; color: var(--out-muted); }

.crm-out__note {
  margin-bottom: 10px; padding: 8px 12px; border-radius: 8px; font-size: 12.5px; line-height: 1.6;
  border: 1px solid color-mix(in srgb, var(--out-lime) 70%, var(--out-line));
  background: color-mix(in srgb, var(--out-lime) 12%, var(--out-card));
}
.crm-out__note.is-warn { border-color: var(--crm-alert-line, #f26b7b); background: var(--crm-alert-bg, #fff1f2); color: var(--crm-alert-ink, #c8243b); }

.crm-out__list { display: grid; gap: 8px; }
.crm-out__row {
  display: grid; grid-template-columns: minmax(200px, 240px) minmax(0, 1fr) 180px; gap: 14px; align-items: start;
  padding: 12px 14px; border: 1px solid var(--out-line); border-radius: 8px; background: var(--out-card);
}
.crm-out__row.is-done { opacity: .6; }
.crm-out__who { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.crm-out__av {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; color: #fff; font-weight: 700;
  background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af);
}
.crm-out__av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.crm-out__id { min-width: 0; }
.crm-out__nm { font-size: 13.5px; font-weight: 700; unicode-bidi: plaintext; overflow-wrap: anywhere; }
.crm-out__un { font-size: 12px; color: var(--out-muted); direction: ltr; unicode-bidi: plaintext; }
.crm-out__why {
  display: inline-block; margin-top: 6px; padding: 2px 9px; border-radius: 999px;
  border: 1px solid var(--out-line); font-size: 11px; color: var(--out-muted);
}
.crm-out__why.is-warn { border-color: var(--out-warn); color: var(--out-warn); }
.crm-out__why.is-new { border-color: var(--out-accent); color: var(--out-accent); }

.crm-out__mid { min-width: 0; }
.crm-out .crm-out__msg {
  display: block; width: 100%; min-height: 70px; margin: 0; resize: vertical;
  padding: 8px 10px; border: 1px solid var(--out-line); border-radius: 8px;
  background: var(--out-soft); color: var(--out-ink); font-size: 13px; line-height: 1.7;
  unicode-bidi: plaintext;
}
.crm-out .crm-out__msg:focus { outline: none; border-color: var(--out-accent); }
.crm-out .crm-out__msg:disabled { opacity: .75; }
.crm-out__mt { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 5px; font-size: 11.5px; color: var(--out-muted); }
.crm-out .crm-out__tx {
  padding: 0; margin: 0; border: 0; background: none; color: var(--out-accent);
  font-size: 11.5px; font-weight: 600; cursor: pointer; text-decoration: none;
}
.crm-out .crm-out__tx:hover { text-decoration: underline; }
.crm-out .crm-out__tx:disabled { opacity: .5; cursor: default; }

.crm-out__act { display: flex; flex-direction: column; gap: 6px; }
.crm-out .crm-out__go {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; margin: 0; border: 0; border-radius: 999px;
  background: var(--out-lime); color: var(--out-on-lime);
  font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.crm-out .crm-out__go:hover { filter: brightness(.95); }
.crm-out .crm-out__go:disabled { opacity: .5; cursor: default; }
.crm-out .crm-out__mk {
  height: 30px; margin: 0; border: 1px solid var(--out-line); border-radius: 999px;
  background: transparent; color: var(--out-muted); font-size: 12px; cursor: pointer;
}
.crm-out .crm-out__mk:hover { border-color: var(--out-accent); color: var(--out-accent); }
.crm-out .crm-out__mk.is-ask { border-color: var(--out-accent); color: var(--out-accent); font-weight: 700; }
.crm-out .crm-out__link {
  font-size: 11px; color: var(--out-muted); direction: ltr; text-align: center;
  word-break: break-all; text-decoration: none;
}
.crm-out .crm-out__link:hover { color: var(--out-accent); }
.crm-out__sent { text-align: center; color: var(--out-ok); font-weight: 700; font-size: 12.5px; padding: 6px 0; }

.crm-out__flow {
  position: sticky; bottom: 0; z-index: 2; margin-top: 14px;
  display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center;
  padding: 11px 16px; border-radius: 8px;
  background: var(--out-ink); color: var(--out-card);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .18);
}
.crm-out__flow b { font-weight: 700; }
.crm-out__flowwho { opacity: .75; unicode-bidi: plaintext; }

.crm-out__empty {
  padding: 22px; border: 1px dashed var(--out-line); border-radius: 8px;
  background: var(--out-card); color: var(--out-muted); line-height: 1.7; text-align: center;
}
.crm-out__dim { font-size: 12.5px; color: var(--out-muted); padding: 6px 0; }

.crm-out__toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 9999;
  padding: 10px 16px; border-radius: 8px; background: #111; color: #fff;
  font-size: 13px; box-shadow: 0 8px 30px rgba(0, 0, 0, .25);
}

@media (max-width: 860px) {
  .crm-out { padding: 16px 16px 24px; }
  .crm-out__row { grid-template-columns: 1fr; }
}

/* ===================================================================
 * THE OWNER'S DESIGN (2026-09-20): a header card with the Instagram
 * mark and two buttons, tiles with an icon each, bigger rows, and the
 * Captain button beside "Write another". Lime stays the accent.
 * ================================================================= */
.crm-out { padding: 20px 22px 30px; font-size: 14px; }
.crm-out [class^="fi-rr-"], .crm-out [class*=" fi-rr-"] { line-height: 1; display: inline-flex; }

/* ---- header card */
.crm-out__head {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding: 16px 18px; margin-bottom: 18px;
  border: 1px solid var(--out-line); border-radius: 8px; background: var(--out-card);
}
.crm-out__headic {
  flex: none; width: 64px; height: 64px; border-radius: 8px; display: grid; place-items: center;
  background: #f7e8ff; color: #a636cf;
}
.dark .crm-out__headic { background: rgba(212, 251, 8, .1); color: #d4fb08; }
.crm-out__headtext { flex: 1; min-width: 220px; }
.crm-out__title { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.crm-out__subtitle { margin: 5px 0 0; font-size: 15px; line-height: 1.5; color: var(--out-muted); max-width: 80ch; }
.crm-out .crm-out__hbtn {
  flex: none; height: 46px; padding: 0 20px; margin: 0;
  border: 1px solid var(--out-line); border-radius: 8px; background: var(--out-card); color: var(--out-ink);
  font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.crm-out .crm-out__hbtn:hover { border-color: var(--out-accent); }
.crm-out .crm-out__hbtn.is-lime { border-color: var(--out-lime); background: var(--out-lime); color: var(--out-on-lime); font-weight: 700; }
.crm-out .crm-out__hbtn.is-lime:hover { filter: brightness(.95); }
.crm-out .crm-out__hbtn:disabled { opacity: .6; cursor: default; }

/* ---- tiles */
.crm-out__tiles { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-bottom: 18px; }
.crm-out__tile { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 8px; }
.crm-out__tileic { flex: none; width: 54px; height: 54px; border-radius: 8px; display: grid; place-items: center; font-size: 22px; }
.crm-out__tileic.is-blue { background: var(--crm-tint); color: var(--crm-ink); }
.crm-out__tileic.is-green { background: #dcfce7; color: #15803d; }
.crm-out__tileic.is-purple { background: var(--crm-tint); color: var(--crm-ink); }
.crm-out__tileic.is-amber { background: #ffedd5; color: #c2610c; }
.dark .crm-out__tileic.is-blue { background: rgba(212, 251, 8, .1); color: #d4fb08; }
.dark .crm-out__tileic.is-green { background: rgba(74, 222, 128, .12); color: #4ade80; }
.dark .crm-out__tileic.is-purple { background: rgba(196, 181, 253, .14); color: #c4b5fd; }
.dark .crm-out__tileic.is-amber { background: rgba(251, 191, 36, .14); color: #fbbf24; }
.crm-out__tilewords { min-width: 0; }
.crm-out__tile .crm-out__l { margin: 0; font-size: 13.5px; }
.crm-out__tile .crm-out__v { font-size: 28px; font-weight: 800; margin: 2px 0; }
.crm-out__sub { font-size: 13px; color: var(--out-muted); }

/* ---- filter bar and the offer line */
.crm-out__bar { gap: 10px; padding: 12px 14px; margin-bottom: 14px; border-radius: 8px; }
.crm-out .crm-out__chip { height: 40px; padding: 0 18px; font-size: 14.5px; color: var(--out-ink); }
.crm-out .crm-out__chip b { font-size: 14.5px; opacity: .75; }
.crm-out .crm-out__chip.is-on b { opacity: 1; }
.crm-out .crm-out__in { height: 40px; padding: 0 12px; font-size: 14.5px; }
.crm-out .crm-out__btn { height: 40px; padding: 0 18px; font-size: 14.5px; border-radius: 8px; }
.crm-out__offer { gap: 14px; padding: 14px 16px; margin-bottom: 16px; border-radius: 8px; border-style: solid; }
.crm-out__lbl { font-size: 15px; font-weight: 600; }
.crm-out .crm-out__offerin { flex: 1 1 320px; max-width: 520px; height: 44px; }
.crm-out__hint { font-size: 13.5px; }

/* ---- rows */
.crm-out__list { gap: 14px; }
.crm-out__row { grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) 210px; gap: 22px; padding: 18px 20px; border-radius: 8px; align-items: center; }
.crm-out__who { gap: 14px; align-items: center; }
.crm-out__av { width: 46px; height: 46px; font-size: 18px; }
.crm-out__nm { font-size: 16px; }
.crm-out__un { font-size: 14px; }
/* One line always (owner, 2026-10-05): smaller words, never a second line. */
.crm-out__why { margin-top: 8px; padding: 3px 10px; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.crm-out__why.is-warn { background: color-mix(in srgb, var(--out-warn) 12%, var(--out-card)); }
.crm-out__why.is-new { background: color-mix(in srgb, var(--out-lime) 16%, var(--out-card)); color: var(--out-accent); }
.crm-out .crm-out__msg { min-height: 78px; padding: 12px 14px; border-radius: 8px; font-size: 15px; background: var(--out-card); }
.crm-out__mt { gap: 8px 18px; margin-top: 10px; font-size: 13.5px; align-items: center; }
.crm-out .crm-out__tx { font-size: 13.5px; }

/* Captain: the AI that reads the customer's whole file, not the thread. */
.crm-out .crm-out__cap {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; margin: 0;
  border: 1px solid color-mix(in srgb, var(--out-lime) 60%, var(--out-line)); border-radius: 999px;
  background: color-mix(in srgb, var(--out-lime) 14%, var(--out-card)); color: var(--out-accent);
  font-size: 13.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.crm-out .crm-out__cap:hover { background: var(--out-lime); color: var(--out-on-lime); border-color: var(--out-lime); }
.crm-out .crm-out__cap:disabled { opacity: .55; cursor: default; }
.crm-out .crm-out__cap [class^="fi-rr-"] { font-size: 15px; }

/* ---- actions */
.crm-out__act { gap: 10px; }
.crm-out .crm-out__go { height: 42px; padding: 0 18px; border-radius: 8px; font-size: 14.5px; }
.crm-out .crm-out__mk { height: 38px; border-radius: 8px; font-size: 13.5px; }
.crm-out .crm-out__link { font-size: 12.5px; }
.crm-out__flow { padding: 14px 18px; border-radius: 8px; font-size: 14.5px; }
.crm-out__flow .crm-out__go { height: 40px; }
.crm-out__note { font-size: 13.5px; padding: 10px 14px; }
.crm-out__empty { font-size: 14.5px; }

@media (max-width: 1100px) {
  .crm-out__row { grid-template-columns: minmax(180px, 220px) minmax(0, 1fr); }
  .crm-out__act { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; }
}
@media (max-width: 860px) {
  .crm-out__row { grid-template-columns: 1fr; }
  .crm-out__title { font-size: 22px; }
  .crm-out__headic { width: 48px; height: 48px; }
}

/* The upload window (openUpload). */
.crm-out__upbody { display: flex; flex-direction: column; gap: 12px; }
.crm-out__drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px; text-align: center;
  border: 1px dashed var(--out-line, #d0d5dd); border-radius: 8px; cursor: pointer; margin: 0;
}
.crm-out__drop b { font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.crm-out__drop small { font-size: 12px; color: var(--out-muted, #667085); }
.crm-out__drop.is-over, .crm-out__drop:hover { border-color: #1877f2; }
.crm-out__drop.is-set { border-style: solid; border-color: #b9dc00; }
.crm-out__dropic { font-size: 26px; color: var(--out-muted, #667085); }
.crm-out__drop .crm-out__file { display: none; }
.crm-out__tpl { display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; font-size: 13px; font-weight: 600; color: #1877f2; text-decoration: none; }
.crm-out__tpl:hover { text-decoration: underline; }
