/* Hallmark · genre: modern-minimal · macrostructure: Workbench · design-system: design.md · designed-as-app */
/* Central · atender: abas, resumo, histórico, formulários e Jev. Só cores dos tokens; sem estilos embutidos (CSP). */

/* colunas: ficha à esquerda, resultado do contato à direita */
.f-body { max-width: 1480px; padding-top: 18px; gap: 20px; }
.f-main, .f-aside { min-width: 0; align-content: start; }
.f-main { gap: 12px; }
@media (min-width: 941px) { .f-body { grid-template-columns: minmax(0, 1fr) 320px; } }
@media (min-width: 941px) and (min-height: 760px) { .f-aside { position: sticky; top: 84px; align-self: start; } }

/* resumo e avisos */
.f-name { width: fit-content; max-width: 100%; }
.f-summary { padding: 16px 18px; box-shadow: none; }
.f-summary .f-name { font-size: clamp(19px, 2.2vw, 25px); line-height: 1.2; }
.f-summary .f-amt { font-size: clamp(23px, 2.6vw, 29px); }
.f-summary .f-head { gap: 10px; flex-wrap: nowrap; }
.f-reason { margin-top: 10px; gap: 6px; }
.f-client-strip { border-left: 3px solid var(--brand); }
.f-client-strip .f-name { font-family: var(--font-display, var(--font)); letter-spacing: -.035em; }
.f-client-strip .f-amt { font-family: var(--font-display, var(--font)); letter-spacing: -.04em; }
.f-client-strip .f-reason .tag { border-radius: var(--r-xs); background: var(--surface-2); }
.f-context > summary, .f-quick > summary { min-height: 40px; display: flex; align-items: center; font-weight: 650; cursor: pointer; color: var(--muted); }
.f-context > summary:hover, .f-quick > summary:hover { color: var(--ink); }
.f-context .f-brief { margin-bottom: 4px; }
.f-name:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: var(--r-xs); }
.f-brief { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 16px; margin: 0; padding: 12px 14px; background: var(--surface-2); border-radius: var(--r-md); }
.f-brief dt, .f-dl dt { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.f-brief dd, .f-dl dd { margin: 2px 0 0; font-weight: 700; font-size: var(--fs-base); overflow-wrap: anywhere; }
.f-brief dd .sub, .f-dl dd .sub { font-weight: 500; }
.f-link { border: 0; background: transparent; color: var(--sky); font: inherit; font-weight: 700; text-decoration: underline; padding: 0; min-height: 40px; display: inline-flex; align-items: center; }
.f-alerts { display: grid; gap: 8px; }
.f-alert { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* abas */
.f-tabcard { padding: 0 16px 16px; box-shadow: none; }
.f-tabs { display: flex; gap: 2px; overflow-x: auto; margin: 0 -16px 14px; padding: 4px 10px 0; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.f-tab { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 46px; padding: 0 14px; border: 0; border-bottom: 3px solid transparent; background: transparent; font-weight: 700; color: var(--muted); white-space: nowrap; }
.f-tab:hover { color: var(--ink); }
.f-tab[aria-selected="true"] { color: var(--brand-2); border-bottom-color: var(--brand); background: var(--mint-soft); }
.f-badge { min-width: 20px; height: 20px; border-radius: var(--r-pill); background: var(--coral); color: var(--on-coral); font-weight: 800; font-size: var(--fs-xs); display: inline-grid; place-items: center; padding: 0 6px; }
.f-panel { display: grid; gap: 12px; align-content: start; }
.f-sec { display: grid; gap: 4px; align-content: start; min-width: 0; }
.f-sec + .f-sec { border-top: 1px solid var(--line); padding-top: 16px; }
.f-sec > .btn { justify-self: start; }
.f-sec h3 { font-size: var(--fs-md); font-weight: 700; letter-spacing: -.01em; margin: 0; }
.f-det > summary { cursor: pointer; font-weight: 700; min-height: 40px; display: flex; align-items: center; }
.f-fs { border: 0; padding: 0; margin: 0; min-width: 0; }
.f-list { display: grid; gap: 10px; }
.f-item { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; background: var(--surface); min-width: 0; }
.f-item.f-open { border-color: var(--sun); }
.f-item-h { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.f-item p { overflow-wrap: anywhere; }
.f-meta { font-size: var(--fs-sm); color: var(--muted); margin: 6px 0 0; }
.f-meta.late { color: var(--coral-ink); font-weight: 600; }
.f-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 8px 0 0; }
.f-phones { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.f-phones li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 12px; background: var(--surface-2); border-radius: var(--r-md); }

/* conversa */
.f-assistant { display: grid; gap: 10px; min-width: 0; padding: 18px; border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: var(--r-md); background: var(--surface); }
.f-assistant.attention { border-left-color: var(--sun); }
.f-assistant h3 { font-size: var(--fs-md); margin: 0; letter-spacing: -.02em; }
.f-assistant p { margin: 0; overflow-wrap: anywhere; }
.f-assistant-message { display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--r-md); background: var(--mint-soft); }
.f-assistant-message p { color: var(--ink); white-space: pre-wrap; }
.f-assistant-help { font-size: var(--fs-xs); }
@media (max-width: 600px) { .f-assistant { padding: 14px; } .f-assistant > .row { align-items: flex-start; } .f-assistant .tag { white-space: normal; } }
.f-drafts { display: grid; gap: 8px; margin-bottom: 12px; }
.f-saved-drafts > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 700; color: var(--ink); }
.f-saved-drafts[open] > summary { margin-bottom: 8px; }
.f-draft { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; background: var(--sun-soft); border: 1.5px dashed var(--sun); border-radius: var(--r-md); padding: 10px 14px; }
.f-draft .grow { flex-basis: 200px; }
.f-draft .sub { color: var(--ink); }
.f-draft-tx { margin: 4px 0 0; font-size: var(--fs-sm); white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.thread:focus-visible { outline-offset: -2px; }
.thread-wrap { position: relative; min-width: 0; }
.thread-wrap .thread { min-height: 130px; max-height: clamp(160px, 28dvh, 320px); padding: 12px; overscroll-behavior: contain; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); }
.thread .b.in { background: var(--surface); border-color: var(--line); }
.thread .b.out { box-shadow: none; }
.f-new-messages { position: sticky; bottom: 6px; display: flex; margin: -44px auto 6px; z-index: 2; background: var(--surface); color: var(--brand); border-color: var(--brand); box-shadow: var(--shadow); }
.f-field-error { margin: 0; color: var(--coral-ink); font-size: var(--fs-sm); font-weight: 650; }
.f-conclusion h2 { font-size: var(--fs-lg); margin-top: 4px; }
.f-decision-panel { border-top: 3px solid var(--brand); box-shadow: none; }
.f-aside > .card { padding: 18px; }
.f-decision-panel .res .pill { border-radius: var(--r-sm); flex: 1 1 40%; text-align: center; justify-content: center; }
.f-decision-panel .eyebrow { color: var(--brand-2); }
.f-conclusion #f-done { background: var(--surface); border-color: var(--brand); color: var(--brand); }
.f-conclusion #f-done:hover { background: var(--mint-soft); }
.f-composer-actions { gap: 8px; align-items: start; }
.f-message-section { margin-top: 2px; gap: 8px; }
.f-message-label { display: flex; gap: 10px; justify-content: space-between; align-items: center; }
.f-message-label label { font-size: var(--fs-sm); font-weight: 750; }
.f-message-label .sub { font-size: var(--fs-xs); }
.composer #f-txt { min-height: 82px; max-height: 240px; background: var(--surface); }
.f-agreement { min-width: 0; }
.f-agreement > summary { list-style: none; }
.f-agreement > summary::-webkit-details-marker { display: none; }
.f-agreement[open] > .row { padding: 8px 0; }
.f-bub-act { display: block; margin-top: 4px; border: 0; background: transparent; color: inherit; font: inherit; font-size: var(--fs-xs); font-weight: 700; text-decoration: underline; padding: 6px 0; min-height: var(--hit-sm); }
.f-jev-box { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 6px; }
.f-jev-box > summary { cursor: pointer; font-weight: 700; min-height: 40px; display: flex; align-items: center; }
.f-jev { display: grid; gap: 12px; padding-top: 6px; }
.f-jev-steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.f-jev-steps li { display: inline-flex; gap: 6px; align-items: center; font-size: var(--fs-sm); font-weight: 700; color: var(--muted); padding: 4px 12px; border-radius: var(--r-pill); background: var(--surface-2); }
.f-jev-steps li span { font-weight: 800; }
.f-jev-steps li[aria-current="step"] { background: var(--ink); color: var(--bg); }
.f-jev-review { background: var(--surface-2); border-radius: var(--r-md); padding: 12px 14px; }
.f-jev-out { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; display: grid; gap: 8px; }
.f-jev-out h4 { margin: 0; font-size: var(--fs-md); }
.f-jev-next { display: grid; gap: 6px; justify-items: start; background: var(--sky-soft); padding: 10px 12px; border-radius: var(--r-md); }
.f-jev-sig dl { display: grid; gap: 4px; margin: 6px 0; }
.f-jev-sig dl div { display: flex; justify-content: space-between; gap: 10px; }
.f-jev-sig dd, .f-jev-sig dt { margin: 0; }
.f-jev-hist > summary, .f-jev-sig > summary, .f-jev-tpl > summary, .f-jev-sub > summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; font-weight: 600; }
#jv-result:focus-visible { outline-offset: 4px; }

