/* Fiado (16/11) — cores da marca FeiraFácil */
body[data-screen="fiado"] #fiado-area { display: block; padding: 0; }
.fd-root { max-width: 1200px; margin: 0 auto; padding: 20px; display: grid; gap: 16px; }
.fd-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.fd-head h1 { margin: 0; font-size: 1.6rem; color: #0b6b55; } .fd-head p { margin: 2px 0 0; color: #5b6475; }
.fd-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fd-root .primary, .fd-dialog .primary { background: linear-gradient(90deg, #ff8a4c, #e8571a); color: #fff; border: 0; border-radius: 10px; padding: 10px 16px; font-weight: 700; cursor: pointer; }
.fd-root .ghost, .fd-dialog .ghost { background: #fff; color: #0b6b55; border: 1px solid #bfe3d6; border-radius: 10px; padding: 9px 14px; font-weight: 600; cursor: pointer; }
.fd-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.fd-kpi { background: #fff; border: 1px solid #e3ece8; border-radius: 14px; padding: 14px 16px; display: grid; gap: 4px; }
.fd-kpi span { color: #5b6475; font-size: .85rem; } .fd-kpi strong { font-size: 1.35rem; color: #1d2433; }
.fd-kpi.is-late strong { color: #c0392b; } .fd-kpi.is-ok strong { color: #0b6b55; }
.fd-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.fd-clients { display: grid; gap: 10px; }
.fd-search { border: 1px solid #cfdad6; border-radius: 10px; padding: 11px 14px; font: inherit; }
.fd-rows { display: grid; gap: 10px; }
.fd-row-card { background: #fff; border: 1px solid #e3ece8; border-radius: 14px; padding: 14px 16px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; }
.fd-who { display: grid; gap: 2px; } .fd-who small { color: #5b6475; }
.fd-status { justify-self: start; font-size: .75rem; font-weight: 700; border-radius: 999px; padding: 3px 10px; margin-top: 4px; }
.fd-status.is-ok { background: #e3f3ed; color: #0b6b55; } .fd-status.is-soon { background: #fff2e8; color: #b8440f; } .fd-status.is-late { background: #fde7e4; color: #b42318; }
.fd-debt { display: grid; gap: 4px; } .fd-debt strong { font-size: 1.15rem; }
.fd-limit { position: relative; height: 8px; border-radius: 99px; background: #edf2f0; overflow: hidden; } .fd-limit i { position: absolute; inset: 0 auto 0 0; background: #0e7c63; border-radius: 99px; }
.fd-limit.is-over i { background: #c0392b; } .fd-limit small { position: absolute; top: 10px; font-size: .72rem; color: #5b6475; white-space: nowrap; } .fd-debt .fd-limit { margin-bottom: 12px; }
.fd-auto { display: flex; gap: 8px; align-items: center; font-size: .85rem; color: #0b6b55; font-weight: 600; } .fd-auto input { width: 18px; height: 18px; accent-color: #0e7c63; }
.fd-btns { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.fd-sched { background: linear-gradient(160deg, #0e7c63, #064d3d); color: #fff; border-radius: 16px; padding: 16px; display: grid; gap: 8px; }
.fd-sched h2 { margin: 0; font-size: 1.1rem; } .fd-sched .fd-muted, .fd-sched .fd-empty { color: rgba(255,255,255,.85); }
.fd-sched .fd-list li { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); color: #fff; }
.fd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.fd-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; border: 1px solid #e3ece8; border-radius: 10px; padding: 8px 12px; }
.fd-list li small { grid-column: 1; color: inherit; opacity: .8; } .fd-list li strong { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.fd-list .is-late { color: #c0392b; }
.fd-muted { color: #5b6475; margin: 0; } .fd-empty { color: #5b6475; padding: 16px; text-align: center; }
.fd-dialog { position: fixed; inset: 0; z-index: 80; background: rgba(6, 30, 24, .45); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.fd-card { width: min(520px, 100%); background: #fff; border-radius: 16px; padding: 20px; display: grid; gap: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.25); max-height: 92vh; overflow-y: auto; }
.fd-card h3 { margin: 6px 0 0; font-size: 1rem; color: #0b6b55; }
.fd-card-head { display: flex; justify-content: space-between; align-items: center; } .fd-card-head h2 { margin: 0; font-size: 1.2rem; }
.fd-x { border: 0; background: none; font-size: 1.6rem; cursor: pointer; color: #5b6475; }
.fd-field { display: grid; gap: 4px; font-weight: 600; font-size: .9rem; } .fd-field small { font-weight: 400; color: #5b6475; }
.fd-field input, .fd-card textarea { border: 1px solid #cfdad6; border-radius: 10px; padding: 11px 12px; font: inherit; width: 100%; box-sizing: border-box; }
.fd-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fd-switch { display: flex; gap: 10px; align-items: center; font-weight: 700; color: #0b6b55; background: #f1faf6; border-radius: 10px; padding: 10px 12px; } .fd-switch input { width: 20px; height: 20px; accent-color: #0e7c63; }
.fd-methods { display: flex; gap: 8px; } .fd-methods button { flex: 1; border: 1px solid #cfdad6; background: #fff; border-radius: 10px; padding: 10px; font: inherit; font-weight: 600; cursor: pointer; }
.fd-methods button[aria-pressed="true"] { border-color: #0e7c63; background: #e3f3ed; color: #0b6b55; }
.fd-err { color: #b42318; margin: 0; min-height: 1em; } .fd-err:empty { display: none; }
.fd-actions { display: flex; justify-content: flex-end; gap: 8px; } .fd-actions:empty { display: none; }
/* CRM x Pedidos e cobranças */
.inbox-area-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 0 12px 8px; padding: 4px; background: #edf2f0; border-radius: 12px; }
.inbox-area-switch button { border: 0; background: transparent; border-radius: 9px; padding: 8px 6px; font: inherit; font-weight: 700; font-size: .85rem; color: #4f625c; cursor: pointer; }
.inbox-area-switch button[aria-pressed="true"] { background: #fff; color: #0b6b55; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
@media (max-width: 900px) { .fd-kpis { grid-template-columns: 1fr 1fr; } .fd-main { grid-template-columns: 1fr; } .fd-row-card { grid-template-columns: 1fr; } .fd-row { grid-template-columns: 1fr; } }

.crm-chat-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px auto 0; max-width: 1200px; padding: 14px 18px; border-radius: 14px; background: linear-gradient(120deg, #064d3d, #0e7c63); color: #fff; }
.crm-chat-bar div { display: grid; } .crm-chat-bar small { opacity: .85; }
.crm-chat-open { border: 0; border-radius: 10px; padding: 10px 16px; font: inherit; font-weight: 700; cursor: pointer; color: #fff; background: linear-gradient(90deg, #ff8a4c, #e8571a); }
#fiado-area > * { max-width: none; } #fiado-area .fd-root { max-width: 1200px; width: 100%; box-sizing: border-box; }
.fd-row-card { grid-template-columns: minmax(180px, 1.4fr) minmax(140px, 1fr) auto; }
.fd-limit { overflow: visible; } .fd-limit i { max-width: 100%; }

.msg-ticks.is-read { color: #34b7f1; font-weight: 700; }

/* Faixa "onde estou" no chat das campanhas / das cobranças (substitui as 3 abas misturadas). */
.inbox-area-banner { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 10px 8px; padding: 8px 10px;
  background: #fff4ec; border: 1px solid #ffd2b5; border-radius: 12px; font-weight: 700; color: #7a3410; }
.inbox-area-banner[hidden] { display: none; }
.inbox-area-banner button { border: 1px solid #e8571a; background: #fff; color: #c2410c; border-radius: 9px; padding: 5px 10px; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.inbox-area-banner button:hover { background: #fff1e8; }
