/* Padrão do CRM: mesma linguagem visual das configurações, com layouts por tarefa. */
:root { --crm-sidebar-width:248px; --crm-nav-layer:70; --crm-backdrop-layer:65; }
body.crm-shell { margin:0; padding:0; max-width:none; background:#fff !important; color:#1F2937; font-family:Inter,system-ui,sans-serif; min-height:100vh; }
.crm-shell [hidden] { display:none !important; }
.crm-shell *, .crm-shell *::before, .crm-shell *::after { box-sizing:border-box; }
.crm-app { min-height:100vh; }
.crm-shell .crm-sidebar { position:fixed; inset:0 auto 0 0; width:var(--crm-sidebar-width); background:#F9FAFB; color:#374151; padding:0; border-right:1px solid #E5E7EB; z-index:var(--crm-nav-layer); display:flex; flex-direction:column; }
.crm-brand { padding:24px 20px; display:flex; align-items:center; gap:8px; }
.crm-brand > a { display:flex; align-items:center; gap:12px; color:#1F2937; text-decoration:none; min-width:0; }
.crm-brand strong { display:block; font-size:14px; font-weight:700; }
.crm-brand small { display:block; font-size:12px; color:#4B5563; margin-top:2px; }
.crm-logo { display:flex; align-items:center; justify-content:center; width:32px; height:32px; border-radius:8px; color:#fff; background:#1E2235; flex-shrink:0; }
.crm-nav { padding:0 12px; flex:1; overflow-y:auto; overscroll-behavior:contain; }
.crm-nav-tools { display:flex; gap:8px; padding:0 12px 8px; }
.crm-nav-tools button { flex:1; min-height:44px; padding:0 12px; font:inherit; font-size:12px; font-weight:600; color:#374151; background:#fff; border:1px solid #E5E7EB; border-radius:8px; cursor:pointer; }
.crm-nav-tools button:hover { background:#F3F4F6; }
.crm-nav-tools { flex-wrap:wrap; }
.crm-nav-tools .crm-nav-map { flex:1 1 100%; display:flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:0 12px; font-size:12px; font-weight:600; color:#374151; background:#fff; border:1px solid #E5E7EB; border-radius:8px; text-decoration:none; }
.crm-nav-tools .crm-nav-map:hover { background:#F3F4F6; }
.crm-nav-tools .crm-nav-map[aria-current="page"] { background:#EEF2FF; color:#4338CA; border-color:#C7D2FE; }
.crm-nav-group { margin-bottom:16px; }
.crm-nav-work { padding-bottom:12px; border-bottom:1px solid #E5E7EB; }
.crm-nav-group h2 { display:flex; align-items:center; gap:10px; font-size:12px; font-weight:500; padding:8px 12px; color:#4B5563; }
.crm-nav-group h2 .crm-nav-gicon { width:18px; text-align:center; }
.crm-nav-link { display:flex; align-items:center; gap:12px; min-height:44px; padding:10px 12px; font-size:13px; font-weight:500; border-radius:8px; color:#374151; text-decoration:none; transition:background 160ms ease-out; }
.crm-nav-link i { width:18px; text-align:center; color:#4B5563; }
.crm-nav-link:hover { background:#F3F4F6; }
.crm-nav-link.active { background:#EEF2FF; color:#4338CA; font-weight:600; }
.crm-nav-link.active i { color:#4F46E5; }
.crm-nav-badge { margin-left:auto; min-width:20px; padding:0 6px; border-radius:999px; background:#B91C1C; color:#fff; font-size:11px; font-weight:700; line-height:20px; text-align:center; }
.crm-account { padding:12px 16px; border-top:1px solid #E5E7EB; display:flex; align-items:center; gap:8px; }
.crm-account-profile { display:flex; align-items:center; gap:10px; flex:1; min-width:0; min-height:44px; text-decoration:none; color:#374151; }
.crm-account-profile > span:last-child { min-width:0; }
.crm-account-profile strong { display:block; font-size:12px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.crm-account-profile small { display:block; font-size:12px; color:#4B5563; }
.crm-account-avatar { width:32px; height:32px; border-radius:50%; object-fit:cover; border:1px solid #E5E7EB; flex-shrink:0; background:#F3F4F6; }
.crm-account-icon { display:flex; align-items:center; justify-content:center; border:1px solid #E5E7EB; border-radius:50%; width:32px; height:32px; flex-shrink:0; }
.crm-signout,.crm-nav-open,.crm-nav-close { display:flex; align-items:center; justify-content:center; background:transparent; border:0; border-radius:8px; min-width:44px; min-height:44px; color:#4B5563; cursor:pointer; }
.crm-signout:hover,.crm-nav-open:hover,.crm-nav-close:hover { background:#F3F4F6; }
.crm-nav-open,.crm-nav-close { display:none; }
.crm-workspace { margin-left:var(--crm-sidebar-width); min-width:0; }
.crm-topbar { display:flex; align-items:center; gap:12px; min-height:64px; padding:8px 32px; border-bottom:1px solid #E5E7EB; font-size:12px; color:#4B5563; }
.crm-topbar a { text-decoration:none; color:inherit; }
.crm-topbar i.fa-chevron-right { font-size:12px; }
.crm-topbar .crm-topbar-new { display:flex; align-items:center; gap:8px; margin-left:auto; min-height:44px; padding:8px 12px; font-weight:600; color:#4338CA; border-radius:8px; }
.crm-topbar-new:hover { background:#EEF2FF; }
.crm-content { padding:32px 40px 64px; max-width:1440px; margin:auto; min-width:0; }
.crm-skip { position:fixed; top:-80px; left:16px; padding:12px; background:white; z-index:80; }
.crm-skip:focus { top:12px; }
.crm-page-header { display:flex; align-items:center; justify-content:flex-start; flex-wrap:wrap; gap:12px; margin-bottom:28px; }
.crm-page-header :is(h1,.page-title) { font-size:24px; font-weight:700; line-height:1.3; letter-spacing:-.02em; text-wrap:balance; min-width:0; }
.crm-page-header > .crm-header-action,.crm-page-header > form { margin-left:auto; }
.crm-page-header > .btn-icon:last-child { margin-left:auto; }
.crm-page-header a[onclick*="toggleMenu"] { display:none; }
.crm-page-header > .w-11[aria-hidden] { display:none; }
.crm-content :is(.shadow-sm,.shadow-md,.shadow-lg,.shadow-xl,.shadow-2xl) { box-shadow:none; }
.crm-content .rounded-3xl { border-radius:12px; }
.crm-content .border-gray-100 { border-color:#E5E7EB; }
.crm-content :is(.text-gray-400,.text-gray-500) { color:#4B5563; }
.crm-content :is(label.uppercase,h2.uppercase,h3.uppercase,p.uppercase,span.uppercase) { text-transform:none; letter-spacing:normal; }
.crm-content :is(input,textarea)::placeholder { color:#4B5563; opacity:1; }
.crm-content :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),select,textarea) { min-height:44px; max-width:100%; font-weight:400; }
.crm-content :is(button,a.btn-icon,summary) { min-height:44px; }
.crm-content button.wa-avatar-btn { min-height:32px; }
.crm-content .form-input,.crm-content .form-select { background:#fff; }
.crm-content .btn-icon { border:1px solid #E5E7EB; box-shadow:none; border-radius:8px; }
.crm-content .form-card { border-radius:12px; box-shadow:none; }
.crm-content .metric-shell { background:#F9FAFB; color:#1F2937; border:1px solid #E5E7EB; box-shadow:none; }
.crm-content .metric-shell .text-gray-300 { color:#4B5563; }
.crm-content .stage-card,.crm-content .broker-item { box-shadow:none; }
.crm-content .broker-bar > span { background:#4F46E5; }
.crm-content .card-shadow { box-shadow:none; }
.crm-content .card-shadow:hover { transform:none; }
.crm-content .summary-card:hover { transform:none; }
.crm-content .text-gray-400.input-icon { color:#6B7280; }
.crm-content form[action="/users/store"] #pass-input,.crm-content form[action="/profile/update"] #pass-input { padding-right:88px; }
.crm-form-page form a.text-red-500.border-red-100 { color:#374151; border-color:#E5E7EB; }
.crm-form-page form a.text-red-500.border-red-100:hover { background:#F9FAFB; }
.crm-content label[for="file-upload"] { min-width:44px; min-height:44px; }
.crm-shell :is(a,button,input,select,textarea,summary):focus-visible { outline:3px solid #4F46E5; outline-offset:3px; }
.crm-shell button:disabled { cursor:wait; opacity:.65; }
.crm-nav-backdrop { position:fixed; inset:0; border:0; background:rgba(30,34,53,.35); z-index:var(--crm-backdrop-layer); }
.crm-content .crm-financial-summary { color:#1F2937; }
.crm-financial-summary :is(.text-white,.text-indigo-200,.text-indigo-300,.text-gray-300) { color:#374151; }
.crm-financial-summary .text-green-400 { color:#15803D; }
.crm-financial-summary :is(.border-white\/10,.border-white\/5) { border-color:#E5E7EB; }
.crm-financial-summary .divide-white\/10 > * + * { border-color:#E5E7EB; }
.crm-financial-summary :is(.bg-black\/20,.bg-white\/10) { background:#F9FAFB; backdrop-filter:none; }
.crm-financial-summary .whitespace-nowrap { white-space:normal; overflow-wrap:anywhere; }
.crm-team-intro { font-size:14px; color:#4B5563; margin-top:-16px; margin-bottom:24px; max-width:65ch; }
.crm-team-toolbar { display:flex; gap:12px; flex-wrap:wrap; align-items:center; margin-bottom:24px; }
.crm-team-toolbar input { flex:1; min-width:180px; border:1px solid #E5E7EB; padding:10px 12px; border-radius:12px; font-size:14px; }
.crm-team-toolbar input { width:0; }
.crm-team-toolbar a { min-height:44px; padding:12px 16px; border-radius:12px; background:#1E2235; color:white; font-size:13px; font-weight:600; text-decoration:none; }
.crm-team { margin-bottom:24px; }
.crm-team > header { display:flex; align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid #E5E7EB; }
.crm-team > header h2 { font-size:14px; font-weight:600; flex:1; }
.crm-team-person { display:flex; align-items:center; gap:12px; border-bottom:1px solid #E5E7EB; padding:8px 0; }
.crm-team-person > a:first-child { display:flex; align-items:center; gap:12px; min-height:44px; flex:1; min-width:0; text-decoration:none; }
.crm-team-person i { color:#4B5563; }
.crm-team-person strong { display:block; font-size:14px; font-weight:500; overflow-wrap:anywhere; }
.crm-team-person small { font-size:12px; color:#4B5563; overflow-wrap:anywhere; }
.crm-team-empty { padding:20px 0; font-size:14px; color:#4B5563; }
@media(min-width:900px) {
 .crm-form-page .crm-content { max-width:960px; }
 .crm-form-page .crm-content > .bg-white { padding:0; border:0; }
 .crm-form-page .crm-content > .flex > main { padding:0; }
 .crm-form-page .crm-content > .flex > main > .bg-white { padding:0; border:0; }
 .crm-content form[action="/users/store"],.crm-content form[action="/users/update"] { max-width:720px; }
 .crm-content form[action="/profile/update"] { display:grid; grid-template-columns:200px minmax(0,1fr); gap:32px; }
 .crm-content form[action="/profile/update"] > .flex.gap-3 { grid-column:2; margin-top:0; }
}
@media(max-width:1199px) { .crm-content { padding:28px; } }
@media(max-width:899px) {
 .crm-shell .crm-sidebar { width:280px; max-width:calc(100vw - 40px); transform:translateX(-100%); transition:transform 180ms ease-out; visibility:hidden; }
 .crm-shell.crm-menu-open .crm-sidebar { transform:translateX(0); visibility:visible; }
 .crm-workspace { margin-left:0; }
 .crm-nav-open,.crm-nav-close { display:flex; }
 [data-nav-expand],[data-nav-collapse] { display:none; }
 .crm-nav-close { margin-left:auto; }
 .crm-brand { padding:16px; }
 .crm-topbar { padding:8px 16px; }
 body.crm-menu-open { overflow:hidden; }
 .crm-content { max-width:800px; }
}
@media(max-width:599px) {
 .crm-content { padding:24px 16px 96px; }
 .crm-page-header :is(h1,.page-title) { font-size:20px; }
 .crm-content .qualified-toggle { padding:0 8px; gap:6px; min-height:44px; }
 .crm-form-page .crm-content > .bg-white { padding:16px; }
 .crm-team-toolbar input { min-width:0; width:100%; flex-basis:100%; }
}
@media(prefers-reduced-motion:reduce) { .crm-shell *, .crm-shell *::before,.crm-shell *::after { transition:none !important; animation:none !important; scroll-behavior:auto !important; } }

/* V2: leitura mais rápida, navegação progressiva e formulários por tarefa. */
.crm-nav-section { margin-bottom:8px; }
.crm-nav-section > summary { display:flex; align-items:center; justify-content:space-between; min-height:44px; padding:10px 12px; font-size:12px; font-weight:600; color:#4B5563; cursor:pointer; border-radius:8px; list-style:none; }
.crm-nav-section > summary::-webkit-details-marker,.crm-team > summary::-webkit-details-marker { display:none; }
.crm-nav-section > summary:hover { background:#F3F4F6; }
.crm-nav-section > summary i,.crm-team > summary i { font-size:12px; transition:transform 160ms ease-out; }
.crm-nav-section:not([open]) > summary i,.crm-team:not([open]) > summary i { transform:rotate(-90deg); }
.crm-nav-section .crm-nav-group { margin:0 0 0 21px; padding-left:6px; border-left:1px solid #E5E7EB; }
.crm-nav-section > summary,.crm-nav-sub > summary { gap:10px; }
.crm-nav-section > summary > span,.crm-nav-sub > summary > span { flex:1; min-width:0; }
.crm-nav-gicon { width:18px; text-align:center; color:#4B5563; }
.crm-nav-section > summary .crm-nav-chev,.crm-nav-sub > summary .crm-nav-chev { margin-left:auto; }
.crm-nav-sub { margin:0 0 4px; }
.crm-nav-sub > summary { display:flex; align-items:center; min-height:44px; padding:10px 12px; font-size:12px; font-weight:600; color:#4B5563; cursor:pointer; border-radius:8px; list-style:none; user-select:none; }
.crm-nav-sub > summary::-webkit-details-marker { display:none; }
.crm-nav-sub > summary:hover { background:#F3F4F6; }
.crm-nav-sub > summary i { font-size:12px; transition:transform 160ms ease-out; }
.crm-nav-sub:not([open]) > summary .crm-nav-chev { transform:rotate(-90deg); }
.crm-nav-sub .crm-nav-group { margin:0 0 0 21px; padding-left:6px; border-left:1px solid #E5E7EB; }
.crm-nav-note { margin:0 0 8px; padding:0 12px; font-size:12px; line-height:1.5; color:#4B5563; }
.crm-nav-section > summary small { margin-right:auto; margin-left:4px; font-size:12px; font-weight:400; }
.crm-dashboard-summary { border:1px solid #E5E7EB; border-radius:12px; margin-bottom:28px; }
.crm-dashboard-metrics { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); margin:0; }
.crm-dashboard-metrics > div { padding:20px 16px; min-width:0; }
.crm-dashboard-metrics > div + div { border-left:1px solid #E5E7EB; }
.crm-dashboard-metrics dt { color:#4B5563; font-size:12px; font-weight:500; line-height:1.5; }
.crm-dashboard-metrics dd { color:#1F2937; font-size:22px; line-height:1.3; font-weight:700; margin:8px 0; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.crm-dashboard-metrics small { display:block; color:#4B5563; font-size:12px; line-height:1.6; }
.crm-dashboard-broker-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }
.crm-dashboard-columns { display:grid; grid-template-columns:minmax(0,1fr); gap:28px; }
.crm-dashboard-columns > section { min-width:0; }
.crm-dashboard-ranking :is(#ranking-panel-activity,#ranking-panel-results) .flex-1 { min-width:0; }
.crm-dashboard-ranking p { overflow-wrap:anywhere; }
.crm-dashboard-ranking img { flex-shrink:0; }
.crm-dashboard-ranking .text-right { flex-shrink:0; margin-left:8px; }
.crm-team { max-width:880px; margin-bottom:16px; border-bottom:1px solid #E5E7EB; }
.crm-team > summary { display:flex; gap:12px; align-items:center; padding:12px 0; font-size:14px; font-weight:600; cursor:pointer; list-style:none; }
.crm-team > summary > span { min-width:0; overflow-wrap:anywhere; }
.crm-team > summary small { margin-left:auto; color:#4B5563; font-size:12px; font-weight:400; white-space:nowrap; }
.crm-team-members > header:empty { display:none; }
.crm-team-edit-manager { display:inline-flex; align-items:center; gap:8px; min-height:44px; font-size:12px; color:#4B5563; text-decoration:none; }
.crm-team-person { justify-content:flex-start; border-bottom:0; }
.crm-team-person + .crm-team-person { border-top:1px solid #F3F4F6; }
.crm-team-person > a:first-child { flex:0 1 auto; }
.crm-team-person > .btn-icon { flex-shrink:0; }
.crm-team-person:hover { background:#F9FAFB; }
.crm-detail-form { position:relative; }
.crm-form-actions { position:sticky; top:8px; z-index:20; display:flex; gap:12px; align-items:center; padding:8px 0; background:#fff; border-bottom:1px solid #E5E7EB; }
.crm-form-actions > a { display:inline-flex; align-items:center; min-height:44px; padding:8px; color:#4B5563; font-size:12px; text-decoration:none; }
.crm-save { margin-left:auto; min-height:44px; padding:10px 18px; background:#1E2235; color:white; border:0; border-radius:12px; font-size:14px; font-weight:600; cursor:pointer; }
.crm-save:hover { background:#1C2340; }
.crm-form-section { margin:0; min-width:0; border:0; border-bottom:1px solid #E5E7EB; padding:0 0 28px; scroll-margin-top:90px; }
.crm-form-section > legend { width:100%; font-size:16px; font-weight:600; color:#1F2937; padding:20px 0 16px; }
.crm-form-fields { display:grid; grid-template-columns:minmax(0,1fr); gap:20px; }
.crm-form-fields > * { min-width:0; }
.crm-project-fields > :is(.properties-list,.properties-add-link,.properties-total,.grid) { grid-column:1/-1; }
.crm-project-fields :is(.properties-total,.property-row-header) { flex-wrap:wrap; gap:8px; }
.crm-lead-secondary-actions { padding-top:8px; }
.crm-pipeline-filters { flex-wrap:wrap; }
.crm-pipeline-filters > form { min-width:min(280px,100%); }
@media(min-width:1200px) {
 .crm-dashboard-columns { grid-template-columns:minmax(0,1.2fr) minmax(320px,1fr); }
 .crm-dashboard-funnel > .bg-white > .px-5 { padding:12px 16px; }
}
@media(min-width:900px) { .crm-form-fields { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(min-width:600px) and (max-width:1199px) {
 .crm-dashboard-metrics:not(.crm-dashboard-broker-metrics) { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .crm-dashboard-metrics:not(.crm-dashboard-broker-metrics) > div:nth-child(4) { border-left:0; }
 .crm-dashboard-metrics:not(.crm-dashboard-broker-metrics) > div:nth-child(n+4) { border-top:1px solid #E5E7EB; }
}
@media(max-width:599px) {
 .crm-topbar { flex-wrap:wrap; gap:8px; }
 .crm-topbar > span { min-width:0; }
 .crm-dashboard-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .crm-dashboard-metrics > div { padding:16px 12px; }
 .crm-dashboard-metrics > div:nth-child(odd) { border-left:0; }
 .crm-dashboard-metrics > div:nth-child(n+3) { border-top:1px solid #E5E7EB; }
 .crm-dashboard-metrics > div:last-child:nth-child(odd) { grid-column:1/-1; }
 .crm-dashboard-metrics dd { font-size:20px; }
 .crm-pipeline-filters > form { flex-basis:100%; }
 .crm-pipeline-filters .qualified-toggle { margin-left:auto; }
 .crm-form-page .crm-content > .bg-white:has(.crm-detail-form) { padding:0; border:0; }
 .crm-form-actions { gap:4px; top:0; }
 .crm-form-actions > a { padding:8px 6px; }
 .crm-save { font-size:13px; padding:10px 12px; }
}

/* Subgrupos das configurações seguem a mesma navegação em todas as telas. */
.crm-nav-subsection { margin:0 0 8px 8px; }
.crm-nav-subsection>summary { display:flex; align-items:center; gap:8px; padding:10px 12px; min-height:44px; font-size:12px; font-weight:600; list-style:none; cursor:pointer; color:#4b5563; }
.crm-nav-subsection>summary::-webkit-details-marker { display:none; }
.crm-nav-subsection>summary>i { margin-left:auto; font-size:10px; }
.crm-nav-subsection[open]>summary>i { transform:rotate(180deg); }
.crm-nav-subsection .crm-nav-group { padding-left:4px; margin-bottom:4px; }
.crm-nav-settings .crm-nav-link { font-size:12px; gap:10px; }
.crm-nav-settings .crm-nav-link>span { min-width:0; overflow-wrap:anywhere; }
.crm-nav-section>summary,.crm-nav-subsection>summary { user-select:none; }

/* Gestão: mesma largura do shell, com listas e ações consistentes. */
.crm-page-description { margin:8px 0 0; max-width:70ch; font-size:14px; line-height:1.6; color:#4b5563; }
.crm-page-header>div { min-width:0; }
.crm-button { display:inline-flex; justify-content:center; align-items:center; gap:8px; min-height:44px; padding:10px 14px; border:1px solid transparent; border-radius:8px; font:600 13px/1.4 Inter,system-ui,sans-serif; text-decoration:none; cursor:pointer; text-align:center; }
.crm-button-primary { background:#1e2235; color:#fff; }
.crm-button-primary:hover { background:#292e47; }
.crm-button-secondary { background:#fff; border-color:#e5e7eb; color:#374151; }
.crm-button-secondary:hover,.crm-button-text:hover { background:#f3f4f6; }
.crm-button-text { background:transparent; color:#4b5563; }
.crm-button-danger { background:#fff; color:#b91c1c; border-color:#fecaca; }
.crm-button-danger:hover { background:#fef2f2; }
.crm-list-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:16px; margin:24px 0; }
.crm-list-toolbar>p { font-size:12px; color:#4b5563; margin-left:auto; }
.crm-search-field { display:flex; align-items:center; gap:12px; padding:0 14px; border:1px solid #d1d5db; border-radius:8px; min-width:0; width:min(480px,100%); background:#fff; }
.crm-search-field>i { color:#4b5563; }
.crm-search-field>input { width:100%; min-width:0; min-height:44px; padding:10px 0; border:0; background:transparent; font:400 14px/1.5 Inter,system-ui,sans-serif; }
.crm-search-field:focus-within { outline:2px solid #4f46e5; outline-offset:2px; }
.crm-search-field>input:focus-visible { outline:0; }
.crm-person-avatar { width:36px; height:36px; flex:0 0 36px; display:flex; align-items:center; justify-content:center; border-radius:50%; background:#f3f4f6; color:#4b5563; }
.crm-teams-page .crm-team { max-width:none; margin:0 0 24px; border:1px solid #e5e7eb; border-radius:12px; }
.crm-teams-page .crm-team>summary { padding:16px 20px; gap:16px; border-radius:12px; }
.crm-teams-page .crm-team[open]>summary { border-bottom:1px solid #e5e7eb; border-radius:12px 12px 0 0; background:#f9fafb; }
.crm-teams-page .crm-team-heading { display:flex; flex-direction:column; gap:4px; flex:1; }
.crm-teams-page .crm-team-heading small { margin:0; font-size:12px; font-weight:400; color:#4b5563; white-space:normal; }
.crm-teams-page .crm-team-heading strong { font-size:15px; font-weight:600; }
.crm-team-count { color:#4b5563; font-size:12px; font-weight:400; white-space:nowrap; }
.crm-teams-page .crm-team-members { padding:0 20px; }
.crm-team-manager-action { display:flex; justify-content:flex-end; padding:4px 0; border-bottom:1px solid #e5e7eb; }
.crm-team-manager-action a { display:inline-flex; align-items:center; gap:8px; min-height:44px; color:#4b5563; font-size:12px; text-decoration:none; }
.crm-team-manager-action a:hover { color:#4338ca; }
.crm-teams-page .crm-team-person { gap:16px; padding:14px 0; }
.crm-teams-page .crm-team-person+.crm-team-person { border-top:1px solid #e5e7eb; }
.crm-teams-page .crm-team-person>a:first-child { flex:1; color:#1f2937; min-width:0; }
.crm-teams-page .crm-team-identity>span:last-child { min-width:0; }
.crm-teams-page .crm-team-person strong { font-weight:600; }
.crm-teams-page .crm-team-person small { display:block; margin-top:4px; line-height:1.6; }
.crm-team-person-actions { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.crm-team-person-actions i { color:inherit; }
.crm-period-label { margin-left:auto; color:#4b5563; font-size:13px; padding:8px 12px; border-radius:8px; background:#f9fafb; }
.crm-section-description { color:#4b5563; font-size:13px; line-height:1.6; margin:0 0 20px; }
.crm-goals-form label,.crm-collection-filters label { display:block; font-size:13px; font-weight:500; margin-bottom:8px; color:#374151; }
.crm-goals-form input:not([type=hidden]),.crm-collection-filters select,.crm-redistribute-dialog input[type=search] { width:100%; border:1px solid #d1d5db; background:#fff; padding:11px 12px; border-radius:8px; font:400 14px/1.5 Inter,system-ui,sans-serif; }
.crm-goals-form input { font-variant-numeric:tabular-nums; }
.crm-goals-general { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
.crm-goal-members { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:40px; }
.crm-goal-row { display:flex; align-items:center; gap:12px; min-width:0; padding:16px 0; border-bottom:1px solid #e5e7eb; }
.crm-goal-row>strong { flex:1; min-width:0; font-size:14px; font-weight:500; overflow-wrap:anywhere; }
.crm-goal-row>div { flex:0 1 180px; min-width:120px; }
.crm-goal-row label { font-size:12px; }
.crm-notice { padding:14px 16px; margin-bottom:24px; border:1px solid #e5e7eb; border-radius:8px; font-size:14px; line-height:1.5; }
.crm-notice-success { color:#166534; background:#f0fdf4; border-color:#bbf7d0; }
.crm-empty-state { padding:40px 24px; margin:24px 0; border:1px dashed #d1d5db; border-radius:12px; text-align:center; color:#4b5563; font-size:14px; line-height:1.6; }
.crm-empty-state>i { font-size:24px; margin-bottom:12px; }
.crm-empty-state h2 { color:#374151; font-size:16px; font-weight:600; }
.crm-empty-state p { margin:8px auto 16px; max-width:60ch; }
.crm-collection-summary { display:flex; align-items:center; flex-wrap:wrap; gap:16px; margin:24px 0; }
.crm-collection-summary>p { color:#4b5563; font-size:14px; }
.crm-collection-summary strong { color:#1f2937; font-weight:600; }
.crm-collection-summary>div { margin:0 0 0 auto; }
.crm-collection-filters { display:flex; align-items:flex-end; flex-wrap:wrap; gap:16px; padding:20px; margin-bottom:24px; border:1px solid #e5e7eb; border-radius:12px; background:#f9fafb; }
.crm-collection-filters>div:not(.crm-filter-actions) { flex:1 1 180px; min-width:0; }
.crm-filter-actions { display:flex; flex-wrap:wrap; gap:8px; }
.crm-collection-list { border-top:1px solid #e5e7eb; }
.crm-collection-row { display:grid; grid-template-columns:minmax(220px,1fr) minmax(300px,1.4fr) minmax(160px,.65fr); gap:24px; align-items:center; padding:24px 0; border-bottom:1px solid #e5e7eb; }
.crm-collection-main { min-width:0; }
.crm-collection-main h2 { font-size:15px; font-weight:600; color:#1f2937; overflow-wrap:anywhere; }
.crm-collection-main p { font-size:13px; line-height:1.6; color:#4b5563; margin:6px 0 12px; overflow-wrap:anywhere; }
.crm-status { display:inline-flex; padding:4px 8px; border-radius:6px; color:#4b5563; background:#f3f4f6; font-size:12px; line-height:1.5; }
.crm-status-warning { color:#92400e; background:#fffbeb; }
.crm-collection-meta { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 20px; margin:0; min-width:0; }
.crm-collection-meta dt { color:#4b5563; font-size:12px; line-height:1.5; margin-bottom:4px; }
.crm-collection-meta dd { margin:0; color:#374151; font-size:13px; line-height:1.5; font-weight:500; overflow-wrap:anywhere; }
.crm-collection-actions { display:flex; flex-direction:column; gap:8px; min-width:0; }
.crm-collection-actions .crm-button { width:100%; }
.crm-collection-more>summary { list-style:none; }
.crm-collection-more>summary::-webkit-details-marker { display:none; }
.crm-collection-more[open]>summary>i { transform:rotate(180deg); }
.crm-collection-more form { padding-top:8px; }
.crm-redistribute-dialog { width:min(560px,calc(100% - 32px)); max-height:calc(100dvh - 48px); padding:24px; border:0; border-radius:12px; margin:auto; overflow-y:auto; color:#1f2937; background:#fff; }
.crm-redistribute-dialog::backdrop { background:rgba(30,34,53,.4); }
.crm-dialog-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:20px; }
.crm-dialog-heading h2 { font-size:18px; font-weight:600; }
.crm-dialog-heading p { font-size:13px; color:#4b5563; margin-top:6px; overflow-wrap:anywhere; }
.crm-redistribute-people { border:0; margin:20px 0 0; padding:0; }
.crm-redistribute-people legend { font-size:13px; font-weight:500; margin-bottom:12px; }
.crm-redistribute-people label { display:flex; align-items:center; gap:12px; min-height:64px; padding:12px; border-bottom:1px solid #e5e7eb; cursor:pointer; }
.crm-redistribute-people label:has(input:checked) { background:#eef2ff; }
.crm-redistribute-people input { accent-color:#4f46e5; width:18px; height:18px; flex-shrink:0; }
.crm-redistribute-people label>span { min-width:0; }
.crm-redistribute-people strong { display:block; font-size:14px; font-weight:500; overflow-wrap:anywhere; }
.crm-redistribute-people small { display:block; color:#4b5563; font-size:12px; margin-top:4px; }
.crm-dialog-actions { display:flex; justify-content:flex-end; gap:12px; padding-top:24px; }
@media(max-width:1199px) {
 .crm-goals-general { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .crm-goal-members { grid-template-columns:1fr; }
 .crm-collection-row { grid-template-columns:minmax(180px,1fr) minmax(260px,1.4fr); }
 .crm-collection-actions { grid-column:1/-1; flex-direction:row; flex-wrap:wrap; }
 .crm-collection-more { flex-basis:100%; }
 .crm-collection-more>summary,.crm-collection-more form .crm-button { width:auto; }
}
@media(max-width:699px) {
 .crm-page-header>.crm-header-action { margin-left:0; }
 .crm-period-label { margin-left:0; }
 .crm-list-toolbar { gap:12px; }
 .crm-list-toolbar>p { margin-left:0; }
 .crm-search-field { width:100%; }
 .crm-teams-page .crm-team>summary { padding:16px; gap:12px; flex-wrap:wrap; }
 .crm-teams-page .crm-team-heading { flex-basis:calc(100% - 30px); }
 .crm-team-count { order:1; }
 .crm-teams-page .crm-team-members { padding:0 16px; }
 .crm-team-manager-action { justify-content:flex-start; }
 .crm-teams-page .crm-team-person { flex-wrap:wrap; gap:12px; }
 .crm-teams-page .crm-team-person>a:first-child { flex-basis:100%; }
 .crm-team-person-actions { margin-left:48px; flex-wrap:wrap; }
 .crm-goals-general { grid-template-columns:1fr; gap:20px; }
 .crm-goal-row { flex-wrap:wrap; }
 .crm-goal-row>div { flex-basis:100%; margin-left:48px; }
 .crm-collection-summary>div { margin-left:0; }
 .crm-collection-filters { padding:16px; }
 .crm-collection-filters>div:not(.crm-filter-actions) { flex-basis:100%; }
 .crm-collection-row { grid-template-columns:1fr; gap:20px; }
 .crm-collection-actions { grid-column:auto; }
 .crm-collection-actions>form,.crm-collection-actions>button { flex:1 1 140px; }
 .crm-collection-more { flex-basis:100%; }
 .crm-redistribute-dialog { padding:20px 16px; max-height:calc(100dvh - 32px); }
 .crm-dialog-actions { flex-wrap:wrap; }
 .crm-dialog-actions .crm-button { flex:1 1 140px; }
}

/* Busca global: caixa de diálogo, botões e destaque do bloco de destino. */
.crm-nav-search { display:flex; align-items:center; gap:8px; width:calc(100% - 24px); margin:0 12px 8px; min-height:44px; padding:0 12px; font:inherit; font-size:13px; color:#4B5563; text-align:left; background:#fff; border:1px solid #E5E7EB; border-radius:8px; cursor:pointer; }
.crm-nav-search:hover { background:#F3F4F6; }
.crm-nav-search span { flex:1; min-width:0; }
.crm-nav-search kbd { font:inherit; font-size:12px; padding:0 6px; color:#4B5563; background:#F9FAFB; border:1px solid #E5E7EB; border-radius:4px; }
.crm-topbar-search { display:none; align-items:center; justify-content:center; min-width:44px; min-height:44px; margin-left:-12px; color:#4B5563; background:transparent; border:0; border-radius:8px; cursor:pointer; }
.crm-topbar-search:hover { background:#F3F4F6; }
.crm-search { position:fixed; inset:0; z-index:90; display:none; align-items:flex-start; justify-content:center; padding:10dvh 16px 16px; background:rgba(30,34,53,.45); }
.crm-search.is-open { display:flex; }
.crm-search-box { display:flex; flex-direction:column; width:100%; max-width:640px; max-height:76dvh; overflow:hidden; background:#fff; border:1px solid #E5E7EB; border-radius:12px; transition:border-color 160ms ease-out, box-shadow 160ms ease-out; }
.crm-search-box:focus-within { border-color:#4F46E5; box-shadow:0 0 0 3px rgba(79,70,229,.10); }
.crm-search-head { display:flex; align-items:center; border-bottom:1px solid #E5E7EB; }
.crm-search-close { flex:none; min-width:44px; min-height:44px; margin-right:8px; font:inherit; font-size:24px; line-height:1; color:#4B5563; background:transparent; border:0; border-radius:8px; cursor:pointer; }
.crm-search-close:hover { background:#F3F4F6; }
.crm-search-input { flex:1; min-width:0; width:100%; min-height:56px; padding:0 20px; font:inherit; font-size:16px; color:#1F2937; border:0; outline:none; }
.crm-search .crm-search-input:focus-visible { outline:0; box-shadow:none; }
.crm-search-results { flex:1; overflow-y:auto; overscroll-behavior:contain; padding:8px; }
.crm-search-group-title { padding:8px 12px 4px; font-size:12px; font-weight:600; color:#4B5563; }
.crm-search-option { display:flex; flex-direction:column; width:100%; min-height:48px; padding:8px 12px; text-align:left; font:inherit; background:none; border:0; border-radius:8px; cursor:pointer; }
.crm-search-option[aria-selected="true"], .crm-search-option:hover { background:#EEF2FF; }
.crm-search-option strong { font-size:14px; font-weight:600; color:#1F2937; }
.crm-search-option small { font-size:12px; color:#4B5563; }
.crm-search-option small.crm-search-trail { margin-top:2px; color:#4B5563; font-style:normal; }
.crm-search-option mark { color:inherit; background:#FEF08A; border-radius:2px; }
.crm-search-empty { padding:24px; text-align:center; font-size:14px; color:#4B5563; }
.crm-search-foot { padding:8px 16px; font-size:12px; color:#4B5563; border-top:1px solid #E5E7EB; }
.crm-search-status { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.crm-search-flash { animation:crm-search-flash 1.6s ease-out; }
@keyframes crm-search-flash { 0%,40% { box-shadow:0 0 0 3px #4F46E5; } 100% { box-shadow:0 0 0 0 transparent; } }
@media (max-width:899px) { .crm-search-foot { display:none; } .crm-topbar-search { display:flex; } .crm-search { padding-top:8px; } .crm-search-box { max-height:calc(100dvh - 16px); } }
@media (prefers-reduced-motion:reduce) { .crm-search-flash { animation:none; outline:3px solid #4F46E5; outline-offset:2px; } }

/* Painel lateral de cadastro e edição (lista + painel). */
.crm-panel { position:fixed; inset:0; z-index:80; display:flex; justify-content:flex-end; background:rgba(30,34,53,.35); }
.crm-panel[hidden] { display:none; }
.crm-panel-box { display:flex; flex-direction:column; width:440px; max-width:100vw; height:100dvh; background:#fff; border-left:1px solid #E5E7EB; animation:crm-panel-in .18s ease-out; }
.crm-panel-head { display:flex; align-items:center; gap:8px; padding:8px 8px 8px 20px; border-bottom:1px solid #E5E7EB; }
.crm-panel-head h2 { flex:1; margin:0; font-size:16px; font-weight:600; color:#1F2937; }
.crm-panel-close { flex:none; min-width:44px; min-height:44px; font:inherit; font-size:24px; line-height:1; color:#4B5563; background:transparent; border:0; border-radius:8px; cursor:pointer; }
.crm-panel-close:hover { background:#F3F4F6; }
.crm-panel-body { flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; }
.crm-panel-body form { display:flex; flex-direction:column; min-height:100%; }
.crm-panel-fields { flex:1; padding:20px; }
.crm-panel-foot { position:sticky; bottom:0; display:flex; flex-wrap:wrap; gap:8px; padding:12px 20px; background:#fff; border-top:1px solid #E5E7EB; }
@keyframes crm-panel-in { from { transform:translateX(24px); opacity:0; } to { transform:none; opacity:1; } }
@media (max-width:899px) { .crm-panel-box { width:100vw; border-left:0; } }
@media (prefers-reduced-motion:reduce) { .crm-panel-box { animation:none; } }

.crm-panel-error { margin:0; padding:12px 20px; font-size:14px; font-weight:600; line-height:1.5; color:#B91C1C; background:#FEF2F2; border-bottom:1px solid #FECACA; }
.crm-panel-error:focus-visible { outline:2px solid #B91C1C; outline-offset:-2px; }
.crm-flash-sticky { position:sticky; top:8px; z-index:30; }

/* Interruptor acessível do agente (valor, negociação, IA). Mesmo desenho do settings-switch. */
.crm-switch { appearance:none; -webkit-appearance:none; width:44px; height:26px; border-radius:999px; background:#d1d5db; position:relative; cursor:pointer; flex:none; transition:background .15s; margin:0; }
.crm-switch::after { content:''; position:absolute; top:3px; left:3px; width:20px; height:20px; border-radius:999px; background:#fff; transition:transform .15s; }
.crm-switch:checked { background:#4f46e5; }
.crm-switch:checked::after { transform:translateX(18px); }
.crm-switch:focus-visible { outline:3px solid rgba(79,70,229,.35); outline-offset:2px; }
.crm-switch:disabled { opacity:.5; cursor:not-allowed; }