/* histórico */
.f-tl { display: grid; }
.f-tl-item { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.f-tl > div:first-child .f-tl-item { border-top: 0; }
.f-tl-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; background: var(--muted); flex: none; }
.f-tl-in .f-tl-dot { background: var(--sky); } .f-tl-out .f-tl-dot { background: var(--brand); }
.f-tl-promise .f-tl-dot, .f-tl-return .f-tl-dot, .f-tl-draft .f-tl-dot { background: var(--sun); }
.f-tl-case .f-tl-dot, .f-tl-resolved .f-tl-dot, .f-tl-protocol .f-tl-dot { background: var(--coral); }
.f-tl-body { flex: 1; min-width: 0; }
.f-tl-tx { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* diálogo de formulário */
.f-contact-tools { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface-2); margin-bottom: 12px; }
.f-contact-tools h3 { font-size: 14px; }
.f-contact-tools summary { padding-block: 10px; cursor: pointer; color: var(--ink); }
.f-contact-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.f-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.f-contact .grow { min-width: 0; overflow-wrap: anywhere; }
.f-contact .tag { margin-top: 6px; white-space: normal; }
.f-contact .btn { min-height: 44px; }
.f-contact-tools > .row > .btn { min-height: 44px; }
#m-cl .mc { max-width: 560px; }

