/* Interface do CRM. Isolada da landing page para manter a identidade do site público. */
.crm-app {
  --ink: #17233c;
  --muted: #65758d;
  --line: #e0e7f0;
  --paper: #f4f7fb;
  --card: #ffffff;
  --green: #0f8773;
  --green-ink: #e7f6f1;
  --copper: #a76c0e;
  --danger: #bd3650;
  --shadow: 0 12px 32px rgba(19, 35, 69, .055);
  --navy: #111d38;
  --primary: #2445aa;
  --accent: #ec4358;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
.crm-app .icon-sprite { display: none; }
.crm-app a { color: var(--primary); }
.crm-app :focus-visible { outline: 3px solid #6c8cf1; outline-offset: 3px; }
.crm-app button, .crm-app .button { border-radius: 11px; background: var(--primary); color: #fff; font-weight: 650; padding: .68rem 1.05rem; transition: background .2s, border-color .2s, transform .2s, box-shadow .2s; }
.crm-app button:hover:not(:disabled), .crm-app .button:hover { background: #1b368b; transform: translateY(-1px); }
.crm-app button:disabled { cursor: not-allowed; opacity: .55; }
.crm-app button.ghost { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.crm-app button.ghost:hover { background: #f6f8fc; border-color: #b9c7df; }
.crm-app button.warn { background: #fff; border: 1px solid #f0c8d0; color: var(--danger); }
.crm-app button.warn:hover { background: #fff3f5; }
.crm-app button.link-button { background: none; border: 0; border-radius: 0; color: var(--primary); }
.crm-app input, .crm-app select, .crm-app textarea { border-color: #dce4ef; background: #fff; border-radius: 10px; padding: .72rem .8rem; box-shadow: 0 1px 2px rgba(30, 50, 85, .025); }
.crm-app input:focus, .crm-app select:focus, .crm-app textarea:focus { border-color: #6884d2; outline: 3px solid #e5ebff; }
.crm-app label { color: #34445f; font-size: .86rem; font-weight: 600; }
.crm-app label input, .crm-app label select, .crm-app label textarea { font-weight: 450; }
.crm-app label.checks input, .crm-app .checks input { box-shadow: none; }
.crm-app .eyebrow, .crm-app #app-view .eyebrow, .crm-app .section-label { color: #5973a5; font-size: .7rem; font-weight: 750; letter-spacing: .12em; }
.crm-app .fine, .crm-app .muted { color: var(--muted); }
.crm-app .panel, .crm-app .card, .crm-app .modal, .crm-app .list article, .crm-app .table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow); }
.crm-app .panel:hover { border-color: #d4deeb; }
.crm-app .tag { padding: .3rem .6rem; font-size: .72rem; font-weight: 700; }
.crm-app .actions { gap: .55rem; }
.crm-app .empty { border-radius: 12px; background: #f8faff; text-align: center; }
.crm-app .sample { background: #f3f6fc; color: #34445f; overflow: auto; }
.crm-app .error { font-size: .82rem; }
.crm-app .toast { background: var(--navy); box-shadow: 0 14px 38px rgba(17, 29, 56, .23); }
.crm-app .toast.bad { background: var(--danger); }

/* Marca e acesso */
.crm-app .brand-lockup { display: inline-flex; align-items: center; gap: .78rem; color: #fff; font-size: .94rem; font-weight: 800; line-height: 1.03; letter-spacing: .025em; white-space: nowrap; }
.crm-app .brand-lockup b { color: #fff; }
.crm-app .brand-lockup small { display: block; margin-top: .32rem; color: #a7b9d9; font-size: .58rem; font-weight: 750; letter-spacing: .28em; }
.crm-app .crm-logo-image { display: block; width: min(178px, 100%); height: auto; object-fit: contain; }
.crm-app .auth-story .brand-lockup { width: min(260px, 100%); padding: .7rem .8rem; border-radius: 16px; background: #fff; box-shadow: 0 12px 30px rgba(5, 16, 40, .2); }
.crm-app .auth-story .crm-logo-image { width: min(240px, 100%); }
.crm-app .side .brand-lockup { display: flex; justify-content: center; padding: .65rem .55rem; border-radius: 15px; background: #fff; box-shadow: 0 10px 24px rgba(5, 16, 40, .18); }
.crm-app .side .crm-logo-image { width: min(204px, 100%); }
.crm-app .side .crm-logo-image { transition: opacity .18s ease, transform .18s ease; }
.crm-app .side .crm-logo-image.is-changing { opacity: 0; transform: scale(.96); }
@media (prefers-reduced-motion: reduce) {
  .crm-app .side .crm-logo-image { transition: none; }
}
.crm-app .brand-mark { position: relative; display: grid; place-items: center; width: 39px; height: 39px; border-radius: 11px; background: linear-gradient(145deg, #19b99b, #126a7e); box-shadow: 0 8px 18px rgba(18, 150, 135, .25); }
.crm-app .brand-mark::before, .crm-app .brand-mark::after, .crm-app .brand-mark span { content: ""; position: absolute; border: 2px solid #fff; border-radius: 3px; }
.crm-app .brand-mark::before { width: 18px; height: 18px; }
.crm-app .brand-mark::after { width: 9px; height: 9px; }
.crm-app .brand-mark span { width: 3px; height: 3px; background: #fff; border: 0; border-radius: 50%; }
.crm-app .platform-brand { display: inline-flex; align-items: center; gap: .75rem; color: #fff; text-decoration: none; }
.crm-app .platform-brand-copy { display: grid; gap: .2rem; min-width: 0; }
.crm-app .platform-brand-copy strong { color: #fff; font-size: .94rem; line-height: 1.05; letter-spacing: -.02em; }
.crm-app .platform-brand-copy small { color: #a7b9d9; font-size: .56rem; font-weight: 800; letter-spacing: .18em; }
.crm-app .platform-brand-auth { width: min(290px, 100%); padding: .55rem 0; }
.crm-app .platform-brand-side { margin: .1rem .75rem .8rem; }
.crm-app .product-brand-rotator { display: grid; place-items: center; gap: .35rem; min-height: 92px; margin: 0 .75rem .9rem; padding: .65rem .75rem; border: 1px solid rgba(182, 200, 235, .16); border-radius: 14px; background: rgba(255, 255, 255, .96); box-shadow: 0 10px 24px rgba(5, 16, 40, .14); }
.crm-app .product-brand-label { color: #6d7f9f; font-size: .54rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.crm-app .crm-sidebar-product { display: grid; justify-items: center; gap: .35rem; width: 100%; min-width: 0; }
.crm-app #crm-sidebar-product-name { overflow: hidden; width: 100%; color: #4b5d7d; font-size: .62rem; font-weight: 750; line-height: 1.25; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.crm-app .product-brand-rotator .crm-logo-image { width: min(174px, 100%); max-height: 64px; transition: opacity .18s ease, transform .18s ease; }
.crm-app .product-brand-rotator .crm-logo-image.is-changing { opacity: 0; transform: scale(.96); }
@media (prefers-reduced-motion: reduce) {
  .crm-app .product-brand-rotator .crm-logo-image { transition: none; }
}
.crm-app .auth-shell { display: grid; grid-template-columns: minmax(320px, .9fr) minmax(360px, 1.1fr); padding: 0; background: #f7f9fd; }
.crm-app .auth-story { min-height: 100dvh; padding: clamp(2rem, 5vw, 5rem); display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(circle at 80% 28%, #284788, transparent 42%), linear-gradient(145deg, #152342, #0d1830); color: #fff; }
.crm-app .auth-story-copy { max-width: 510px; padding: 3rem 0; }
.crm-app .auth-story-copy .eyebrow { color: #9ebbf5; }
.crm-app .auth-story-copy h2 { font-size: clamp(2.8rem, 5vw, 4.4rem); line-height: 1.02; letter-spacing: -.065em; margin: 1rem 0; }
.crm-app .auth-story-copy > p:last-child { max-width: 27rem; color: #c5d1e9; font-size: 1.05rem; line-height: 1.7; }
.crm-app .auth-story-foot { margin: 0; color: #93a8c9; font-size: .8rem; }
.crm-app .auth-shell form { width: min(430px, calc(100% - 3rem)); margin: auto; padding: 2rem; border: 1px solid #e8edf5; border-radius: 22px; background: #fff; box-shadow: 0 28px 70px rgba(29, 46, 84, .09); gap: .75rem; }
.crm-app .auth-form-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 1rem; border-radius: 15px; background: #ecf1ff; color: var(--primary); font-weight: 800; letter-spacing: -.04em; }
.crm-app .auth-shell h1 { font-size: 2.15rem; margin: .15rem 0 0; letter-spacing: -.05em; }
.crm-app .auth-form-copy { margin: 0 0 .65rem; color: var(--muted); }
.crm-app #login-form > button { display: flex; justify-content: space-between; align-items: center; margin-top: .65rem; padding: .88rem 1rem; }
.crm-app .auth-help { margin: .1rem 0 0; color: var(--muted); font-size: .78rem; text-align: center; }
.crm-app .auth-help a { font-weight: 650; }
.crm-app .auth-link-button { width: 100%; margin-top: .1rem; padding: .15rem; border: 0; background: transparent; color: var(--primary); font-size: .78rem; font-weight: 700; cursor: pointer; }
.crm-app .auth-recovery-panel { display: grid; gap: .75rem; }
.crm-app .auth-recovery-panel h1 { margin: .15rem 0 0; }
.crm-app .auth-recovery-panel .eyebrow { margin-bottom: 0; }
.crm-app .auth-feedback { min-height: 1.2rem; margin: 0; color: #11866d; font-size: .78rem; line-height: 1.45; text-align: center; }
.crm-app .auth-feedback.is-error { color: var(--danger); }

/* Navegação e estrutura */
.crm-app .shell { grid-template-columns: 258px minmax(0, 1fr); }
.crm-app .side { height: 100dvh; position: sticky; top: 0; padding: 1.75rem .9rem 1.1rem; gap: 1rem; background: radial-gradient(circle at 8% 0, rgba(70, 99, 161, .25), transparent 42%), var(--navy); color: #c4d0e5; z-index: 20; }
.crm-app .side .brand-lockup { margin: .1rem .75rem 1.1rem; }
.crm-app .side-context { display: flex; align-items: center; gap: .5rem; margin: 0 .7rem .4rem; padding: .55rem .65rem; border: 1px solid rgba(182, 200, 235, .12); border-radius: 9px; color: #b3c1dc; font-size: .62rem; font-weight: 750; letter-spacing: .1em; }
.crm-app .side-context-dot { width: 7px; height: 7px; border-radius: 50%; background: #57d4a9; box-shadow: 0 0 0 4px rgba(87, 212, 169, .12); }
.crm-app .side .tabs { display: grid; gap: .15rem; min-width: 0; }
.crm-app .nav-group-label { margin: 1.2rem .85rem .35rem; color: #8294b2; font-size: .59rem; font-weight: 750; letter-spacing: .16em; }
.crm-app .side .tabs button { width: 100%; display: flex; align-items: center; gap: .85rem; min-height: 43px; padding: .65rem .9rem; border-radius: 10px; background: transparent; color: #b8c7df; font-size: .85rem; font-weight: 600; box-shadow: none; }
.crm-app .side .tabs button:hover { background: rgba(255,255,255,.075); color: #fff; transform: none; }
.crm-app .side .tabs button.active { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.crm-app .side .tabs svg, .crm-app .menu-toggle svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.crm-app .side-bottom { margin-top: auto; display: grid; gap: .65rem; }
.crm-app .side-help { display: flex; justify-content: space-between; margin: 0 .2rem; padding: .65rem .7rem; border-radius: 10px; color: #b8c7df; font-size: .78rem; text-decoration: none; }
.crm-app .side-help:hover { background: rgba(255,255,255,.075); color: #fff; }
.crm-app .side-profile { display: flex; align-items: center; gap: .65rem; margin-top: .25rem; padding: .75rem .65rem; border-top: 1px solid rgba(225,235,255,.11); }
.crm-app .profile-avatar, .crm-app .topbar-avatar { width: 34px; height: 34px; display: grid; flex: none; place-items: center; border-radius: 10px; background: #e8ecfb; color: var(--primary); font-size: .72rem; font-weight: 800; }
.crm-app .profile-copy { display: grid; min-width: 0; }
.crm-app .profile-copy strong { color: #fff; font-size: .75rem; }
.crm-app .profile-copy small { overflow: hidden; color: #9eafce; font-size: .69rem; text-overflow: ellipsis; white-space: nowrap; }
.crm-app .side #logout { margin: 0 .2rem; padding: .55rem .7rem; border-color: rgba(228,238,255,.15); border-radius: 9px; color: #cad6eb; font-size: .74rem; text-align: left; }
.crm-app .side #logout:hover { border-color: rgba(228,238,255,.34); background: rgba(255,255,255,.07); }
.crm-app .work { padding: 0; background: var(--paper); min-width: 0; }
.crm-app .crm-topbar { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 76px; padding: .8rem clamp(1rem, 3vw, 2.4rem); background: rgba(255,255,255,.94); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.crm-app .topbar-left, .crm-app .topbar-right { display: flex; align-items: center; gap: 1.15rem; min-width: 0; }
.crm-app .topbar-left > div { min-width: 0; }
.crm-app .topbar-eyebrow { margin: 0; color: #8795ab; font-size: .58rem; font-weight: 750; letter-spacing: .12em; }
.crm-app .topbar-eyebrow span { color: var(--accent); margin: 0 .25rem; }
.crm-app #topbar-title { display: block; color: var(--ink); font-size: 1.1rem; line-height: 1.3; letter-spacing: -.03em; }
.crm-app .topbar-date { color: var(--muted); font-size: .75rem; white-space: nowrap; }
.crm-app .topbar-help { color: #4e5d76; font-size: .76rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
.crm-app .topbar-help:hover { color: var(--primary); }
.crm-app .affiliate-panel-link { display: inline-flex; align-items: center; gap: .35rem; padding: .48rem .72rem; border: 1px solid #c8d7f4; border-radius: 999px; background: #eef4ff; color: var(--primary); font-size: .72rem; font-weight: 750; text-decoration: none; white-space: nowrap; }
.crm-app .affiliate-panel-link::before { content: '↗'; font-size: .85rem; }
.crm-app .affiliate-panel-link:hover { border-color: #9fb8eb; background: #e3edff; color: #1b368b; }
.crm-app .menu-toggle { display: none; width: 40px; height: 40px; padding: .65rem; background: #f2f5fc; color: var(--ink); }
.crm-app .content-wrap { padding: 1.45rem 0 3rem; }
.crm-app .banner, .crm-app #main { width: min(1420px, calc(100% - clamp(2rem, 6vw, 4.8rem))); margin-inline: auto; }
.crm-app .banner { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.4rem; padding: .78rem .95rem; border: 1px solid #dce7fb; border-radius: 12px; background: #edf3ff; color: #395275; font-size: .78rem; line-height: 1.45; }
.crm-app .banner strong { color: #284a88; }
.crm-app .banner-icon { display: grid; place-items: center; width: 21px; height: 21px; flex: none; border-radius: 50%; background: #d8e5ff; color: #3357aa; font-family: Georgia, serif; font-weight: 800; }
.crm-app .banner button { margin-left: auto; padding: .15rem .42rem; border-radius: 6px; background: transparent; color: #6680a9; font-size: 1.3rem; line-height: 1; }
.crm-app .banner button:hover { background: #dbe7fb; color: #284a88; transform: none; }
.crm-app #main { gap: 1.25rem; }
.crm-app .page-head { align-items: center; margin-bottom: .05rem; }
.crm-app .page-head h2 { font-size: clamp(1.65rem, 2.8vw, 2.25rem); letter-spacing: -.055em; }
.crm-app .page-subtitle { margin: .28rem 0 0; color: var(--muted); font-size: .86rem; }
.crm-app .page-head .actions { justify-content: flex-end; }
.crm-app .section-label { margin-bottom: .25rem; }
.crm-app .toolbar { gap: .65rem; }
.crm-app .contact-search { flex: 1 1 300px; }
.crm-app .contact-search input { min-width: 0; width: 100%; }
.crm-app .chips { gap: .35rem; }
.crm-app button.chip { border: 1px solid transparent; border-radius: 9px; background: transparent; color: #61728b; padding: .45rem .7rem; font-size: .77rem; }
.crm-app button.chip:hover { background: #eef3fb; color: var(--ink); transform: none; }
.crm-app button.chip.selected { background: #e8eeff; border-color: #bdcbee; color: #22439d; }
.crm-app .workspace { grid-template-columns: minmax(300px, 370px) minmax(0, 1fr); gap: 1rem; }
.crm-app .roster { max-height: calc(100dvh - 240px); min-height: 310px; padding: .45rem; }
.crm-app button.roster-item { border-radius: 12px; padding: .82rem; gap: .3rem; color: var(--ink); }
.crm-app button.roster-item:hover { background: #f6f8fc; transform: none; }
.crm-app button.roster-item.selected { border-color: #bed0f3; background: #eef3ff; box-shadow: none; }
.crm-app .roster-identity { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.crm-app .roster-avatar { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: #e9efff; color: #3153a1; font-size: .73rem; font-weight: 800; }
.crm-app .roster-name { min-width: 0; display: grid; gap: .05rem; }
.crm-app .roster-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-app .roster-meta { margin-left: 2.58rem; color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-app .roster-item .contact-channels { margin-left: 2.58rem; }
.crm-app .detail { top: 6.2rem; padding: 1.25rem 1.4rem; }
.crm-app .detail h3 { font-size: 1.5rem; }
.crm-app .contact-list-panel { padding: .45rem; overflow: hidden; }
.crm-app .contact-list-head,
.crm-app .contact-row { display: grid; grid-template-columns: minmax(240px, 1.35fr) minmax(120px, .72fr) minmax(180px, 1fr) 112px 20px; align-items: center; gap: 1rem; }
.crm-app .contact-list-head { padding: .55rem .9rem .45rem; color: #71809a; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.crm-app button.contact-row { width: 100%; border: 1px solid transparent; border-bottom-color: #edf1f6; border-radius: 10px; padding: .78rem .9rem; text-align: left; color: var(--ink); background: transparent; }
.crm-app button.contact-row:last-of-type { border-bottom-color: transparent; }
.crm-app button.contact-row:hover { border-color: #dce5f4; background: #f8faff; transform: none; }
.crm-app button.contact-row.selected { border-color: #bfd1f2; background: #eef4ff; box-shadow: none; }
.crm-app .contact-row .roster-identity { min-width: 0; }
.crm-app .contact-row .roster-name small { overflow: hidden; color: #78869c; font-size: .73rem; text-overflow: ellipsis; white-space: nowrap; }
.crm-app .contact-row .contact-segment { overflow: hidden; color: #52637d; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.crm-app .contact-row-channels { min-width: 0; }
.crm-app .contact-channel-pills { display: flex; flex-wrap: wrap; gap: .3rem; }
.crm-app .contact-pill { display: inline-flex; align-items: center; gap: .28rem; border-radius: 999px; padding: .22rem .42rem; font-size: .64rem; font-weight: 750; white-space: nowrap; }
.crm-app .contact-pill i { width: .38rem; height: .38rem; border-radius: 50%; background: currentColor; }
.crm-app .contact-pill.is-on { color: #0d8b72; background: #e4f8f1; }
.crm-app .contact-pill.is-off { color: #bb5260; background: #fdecef; }
.crm-app .contact-pill.is-muted, .crm-app .contact-pill.is-empty { color: #8490a3; background: #f0f3f7; }
.crm-app .contact-row-status { justify-self: start; }
.crm-app .contact-row-arrow { color: #93a1b6; font-size: 1.25rem; line-height: 1; }
.crm-app .contact-list-empty { display: grid; justify-items: center; gap: .25rem; padding: 3rem 1rem; color: #6d7b92; text-align: center; }
.crm-app .contact-list-empty strong { color: var(--ink); }
.crm-app .contact-overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; padding: .75rem; border-color: #dbe5f2; background: #fbfcff; }
.crm-app .contact-overview > div { display: grid; gap: .2rem; min-width: 0; padding: .75rem .85rem; border: 1px solid #e4eaf3; border-radius: 11px; background: #fff; }
.crm-app .contact-overview span { color: #7a8ba5; font-size: .64rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.crm-app .contact-overview strong { color: #21375f; font-size: 1.3rem; letter-spacing: -.04em; }
.crm-app .contact-overview small { overflow: hidden; color: #8290a7; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.crm-app .contact-list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.crm-app .contact-list-toolbar .fine { margin: 0; }
.crm-app .contact-page-count { color: #7485a0; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.crm-app .contact-list-compact { gap: .4rem; padding: .45rem; }
.crm-app .contact-list-compact .contact-row { position: relative; grid-template-columns: 1fr; gap: .38rem; border: 1px solid #e5ebf4; background: #fbfcff; }
.crm-app .contact-list-compact .contact-row:hover, .crm-app .contact-list-compact .contact-row.selected { border-color: #bfd1f2; background: #eef4ff; }
.crm-app .contact-list-compact .contact-row-arrow { display: none; }
.crm-app .contact-list-compact .contact-row-status { position: absolute; top: .82rem; right: .78rem; }
.crm-app .kv { gap: .5rem 1rem; }
.crm-app .callout { background: #f1f5fc; }
.crm-app .modal-back, .crm-app .drawer-back { background: rgba(13, 24, 48, .55); backdrop-filter: blur(3px); }
.crm-app .modal, .crm-app .drawer { border-radius: 20px; }
.crm-app .drawer { border-radius: 20px 0 0 20px; }
.crm-app .affiliate-share-modal { width: min(720px, 100%); max-height: min(88vh, 820px); padding: 1.35rem; }
.crm-app .affiliate-profile-modal-back { display: grid; place-items: center; justify-content: initial; padding: 1.25rem; }
.crm-app .affiliate-profile-modal-back .drawer { width: min(820px, 100%); height: auto; max-height: min(88vh, 820px); overflow: auto; padding: 1.8rem; border-radius: 22px; }
.crm-app .affiliate-profile-modal-back .drawer > .row { align-items: flex-start; margin-bottom: .35rem; }
.crm-app .affiliate-profile-modal-back .drawer h2 { max-width: 620px; margin: .1rem 0 0; color: var(--ink); font-size: clamp(1.25rem, 2.5vw, 1.7rem); letter-spacing: -.035em; }
.crm-app .affiliate-profile-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.crm-app .affiliate-profile-form > label { display: grid; min-width: 0; gap: .38rem; color: #52637d; font-size: .78rem; font-weight: 750; }
.crm-app .affiliate-profile-form > label input { min-width: 0; width: 100%; }
.crm-app .affiliate-profile-form > label small { font-weight: 500; }
.crm-app .affiliate-profile-form > .actions { grid-column: 1 / -1; justify-content: flex-end; margin-top: .25rem; padding-top: 1rem; border-top: 1px solid #e4eaf3; }
.crm-app .affiliate-profile-form > .actions .error { flex-basis: 100%; order: -1; margin: 0; }
@media (max-width: 700px) {
  .crm-app .affiliate-profile-modal-back { padding: .65rem; }
  .crm-app .affiliate-profile-modal-back .drawer { padding: 1.15rem; border-radius: 18px; }
  .crm-app .affiliate-profile-form { grid-template-columns: 1fr; gap: .8rem; }
  .crm-app .affiliate-profile-form > .actions { grid-column: auto; }
  .crm-app .affiliate-profile-form > .actions button { width: 100%; justify-content: center; }
}
.crm-app .affiliate-share-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.crm-app .affiliate-share-head h2 { margin: .1rem 0 0; color: var(--ink); }
.crm-app .share-code-card { padding: .9rem 1rem; border: 1px solid #d7e3f6; border-radius: 14px; background: #f5f8ff; }
.crm-app .share-code-line { display: flex; align-items: center; gap: .7rem; margin-top: .35rem; }
.crm-app .share-code-line code { flex: 1 1 auto; overflow-wrap: anywhere; color: var(--primary); font-size: 1rem; font-weight: 800; }
.crm-app .share-link-field { display: grid; gap: .35rem; margin-top: 1rem; color: #52637d; font-size: .78rem; font-weight: 700; }
.crm-app .share-link-field input { color: #52637d; font-size: .78rem; }
.crm-app .share-link-actions { margin-top: .75rem; }
.crm-app .share-send-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; margin-top: 1.1rem; }
.crm-app .share-send-card { display: grid; gap: .65rem; padding: .95rem; border: 1px solid #dfe7f1; border-radius: 14px; background: #fff; }
.crm-app .share-send-card label { display: grid; gap: .35rem; color: #52637d; font-size: .76rem; font-weight: 700; }
.crm-app .share-send-card input { width: 100%; }
.crm-app .share-send-card button { justify-self: start; }
.crm-app .share-status { min-height: 1.2rem; margin: 0; color: #6b7d97; font-size: .75rem; }
.crm-app .share-status.is-success { color: #0e8065; font-weight: 700; }
.crm-app .share-status.is-error { color: #b13f4c; font-weight: 700; }
.crm-app .share-missing { margin-top: 1rem; padding: .85rem 1rem; border: 1px solid #e7dfc5; border-radius: 13px; background: #fffaf0; }
.crm-app .share-missing p { margin: .2rem 0 .7rem; color: #7b6a47; font-size: .78rem; }
.crm-app .share-empty { padding: 1.4rem 1rem; border: 1px dashed #cbd8ec; border-radius: 14px; background: #f7faff; text-align: center; }
.crm-app .share-empty p { margin: .35rem auto 1rem; max-width: 520px; color: #65758d; }
.crm-app .share-ready-note { margin: .9rem 0 0; }
.crm-app.affiliate-modal-open { overflow: hidden; }

/* Dashboard com próxima ação visível */
.crm-app .dashboard-hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; min-height: 214px; padding: clamp(1.35rem, 3.5vw, 2.25rem); border-radius: 20px; background: linear-gradient(120deg, #14264a 0%, #203b78 72%, #344f96 100%); color: #fff; box-shadow: 0 16px 36px rgba(24, 48, 99, .16); }
.crm-app .dashboard-hero::after { content: ""; position: absolute; z-index: -1; width: 390px; height: 390px; top: -200px; right: -30px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; box-shadow: 0 0 0 50px rgba(255,255,255,.025), 0 0 0 100px rgba(255,255,255,.025); }
.crm-app .dashboard-hero .eyebrow { color: #abc5fa; }
.crm-app .dashboard-hero h2 { max-width: 610px; margin: .55rem 0 .45rem; color: #fff; font-size: clamp(1.8rem, 3vw, 2.55rem); line-height: 1.14; letter-spacing: -.055em; }
.crm-app .dashboard-hero p:not(.eyebrow) { margin: 0; max-width: 540px; color: #c9d8f2; }
.crm-app .dashboard-hero .actions { margin-top: 1.35rem; }
.crm-app .dashboard-hero button { background: #fff; color: #1c3b81; }
.crm-app .dashboard-hero button:hover { background: #e9efff; color: #1c3b81; }
.crm-app .dashboard-hero button.ghost { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.25); color: #fff; }
.crm-app .dashboard-hero button.ghost:hover { background: rgba(255,255,255,.19); }
.crm-app .hero-stat { flex: none; align-self: center; min-width: 172px; padding: 1.1rem; border: 1px solid rgba(255,255,255,.17); border-radius: 16px; background: rgba(255,255,255,.095); backdrop-filter: blur(8px); }
.crm-app .hero-stat small { display: block; color: #ccdaf2; font-size: .72rem; }
.crm-app .hero-stat strong { display: block; margin: .2rem 0; font-size: 2rem; letter-spacing: -.07em; line-height: 1.1; }
.crm-app .metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; }
.crm-app .metric-card { position: relative; display: grid; gap: .9rem; min-width: 0; padding: 1.1rem 1.15rem; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); text-align: left; box-shadow: var(--shadow); }
.crm-app .metric-card:hover { background: #fff; border-color: #b9c9e6; color: var(--ink); box-shadow: 0 15px 32px rgba(25,47,95,.1); }
.crm-app .metric-card span { color: var(--muted); font-size: .76rem; font-weight: 650; }
.crm-app .metric-card strong { font-size: clamp(1.8rem, 2.5vw, 2.4rem); line-height: 1; letter-spacing: -.07em; }
.crm-app .metric-card small { color: #8795a9; font-size: .67rem; }
.crm-app .metric-card::before { content: ""; position: absolute; top: 1.12rem; right: 1.15rem; width: 9px; height: 9px; border-radius: 3px; background: #7b96d7; }
.crm-app .metric-card[data-tone="rose"]::before { background: #ef7080; }
.crm-app .metric-card[data-tone="green"]::before { background: #33b29a; }
.crm-app .metric-card[data-tone="amber"]::before { background: #e3aa48; }
.crm-app .dashboard-lower { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(290px, .75fr); gap: 1rem; align-items: start; }
.crm-app .dashboard-panel { padding: 1.25rem 1.35rem; }
.crm-app .dashboard-panel h3 { margin: .15rem 0 .65rem; font-size: 1.2rem; letter-spacing: -.035em; }
.crm-app .dashboard-panel > p.fine { line-height: 1.6; margin: 0; }
.crm-app .dashboard-panel .kv { grid-template-columns: 8.4rem 1fr; font-size: .8rem; margin-top: .9rem; }
.crm-app .dashboard-panel .kv dt { color: var(--muted); }
.crm-app .dashboard-panel .kv dd { font-weight: 600; }
.crm-app .dashboard-next { background: linear-gradient(150deg,#fff,#f8faff); }
.crm-app .dashboard-next .next-number { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #e8efff; color: var(--primary); font-weight: 800; }
.crm-app .dashboard-next .actions { margin-top: 1.1rem; }
.crm-app .result-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .85rem; }
.crm-app .result-card { padding: 1rem 1.15rem; display: grid; gap: .18rem; }
.crm-app .result-card strong { font-size: 1.6rem; line-height: 1.1; letter-spacing: -.05em; }
.crm-app .result-card span { color: var(--muted); font-size: .74rem; }
.crm-app .section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; margin-bottom: -.4rem; }
.crm-app .section-heading h3 { margin: 0; font-size: 1rem; letter-spacing: -.03em; }
.crm-app .section-heading p { margin: 0; }

/* Formulários e listas */
.crm-app .studio { grid-template-columns: minmax(0,1fr) minmax(290px,340px); gap: 1rem; }
.crm-app .studio-form { padding: 1.4rem; gap: 1.1rem; }
.crm-app .studio-intro { display: flex; align-items: flex-start; gap: .7rem; }
.crm-app .step-number { display: grid; place-items: center; width: 31px; height: 31px; flex: none; border-radius: 9px; background: #e9efff; color: var(--primary); font-size: .72rem; font-weight: 800; }
.crm-app .studio-intro h3 { margin: 0; font-size: 1rem; letter-spacing: -.025em; }
.crm-app .studio-intro p { margin: .15rem 0 0; color: var(--muted); font-size: .75rem; }
.crm-app .studio-divider { height: 1px; background: var(--line); }
.crm-app .studio-controls { align-items: end; }
.crm-app .switch { background: #eef1f7; }
.crm-app .switch button { background: transparent; color: #596d8e; }
.crm-app .switch button.on { background: #fff; color: var(--primary); }
.crm-app .public-field select, .crm-app .inline-select select { border-radius: 10px; }
.crm-app .mail-stage { border: 1px solid #dbe5f3; background: #edf2fa; }
.crm-app .mail-stage.is-chat { background: #e9f2ee; }
.crm-app .audience-hero strong { color: var(--primary); }
.crm-app button.art-card { background: #fff; color: var(--ink); }
.crm-app button.art-card:hover { background: #fff; }
.crm-app .used-shelf, .crm-app .import-counts span { background: #f3f6fb; }
.crm-app .campaign-row, .crm-app .source-card, .crm-app .queue-item { transition: border-color .2s, box-shadow .2s; }
.crm-app .campaign-row:hover, .crm-app .source-card:hover, .crm-app .queue-item:hover { border-color: #bdcde6; box-shadow: 0 12px 28px rgba(30,50,85,.08); }
.crm-app .delivery-state { background: #f8faff; }
.crm-app .source-guide { background: linear-gradient(140deg,#fff,#edf4ff); }
.crm-app .source-mark { background: #edf1ff; color: var(--primary); }
.crm-app .queue-hero { background: linear-gradient(115deg,#fff,#eef3ff); }
.crm-app .queue-stat { background: #fff; color: var(--ink); }
.crm-app .queue-stat:hover, .crm-app .queue-stat.selected { background: #eaf0ff; border-color: #b6c6ed; color: var(--primary); }
.crm-app .queue-action { background: #fff; color: #394962; }
.crm-app .queue-action:hover { background: #f1f5ff; border-color: #aac0e6; color: var(--primary); }
.crm-app .queue-filters { padding: 1rem; }
.crm-app .import-drop { background: #f3f7ff; border-color: #adbfdf; }
.crm-app .import-icon, .crm-app .import-drop-icon { background: #e8efff; color: var(--primary); }
.crm-app .import-issues { background: #fff9ed; }
.crm-app .log { background: #15213a; }
.crm-app .admin-summary-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .8rem; margin-bottom: 1rem; }
.crm-app .admin-workspace { display: grid; grid-template-columns: minmax(260px,.7fr) minmax(0,1.3fr); gap: 1rem; align-items: start; }
.crm-app .admin-workspace > .detail, .crm-app .admin-rep-card { padding: 1.1rem; }
.crm-app .admin-representatives-list { display: grid; gap: .75rem; margin-top: 1rem; }
.crm-app .admin-rep-heading { align-items: flex-start; justify-content: space-between; gap: 1rem; }
.crm-app .admin-rep-heading strong { overflow-wrap: anywhere; }
.crm-app .admin-rep-heading .fine { margin: .25rem 0 0; }
.crm-app .admin-limits { margin-top: .9rem; }
.crm-app .admin-queue-enabled { margin-top: .95rem; }
.crm-app .admin-rep-actions { margin-top: .8rem; }
.crm-app .admin-password-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .55rem; margin-top: .7rem; }
.crm-app .admin-affiliate-registrations { display: grid; gap: .5rem; margin: .85rem 0; padding: .75rem .85rem; border: 1px solid #dce6f3; border-radius: 11px; background: #f8fbff; }
.crm-app .admin-affiliate-registrations > strong { color: #405574; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.crm-app .admin-affiliate-registrations > div { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; padding-top: .45rem; border-top: 1px solid #e7edf5; }
.crm-app .admin-affiliate-registrations > div span { color: #243654; font-weight: 700; }
.crm-app .admin-affiliate-registrations > div small { color: #536987; text-align: right; }
.crm-app .admin-affiliate-registrations code { color: #2448aa; font-weight: 800; }
.crm-app .admin-affiliate-registrations-empty { margin: .75rem 0; }
.crm-app .admin-default-queue { padding: 1.1rem; margin-bottom: 1rem; border: 1px solid #cddbf0; background: linear-gradient(135deg,#f8fbff,#eef4ff); }
.crm-app .admin-default-queue h3 { margin: .15rem 0 .35rem; }
.crm-app .admin-default-queue .fine { margin-top: 0; }
.crm-app .admin-default-grid { margin-top: 1rem; }
.crm-app .admin-default-grid input[readonly], .crm-app .admin-default-grid input:disabled { background: #fff; color: #5b6d89; cursor: default; }
.crm-app .admin-default-actions { margin-top: 1rem; }
.crm-app .affiliate-code-panel { max-width: 760px; }
.crm-app .affiliate-link-box { display: grid; gap: .25rem; margin-top: 1rem; padding: .85rem 1rem; border: 1px solid #cfe0f4; border-radius: 12px; background: #f3f8ff; }
.crm-app .affiliate-link-box a { overflow-wrap: anywhere; color: var(--primary); font-weight: 700; }
.crm-app .affiliate-panel-link-box { background: #f2fbf8; border-color: #c7e8dd; }
.crm-app .affiliate-panel-link-box .ghost { justify-self: start; margin-top: .35rem; }
.crm-app #queue-form input[readonly] { background: #f1f4f8; color: #64748b; cursor: not-allowed; }
.crm-app .section-tabs { display: flex; gap: .45rem; overflow-x: auto; padding: .35rem; margin-bottom: 1rem; border: 1px solid #dce5f3; border-radius: 14px; background: #f2f6fc; scrollbar-width: thin; }
.crm-app .section-tabs button { flex: 0 0 auto; border: 1px solid transparent; border-radius: 10px; padding: .7rem .95rem; background: transparent; color: #5a6c89; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.crm-app .section-tabs button:hover { border-color: #c7d5eb; background: #eaf0fb; color: var(--primary); }
.crm-app .section-tabs button.active { border-color: #cad8ed; background: #fff; color: var(--primary); box-shadow: 0 5px 14px rgba(30,50,85,.08); }
.crm-app .config-panels, .crm-app .affiliate-panel { display: grid; gap: 1rem; }
.crm-app .config-panel[hidden], .crm-app .affiliate-panel[hidden] { display: none; }
.crm-app .config-panel > .detail { min-height: 100%; }
.crm-app .config-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(270px, .8fr); gap: 1rem; align-items: start; }
.crm-app .config-main-stack, .crm-app .config-side-stack { display: grid; gap: 1rem; min-width: 0; }
.crm-app .config-layout .detail { position: static; }
.crm-app .config-card-heading, .crm-app .config-info-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.crm-app .config-card-heading h3 { margin: .15rem 0 0; }
.crm-app .config-card-heading .fine { margin: .35rem 0 0; }
.crm-app .config-state-pill { display: inline-flex; align-items: center; gap: .4rem; flex: none; padding: .4rem .62rem; border: 1px solid #dbe3ef; border-radius: 999px; background: #f6f8fc; color: #71809a; font-size: .7rem; font-weight: 800; white-space: nowrap; }
.crm-app .config-state-pill i { width: .45rem; height: .45rem; border-radius: 50%; background: #a9b4c4; }
.crm-app .config-state-pill.is-ready { border-color: #bfe3d4; background: #effaf5; color: #0f8066; }
.crm-app .config-state-pill.is-ready i { background: #1eaa79; box-shadow: 0 0 0 .18rem rgba(30,170,121,.12); }
.crm-app .config-state-pill.is-neutral { color: #2445aa; border-color: #cad8f2; background: #f0f4ff; }
.crm-app .config-state-pill.is-neutral i { background: #5578d1; }
.crm-app .config-form-grid { margin-top: .25rem; }
.crm-app .config-form-grid label { display: grid; gap: .38rem; }
.crm-app .config-form-grid .config-form-wide { grid-column: 1 / -1; }
.crm-app .config-form-grid small { color: #7b8aa1; font-size: .72rem; font-weight: 450; line-height: 1.4; }
.crm-app .config-checks { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; padding: .75rem .85rem; border: 1px solid #e0e7f1; border-radius: 12px; background: #f8faff; }
.crm-app .config-checks .checks { margin: 0; }
.crm-app .locked-hint { color: #8795aa; font-size: .7rem; font-weight: 500; }
.crm-app .config-info-panel { padding: 1.1rem 1.15rem; }
.crm-app .config-info-panel h3 { margin: .15rem 0 .8rem; font-size: 1.18rem; letter-spacing: -.03em; }
.crm-app .config-summary { display: grid; grid-template-columns: minmax(90px, .65fr) minmax(0, 1.35fr); gap: .55rem .8rem; margin: 0; padding-top: .8rem; border-top: 1px solid #e5ebf3; }
.crm-app .config-summary dt { color: #76859c; font-size: .77rem; }
.crm-app .config-summary dd { margin: 0; overflow-wrap: anywhere; color: #283b5e; font-size: .79rem; font-weight: 700; text-align: right; }
.crm-app .config-steps { display: grid; gap: .8rem; margin: 0; padding: 0; list-style: none; }
.crm-app .config-steps li { display: flex; align-items: flex-start; gap: .65rem; }
.crm-app .config-steps li > span { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; flex: 0 0 auto; border-radius: 50%; background: #e9efff; color: #294baa; font-size: .72rem; font-weight: 850; }
.crm-app .config-steps strong { display: block; color: #2b3d60; font-size: .82rem; }
.crm-app .config-steps p { margin: .12rem 0 0; color: #71809a; font-size: .76rem; line-height: 1.45; }
.crm-app .config-security-panel { background: linear-gradient(145deg, #f7fbff, #eef5ff); border-color: #cfddf1; }
.crm-app .config-security-panel .fine { margin: 0; line-height: 1.55; }
.crm-app .config-note { display: flex; align-items: flex-start; gap: .55rem; margin-top: .9rem; padding: .65rem .7rem; border-radius: 10px; background: #fff; color: #43608f; }
.crm-app .config-note > span { color: #168b70; font-size: 1rem; font-weight: 850; line-height: 1.2; }
.crm-app .config-note p { margin: 0; font-size: .76rem; line-height: 1.4; }
.crm-app .config-number-badge { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; flex: none; border-radius: 50%; background: #e9efff; color: #294baa; font-size: .75rem; font-weight: 850; }
.crm-app .affiliate-overview-grid { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(280px,.8fr); gap: 1rem; }
.crm-app .affiliate-overview-grid .detail { padding: 1.25rem; }
.crm-app .admin-checklist { display: grid; gap: .85rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.crm-app .admin-checklist li { display: flex; align-items: flex-start; gap: .7rem; }
.crm-app .admin-checklist li > span { display: grid; place-items: center; width: 1.45rem; height: 1.45rem; flex: 0 0 auto; border-radius: 50%; background: #e8f6ee; color: #16844a; font-weight: 800; }
.crm-app .admin-checklist strong { display: block; }
.crm-app .admin-checklist .fine { margin: .15rem 0 0; }
.crm-app .report-summary-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: .8rem; margin-bottom: 1rem; }
.crm-app .report-filter { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-bottom: 1rem; padding: 1rem 1.15rem; border: 1px solid #d7e2f3; background: #f8fbff; }
.crm-app .report-filter h3 { margin: .15rem 0 .35rem; }
.crm-app .report-filter .fine { max-width: 660px; margin: 0; }
.crm-app .report-filter label { min-width: min(300px,100%); }
.crm-app .report-filter select { width: 100%; margin-top: .3rem; }
.crm-app .contact-report-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .8rem; margin-bottom: 1rem; }
.crm-app .contact-report-panel { padding: 1.1rem; margin-bottom: 1rem; }
.crm-app .contact-report-panel h3 { margin: .15rem 0 .35rem; }
.crm-app .contact-report-panel .fine { margin: 0; }
.crm-app .contact-report-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .65rem; margin-top: 1rem; }
.crm-app .contact-report-list article { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .75rem .85rem; border: 1px solid #dfe7f2; border-radius: 11px; background: #fbfcfe; }
.crm-app .contact-report-list strong { color: var(--ink); font-size: 1.1rem; }
.crm-app .contact-report-list span { color: #667893; font-size: .76rem; font-weight: 700; }
.crm-app .contact-report-subtitle { margin-top: 1.1rem; }
.crm-app .report-overview { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-bottom: 1rem; padding: 1.15rem 1.25rem; }
.crm-app .report-overview h3 { margin: .15rem 0 .35rem; }
.crm-app .report-overview .fine { margin: 0; }
.crm-app .report-chip-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .55rem; }
.crm-app .report-chip { display: grid; min-width: 86px; gap: .1rem; padding: .65rem .75rem; border: 1px solid #d8e2f0; border-radius: 12px; background: #f7f9fd; text-align: center; }
.crm-app .report-chip strong { color: var(--ink); font-size: 1.25rem; }
.crm-app .report-chip small { color: #667893; font-size: .7rem; font-weight: 700; }
.crm-app .report-chip.is-done { background: #edf8f1; border-color: #c7ead4; }
.crm-app .report-chip.is-progress { background: #eef4ff; border-color: #cad9f5; }
.crm-app .report-chip.is-danger { background: #fff0f1; border-color: #f4cbd0; }
.crm-app .report-chip.is-muted { background: #f1f3f6; border-color: #d9dfe8; }
.crm-app .report-table-panel { padding: 1.1rem; }
.crm-app .report-table-panel .table-wrap { margin-top: 1rem; }
.crm-app .report-table-panel table { min-width: 760px; }
.crm-app .report-table-panel td { vertical-align: middle; }
.crm-app .report-table-panel td .tag { margin-top: .25rem; }
.crm-app .report-state { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; font-size: .78rem; }
.crm-app .report-state i { width: .48rem; height: .48rem; border-radius: 50%; background: #94a3b8; }
.crm-app .report-state.is-done i { background: #27a45d; }
.crm-app .report-state.is-progress i { background: #3f75df; }
.crm-app .report-state.is-danger i { background: #dc4c5c; }
.crm-app .ai-advisor, .crm-app .report-ai-panel { margin-top: 1rem; padding: 1.1rem 1.2rem; border: 1px solid #cddcf2; background: linear-gradient(135deg,#f8fbff,#eef4ff); }
.crm-app .ai-advisor h3, .crm-app .report-ai-panel h3 { margin: .15rem 0 .35rem; }
.crm-app .ai-advisor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.crm-app .ai-advisor-head .fine { max-width: 680px; margin: 0; }
.crm-app .ai-connection-status { display: inline-flex; align-items: center; gap: .35rem; flex: none; padding: .4rem .6rem; border: 1px solid #d8e1ee; border-radius: 999px; background: #fff; color: #71809a; font-size: .72rem; font-weight: 750; }
.crm-app .ai-connection-status i { width: .45rem; height: .45rem; border-radius: 50%; background: #a5afbe; }
.crm-app .ai-connection-status.is-on { border-color: #bfe3d4; background: #effaf5; color: #0f8066; }
.crm-app .ai-connection-status.is-on i { background: #1eaa79; }
.crm-app .ai-advisor-actions { margin-top: 1rem; }
.crm-app .ai-model-controls { display: flex; align-items: flex-end; flex-wrap: wrap; gap: .75rem; margin-top: .75rem; padding: .75rem; border: 1px solid #dbe5f4; border-radius: 12px; background: rgba(255,255,255,.72); }
.crm-app .ai-model-field { display: grid; gap: .35rem; min-width: min(390px, 100%); color: #52637d; font-size: .78rem; font-weight: 700; }
.crm-app .ai-model-field select { width: 100%; min-width: 280px; }
.crm-app .ai-free-only { margin: 0; white-space: nowrap; }
.crm-app .ai-model-status { flex: 1 1 220px; min-width: 180px; }
.crm-app .button-link { display: inline-flex; align-items: center; border-radius: 999px; padding: .7rem 1.1rem; background: var(--primary); color: white; font-weight: 700; text-decoration: none; }
.crm-app .button-link:hover { background: #1d3c9e; color: #fff; }
.crm-app .ai-scope-label { display: inline-flex; align-items: center; grid-template-columns: auto; gap: .45rem; color: #60718b; font-size: .8rem; }
.crm-app .ai-scope-label select { width: auto; min-width: 220px; }
.crm-app .ai-result { display: grid; gap: .85rem; margin-top: 1rem; padding: 1rem; border: 1px solid #cfddf1; border-radius: 14px; background: #fff; }
.crm-app .ai-result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.crm-app .ai-result-head p { margin: .25rem 0 0; color: #546783; }
.crm-app .ai-suggested-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .55rem; }
.crm-app .ai-suggested-grid span { display: grid; gap: .2rem; padding: .65rem .7rem; border-radius: 10px; background: #f4f7fc; color: #71809a; font-size: .7rem; font-weight: 750; }
.crm-app .ai-suggested-grid strong { color: var(--ink); font-size: .9rem; }
.crm-app .ai-result ul { margin: .35rem 0 0; padding-left: 1.1rem; color: #52637d; }
.crm-app .ai-apply-status { min-height: 1.2rem; margin: 0; font-size: .8rem; font-weight: 700; }
.crm-app .ai-apply-status.is-success { color: #0e8065; }
.crm-app .ai-apply-status.is-error { color: #b13f4c; }
.crm-app .ai-warning { padding: .65rem .75rem; border-radius: 10px; background: #fff7e8; }
.crm-app .ai-recommendations { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .6rem; }
.crm-app .ai-recommendations article { padding: .75rem; border: 1px solid #e0e7f1; border-radius: 11px; background: #fbfcff; }
.crm-app .ai-recommendations article p { margin: .25rem 0; color: #52637d; font-size: .82rem; }
.crm-app .ai-recommendations article span { color: #71809a; font-size: .75rem; }
.crm-app .ai-goal-grid { margin-top: 1rem; max-width: 680px; }

/* Responsividade */
@media (max-width: 1200px) {
  .crm-app .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .crm-app .dashboard-lower { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .crm-app .shell { display: block; }
  .crm-app .side { position: fixed; left: 0; top: 0; bottom: 0; width: min(290px, 86vw); height: 100dvh; max-height: none; transform: translateX(-103%); transition: transform .23s ease; z-index: 31; box-shadow: 15px 0 36px rgba(15,28,57,.18); }
  .crm-app .shell.menu-open .side { transform: translateX(0); }
  .crm-app .mobile-backdrop:not([hidden]) { position: fixed; inset: 0; display: block; background: rgba(12,25,51,.54); z-index: 30; }
  .crm-app.menu-is-open { overflow: hidden; }
  .crm-app .side .tabs { display: grid; flex-wrap: initial; overflow: visible; }
  .crm-app .menu-toggle { display: grid; place-items: center; }
  .crm-app .menu-toggle:hover { background: #e8eeff; color: var(--primary); }
  .crm-app .studio, .crm-app .source-layout, .crm-app .source-guide { grid-template-columns: 1fr; }
  .crm-app .studio-side, .crm-app .source-form { position: static; }
  .crm-app .content-wrap { padding-top: 1.1rem; }
}
@media (max-width: 1050px) {
  .crm-app .contact-list-head, .crm-app .contact-row { grid-template-columns: minmax(210px, 1.3fr) minmax(100px, .7fr) minmax(150px, 1fr) 100px 16px; gap: .65rem; }
}
@media (max-width: 700px) {
  .crm-app .auth-shell { display: block; }
  .crm-app .auth-story { min-height: auto; padding: 1.5rem 1.4rem; }
  .crm-app .platform-brand-auth { width: 220px; }
  .crm-app .auth-story .brand-lockup { width: 180px; }
  .crm-app .auth-story .crm-logo-image { width: 160px; }
  .crm-app .auth-story-copy { display: none; }
  .crm-app .auth-story-foot { display: none; }
  .crm-app .auth-shell form { width: min(440px,calc(100% - 2rem)); margin: 1.5rem auto; padding: 1.4rem; }
  .crm-app .crm-topbar { min-height: 64px; padding: .55rem 1rem; }
  .crm-app .topbar-date, .crm-app .topbar-help { display: none; }
  .crm-app .affiliate-panel-link { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
  .crm-app .topbar-avatar { width: 32px; height: 32px; }
  .crm-app .banner, .crm-app #main { width: calc(100% - 1.5rem); }
  .crm-app .banner { align-items: flex-start; font-size: .72rem; }
  .crm-app .page-head { align-items: flex-start; }
  .crm-app .page-head .actions { justify-content: flex-start; width: 100%; }
  .crm-app .page-head .actions button { flex: 1 1 auto; }
  .crm-app .dashboard-hero { min-height: 0; display: block; padding: 1.4rem; }
  .crm-app .dashboard-hero h2 { font-size: 1.8rem; }
  .crm-app .dashboard-hero .actions button { flex: 1 1 auto; }
  .crm-app .hero-stat { margin-top: 1.25rem; min-width: 0; }
  .crm-app .metric-grid { gap: .55rem; }
  .crm-app .metric-card { padding: .9rem; gap: .55rem; }
  .crm-app .metric-card strong { font-size: 1.8rem; }
  .crm-app .metric-card small { display: none; }
  .crm-app .result-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: .5rem; }
  .crm-app .result-card { padding: .8rem; }
  .crm-app .result-card strong { font-size: 1.35rem; }
  .crm-app .dashboard-panel .kv { grid-template-columns: 7.2rem 1fr; }
  .crm-app .workspace { grid-template-columns: 1fr; }
  .crm-app .config-layout { grid-template-columns: 1fr; }
  .crm-app .config-card-heading { align-items: flex-start; }
  .crm-app .admin-workspace { grid-template-columns: 1fr; }
  .crm-app .roster { max-height: none; min-height: 0; }
  .crm-app .workspace.has-selection .roster { display: none; }
  .crm-app .affiliate-overview-grid { grid-template-columns: 1fr; }
  .crm-app .report-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .crm-app .report-filter { display: block; }
  .crm-app .report-filter label { display: block; margin-top: 1rem; }
  .crm-app .contact-report-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .crm-app .contact-report-list { grid-template-columns: 1fr; }
  .crm-app .report-overview { display: block; }
  .crm-app .report-chip-row { justify-content: flex-start; margin-top: 1rem; }
  .crm-app .ai-advisor-head, .crm-app .ai-result-head { display: block; }
  .crm-app .ai-connection-status { margin-top: .8rem; }
  .crm-app .ai-model-controls { align-items: stretch; }
  .crm-app .ai-model-field, .crm-app .ai-model-field select { min-width: 100%; }
  .crm-app .affiliate-share-modal { padding: 1rem; }
  .crm-app .share-code-line, .crm-app .share-link-actions { align-items: stretch; flex-direction: column; }
  .crm-app .share-code-line button, .crm-app .share-link-actions > * { width: 100%; justify-content: center; }
  .crm-app .share-send-grid { grid-template-columns: 1fr; }
  .crm-app .ai-suggested-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .crm-app .ai-recommendations { grid-template-columns: 1fr; }
  .crm-app .detail { position: static; padding: 1.1rem; }
  .crm-app .detail-back { display: inline-flex; }
  .crm-app .contact-list-head { display: none; }
  .crm-app .contact-list-panel { padding: .35rem; }
  .crm-app .contact-list-panel .contact-row { grid-template-columns: minmax(0, 1fr) auto; gap: .45rem .7rem; padding: .8rem; }
  .crm-app .contact-list-panel .contact-row .contact-segment { grid-column: 1; }
  .crm-app .contact-list-panel .contact-row .contact-row-channels { grid-column: 1; }
  .crm-app .contact-list-panel .contact-row .contact-row-status { grid-column: 2; grid-row: 1 / span 2; align-self: start; }
  .crm-app .contact-list-panel .contact-row .contact-row-arrow { display: none; }
  .crm-app .toolbar input, .crm-app .toolbar select { width: 100%; min-width: 0; }
  .crm-app .contact-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crm-app .contact-list-toolbar { align-items: flex-start; flex-direction: column; }
  .crm-app .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .35rem; scrollbar-width: thin; }
  .crm-app .chips button { flex: none; }
  .crm-app .queue-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .crm-app .admin-summary-grid { grid-template-columns: 1fr; }
  .crm-app .admin-password-row { grid-template-columns: 1fr; }
  .crm-app .queue-hero { display: grid; }
  .crm-app .queue-rule { width: fit-content; }
  .crm-app .campaign-row { grid-template-columns: 48px minmax(0,1fr); gap: .65rem; }
  .crm-app .campaign-row > img, .crm-app .campaign-row .ph { width: 48px; height: 48px; }
  .crm-app .campaign-row .actions { grid-column: 1 / -1; }
  .crm-app .campaign-row .actions > * { flex: 1 1 auto; text-align: center; }
  .crm-app .queue-item-main { grid-template-columns: minmax(0,1fr) auto; }
  .crm-app .queue-item-status { grid-column: 1; }
  .crm-app .queue-clicks { grid-column: 2; grid-row: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .crm-app *, .crm-app *::before, .crm-app *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
.crm-app .managed-integration { padding: .95rem 1rem; border: 1px solid #d8e3f0; border-radius: .85rem; background: #f7faff; }
.crm-app .managed-integration strong { color: #1f3152; }
.crm-app .managed-integration .fine { margin: .45rem 0 0; line-height: 1.5; }
.crm-app .whatsapp-connection-badge { display: inline-flex; align-items: center; gap: .45rem; width: fit-content; margin: 0; padding: .48rem .7rem; border: 1px solid #bfe3d4; border-radius: 999px; background: #effaf5; color: #0f8066; font-size: .82rem; font-weight: 800; }
.crm-app .whatsapp-connection-badge i { width: .55rem; height: .55rem; border-radius: 50%; background: #1eaa79; box-shadow: 0 0 0 .18rem rgba(30,170,121,.14); }
.crm-app #zap-status.is-connected { color: #0f8066; font-weight: 750; }
.crm-app .guide-launch { padding: .48rem .7rem; border: 1px solid #cdd9ee; border-radius: 999px; background: #f4f7ff; color: #2445aa; font-size: .76rem; font-weight: 800; white-space: nowrap; }
.crm-app .guide-launch:hover { background: #eaf0ff; }
.crm-app .welcome-guide-modal { width: min(720px, calc(100vw - 2rem)); max-height: min(88vh, 760px); overflow: auto; padding: 1.35rem; }
.crm-app .welcome-guide-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid #e0e7f1; }
.crm-app .welcome-guide-head h2 { margin: .25rem 0 .35rem; font-size: 1.7rem; letter-spacing: -.04em; }
.crm-app .welcome-guide-head .fine { margin: 0; }
.crm-app .welcome-guide-progress { padding: 1rem 0 .8rem; }
.crm-app .welcome-guide-progress .row { align-items: center; color: #263b61; }
.crm-app .welcome-guide-progress .row span { color: #55709c; font-weight: 800; }
.crm-app .welcome-guide-progress-bar { height: .5rem; margin-top: .6rem; overflow: hidden; border-radius: 999px; background: #e9eef6; }
.crm-app .welcome-guide-progress-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #274ab4, #1eaa79); transition: width .25s ease; }
.crm-app .welcome-guide-steps { display: grid; gap: .65rem; }
.crm-app .welcome-guide-step { display: grid; grid-template-columns: 2.1rem 1fr auto; gap: .75rem; align-items: center; padding: .8rem .85rem; border: 1px solid #dbe3ef; border-radius: .85rem; background: #fff; }
.crm-app .welcome-guide-step.is-done { border-color: #c8e6d8; background: #f5fbf8; }
.crm-app .welcome-guide-step-number { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: #edf2ff; color: #2445aa; font-size: .75rem; font-weight: 850; }
.crm-app .welcome-guide-step.is-done .welcome-guide-step-number { background: #d9f3e7; color: #0f8066; }
.crm-app .welcome-guide-step strong { color: #263653; }
.crm-app .welcome-guide-step p { margin: .2rem 0 0; color: #7082a1; font-size: .82rem; line-height: 1.4; }
.crm-app .welcome-guide-step button { min-width: 5rem; padding: .55rem .7rem; }
.crm-app .welcome-guide-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid #e0e7f1; }
.crm-app .welcome-guide-footer .fine { margin: 0; }
@media (max-width: 720px) {
  .crm-app .welcome-guide-step { grid-template-columns: 2rem 1fr; }
  .crm-app .welcome-guide-step button { grid-column: 2; justify-self: start; }
  .crm-app .welcome-guide-footer { align-items: flex-start; flex-direction: column; }
}

/* Catálogo de produtos e permissões de divulgação. */
.crm-app .products-intro { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: clamp(1.2rem, 3vw, 1.8rem); border: 1px solid #d5e1f1; background: linear-gradient(120deg, #eef4ff, #fff); }
.crm-app .products-intro h3 { margin: .25rem 0 .45rem; color: #1d2e51; font-size: 1.35rem; letter-spacing: -.04em; }
.crm-app .products-intro .fine { max-width: 680px; margin: 0; line-height: 1.6; }
.crm-app .product-intro-icon { display: grid; place-items: center; width: 58px; height: 58px; flex: 0 0 58px; border-radius: 17px; background: #274bb4; color: #fff; font-size: 1.45rem; box-shadow: 0 12px 24px rgba(39, 75, 180, .2); }
.crm-app .products-admin-layout { display: grid; grid-template-columns: minmax(310px, .72fr) minmax(0, 1.28fr); gap: 1rem; align-items: start; }
.crm-app .product-editor { display: grid; gap: .85rem; padding: 1.25rem; }
.crm-app .product-editor-head, .crm-app .product-list-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.crm-app .product-editor-head h3, .crm-app .product-list-head h3 { margin: .25rem 0 0; color: #203252; font-size: 1.15rem; letter-spacing: -.04em; }
.crm-app .product-editor label, .crm-app .product-editor .checks { font-size: .78rem; font-weight: 700; }
.crm-app .product-editor textarea { min-height: 5rem; }
.crm-app .product-integration-box, .crm-app .product-signup-box, .crm-app .product-affiliate-box { display: grid; gap: .75rem; padding: 1rem; border: 1px solid #dce5f1; border-radius: 13px; background: #f8faff; }
.crm-app .product-integration-box h4, .crm-app .product-signup-box h4, .crm-app .product-affiliate-box h4 { margin: .2rem 0 .3rem; color: #263858; font-size: .85rem; }
.crm-app .product-integration-box .fine, .crm-app .product-signup-box .fine, .crm-app .product-affiliate-box .fine { margin: 0; line-height: 1.45; }
.crm-app .product-affiliate-list { display: grid; gap: .45rem; max-height: 190px; overflow: auto; }
.crm-app .product-affiliate-list label { display: flex; align-items: center; gap: .55rem; padding: .55rem .65rem; border: 1px solid #e0e7f1; border-radius: 9px; background: #fff; font-weight: 650; }
.crm-app .product-affiliate-list label small { margin-left: auto; color: #b2762d; font-size: .68rem; }
.crm-app .product-scope-toggle { display: flex; align-items: flex-start; gap: .55rem; padding: .65rem .75rem; border: 1px solid #d7e3f2; border-radius: .7rem; background: #fff; color: #29426d; font-size: .75rem; font-weight: 750; }
.crm-app .product-scope-toggle small { display: block; margin-left: auto; color: #8493aa; font-size: .68rem; font-weight: 600; }
.crm-app .product-affiliate-list.is-locked { opacity: .55; }
.crm-app .product-affiliate-list label.is-locked { cursor: not-allowed; }
.crm-app .product-list-panel { min-width: 0; }
.crm-app .product-list-head { align-items: end; margin-bottom: .75rem; padding: 0 .2rem; }
.crm-app .product-list-head .fine { margin: 0; }
.crm-app .product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.crm-app .product-card { display: grid; gap: .85rem; min-width: 0; padding: 1rem; border: 1px solid #dce5f1; background: #fff; }
.crm-app .product-card.is-disabled { opacity: .68; }
.crm-app .product-card-head { display: flex; align-items: flex-start; gap: .7rem; min-width: 0; }
.crm-app .product-mark { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 11px; background: #e9efff; color: #2c55bb; font-size: .95rem; }
.crm-app .product-logo { object-fit: contain; padding: .2rem; border: 1px solid #dce5f1; background: #fff; }
.crm-app .product-logo-preview { display: flex; align-items: center; gap: .65rem; padding: .55rem .65rem; border: 1px solid #dce5f1; border-radius: .65rem; background: #f8faff; color: #7183a1; font-size: .68rem; font-weight: 750; }
.crm-app .product-logo-preview img { width: 48px; height: 48px; object-fit: contain; border: 1px solid #dce5f1; border-radius: 10px; background: #fff; }
.crm-app .product-card-head > div { min-width: 0; flex: 1; }.crm-app .product-card-head strong { display: block; overflow: hidden; color: #203252; font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }.crm-app .product-card-head p { margin: .25rem 0 0; overflow: hidden; color: #7586a2; font-size: .7rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.crm-app .product-active { padding: .28rem .45rem; border-radius: 999px; background: #e6f7f1; color: #11866d; font-size: .62rem; font-weight: 800; }
.crm-app .product-card-meta { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 1.3rem; }.crm-app .product-card-meta > small { color: #7c8ca6; font-size: .67rem; }
.crm-app .product-card-meta .product-affiliate-code { display: block; flex-basis: 100%; color: #36518e; line-height: 1.5; }.crm-app .product-card-meta .product-affiliate-code code { color: #173b9f; font-weight: 800; }.crm-app .product-card-meta .product-affiliate-code a, .crm-app .admin-affiliate-registrations a, .crm-app .affiliate-product-config-list a { color: #2448aa; font-weight: 800; text-decoration: none; }.crm-app .product-card-meta .product-affiliate-code a:hover, .crm-app .admin-affiliate-registrations a:hover, .crm-app .affiliate-product-config-list a:hover { text-decoration: underline; }
.crm-app .product-status { display: inline-flex; align-items: center; gap: .35rem; color: #7586a2; font-size: .68rem; font-weight: 700; }.crm-app .product-status i { width: 6px; height: 6px; border-radius: 50%; background: #93a3ba; }.crm-app .product-status.is-on { color: #0c8b70; }.crm-app .product-status.is-on i { background: #18ae87; }.crm-app .product-status.is-warning { color: #a56b2b; }.crm-app .product-status.is-warning i { background: #e3a04a; }
.crm-app .products-overview { display: grid; gap: 1rem; padding: 1.1rem 1.25rem; border-color: #dbe5f2; background: #fff; }
.crm-app .products-overview-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }.crm-app .products-overview-head h3 { margin: .2rem 0 0; color: #203252; font-size: 1rem; letter-spacing: -.03em; }.crm-app .products-overview-head .section-label { margin: 0; }
.crm-app .catalog-sync-note { display: inline-flex; align-items: center; gap: .38rem; color: #7183a1; font-size: .68rem; font-weight: 700; }.crm-app .catalog-sync-note i { width: .42rem; height: .42rem; border-radius: 50%; background: #1eaa79; box-shadow: 0 0 0 .18rem rgba(30,170,121,.12); }
.crm-app .product-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }.crm-app .product-metrics > div { display: grid; grid-template-columns: 1fr auto; gap: .15rem .5rem; padding: .72rem .8rem; border: 1px solid #e3eaf4; border-radius: .75rem; background: #f8faff; }.crm-app .product-metrics span { color: #7183a1; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }.crm-app .product-metrics strong { color: #2445aa; font-size: 1.15rem; line-height: 1; }.crm-app .product-metrics small { grid-column: 1 / -1; color: #8b9ab2; font-size: .68rem; }
.crm-app .product-editor-subtitle { margin: .35rem 0 0; color: #7b8ca7; font-size: .73rem; line-height: 1.45; }.crm-app .product-form-section { min-width: 0; padding: 1rem; border: 1px solid #e0e8f3; border-radius: .9rem; background: #fff; }.crm-app .product-form-basics { display: grid; gap: .78rem; background: linear-gradient(145deg, #fff, #f9fbff); }.crm-app .product-section-heading { display: flex; align-items: flex-start; gap: .7rem; padding-bottom: .75rem; border-bottom: 1px solid #e8eef6; }.crm-app .product-section-heading h4 { margin: .2rem 0 .2rem; color: #243654; font-size: .92rem; }.crm-app .product-section-heading .fine { margin: 0; }.crm-app .product-step-number { display: grid; place-items: center; width: 1.85rem; height: 1.85rem; flex: 0 0 1.85rem; border-radius: .6rem; background: #eaf0ff; color: #2d53b4; font-size: .67rem; font-weight: 850; }.crm-app .product-active-toggle { display: flex; align-items: center; gap: .5rem; padding: .55rem .65rem; border: 1px solid #e0e8f3; border-radius: .65rem; background: #fff; }.crm-app .product-active-toggle small { margin-left: auto; color: #8493aa; font-size: .68rem; font-weight: 600; }
.crm-app .product-list-panel { grid-column: 1 / -1; }.crm-app .product-editor-modal[hidden] { display: none !important; }.crm-app .product-editor-back { z-index: 40; padding: 1rem; }.crm-app .product-editor-modal:not([hidden]) { display: grid; width: min(820px, calc(100vw - 2rem)); max-height: min(90vh, 850px); overflow: auto; padding: 1.25rem; border: 1px solid #d7e2f1; box-shadow: 0 28px 80px rgba(15, 32, 70, .25); }.crm-app .product-editor-modal .product-editor-head { position: sticky; top: -1.25rem; z-index: 2; margin: -1.25rem -1.25rem 0; padding: 1.25rem; border-bottom: 1px solid #e1e8f2; background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); }.crm-app .product-modal-head-actions { display: flex; gap: .45rem; flex-shrink: 0; }.crm-app .product-editor-modal > .actions:last-child { position: sticky; bottom: -1.25rem; z-index: 2; margin: 0 -1.25rem -1.25rem; padding: 1rem 1.25rem 1.25rem; border-top: 1px solid #e1e8f2; background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); }
.crm-app .product-form-details { padding: 0; overflow: hidden; }.crm-app .product-form-details > summary { display: flex; align-items: center; gap: .7rem; padding: .9rem 1rem; color: #243654; list-style: none; cursor: pointer; }.crm-app .product-form-details > summary::-webkit-details-marker { display: none; }.crm-app .product-form-details > summary::after { margin-left: auto; color: #7e8fa8; content: '+'; font-size: 1.1rem; font-weight: 500; }.crm-app .product-form-details[open] > summary { border-bottom: 1px solid #e0e8f3; background: #fbfcff; }.crm-app .product-form-details[open] > summary::after { content: '−'; }.crm-app .product-form-details > summary > span:not(.product-step-number) { display: grid; gap: .18rem; min-width: 0; }.crm-app .product-form-details > summary strong { font-size: .82rem; }.crm-app .product-form-details > summary small { color: #8292aa; font-size: .7rem; font-weight: 550; }.crm-app .product-form-details > summary b { margin-left: auto; padding: .28rem .48rem; border-radius: 999px; background: #eef3ff; color: #3558b5; font-size: .62rem; font-weight: 800; white-space: nowrap; }.crm-app .product-section-body { display: grid; gap: .75rem; padding: 1rem; background: #fff; }.crm-app .product-section-body > .product-integration-box, .crm-app .product-section-body > .product-signup-box, .crm-app .product-section-body > .product-affiliate-box { background: #f8faff; }
.crm-app .product-active.is-off { background: #f3e8eb; color: #a75969; }.crm-app .product-card-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; padding-top: .75rem; border-top: 1px solid #edf1f6; }.crm-app .product-card-details > div { display: grid; gap: .22rem; min-width: 0; }.crm-app .product-card-details span { color: #8594aa; font-size: .62rem; font-weight: 700; }.crm-app .product-card-details strong { overflow: hidden; color: #30466d; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }.crm-app .product-card-actions { display: flex; justify-content: flex-end; padding-top: .15rem; }.crm-app .product-card-actions button { width: 100%; }
.crm-app .product-select { display: flex; align-items: center; gap: .55rem; padding-top: .7rem; border-top: 1px solid #edf1f6; color: #2e456b; font-size: .72rem; font-weight: 750; }.crm-app .product-select input { accent-color: #294db5; }
.crm-app .product-signup-link { padding: 0; border: 0; color: #294db5; background: transparent; font: inherit; font-size: .7rem; font-weight: 750; text-align: left; text-decoration: none; cursor: pointer; }.crm-app .product-signup-link:hover { text-decoration: underline; }.crm-app .product-signup-pending { color: #8797af; font-size: .7rem; font-weight: 650; }
.crm-app .product-premium-button { display: inline-flex; align-items: center; justify-content: space-between; gap: .45rem; width: 100%; padding: .68rem .8rem; border: 1px solid #c8d4f2; border-radius: 10px; color: #2448aa; background: linear-gradient(135deg, #f2f5ff, #fff); font: inherit; font-size: .72rem; font-weight: 800; cursor: pointer; box-shadow: 0 5px 14px rgba(36, 72, 170, .08); }.crm-app .product-premium-button:hover { border-color: #2448aa; transform: translateY(-1px); }.crm-app .product-premium-button span { font-size: .9rem; }
.crm-app .affiliate-product-flow-back { display: grid; place-items: center; justify-content: initial; padding: 1rem; }.crm-app .affiliate-product-flow-back .drawer { width: min(760px, 100%); height: auto; max-height: min(90vh, 860px); overflow: auto; padding: 1.5rem; border-radius: 22px; }.crm-app .affiliate-product-flow-back .drawer > .row { align-items: flex-start; margin-bottom: .75rem; }.crm-app .affiliate-product-flow-back .drawer h2 { max-width: 620px; color: var(--ink); font-size: clamp(1.2rem, 2.4vw, 1.65rem); letter-spacing: -.035em; }
.crm-app .affiliate-flow-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: .2rem 0 1.25rem; }.crm-app .affiliate-flow-steps span { display: grid; gap: .25rem; padding: .65rem .7rem; border-bottom: 2px solid #e6ebf4; color: #95a2b5; font-size: .68rem; font-weight: 750; }.crm-app .affiliate-flow-steps span.is-active { border-color: #3154b8; color: #3154b8; }.crm-app .affiliate-flow-steps b { font-size: .6rem; letter-spacing: .08em; }.crm-app .affiliate-flow-copy { display: grid; gap: .4rem; }.crm-app .affiliate-flow-copy h3, .crm-app .affiliate-flow-result h3 { margin: 0; color: #243654; font-size: 1.25rem; }.crm-app .affiliate-flow-copy .fine, .crm-app .affiliate-flow-result .fine { margin: 0; line-height: 1.55; }.crm-app .affiliate-flow-product-preview { display: grid; gap: .3rem; margin: .7rem 0; padding: 1rem; border: 1px solid #dce5f1; border-radius: 12px; background: #f8faff; }.crm-app .affiliate-flow-product-preview span { color: #71819b; font-size: .78rem; line-height: 1.45; }.crm-app .affiliate-flow-result { display: grid; gap: .55rem; }.crm-app .affiliate-integration-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; margin: .55rem 0; }.crm-app .affiliate-integration-grid > div { display: grid; gap: .2rem; padding: .75rem; border: 1px solid #e0e7f1; border-radius: 10px; background: #fbfcff; }.crm-app .affiliate-integration-grid span, .crm-app .affiliate-flow-customer-head .fine { color: #8492a8; font-size: .64rem; }.crm-app .affiliate-integration-grid strong { color: #284172; font-size: .77rem; }.crm-app .affiliate-flow-actions { display: flex; gap: .55rem; flex-wrap: wrap; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #edf1f6; }.crm-app .affiliate-flow-customers { display: grid; gap: .6rem; margin-top: .8rem; padding-top: .9rem; border-top: 1px solid #edf1f6; }.crm-app .affiliate-flow-customers[hidden], .crm-app .affiliate-flow-history[hidden] { display: none; }.crm-app .affiliate-flow-customer-head, .crm-app .affiliate-flow-history-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }.crm-app .affiliate-flow-customer-head h4 { margin: .2rem 0 0; color: #2a3f66; font-size: .9rem; }.crm-app .affiliate-flow-customer-list { display: grid; gap: .45rem; }.crm-app .affiliate-flow-customer-list article { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .7rem; border: 1px solid #e0e7f1; border-radius: 10px; background: #fff; }.crm-app .affiliate-flow-customer-list article > div { display: grid; gap: .18rem; min-width: 0; }.crm-app .affiliate-flow-customer-list strong { color: #2b416b; font-size: .78rem; }.crm-app .affiliate-flow-customer-list span, .crm-app .affiliate-flow-customer-list small { overflow: hidden; color: #8391a8; font-size: .66rem; text-overflow: ellipsis; }.crm-app .affiliate-flow-history { display: grid; gap: .4rem; padding: .7rem; border-radius: 10px; background: #f7f9fd; }.crm-app .affiliate-history-row { display: grid; grid-template-columns: .7fr 1.5fr .8fr; gap: .5rem; padding: .45rem 0; border-bottom: 1px solid #e7edf5; font-size: .68rem; }.crm-app .affiliate-history-row:last-child { border-bottom: 0; }.crm-app .affiliate-history-row span { color: #3154b8; font-weight: 750; }.crm-app .affiliate-history-row strong { color: #536582; }.crm-app .affiliate-history-row small { color: #8996a9; text-align: right; }.crm-app .affiliate-config-actions { display: flex; align-items: center; gap: .45rem; }
.crm-app .product-selection-foot { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; }.crm-app .product-selection-foot .error { margin: 0; }.crm-app .product-save-status { margin: 0; color: #0c8b70; font-size: .78rem; font-weight: 700; }
.crm-app .product-field { grid-column: 1 / -1; }.crm-app .product-campaign-note { margin: -.35rem 0 1rem; color: #7183a1; font-size: .75rem; line-height: 1.5; }
.crm-app .campaign-product-label { display: inline-block; padding: .22rem .4rem; border-radius: 5px; background: #edf2ff; color: #3153ad; font-size: .66rem; font-weight: 750; }
.crm-app .finance-intro { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding: 1.25rem; }.crm-app .finance-intro h3 { margin: .25rem 0 .4rem; color: #203252; }.crm-app .finance-intro .fine { max-width: 760px; margin: 0; line-height: 1.55; }.crm-app .finance-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin: 1rem 0; }.crm-app .finance-columns { display: grid; grid-template-columns: 1.1fr .9fr; gap: 1rem; }.crm-app .finance-table-panel { min-width: 0; padding: 1.1rem; }.crm-app .finance-table-panel .shelf-head { margin-bottom: .8rem; }.crm-app .finance-amount { color: #13856d; font-weight: 800; white-space: nowrap; }.crm-app .finance-amount.is-negative { color: #bd4660; }.crm-app .finance-usage-detail { display: grid; gap: .5rem; margin-top: 1rem; padding: .9rem; border: 1px solid #dce5f1; border-radius: 10px; background: #f8faff; }.crm-app .finance-usage-detail > p { margin: 0; }.crm-app .finance-usage-detail article { display: grid; grid-template-columns: 1fr auto; gap: .2rem .7rem; padding: .55rem 0; border-top: 1px solid #e6edf6; }.crm-app .finance-usage-detail article p { grid-column: 1 / -1; margin: 0; color: #7586a2; font-size: .72rem; }
@media (max-width: 980px) {
  .crm-app .products-admin-layout { grid-template-columns: 1fr; }.crm-app .product-editor { order: 0; }.crm-app .product-list-panel { order: 1; }.crm-app .finance-columns { grid-template-columns: 1fr; }.crm-app .finance-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.crm-app .finance-intro { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 620px) {
  .crm-app .products-intro { align-items: flex-start; }.crm-app .product-intro-icon { display: none; }.crm-app .product-grid { grid-template-columns: 1fr; }.crm-app .product-selection-foot { align-items: flex-start; flex-direction: column; }.crm-app .products-overview-head { align-items: flex-start; flex-direction: column; }.crm-app .product-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }.crm-app .product-form-details > summary { align-items: flex-start; }.crm-app .product-form-details > summary b { margin-left: .1rem; }.crm-app .product-card-details { grid-template-columns: 1fr 1fr; }.crm-app .product-card-details > div:last-child { grid-column: 1 / -1; }
}
/* Segurança administrativa: tela de MFA integrada ao acesso do CRM. */
.auth-mfa-panel { max-width: 520px; }
.auth-mfa-instruction { margin: 0 0 1rem; color: #5f7698; font-size: .85rem; line-height: 1.6; }
.mfa-qr { display: block; width: 210px; height: 210px; margin: 1.25rem auto; padding: .75rem; border: 1px solid #d8e2f1; border-radius: 1rem; background: #fff; }
.mfa-secret { display: block; margin: .5rem 0 1.25rem; padding: .8rem 1rem; overflow-wrap: anywhere; border-radius: .75rem; background: #f1f5fb; color: #203e84; font-size: .78rem; letter-spacing: .08em; text-align: center; }
.mfa-recovery-box { display: grid; gap: .65rem; margin-top: 1.25rem; padding: 1rem; border: 1px solid #b8e5d4; border-radius: .85rem; background: #effbf6; color: #1c725a; }
.mfa-recovery-box p { margin: 0; color: #477866; font-size: .78rem; line-height: 1.5; }
.mfa-recovery-box code { display: block; padding: .75rem; border-radius: .6rem; background: #fff; color: #173d32; font-size: .82rem; line-height: 1.8; letter-spacing: .1em; white-space: pre-wrap; }
.mfa-recovery-details { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid #e0e7f2; }
.mfa-recovery-details summary { cursor: pointer; color: #3156b9; font-size: .78rem; font-weight: 800; }
.mfa-recovery-details label { margin-top: 1rem; }
.audit-panel { margin-top: 1rem; }
.audit-panel .shelf-head { align-items: flex-start; }
.shelf-actions { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; justify-content: flex-end; }
.audit-filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; gap: .65rem; align-items: end; margin: 1rem 0; padding: .85rem; border: 1px solid #e0e7f0; border-radius: .75rem; background: #f8faff; }
.audit-filters label { display: grid; gap: .35rem; color: #59708f; font-size: .72rem; font-weight: 750; }
.audit-json { max-width: 420px; overflow: auto; margin: .5rem 0 0; padding: .6rem; border-radius: .6rem; background: #f4f7fb; color: #345078; font-size: .7rem; white-space: pre-wrap; }
.security-status-card { margin: 1rem 0; padding: 1rem; border: 1px solid #cfe0f5; border-radius: .8rem; background: #f6f9ff; }
.security-status-card strong { color: #203e84; }
.security-status-card p { margin: .4rem 0 0; color: #65758d; font-size: .8rem; line-height: 1.5; }
.finance-payment-modal { width: min(560px, calc(100vw - 2rem)); }
@media (max-width: 980px) { .audit-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .audit-filters { grid-template-columns: 1fr; } }
