/* Front desk tab (27 Oct 2026). Same cards, pills and type as Keystone; phone first. No :has(), no runtime custom
   properties (see the 22 Oct perf rules in app.css). */
.crm .fd-demo { margin: 0 0 8px; }
.crm .kpi.good .kv { color: #13744a; }
.crm .kpi.warn .kv { color: #c2410c; }
.crm .fd-row { align-items: flex-start; }
.crm .fd-row .cmain { flex-direction: row; align-items: flex-start; gap: 10px; }
.crm .fd-tx { min-width: 0; display: flex; flex-direction: column; flex: 1; }
.crm .fd-tx .cs { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.crm .fd-tx .fd-sub { -webkit-line-clamp: 1; }
.crm .fd-pills { flex: none; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; padding-top: 10px; max-width: 40%; }
.crm .fd-ho .btn { margin-top: 10px; flex: none; }
.fd-ico { flex: none; width: 40px; height: 40px; margin-top: 2px; border-radius: 10px; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; letter-spacing: .02em;
  background: var(--accent-soft); color: var(--accent); }
.fd-ico.k-sms { background: #e6f4ea; color: #13744a; } .fd-ico.k-phone { background: #fdecd6; color: #a14b00; }
.fd-ico.k-facebook, .fd-ico.k-fb_comment { background: #e3e9fb; color: #1d4ed8; } .fd-ico.k-instagram, .fd-ico.k-ig_comment { background: #fbe4f0; color: #b0246b; }
.fd-ico.k-email { background: var(--notice); color: var(--muted); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .fd-ico.k-sms { background: #12352a; color: #6fd3a5; } :root:not([data-theme="light"]) .fd-ico.k-phone { background: #3a2a12; color: #f5b768; }
  :root:not([data-theme="light"]) .fd-ico.k-facebook, :root:not([data-theme="light"]) .fd-ico.k-fb_comment { background: #1d2340; color: #9fb0ff; } :root:not([data-theme="light"]) .fd-ico.k-instagram, :root:not([data-theme="light"]) .fd-ico.k-ig_comment { background: #3a1730; color: #f39ac8; }
}
:root[data-theme="dark"] .fd-ico.k-sms { background: #12352a; color: #6fd3a5; } :root[data-theme="dark"] .fd-ico.k-phone { background: #3a2a12; color: #f5b768; }
:root[data-theme="dark"] .fd-ico.k-facebook, :root[data-theme="dark"] .fd-ico.k-fb_comment { background: #1d2340; color: #9fb0ff; } :root[data-theme="dark"] .fd-ico.k-instagram, :root[data-theme="dark"] .fd-ico.k-ig_comment { background: #3a1730; color: #f39ac8; }
.crm .dright { float: right; margin-top: -4px; }
.crm .dsm { min-height: 32px; padding: 0 10px; font-size: 13px; }
.crm .fd .dsm { min-height: 40px; padding: 0 12px; font-size: 13.5px; }
.crm .fd-snip { display: flex; gap: 8px; align-items: center; background: var(--bg); border: 1px solid var(--rule); border-radius: 10px; padding: 8px 10px; }
.crm .fd-snip code { flex: 1; min-width: 0; font-size: 12.5px; overflow-wrap: anywhere; }
.crm .fd-try { margin-top: 10px; }
.crm .fd-try summary { cursor: pointer; font-weight: 600; color: var(--accent); padding: 4px 0; }
.crm .fd-bubbles { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; padding: 8px 2px; }
.crm .fd-bubbles.big { max-height: none; }
.crm .fd-b { max-width: 86%; padding: 8px 11px; border-radius: 14px; font-size: 14.5px; line-height: 1.4; overflow-wrap: anywhere; background: var(--bg); border: 1px solid var(--rule); align-self: flex-start; }
.crm .fd-b.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.crm .fd-b.team { background: var(--accent-soft); border-color: var(--accent-soft); }
.crm .fd-b.typing { color: var(--muted); }
.crm .fd-who { display: block; font-size: 11px; opacity: .75; margin-bottom: 2px; }
.crm .fd-b .fd-who:last-child { margin: 3px 0 0; }
.crm .fd-sys { align-self: center; font-size: 12px; color: var(--muted); text-align: center; padding: 2px 8px; }
.crm .fd-chs .fd-ch { border-top: 1px solid var(--rule); padding: 10px 0; }
.crm .fd-chs .fd-ch:first-child { border-top: 0; }
.crm .fd-chh { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 3px; }
.crm .fd-chh b { font-weight: 600; font-size: 14.5px; }
.crm .fd-chb { margin-top: 6px; }
.crm .fd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.crm .fd-grid input { width: 100%; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); color: var(--ink); padding: 9px 10px; font: inherit; font-size: 16px; }
.crm .fd-grid .fld small { color: var(--muted); font-size: 11px; }
.crm .form .fld input { font-size: 16px; }
.crm .fd-bars { display: flex; align-items: flex-end; gap: 3px; height: 54px; margin: 10px 0 6px; padding: 0 2px; border-bottom: 1px solid var(--rule); }
.crm .fd-bars i { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; }
.crm .fd-draft { border-top: 1px solid var(--rule); padding: 10px 0; }
.crm .fd-draft:first-child { border-top: 0; }
.crm .fd-draft textarea { margin-top: 6px; }
.crm .fd-replybox { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.crm .fd-replybox textarea { flex: 1; min-width: 0; width: auto; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); color: var(--ink); padding: 9px 10px; font: inherit; font-size: 16px; resize: vertical; min-height: 44px; }
.crm .fd-replybox .btn { flex: none; min-height: 44px; }
.crm .fd-link { color: var(--accent); text-decoration: underline; overflow-wrap: anywhere; }
.crm .fd-grid .fld { justify-content: flex-end; }
.crm .fd-tx .ct { white-space: normal; overflow-wrap: anywhere; }
/* 28 Oct 2026 UX pass: set-up folded below the inbox, "Show all", tap targets */
.crm .fd { display: flex; flex-direction: column; gap: 12px; }
.crm .fd > .fd-h { margin: 6px 2px -4px; }
.crm .fd-h { margin: 18px 2px 8px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.crm .fd-fold { padding-top: 0; padding-bottom: 0; }
.crm .fd-fold > summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 2px; min-height: 56px; justify-content: center; padding: 10px 28px 10px 0; position: relative; }
.crm .fd-fold > summary::-webkit-details-marker { display: none; }
.crm .fd-fold > summary::after { content: ""; position: absolute; right: 4px; top: 50%; width: 9px; height: 9px; margin-top: -7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.crm .fd-fold[open] > summary::after { transform: rotate(225deg); margin-top: -2px; }
.crm .fd-fold[open] > summary { border-bottom: 1px solid var(--rule); margin-bottom: 10px; }
.crm .fd-fold[open] { padding-bottom: 14px; }
.crm .fd-ft { font-family: "Instrument Serif", Georgia, serif; font-size: 22px; line-height: 1.15; color: var(--ink); }
.crm .fd-fold > summary .cs { white-space: normal; }
.crm .fd-more { width: 100%; margin-top: 8px; min-height: 44px; }
.crm .fd-try summary { min-height: 40px; display: flex; align-items: center; }
.crm .fd-ho .btn.dsm { min-width: 64px; }

/* ───── Desktop (28 Oct 2026): the inbox in two columns (conversations on the right, what's waiting and the calls on the
   left), the set-up cards side by side. The two wrappers are display: contents below 1024px, so the phone is untouched. ───── */
.crm .fd-inbox, .crm .fd-setup { display: contents; }
@media (min-width: 1024px) {
  .crm .fd { gap: 16px; }
  .crm .fd-inbox, .crm .fd-setup { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; align-items: start; gap: 16px; }
  .crm .fd-inbox > .card { grid-column: 1; min-width: 0; }
  .crm .fd-inbox > .fd-conv { grid-column: 2; grid-row: span 3; }
  .crm .fd-setup > .card { min-width: 0; }
  .crm .fd > .fd-h { margin: 8px 2px -6px; }
  .crm .fd .card > .chips { flex-wrap: wrap; overflow: visible; }
  .crm .fd .clist .cmain { cursor: pointer; }
  .crm .fd .clist .crow:hover { background: var(--bg); }
  .crm .fd-fold > summary { min-height: 48px; }
  .crm .fd-fold > summary:hover .fd-ft { color: var(--accent); }
  .crm .fd .dsm, .crm .fd-more { min-height: 34px; }
  .crm .fd-ho .btn.dsm { min-height: 34px; }
  .crm .fd-bubbles { max-height: 420px; }
  .crm .fd button:focus-visible, .crm .fd summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
}
@media (min-width: 1440px) {
  .crm .fd, .crm .fd-inbox, .crm .fd-setup { gap: 20px; }
}