@media (max-width: 560px) {
  .f-body { padding-top: 12px; gap: 14px; }
  .f-summary { padding: 12px 14px; }
  .f-summary .av { display: none; }
  .f-summary .f-head { align-items: start; }
  .f-summary .f-name { font-size: 19px; }
  .f-summary .f-amt { font-size: 23px; }
  .f-summary .eyebrow { font-size: 10px; }
  .f-summary .right { flex: none; }
  .f-reason .tag { font-size: 12px; }
  .f-tabs { display: flex; gap: 2px; overflow-x: auto; margin: 0 -16px 10px; padding: 4px 8px 0; }
  .f-tab { justify-content: center; height: 44px; padding: 0 10px; }
  .f-tab[aria-selected="true"] { background: var(--mint-soft); border-color: var(--brand); }
  .f-brief { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .thread-wrap .thread { min-height: 130px; max-height: clamp(160px, 26dvh, 240px); }
  .composer #f-txt { min-height: 76px; font-size: 16px; }
  .composer .ins { gap: 4px; }
  .f-composer-actions > .btn { flex: 1 1 44%; padding-inline: 10px; }
  .f-composer-actions > .f-agreement { flex: 1 0 100%; }
  .f-agreement > summary { width: 100%; }
  .f-agreement[open] > .row { display: grid; grid-template-columns: 1fr 1fr; }
  .f-new-messages { min-height: 44px; }
  .f-draft > .btn { width: 100%; }
  .f-decision-panel .res .pill { flex-basis: 44%; }
  .f-aside > .card { padding: 16px; }
}
@media (max-width: 380px) {
  .f-summary .f-head { flex-wrap: wrap; }
  .f-summary .right { text-align: left; display: flex; align-items: baseline; gap: 8px; }
  .f-summary .f-amt { font-size: 21px; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .thread-wrap .thread { min-height: 110px; max-height: 150px; }
  .composer #f-txt { min-height: 64px; }
}

/* Esmeralda Editorial · identidade, conversa e decisão em planos claros. */
.f-body { max-width: 1520px; padding-top: 28px; gap: 32px; }
.f-main { gap: 20px; }
.f-client-strip { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 0 0 22px; background: transparent; }
.f-summary .f-name { font-size: clamp(26px, 2.9vw, 38px); line-height: 1.25; font-weight: 650; }
.f-summary .f-amt { font-size: clamp(24px, 2.5vw, 32px); font-weight: 650; }
.f-summary .av { border-radius: 50%; width: 60px; height: 60px; flex: none; font-size: 20px; }
.f-reason { margin-top: 16px; gap: 8px; }
.f-context > summary { min-height: 44px; margin-top: 4px; }
.f-context .f-brief { border-radius: var(--r-sm); padding: 16px; gap: 16px 24px; }
.f-tabcard { border: 0; background: transparent; padding: 0; }
.f-tabs { margin: 0 0 20px; padding: 0; gap: 10px; }
.f-tab { height: 52px; padding-inline: 12px; font-weight: 650; font-size: 15.5px; }
.f-tab:first-child { padding-left: 4px; }
.f-tab[aria-selected="true"] { background: transparent; }
.f-panel { gap: 16px; }
.thread-wrap .thread { border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--r-md); padding: 18px; min-height: 160px; max-height: clamp(180px, 30dvh, 360px); }
.thread .b { font-size: 16px; line-height: 1.65; border-radius: var(--r-sm); padding: 14px 18px; }
.thread .b small { font-size: 13px; margin-bottom: 6px; }
.thread .b.in { border: 0; }
.thread .b.out { border: 0; background: var(--mint-soft); color: var(--ink); }
.thread .b.out small { color: var(--muted); opacity: 1; }
.f-message-section { gap: 12px; }
.f-message-label { margin-top: 4px; }
.f-message-label label { font-size: 17px; font-weight: 750; }
.composer #f-txt { border-radius: var(--r-sm); min-height: 120px; padding: 16px 18px; font-size: 16px; line-height: 1.65; }
.f-composer-actions { padding-top: 4px; }
.f-composer-actions > .btn { min-height: 48px; font-size: 15px; }
.f-composer-actions > #f-review { min-height: 52px; padding-inline: 24px; font-size: 16px; }
.f-composer-actions .f-agreement > summary { min-height: 48px; font-size: 15px; }
.f-contact-options { border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r-sm); min-width: 0; }
.f-contact-options > summary { min-height: 56px; padding: 12px 16px; gap: 8px; font-size: 15px; flex-wrap: wrap; }
.f-contact-options > summary > span:first-of-type { flex: 1; }
.f-contact-options > summary .sub { font-size: 13px; font-weight: 550; }
.f-contact-options[open] > .f-contact-tools { padding: 8px 16px 16px; border: 0; }
.f-contact-options .f-contact-tools h3 { font-size: 15px; }
.f-contact-tools { border: 0; border-bottom: 1px solid var(--line); background: transparent; border-radius: 0; padding: 0 0 14px; margin-bottom: 2px; }
.f-contact-list { gap: 0; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
.f-contact { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 14px; background: transparent; }
.f-contact:last-child { border-bottom: 0; }
.f-contact-tools > .row > .btn { min-height: 40px; }
.f-item { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 16px 0; background: transparent; }
.f-list { gap: 0; }
.f-list > .f-item:last-child { border-bottom: 0; }
.f-sec h3 { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; letter-spacing: -.035em; }
.f-sec + .f-sec { padding-top: 22px; margin-top: 6px; }
.f-dl { gap: 20px 28px; margin-top: 14px; }
.f-phones { gap: 0; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.f-phones li { border-radius: 0; border-bottom: 1px solid var(--line); padding: 14px; background: var(--surface); }
.f-phones li:last-child { border-bottom: 0; }
.f-tl-item { padding: 16px 0; }
.f-jev-out, .f-jev-review, .f-jev-next { border-radius: var(--r-sm); }
.f-aside { border-left: 1px solid var(--line); padding-left: 28px; gap: 28px; }
.f-aside > .card { border: 0; border-radius: 0; background: transparent; padding: 0; box-shadow: none; }
.f-aside > .card + .card { border-top: 1px solid var(--line); padding-top: 24px; }
.f-conclusion h2 { font-family: var(--font-display); font-size: 27px; font-weight: 600; letter-spacing: -.04em; line-height: 1.35; margin-top: 8px; }
.f-decision-panel .res { gap: 8px; margin-top: 18px; }
.f-decision-panel .res .pill { background: var(--surface); border: 1px solid var(--control-border); color: var(--ink); font-size: 14px; min-height: 46px; }
.f-decision-panel .res .pill:hover { background: var(--surface-2); color: var(--ink); }
.f-decision-panel .res .pill[aria-pressed="true"] { background: var(--mint-soft); border-color: var(--brand); color: var(--brand-2); }
.f-aside .checks { gap: 12px; }
.f-aside .ck { font-size: var(--fs-sm); line-height: 1.6; }
.f-conclusion #f-done { min-height: 50px; font-size: 15px; }
.f-aside .f-send-status > summary { min-height: 56px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 16px; }
.f-aside .f-send-status > summary > span:first-of-type { flex: 1; }
.f-aside .f-send-status > summary .tag { font-size: 12.5px; }
.f-send-status[open] .ck.no { background: var(--sun-soft); color: var(--ink); border-left: 2px solid var(--sun); padding: 10px 12px; border-radius: 0 var(--r-xs) var(--r-xs) 0; }
@media (min-width: 821px) {
  body[data-density="compact"] .f-summary .f-name { font-size: 30px; }
  body[data-density="compact"] .f-main { gap: 14px; }
  body[data-density="compact"] .thread .b { font-size: 15px; padding: 10px 14px; }
  body[data-density="compact"] .composer #f-txt { min-height: 96px; }
  body[data-density="compact"] .f-tab { height: 46px; }
  body[data-density="compact"] .f-decision-panel .res .pill { min-height: 42px; }
}
@media (min-width: 941px) { .f-body { grid-template-columns: minmax(0, 1fr) 320px; } }
@media (max-width: 940px) {
  .f-body { gap: 28px; }
  .f-aside { border-left: 0; border-top: 1px solid var(--line); padding: 24px 0 0; }
  .f-aside > .card { max-width: none; }
}
@media (max-width: 560px) {
  .f-body { padding-top: 20px; gap: 24px; }
  .f-main { gap: 16px; }
  .f-client-strip { padding: 0 0 18px; }
  .f-summary .f-head { flex-wrap: wrap; gap: 16px; }
  .f-summary .f-name { font-size: 27px; }
  .f-summary .right { text-align: left; display: flex; align-items: baseline; gap: 12px; width: 100%; }
  .f-summary .f-amt { font-size: 25px; }
  .f-summary .eyebrow { font-size: var(--fs-xs); }
  .f-reason { margin-top: 12px; }
  .f-tabs { margin: 0 0 16px; padding: 0; gap: 6px; }
  .f-tab { padding-inline: 10px; font-size: 15px; }
  .thread-wrap .thread { padding: 12px; max-height: clamp(170px, 28dvh, 300px); }
  .composer #f-txt { min-height: 100px; padding: 12px 14px; }
  .f-aside { gap: 24px; }
  .f-contact { padding: 14px 12px; }
  .f-contact-options > summary { padding: 12px; gap: 6px; }
  .f-contact-options > summary .sub { flex-basis: 100%; padding-left: 17px; }
  .f-contact-options[open] > .f-contact-tools { padding-inline: 12px; }
  .thread .b { padding: 12px 14px; }
  .f-composer-actions { gap: 10px; }
  .f-composer-actions > .btn:first-child { flex-basis: 100%; }
  .f-conclusion h2 { font-size: 24px; }
  .f-decision-panel .res .pill { min-height: 44px; }
}
