/* LX Suite · Design System (tokens + acabamento) — LDX Digital
   Paleta do briefing: Azul LX #2054E6 · Azul profundo #142444 · Inteligência #7950ED · Esmeralda #0D9F80
   Atenção #E8A317 · Crítico #DC4C64 · Fundo #F5F6FA · Superfície #FFFFFF.
   Só aparência: não muda dados, regras nem permissões. Carregado por último no portal. */
:root{
  --lx-blue:#2054E6;--lx-blue-2:#1A45C2;--lx-navy:#142444;--lx-ai:#7950ED;--lx-ok:#0D9F80;--lx-warn:#E8A317;--lx-warn-ink:#9A6A00;--lx-bad:#DC4C64;
  --lx-bg:#F5F6FA;--lx-surface:#FFFFFF;--lx-line:#E6E8EF;--lx-muted:#5B6478;
  --lx-r-card:16px;--lx-r-ctl:999px;--lx-shadow:0 1px 2px rgba(20,36,68,.05),0 8px 24px -16px rgba(20,36,68,.25);
  --lx-f-ui:'LXS Interface','Plus Jakarta Sans',system-ui,Arial,sans-serif;
}
html:not([data-theme="dark"]){
  --bg:#F5F6FA;--surface:#FFFFFF;--surface-2:#F1F3F8;--line:#E6E8EF;--line-2:#D5D9E3;
  --fg:#142444;--muted:#5B6478;--faint:#8A93A6;
  --accent:#2054E6;--accent-ink:#FFFFFF;--accent-soft:#EAF0FD;--accent-line:#C9D8FA;
  --side:#FFFFFF;--side-act:#EAF0FD;--ok:#0D9F80;--ok-soft:#E3F6F0;--warn:#C98A06;--warn-soft:#FCF3DC;--bad:#DC4C64;--bad-soft:#FCE8EC;
  --shadow:var(--lx-shadow)
}
html[data-theme="dark"]{--accent:#7C9CFF;--accent-soft:#16264A;--ok:#3CCB9E;--lx-ai:#A58BFF}

/* ---------- navegação (Linear) ---------- */
html body .side{background:var(--side)!important;border-right:1px solid var(--line)!important}
html body .nv-lbl{font-size:11px!important;font-weight:700!important;letter-spacing:.12em!important;text-transform:uppercase;color:var(--faint)!important;margin-top:14px!important}
html body .nv-it{border-radius:10px!important;font-weight:500;transition:background .15s,color .15s}
html body .nv-it:hover{background:var(--surface-2)!important}
html body .nv-it[aria-current="page"]{background:var(--accent-soft)!important;color:var(--accent)!important;font-weight:700!important}
html body .nv-it[aria-current="page"] svg{color:var(--accent)!important}
html body .nv-it .nb{border-radius:999px!important}
html body .sb-busca{border-radius:999px!important}
html body .side.lx-mini{width:72px!important;min-width:72px!important}
html body .side.lx-mini .nv-it>span:not(.nb),html body .side.lx-mini .nv-lbl,html body .side.lx-mini .sb-t,html body .side.lx-mini .sb-busca span,html body .side.lx-mini .sb-busca kbd,html body .side.lx-mini .nv-car,html body .side.lx-mini .nv-sub{display:none!important}
html body .side.lx-mini .nv-it{justify-content:center}
html body .side.lx-mini .nv-it .nb{position:absolute;top:2px;right:6px;transform:scale(.85)}
html body .lx-mini-bt{width:32px;height:32px;border-radius:999px;display:grid;place-items:center;color:var(--faint);border:0;background:transparent;cursor:pointer}
html body .lx-mini-bt:hover{background:var(--surface-2);color:var(--fg)}

/* ---------- títulos: editorial no topo, operacional nos cartões ---------- */
html body .ic-h h3,html body .ic h3,html body .kpi2 .k,html body section h3,:root body .app .ic h3,:root body .app .ic-h h3,:root body .app .content section h3,:root body .app .content .card h3{font-family:var(--lx-f-ui)!important;font-weight:700!important;font-style:normal!important;letter-spacing:-.01em!important}
html body .ic-h h3{font-size:15px!important;color:var(--fg)}
html body .ini-hd h1{color:var(--fg)}
html body .ini-hd p::first-letter{text-transform:uppercase}

/* ---------- cartões e controles ---------- */
html body .ic,html body .kpi2,html body .card{border-radius:var(--lx-r-card)!important;border-color:var(--line)!important;box-shadow:var(--shadow)!important}
html body .kpis{gap:12px!important;background:transparent!important;border:0!important;box-shadow:none!important}
html body .kpi2{background:var(--surface)!important;border:1px solid var(--line)!important}
html body .kpi2 .k{font-size:13px!important;color:var(--muted)!important;font-weight:600!important}
html body .kpi2 b.num{font-size:28px!important;font-weight:800!important;letter-spacing:-.03em;font-variant-numeric:tabular-nums}
html body .kpis .kpi2:nth-child(1) b.num,html body .kpis .kpi2:nth-child(1) .spark{color:var(--fg)}
html body .kpis .kpi2:nth-child(2) b.num,html body .kpis .kpi2:nth-child(2) .spark{color:var(--lx-warn-ink)}
html body .kpis .kpi2:nth-child(3) b.num,html body .kpis .kpi2:nth-child(3) .spark{color:var(--lx-ai)}
html body .kpis .kpi2:nth-child(4) b.num,html body .kpis .kpi2:nth-child(4) .spark{color:var(--accent)}
html body .kpi2:hover{border-color:var(--accent-line)!important;transform:translateY(-1px)}
html body .seg3,html body .ini-tb .seg,html body .tabs{border-radius:999px!important}
html body .seg3 button,html body .tabs button{border-radius:999px!important}
html body select.input,html body .input,html body input.input{border-radius:12px}

/* ---------- LDX IA compacta (identidade de IA em roxo, só aqui) ---------- */
html body .iai{background:var(--lx-navy)!important;background-image:radial-gradient(120% 140% at 100% 0%,rgba(121,80,237,.45) 0,rgba(121,80,237,0) 55%)!important;border-radius:20px!important;padding:16px 18px!important;box-shadow:none!important;gap:10px!important}
html body .iai-t{gap:12px!important;align-items:center!important}
html body .iai-orb{background:rgba(121,80,237,.25)!important;color:#CDBDFF!important;border-radius:12px!important;width:40px!important;height:40px!important}
html body .iai-k{color:#B9A4FF!important;letter-spacing:.14em!important}
html body .iai-tx b{font-size:17px!important;font-family:var(--lx-f-ui)!important}
html body .iai-tx small{display:none!important}
html body .iai-in{margin-top:4px!important;border-radius:999px!important;background:rgba(255,255,255,.08)!important;border:1px solid rgba(255,255,255,.14)!important;padding:4px!important}
html body .iai-in input{background:transparent!important;color:#fff!important;border:0!important;height:40px}
html body .iai-in input::placeholder{color:rgba(255,255,255,.6)!important}
html body .iai-in button{border-radius:999px!important;background:var(--lx-ai)!important;color:#fff!important;height:40px}
html body .iai-sg button{border-radius:999px!important;background:rgba(255,255,255,.06)!important;border-color:rgba(255,255,255,.16)!important;color:rgba(255,255,255,.86)!important;font-size:12.5px!important;padding:5px 12px!important}
html body .iai-ab{border-radius:999px!important}

/* ---------- estados semânticos ---------- */
html body .pill{border-radius:999px!important}
html body .p-ok{background:var(--ok-soft)!important;color:#0A7A62!important}
html body .p-warn{background:var(--warn-soft)!important;color:var(--lx-warn-ink)!important}
html body .p-bad{background:var(--bad-soft)!important;color:#B3283F!important}
html body .bar{border-radius:999px!important;overflow:hidden}
html body .bar i{border-radius:999px}

/* ---------- foco e movimento ---------- */
html body :focus-visible{outline:2px solid var(--accent)!important;outline-offset:2px}
@media (prefers-reduced-motion:reduce){html body *{transition:none!important;animation:none!important}}

html body .kpi2 .r{gap:8px!important;min-width:0}
html body .kpi2 .spark{flex:0 1 84px!important;min-width:36px}
html body .kpi2 b.num{white-space:nowrap;font-size:clamp(20px,2vw,28px)!important}
@media (max-width:640px){html body .iai-t{flex-wrap:wrap!important}html body .iai-ab{order:3}html body .iai-tx{flex:1 1 200px}}
/* movimento ao abrir cada tela (classe colocada pelo lx-ds.js) */
@keyframes lxDraw{from{stroke-dashoffset:var(--lx-len,400)}to{stroke-dashoffset:0}}
@keyframes lxGrow{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes lxRise{from{transform:scaleY(0)}to{transform:scaleY(1)}}
@keyframes lxUp{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
html body .main.lx-anim .content svg polyline,html body .main.lx-anim .content svg path[fill="none"]{stroke-dasharray:400;--lx-len:400;animation:lxDraw 1.1s cubic-bezier(.3,.8,.3,1) both}
html body .main.lx-anim .content .bar i{transform-origin:left center;animation:lxGrow .9s cubic-bezier(.3,.8,.3,1) both}
html body .main.lx-anim .content svg rect{transform-box:fill-box;transform-origin:bottom;animation:lxRise .8s cubic-bezier(.3,.8,.3,1) both}
html body .main.lx-anim .content svg circle[stroke-dasharray]{animation:lxDraw 1.1s ease-out both}
html body .main.lx-anim .content .kpi2,html body .main.lx-anim .content .ic,html body .main.lx-anim .content .kpi{animation:lxUp .5s ease-out both}
html body .main.lx-anim .content .kpis>*:nth-child(2){animation-delay:.05s}html body .main.lx-anim .content .kpis>*:nth-child(3){animation-delay:.1s}html body .main.lx-anim .content .kpis>*:nth-child(4){animation-delay:.15s}
/* ---------- fase 2 ---------- */
html body .ini-col .grid2{grid-template-columns:1fr!important}
html body .ini-col .card{border-radius:var(--lx-r-card)!important}
/* estados vazios elegantes */
html body .content .empty{display:flex;flex-direction:column;align-items:center;gap:10px;padding:42px 20px!important;color:var(--muted)!important;font-size:14px;text-align:center}
html body .content .empty::before{content:"";width:48px;height:48px;border-radius:16px;background:var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232054E6' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-6l-2 3h-4l-2-3H2'/%3E%3Cpath d='M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/%3E%3C/svg%3E") center/24px no-repeat}
/* tabelas (Attio) */
html body .content .table-wrap{border-radius:var(--lx-r-card)!important;border:1px solid var(--line)!important;background:var(--surface);overflow:auto}
html body .content table thead th{background:var(--surface-2)!important;font-size:12px!important;font-weight:700!important;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)!important;border-bottom:1px solid var(--line)!important}
html body .content table tbody tr{transition:background .12s}
html body .content table tbody tr:hover{background:color-mix(in srgb,var(--accent) 4%,transparent)}
html body .chip{border-radius:999px!important}
html body .chip[aria-pressed="true"]{background:var(--fg)!important;color:var(--surface)!important;border-color:var(--fg)!important}
/* paleta de comandos (Ctrl K) */
html body .cmdk input,html body [class*="cmd"] input[type="text"],html body [class*="paleta"] input{border-radius:999px!important}
/* atividades recentes */
html body .lx-ativ ul{list-style:none;margin:0;padding:0}
html body .lx-ativ li{display:grid;grid-template-columns:10px 1fr auto;gap:10px;align-items:start;padding:9px 0;border-top:1px solid var(--line)}
html body .lx-ativ li:first-child{border-top:0}
html body .lx-ativ i{width:8px;height:8px;border-radius:50%;margin-top:6px;background:var(--accent)}
html body .lx-ativ i.warn{background:var(--lx-warn)}html body .lx-ativ i.bad{background:var(--lx-bad)}html body .lx-ativ i.ok{background:var(--lx-ok)}
html body .lx-ativ b{display:block;font-size:13.5px;font-weight:600;color:var(--fg)}
html body .lx-ativ small{color:var(--muted);font-size:12px}
html body .lx-ativ time{font-size:11.5px;color:var(--faint);white-space:nowrap}
/* ---------- correções (dez/26) ---------- */
html body .ic.atn2>header.ic-h{border:0!important;border-bottom:1px solid var(--line)!important;border-radius:0!important;box-shadow:none!important;background:transparent!important}
html body .ic.atn2>ul>li:only-child,html body .ic.atn2>ul>li:last-child:nth-child(odd){grid-column:1/-1}
@media (max-width:1440px){html body .kpis .kpi2 .spark{display:none!important}}
html body .ic,html body .kpi2{overflow:hidden}
