/* Diagnóstico de Empresas — botões padronizados (ícone e texto na mesma cor, claro/escuro), filtros, relatório e identidade. */

/* ===== Sistema de botões ===== */
.wsr-btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;padding:0 20px;border:1px solid transparent;border-radius:12px;font:800 13px/1 inherit;letter-spacing:.01em;cursor:pointer;white-space:nowrap;box-shadow:none;transition:filter .15s,transform .15s,background .15s}
.wsr-btn svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.wsr-btn:hover{filter:brightness(1.08);transform:translateY(-1px)}.wsr-btn:focus-visible{outline:2px solid #7fb3ff;outline-offset:2px}.wsr-btn:disabled{opacity:.55;cursor:not-allowed;transform:none}
:is(#modal,#wsp19CompanyUI) .wsr-btn.blue{background:linear-gradient(135deg,#3b82f6,#2458c9)!important;border-color:#2458c9!important;color:#fff!important}
:is(#modal,#wsp19CompanyUI) .wsr-btn.green{background:linear-gradient(135deg,#1fb877,#0e8a58)!important;border-color:#0e8a58!important;color:#fff!important}
:is(#modal,#wsp19CompanyUI) .wsr-btn.gold{background:linear-gradient(135deg,#f2c230,#d19200)!important;border-color:#b57d00!important;color:#161006!important}
:is(#modal,#wsp19CompanyUI) .wsr-btn.slate{background:#1d2a3a!important;border-color:#3a4d66!important;color:#e8eff7!important}
:is(#modal,#wsp19CompanyUI) .wsr-btn.ghost{background:transparent!important;border-color:#52627a!important;color:#d5deea!important}
html[data-nortear-theme="light"] :is(#modal,#wsp19CompanyUI) .wsr-btn.slate{background:#edf2f8!important;border-color:#b9c6d6!important;color:#1b2a3d!important}
html[data-nortear-theme="light"] :is(#modal,#wsp19CompanyUI) .wsr-btn.ghost{background:#fff!important;border-color:#b9c6d6!important;color:#2a3a4f!important}
html[data-nortear-theme="light"] :is(#modal,#wsp19CompanyUI) .wsr-btn.blue,html[data-nortear-theme="light"] :is(#modal,#wsp19CompanyUI) .wsr-btn.green{color:#fff!important}

/* ===== Rodapés dos modais (detalhe/prompt) e ações do relatório: sem moldura que corta os botões ===== */
#modal.wsp19-modal .wsr-footer{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end;align-items:center;padding:14px 26px;border:0;border-top:1px solid var(--line,#2b3a4d);background:var(--panel,#111a24);position:sticky;bottom:0;z-index:3}
#modal.wsp19-modal .wsr-footer .wsr-btn{min-height:44px;padding:0 18px}
#modal .wsr-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:flex-start;margin:0;padding:14px 4px 6px;border:0;background:transparent;box-shadow:none;position:sticky;bottom:0;z-index:3}
#modal .wsr-actions .wsr-btn{min-width:150px;min-height:46px}
@media(max-width:640px){#modal.wsp19-modal .wsr-footer{padding:12px 14px}#modal.wsp19-modal .wsr-footer .wsr-btn,#modal .wsr-actions .wsr-btn{flex:1 1 100%}}

/* ===== Lista de resultados: botões do cabeçalho e filtros ===== */
#wsp19CompanyUI .wsp19-results>header>div:last-child{display:flex;gap:10px;flex-wrap:wrap}
#wsp19CompanyUI .wsp19-results>header .wsr-btn{min-height:42px;padding:0 18px}
#wsp19CompanyUI .wsp19-table .toolbar nav button{display:inline-flex!important;align-items:center!important;gap:7px!important;height:34px!important;padding:0 12px!important;font-weight:800!important}
#wsp19CompanyUI .wsp19-table .toolbar nav button svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
#wsp19CompanyUI .wsp19-table .toolbar nav button em{font-style:normal;min-width:20px;padding:2px 6px;border-radius:999px;background:rgba(127,140,160,.22);font-size:11px;line-height:1.2;text-align:center}
#wsp19CompanyUI .wsp19-table .toolbar nav button.urgente{color:#ef5b63!important}#wsp19CompanyUI .wsp19-table .toolbar nav button.alta{color:#e9a021!important}#wsp19CompanyUI .wsp19-table .toolbar nav button.média{color:#5b9bff!important}#wsp19CompanyUI .wsp19-table .toolbar nav button.baixa{color:#2fc88a!important}
html[data-nortear-theme="light"] #wsp19CompanyUI .wsp19-table .toolbar nav button.urgente{color:#c92f3d!important}html[data-nortear-theme="light"] #wsp19CompanyUI .wsp19-table .toolbar nav button.alta{color:#a86400!important}html[data-nortear-theme="light"] #wsp19CompanyUI .wsp19-table .toolbar nav button.média{color:#2867c7!important}html[data-nortear-theme="light"] #wsp19CompanyUI .wsp19-table .toolbar nav button.baixa{color:#0b8a58!important}
#wsp19CompanyUI .wsp19-table .toolbar nav button.active.urgente{background:rgba(239,68,68,.16)!important;border-color:rgba(239,68,68,.5)!important}
#wsp19CompanyUI .wsp19-table .toolbar nav button.active.alta{background:rgba(245,158,11,.16)!important;border-color:rgba(245,158,11,.55)!important}
#wsp19CompanyUI .wsp19-table .toolbar nav button.active.média{background:rgba(59,130,246,.16)!important;border-color:rgba(59,130,246,.5)!important}
#wsp19CompanyUI .wsp19-table .toolbar nav button.active.baixa{background:rgba(22,166,106,.16)!important;border-color:rgba(22,166,106,.5)!important}
#wsp19CompanyUI .wsp19-table .toolbar nav button.active.todos{color:var(--text,#e8eef5)!important}
#wsp19CompanyUI .wsp19-kpis article{position:relative}
.wsr-kico{position:absolute;top:12px;right:12px;display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:rgba(59,130,246,.16);color:#6aa7ff}
.wsr-kico svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.wsp19-kpis article.green .wsr-kico{background:rgba(22,166,106,.16);color:#2fc88a}.wsp19-kpis article.gold .wsr-kico{background:rgba(245,158,11,.16);color:#f0b13a}.wsp19-kpis article.red .wsr-kico{background:rgba(239,68,68,.16);color:#f0707a}
.priority.urgente,.priority.alta,.priority.média,.priority.baixa{white-space:nowrap}

/* ===== Cabeçalho do detalhe ===== */
.wsr-head{display:flex;align-items:center;gap:16px;min-width:0}.wsr-head>div{min-width:0}
.wsr-co-logo{width:58px;height:58px;flex:none;border-radius:14px;object-fit:cover;background:#fff;border:1px solid rgba(127,140,160,.3)}
.wsr-co-logo.ini{display:grid;place-items:center;background:linear-gradient(135deg,#1f3b73,#2563eb);color:#fff;font:900 20px/1 inherit}
#modal .wsp19-detail>header{align-items:center;gap:14px}

/* ===== Identidade: logo da empresa (discreta) e assinatura Nortear ONE ===== */
.wsr-id-bar{display:flex;justify-content:flex-end;margin:0 0 10px}
.wsr-id-chip{display:inline-flex;align-items:center;max-height:36px;padding:4px 10px;border-radius:10px;background:rgba(255,255,255,.94);border:1px solid rgba(127,140,160,.28);color:#1b2433;font-size:12px}
.wsr-id-chip img{display:block;max-height:26px;max-width:130px;width:auto;height:auto;object-fit:contain}
.wsr-id-chip b{font-weight:800}
.wsr-nfoot{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:26px;padding-top:12px;border-top:1px solid #e3eaf0;color:#64748b;font-size:11px}
.wsr-nsign{display:inline-flex;align-items:center;gap:7px}.wsr-nsign img{height:16px;width:auto;display:block}

/* ===== Relatório (documento claro) ===== */
.wsr-report{--ink:#172033;--mut:#64748b;--line:#e3eaf0;--soft:#f6f9fb;--acc:#c9a227;--pri:#0f2a4a;color:var(--ink);font-family:'Segoe UI',Arial,sans-serif;line-height:1.5}
.wsr-report *{box-sizing:border-box}
.wsr-cover{padding:26px 30px;border-radius:18px;color:#fff;background:linear-gradient(135deg,#0f2a4a,#17445f 60%,#0f6b55)}
.wsr-cover-top{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px}
.wsr-tag{padding:5px 12px;border-radius:999px;background:rgba(255,255,255,.16);font-size:11px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}
.wsr-cover h1{margin:0 0 6px;font-size:30px;line-height:1.15;color:#fff}.wsr-cover h1 em{font-style:normal;font-weight:500;opacity:.9}.wsr-cover p{margin:0 0 14px;color:#cfe0ea}
.wsr-pills{display:flex;flex-wrap:wrap;gap:8px}.wsr-pills span{display:inline-flex;align-items:center;gap:7px;padding:6px 12px;border-radius:999px;background:rgba(255,255,255,.14);font-size:12px;font-weight:700}
.wsr-pills svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.wsr-sec{padding:24px 0 6px}.wsr-sec>h2{margin:0 0 14px;padding-left:12px;border-left:4px solid var(--acc);font-size:19px;color:var(--pri)}
.wsr-lead{margin:0;padding:16px 18px;border:1px solid var(--line);border-radius:14px;background:var(--soft);font-size:14.5px}
.wsr-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-top:18px}
.wsr-kpis article{position:relative;padding:14px;border:1px solid var(--line);border-radius:14px;background:#fff}
.wsr-kpis i{display:grid;place-items:center;width:32px;height:32px;margin-bottom:8px;border-radius:10px;background:#e8f1ff;color:#2f6fdb}
.wsr-kpis i svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.wsr-kpis span{display:block;color:var(--mut);font-size:11px}.wsr-kpis b{display:block;font-size:26px;line-height:1.15;color:var(--pri)}.wsr-kpis small{color:var(--mut);font-size:11px}
.wsr-grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.wsr-card{padding:16px;border:1px solid var(--line);border-radius:14px;background:#fff;break-inside:avoid}.wsr-card h3{margin:0 0 12px;font-size:13px;color:var(--pri);text-transform:uppercase;letter-spacing:.06em}.wsr-wide{margin-top:12px}
.wsr-bars{display:grid;gap:9px}.wsr-bar{display:grid;grid-template-columns:minmax(80px,34%) 1fr auto;align-items:center;gap:10px;font-size:12px}
.wsr-bar-l{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wsr-bar-t{height:10px;border-radius:99px;background:#eaf0f5;overflow:hidden}.wsr-bar-t i{display:block;height:100%;border-radius:99px}.wsr-bar b{min-width:34px;text-align:right}
.wsr-duo{display:grid;grid-template-columns:1fr 1fr;gap:10px}.wsr-donut{display:flex;flex-direction:column;align-items:center;gap:8px}.wsr-donut svg{width:118px;height:118px}
.wsr-dn{font:800 20px 'Segoe UI',Arial,sans-serif;fill:var(--pri)}.wsr-ds{font:600 8px 'Segoe UI',Arial,sans-serif;fill:var(--mut)}
.wsr-donut ul{list-style:none;margin:0;padding:0;display:grid;gap:3px;font-size:11.5px}.wsr-donut li{display:flex;align-items:center;gap:6px}.wsr-donut li i{width:10px;height:10px;border-radius:3px;display:inline-block}.wsr-donut li b{margin-left:auto;padding-left:8px}
.wsr-muted{color:var(--mut);font-size:12px;margin:0}
.wsr-companies{display:grid;gap:14px}
.wsr-company{padding:18px;border:1px solid var(--line);border-radius:16px;background:#fff;break-inside:avoid}
.wsr-company>header{display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:center;margin-bottom:14px}
.wsr-company header img,.wsr-avatar{width:54px;height:54px;border-radius:14px;object-fit:cover;border:1px solid var(--line)}.wsr-avatar{display:grid;place-items:center;background:linear-gradient(135deg,#1f3b73,#2563eb);color:#fff;font-weight:900;font-size:18px}
.wsr-company h3{margin:0;font-size:16px;color:var(--pri)}.wsr-company header p{margin:2px 0 0;color:var(--mut);font-size:12px}.wsr-company header small{display:inline-flex;align-items:center;gap:5px;color:var(--mut);font-size:11.5px}.wsr-company header small svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2}
.wsr-prio{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;background:color-mix(in srgb,var(--c) 14%,#fff);color:var(--c);border:1px solid color-mix(in srgb,var(--c) 40%,#fff);font-size:11px;font-weight:900;letter-spacing:.06em}.wsr-prio svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2}
.wsr-company-body{display:grid;grid-template-columns:150px 1fr;gap:16px;align-items:center;padding:14px;border-radius:12px;background:var(--soft)}
.wsr-score{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center}.wsr-score small{color:var(--mut);font-size:11px}.wsr-ring{width:84px;height:84px}.wsr-rn{font:800 24px 'Segoe UI',Arial,sans-serif;fill:var(--pri)}.wsr-rs{font:600 8px 'Segoe UI',Arial,sans-serif;fill:var(--mut)}
.wsr-score-na{display:grid;place-items:center;width:84px;height:84px;border-radius:50%;border:8px solid #e8eef3;color:var(--mut)}.wsr-score-na b{font-size:22px}.wsr-score-na small{display:none}
.wsr-google{display:flex;flex-direction:column;align-items:center}.wsr-google b{font-size:20px;color:var(--pri)}
.wsr-stars{position:relative;display:inline-block;font-size:15px;letter-spacing:1px;color:#d7dee6;background:linear-gradient(90deg,#f5b301 var(--p),#d7dee6 var(--p));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.wsr-checks{list-style:none;margin:0;padding:0;display:grid;gap:8px}.wsr-checks li{display:grid;grid-template-columns:24px 130px 1fr;align-items:center;gap:8px;font-size:13px}
.wsr-checks i{display:grid;place-items:center;width:22px;height:22px;border-radius:50%}.wsr-checks i svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.wsr-checks li.ok i{background:#dcf7ea;color:#0b8a58}.wsr-checks li.no i{background:#ffe4e6;color:#c92f3d}.wsr-checks li.na i{background:#eef1f5;color:#8a96a5}.wsr-checks span{color:var(--mut)}.wsr-checks b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wsr-company h4{margin:14px 0 6px;font-size:12px;text-transform:uppercase;letter-spacing:.07em;color:var(--pri)}.wsr-diag p{margin:0;font-size:13.5px}
.wsr-opps ol{margin:0;padding-left:20px;display:grid;gap:4px;font-size:13.5px}.wsr-gaps{margin:12px 0 0;padding:8px 12px;border-radius:10px;background:#fff7e0;color:#7a5a00;font-size:12.5px}.wsr-basis{display:block;margin-top:8px;color:var(--mut);font-size:11px}
.wsr-plan{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.wsr-plan article{padding:14px;border:1px solid var(--line);border-top:4px solid var(--c);border-radius:12px;background:#fff;break-inside:avoid}
.wsr-plan h3{display:flex;align-items:center;gap:8px;margin:0 0 10px;font-size:14px;color:var(--c)}.wsr-plan h3 i{width:10px;height:10px;border-radius:50%;background:var(--c)}.wsr-plan h3 em{margin-left:auto;font-style:normal;padding:1px 9px;border-radius:99px;background:color-mix(in srgb,var(--c) 14%,#fff);font-size:12px}
.wsr-plan b{font-size:13px}.wsr-plan ul{margin:3px 0 10px;padding-left:18px;font-size:12.5px;color:#334155}
.wsr-ai{padding:18px 20px;border:1px solid var(--line);border-radius:16px;background:var(--soft);margin-top:22px}.wsr-ai>h2{margin-top:0}.wsr-ai h4{margin:14px 0 4px;color:var(--pri)}.wsr-ai p{margin:6px 0}.wsr-ai ul{margin:6px 0 6px 18px;padding:0;display:grid;gap:4px}.wsr-ai-off p{margin:0;color:var(--mut)}
.wsr-method ul{margin:0;padding-left:20px;display:grid;gap:6px;font-size:13px;color:#334155}
.wsr-prompt{margin-top:18px;padding:10px 0;border-top:1px solid var(--line)}.wsr-prompt summary{cursor:pointer;color:var(--mut);font-size:12.5px}.wsr-prompt pre{white-space:pre-wrap;font-size:11.5px;background:var(--soft);padding:12px;border-radius:10px}
@media(max-width:760px){.wsr-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.wsr-grid2,.wsr-plan,.wsr-duo{grid-template-columns:1fr}.wsr-company-body{grid-template-columns:1fr}.wsr-checks li{grid-template-columns:24px 1fr}.wsr-checks b{grid-column:2}.wsr-company>header{grid-template-columns:auto 1fr}.wsr-prio{grid-column:1/-1;justify-self:start}.wsr-cover h1{font-size:23px}}
@media print{.wsr-actions,.wsr-id-bar{display:none!important}.wsr-report{font-size:12px}.wsr-cover,.wsr-prio,.wsr-lead,.wsr-company-body,.wsr-plan article,.wsr-bar-t i,.wsr-kpis i,.wsr-checks i{-webkit-print-color-adjust:exact;print-color-adjust:exact}.wsr-sec{break-inside:auto}.wsr-company,.wsr-card,.wsr-plan article{break-inside:avoid}.wsr-prompt{display:none}}

/* Conteúdo do modal limitado à altura da janela: o rodapé fixo (botões) não é mais cortado */
#modal.wsp19-modal>.box>#modalContent,#modal.wsp19-modal .box>#modalContent{height:100%!important;max-height:100%!important;overflow-y:auto!important;box-sizing:border-box}
#modal.wsp19-modal #modalContent:has(.wsp19-detail,.wsp19-prompt){padding:0!important}
#modal.wsp19-modal .wsp19-detail .score b{font-size:26px}#modal.wsp19-modal .wsp19-detail .score b small{font-size:12px;font-weight:600;opacity:.8}
#modal.wsp19-modal #modalContent:has(.wsr-report){padding:0!important}
#modal #printArea.wsp18-report:has(.wsr-report){max-width:none;margin:0;padding:20px 24px 8px;border-radius:0}
#modal .wsr-actions{padding:14px 24px;background:var(--panel,#111a24);box-shadow:0 -10px 18px -12px rgba(0,0,0,.45)}
html[data-nortear-theme="light"] #modal .wsr-actions{background:#fff;box-shadow:0 -10px 18px -12px rgba(15,30,50,.18)}
/* O documento tem fundo claro nos dois temas: cores próprias protegidas contra regras globais de tema */
#modal .wsr-report .wsr-cover,#modal .wsr-report .wsr-cover h1,#modal .wsr-report .wsr-cover h1 em,#modal .wsr-report .wsr-cover p,#modal .wsr-report .wsr-pills span,#modal .wsr-report .wsr-tag{color:#fff!important}
#modal .wsr-report .wsr-cover p{color:#d6e6ee!important}
#modal .wsr-report{color:#172033!important}
#modal .wsr-report h2,#modal .wsr-report h3,#modal .wsr-report h4{color:#0f2a4a!important}
#modal .wsr-report .wsr-plan h3{color:color-mix(in srgb,var(--c) 70%,#000)!important}
#modal .wsr-report .wsr-prio{color:color-mix(in srgb,var(--c) 58%,#000)!important}
#modal .wsr-report .wsr-muted,#modal .wsr-report .wsr-kpis span,#modal .wsr-report .wsr-kpis small,#modal .wsr-report .wsr-checks span,#modal .wsr-report .wsr-basis,#modal .wsr-report header p,#modal .wsr-report .wsr-nfoot{color:#64748b!important}
#modal .wsr-report .wsr-kpis b,#modal .wsr-report .wsr-google b{color:#0f2a4a!important}
#modal .wsr-report .wsr-gaps{color:#7a5a00!important}
#modal .wsr-report .wsr-card,#modal .wsr-report .wsr-company,#modal .wsr-report .wsr-kpis article,#modal .wsr-report .wsr-plan article{background:#fff!important;border-color:#e3eaf0!important}
#modal .wsr-report .wsr-lead,#modal .wsr-report .wsr-company-body,#modal .wsr-report .wsr-ai{background:#f6f9fb!important;border-color:#e3eaf0!important;color:#172033!important}
#modal .wsr-report .wsr-avatar,#modal .wsr-report .wsr-co-logo.ini{color:#fff!important}
.wsr-nsign img{height:22px}
#modal .wsr-report .wsr-nsign,#modal .wsr-report .wsr-nfoot span{color:#64748b!important}
