/* CommercialOS V7.7 — camada de usabilidade e visual dinâmico.
   Carregada por último no layout. Não altera estilos existentes fora das classes cos77-*. */

:root{--cos77-brand:#2563eb;--cos77-brand2:#7c3aed;--cos77-ok:#16a34a;--cos77-ink:#0f172a;--cos77-muted:#64748b;--cos77-line:#e2e8f0;--cos77-card:#fff}

/* ---------- Animações suaves ---------- */
@keyframes cos77In{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes cos77Pulse{0%,100%{box-shadow:0 0 0 0 rgba(37,99,235,.35)}50%{box-shadow:0 0 0 6px rgba(37,99,235,0)}}
.cos-home>section,.cos-home>nav,.cos77-help{animation:cos77In .35s ease both}
.cos-home>section:nth-of-type(2){animation-delay:.04s}.cos-home>section:nth-of-type(3){animation-delay:.08s}
.cos-kpi,.cos-panel,.cos77-quick a{transition:transform .15s ease,box-shadow .15s ease}
.cos-kpi:hover,.cos77-quick a:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(15,23,42,.08)}
.sidebar a.menu-item{transition:background .15s ease,transform .15s ease}
.sidebar a.menu-item:hover{transform:translateX(2px)}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* ---------- Comece por aqui (tema escuro) ---------- */
.cos77-start{margin:0 0 16px;padding:20px 22px;background:linear-gradient(135deg,rgba(37,99,235,.20),rgba(124,58,237,.14));border:1px solid #34507a;border-radius:18px;color:#f4f8ff}
.cos77-start-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;flex-wrap:wrap}
.app .cos77-start h2,.cos77-start h2{margin:6px 0;font-size:21px!important;color:#fff!important}
.cos77-start p{margin:0;color:#b9cbe0;font-size:14.5px}
.cos77-start-cta{display:inline-block;padding:11px 16px;border-radius:12px;background:#3b82f6;color:#fff!important;font-weight:800;font-size:14.5px;text-decoration:none;animation:cos77Pulse 2.4s ease-in-out infinite;white-space:nowrap}
.cos77-start-cta:hover{background:#2563eb}
.cos77-progress{height:9px;background:rgba(148,163,184,.22);border-radius:99px;margin:16px 0 14px;overflow:hidden}
.cos77-progress span{display:block;height:100%;background:linear-gradient(90deg,#3b82f6,#8b5cf6);border-radius:99px;transition:width .6s ease}
.cos77-steps{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:10px}
.cos77-steps a{display:flex;gap:12px;align-items:flex-start;padding:12px 14px;background:#0d1a2b;border:1px solid #2a4668;border-radius:14px;text-decoration:none;color:#f4f8ff!important;height:100%;box-sizing:border-box}
.cos77-steps a:hover{border-color:#69a7ff}
.cos77-step-mark{flex:0 0 24px;height:24px;border-radius:50%;border:2px solid #4b6587;display:grid;place-items:center;font-size:13px;font-weight:900;color:#fff}
.cos77-steps li.done .cos77-step-mark{background:#22c55e;border-color:#22c55e}
.cos77-steps li.done strong{text-decoration:line-through;color:#7f95ae!important}
.cos77-steps li.next a{border-color:#3b82f6;box-shadow:0 0 0 3px rgba(59,130,246,.25)}
.cos77-steps li.next .cos77-step-mark{border-color:#69a7ff}
.cos77-step-text strong{display:block;font-size:14.5px;color:#fff}
.cos77-step-text small{display:block;font-size:13px;color:#a9bcd3;margin-top:3px;line-height:1.4}

/* ---------- Atalhos ---------- */
.cos77-quick{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:0 0 16px}
.cos77-quick a{display:grid;grid-template-columns:40px 1fr;grid-template-rows:auto auto;column-gap:12px;align-items:center;padding:14px 16px;background:#0d1a2b;border:1px solid #2a4668;border-radius:16px;text-decoration:none;color:#f4f8ff!important}
.cos77-quick a:hover{border-color:#69a7ff}
.cos77-quick span{grid-row:1/3;width:40px;height:40px;border-radius:12px;background:rgba(59,130,246,.18);display:grid;place-items:center;font-size:19px}
.cos77-quick strong{font-size:15px;color:#fff}
.cos77-quick small{font-size:13px;color:#a9bcd3}
@media(max-width:900px){.cos77-quick{grid-template-columns:1fr 1fr}}

/* ---------- Ajuda contextual ---------- */
.cos77-help{display:flex;align-items:flex-start;gap:12px;margin:0 0 16px;padding:14px 16px;background:rgba(245,158,11,.10);border:1px solid rgba(245,158,11,.38);border-radius:14px}
.cos77-help[hidden]{display:none}
.cos77-help-icon{font-size:22px;line-height:1}
.cos77-help-text{flex:1;min-width:0}
.cos77-help-text strong{display:block;font-size:15px;color:#fde68a!important}
.cos77-help-text p{margin:4px 0 0;font-size:14.5px;line-height:1.55;color:#fef3c7}
.cos77-help-ok{flex:0 0 auto;border:1px solid rgba(245,158,11,.6);background:transparent;color:#fde68a;border-radius:10px;padding:8px 14px;font-weight:800;font-size:14px;cursor:pointer}
.cos77-help-ok:hover{background:rgba(245,158,11,.15)}
.cos77-help-reopen{position:fixed;right:18px;bottom:96px;z-index:9000;width:44px;height:44px;border-radius:50%;border:0;background:#3b82f6;color:#fff;font-size:19px;font-weight:900;cursor:pointer;box-shadow:0 8px 20px rgba(37,99,235,.45)}
.cos77-help-reopen[hidden]{display:none}
body:has(#commercialos-wpp) .cos77-help-reopen{bottom:110px}

/* ---------- Corretor de texto (✨) ---------- */
.cos77-ta-btn{flex:0 0 auto;border:1px solid rgba(148,163,184,.5);background:transparent;color:inherit;border-radius:10px;min-width:40px;height:40px;font-size:17px;cursor:pointer}
.cos77-ta-btn:hover:not(:disabled){background:rgba(124,58,237,.12)}
.cos77-ta-btn:disabled{opacity:.45;cursor:not-allowed}
.cos77-ta-inline{display:inline-flex;align-items:center;gap:6px;margin-top:8px;border:1px solid #4f46e5;background:rgba(99,102,241,.18);color:#e0e7ff;border-radius:10px;padding:7px 12px;font-size:13.5px;font-weight:800;cursor:pointer}
.cos77-ta-inline:hover{background:rgba(99,102,241,.3)}
.cos77-ta-menu{position:fixed;z-index:100000;min-width:250px;font-size:14px;background:#0f172a;color:#e2e8f0;border:1px solid #334155;border-radius:12px;padding:6px;box-shadow:0 18px 40px rgba(2,6,23,.45);font-size:13px}
.cos77-ta-menu button{display:flex;width:100%;gap:8px;align-items:center;border:0;background:transparent;color:inherit;text-align:left;padding:8px 10px;border-radius:8px;cursor:pointer;font-size:13px}
.cos77-ta-menu button:hover,.cos77-ta-menu button:focus{background:#1e293b;outline:none}
.cos77-ta-menu small{display:block;color:#a9bcd3;font-size:12.5px}
.cos77-ta-menu .cos77-ta-sep{height:1px;background:#334155;margin:4px 2px}
.cos77-ta-menu .cos77-ta-note{padding:6px 10px;color:#94a3b8;font-size:11px}
.cos77-ta-toast{position:fixed;left:50%;bottom:96px;transform:translateX(-50%);z-index:100001;background:#0f172a;color:#fff;border:1px solid #334155;border-radius:10px;padding:10px 14px;font-size:13px;display:flex;gap:10px;align-items:center;box-shadow:0 10px 30px rgba(2,6,23,.4)}
.cos77-ta-toast button{border:1px solid #475569;background:transparent;color:#fff;border-radius:7px;padding:4px 9px;cursor:pointer;font-weight:700}
.cos77-ta-preview-overlay{position:fixed;inset:0;z-index:100010;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(2,6,23,.78)}
.cos77-ta-preview{width:min(680px,100%);max-height:90vh;overflow:auto;padding:22px;border:1px solid #475569;border-radius:16px;background:#0f172a;color:#e2e8f0;box-shadow:0 24px 70px rgba(0,0,0,.5)}
.cos77-ta-preview h2{margin:0 0 6px;font-size:19px}.cos77-ta-preview p{margin:0 0 16px;color:#94a3b8;font-size:13px}
.cos77-ta-preview strong{display:block;margin:13px 0 6px;font-size:12px;color:#cbd5e1}
.cos77-ta-preview pre{white-space:pre-wrap;overflow-wrap:anywhere;margin:0;padding:12px;border:1px solid #334155;border-radius:9px;background:#111c30;color:#f8fafc;font:inherit;font-size:13px;line-height:1.5}
.cos77-ta-preview-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:18px}.cos77-ta-preview-actions button{padding:9px 13px;border:1px solid #475569;border-radius:8px;background:transparent;color:#e2e8f0;font:inherit;font-weight:700;cursor:pointer}.cos77-ta-preview-actions button.primary{border-color:#16a34a;background:#16a34a;color:white}

/* ---------- V7.7.2 — contraste do topo e textos que sumiam ---------- */
.app .cos-user-menu strong{color:#f4f8ff!important}
.app .cos-user-menu small{color:#a9bcd3!important}
.app .cos-user-menu span{color:#c3d1e3!important}
.app .cos-top-search kbd{color:#c3d1e3!important;border-color:#3a5a80!important;background:#13263d!important}
.app .content a:not([class]){color:#93c5fd}
.app .content a:not([class]):hover{color:#bfdbfe}
