/* Sistema · estilo profissional: fundo cinza claro, cartões brancos, Inter, ícones de traço, claro e escuro. */
@font-face { font-family: 'Inter'; src: url('../fonts/inter.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }

:root {
  --marca: #01c758; --marca-texto: #0b0b09; --marca-escura: #04773a;
  --marca-suave: color-mix(in oklab, var(--marca) 13%, var(--superficie));
  --marca-borda: color-mix(in oklab, var(--marca) 40%, var(--superficie));
  --fundo: #f3f4f6; --superficie: #ffffff; --superficie-2: #f8f9fa; --superficie-3: #eef0f2;
  --borda: #e5e7eb; --borda-forte: #d2d6dc;
  --texto: #15171a; --texto-2: #545c66; --texto-3: #858d97;
  --lateral: #101113; --lateral-2: #17181b; --lateral-texto: #b7bcc3; --lateral-forte: #f3f4f6;
  --ok: #12a150; --ok-fundo: #e7f6ed; --ok-texto: #0d7a3d;
  --alerta: #b7791f; --alerta-fundo: #fdf3dc; --alerta-texto: #8a5a06;
  --perigo: #d43b2a; --perigo-fundo: #fdecea; --perigo-texto: #b02a1b;
  --info: #2f6fdb; --info-fundo: #e9f0fc; --info-texto: #1f55b3;
  --roxo: #7c4ddb; --roxo-fundo: #f0eafc; --roxo-texto: #5e33b8;
  --laranja: #e8590c; --laranja-fundo: #fdeee4; --laranja-texto: #b6420a;
  --neutro-fundo: #eef0f2; --neutro-texto: #4b535c;
  --raio: 14px; --raio-sm: 10px; --raio-lg: 20px;
  --sombra: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .05);
  --sombra-lg: 0 24px 48px -16px rgba(16, 24, 40, .22);
  --fonte: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.19, 1, .22, 1);
  color-scheme: light;
}
[data-tema="escuro"] {
  --fundo: #0d0e10; --superficie: #16181b; --superficie-2: #1b1d21; --superficie-3: #22252a;
  --borda: #2a2e34; --borda-forte: #3a3f46;
  --texto: #eef0f2; --texto-2: #aab1ba; --texto-3: #7c848e;
  --lateral: #0a0b0c; --lateral-2: #121316;
  --ok-fundo: #0f2a1b; --ok-texto: #4fd08a; --alerta-fundo: #2e2410; --alerta-texto: #f0c063;
  --perigo-fundo: #33130f; --perigo-texto: #ff8a7a; --info-fundo: #12223d; --info-texto: #8db4ff;
  --roxo-fundo: #241a3a; --roxo-texto: #bba2ff; --laranja-fundo: #33200f; --laranja-texto: #ffaa70;
  --neutro-fundo: #22252a; --neutro-texto: #b7bec7;
  --marca-escura: color-mix(in oklab, var(--marca) 80%, #fff);
  --sombra: 0 1px 2px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fundo); color: var(--texto); font: 14px/1.5 var(--fonte); overflow-x: clip; -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
.ic { flex: none; display: inline-block; vertical-align: -0.2em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; }
.muted { color: var(--texto-3); }
.texto-2 { color: var(--texto-2); }
.forte { font-weight: 600; }
.ok-t { color: var(--ok-texto); } .perigo-t { color: var(--perigo-texto); } .alerta-t { color: var(--alerta-texto); }
:focus-visible { outline: 2px solid var(--marca-escura); outline-offset: 2px; border-radius: 6px; }
.sem-js { padding: 40px; text-align: center; }
.carregando { min-height: 100vh; display: grid; place-content: center; gap: 14px; justify-items: center; color: var(--texto-3); }
.carregando span { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--borda); border-top-color: var(--marca); animation: gira 0.8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* ---------- Casca ---------- */
.app { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.lateral { position: sticky; top: 0; height: 100vh; background: var(--lateral); color: var(--lateral-texto); display: flex; flex-direction: column; overflow: hidden; z-index: 40; }
.lateral-topo { padding: 18px 18px 12px; }
.marca { display: flex; align-items: center; gap: 10px; color: var(--lateral-forte); min-width: 0; }
.marca-simbolo { width: 34px; height: 34px; border-radius: 10px; background: #fff; display: grid; place-items: center; flex: none; }
.marca-simbolo img { width: 24px; }
.marca-logo-img { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; background: #fff; flex: none; }
.marca-nome { font-weight: 650; font-size: 15px; letter-spacing: -.01em; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seletor-empresa { margin: 4px 14px 8px; display: flex; align-items: center; gap: 8px; padding: 0 10px; height: 40px; border-radius: 10px; background: var(--lateral-2); border: 1px solid #25272b; }
.seletor-empresa select { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--lateral-forte); font-size: 13px; font-weight: 500; outline: none; }
.seletor-empresa select option { color: #111; }
.menu { flex: 1; overflow-y: auto; padding: 6px 10px 12px; scrollbar-width: thin; scrollbar-color: #2a2c30 transparent; }
.menu-grupo { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #6d737c; padding: 14px 10px 6px; }
.menu a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; font-size: 13.5px; font-weight: 500; color: var(--lateral-texto); position: relative; transition: background .2s, color .2s; }
.menu a:hover { background: rgba(255, 255, 255, .05); color: var(--lateral-forte); }
.menu a.ativo { background: rgba(255, 255, 255, .08); color: #fff; }
.menu a.ativo::before { content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--marca); }
.menu a.ativo .ic { color: var(--marca); }
.menu-sinal { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--perigo); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.menu-sinal[hidden] { display: none; }
.usuario { margin: 8px 10px 12px; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; border: 1px solid #222428; background: var(--lateral-2); color: var(--lateral-forte); text-align: left; }
.usuario > span:not(.avatar) { flex: 1; min-width: 0; display: grid; }
.usuario strong { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usuario small { color: #8b9199; font-size: 12px; }
.lateral-fundo { display: none; }

.principal { min-width: 0; display: flex; flex-direction: column; }
.topo { position: sticky; top: 0; z-index: 30; height: 64px; display: flex; align-items: center; gap: 14px; padding: 0 28px; background: color-mix(in oklab, var(--superficie) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--borda); }
.busca { position: relative; flex: 1; min-width: 0; max-width: 520px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: 10px; background: var(--superficie-2); border: 1px solid var(--borda); color: var(--texto-3); }
.busca:focus-within { border-color: var(--marca-borda); box-shadow: 0 0 0 3px var(--marca-suave); }
.busca input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--texto); }
.busca-resultados { position: absolute; top: 46px; left: 0; right: 0; background: var(--superficie); border: 1px solid var(--borda); border-radius: 12px; box-shadow: var(--sombra-lg); padding: 6px; max-height: 420px; overflow: auto; }
.busca-resultados a { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 8px; color: var(--texto); }
.busca-resultados a:hover, .busca-resultados a:focus { background: var(--superficie-2); }
.busca-resultados a span { display: grid; }
.busca-resultados small, .busca-resultados p { color: var(--texto-3); font-size: 12px; }
.busca-resultados p { padding: 10px; }
.topo-acoes { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.topo-marca .marca { color: var(--texto); }
.sino { position: relative; }
.sino-n { position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--perigo); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--superficie); }
.sino-n[hidden] { display: none; }
.btn-icone.so-celular { display: none; }
#tela { padding: 28px 32px 72px; width: 100%; max-width: 1520px; margin: 0 auto; outline: none; }
.app-simples { grid-template-columns: 1fr; }
.app-simples .lateral { display: none; }
.app-simples #tela { max-width: 760px; padding: 20px 16px 72px; }

/* ---------- Cabeçalho das telas ---------- */
.tela-topo { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.tela-icone { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--marca); color: var(--marca-texto); flex: none; box-shadow: 0 6px 16px -8px color-mix(in oklab, var(--marca) 70%, transparent); }
.tela-titulo { min-width: 0; flex: 1 1 260px; }
.tela-titulo h1 { font-size: 23px; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; }
.tela-titulo p { color: var(--texto-2); margin-top: 2px; }
.tela-acoes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.voltar { margin-right: -4px; }
.secao-titulo { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.secao-titulo h2 { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }

/* ---------- Botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; font-weight: 600; font-size: 13.5px; white-space: nowrap; transition: background .2s, border-color .2s, transform .15s, box-shadow .2s; }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primario { background: var(--marca); color: var(--marca-texto); box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 4px 12px -6px color-mix(in oklab, var(--marca) 80%, transparent); }
.btn-primario:hover:not([disabled]) { background: color-mix(in oklab, var(--marca) 88%, #000); }
.btn-sec { background: var(--superficie); border-color: var(--borda-forte); color: var(--texto); }
.btn-sec:hover:not([disabled]) { background: var(--superficie-2); }
.btn-fantasma { background: transparent; color: var(--texto-2); }
.btn-fantasma:hover { background: var(--superficie-3); color: var(--texto); }
.btn-perigo { background: var(--perigo); color: #fff; }
.btn-escuro { background: var(--texto); color: var(--superficie); }
.btn-pequeno { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; gap: 6px; }
.btn-bloco { width: 100%; }
.btn-icone { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 10px; border: 0; background: transparent; color: var(--texto-2); transition: background .2s, color .2s; flex: none; }
.btn-icone:hover { background: var(--superficie-3); color: var(--texto); }
.btn-icone.pequeno { width: 30px; height: 30px; border-radius: 8px; }
.link { color: var(--marca-escura); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 0; }
.link:hover { text-decoration: underline; }

/* ---------- Cartões e grades ---------- */
.cartao { background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio); padding: 20px; box-shadow: var(--sombra); min-width: 0; }
.cartao-topo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.cartao-topo h3 { font-size: 15px; font-weight: 650; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.cartao-topo .acoes { margin-left: auto; display: flex; gap: 6px; }
.cartao-topo p { color: var(--texto-3); font-size: 12.5px; width: 100%; margin-top: -8px; }
.cartao.sem-pad { padding: 0; }
.cartao.sem-pad .cartao-topo { padding: 18px 20px 0; }
.grade { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g12 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.mt { margin-top: 16px; } .mt2 { margin-top: 24px; } .mb { margin-bottom: 16px; }
.linha { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.linha.entre { justify-content: space-between; }
.pilha { display: grid; gap: 10px; }

.kpi { background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio); padding: 18px 20px; box-shadow: var(--sombra); display: grid; gap: 6px; align-content: start; min-width: 0; }
.kpi-topo { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--texto-2); font-size: 13px; font-weight: 500; }
.kpi strong { font-size: 25px; font-weight: 650; letter-spacing: -.025em; font-variant-numeric: tabular-nums; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi small { color: var(--texto-3); font-size: 12.5px; }
.kpi-icone { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-style: normal; }
.kpi-destaque { background: linear-gradient(160deg, var(--marca-suave), var(--superficie) 70%); border-color: var(--marca-borda); }
.tom-marca { background: var(--marca-suave); color: var(--marca-escura); }
.tom-ok { background: var(--ok-fundo); color: var(--ok-texto); }
.tom-perigo { background: var(--perigo-fundo); color: var(--perigo-texto); }
.tom-alerta { background: var(--alerta-fundo); color: var(--alerta-texto); }
.tom-info { background: var(--info-fundo); color: var(--info-texto); }
.tom-roxo { background: var(--roxo-fundo); color: var(--roxo-texto); }
.tom-laranja { background: var(--laranja-fundo); color: var(--laranja-texto); }
.tom-neutro { background: var(--neutro-fundo); color: var(--neutro-texto); }

/* ---------- Crachás, avatar, barra ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap; line-height: 1; }
.badge-ok { background: var(--ok-fundo); color: var(--ok-texto); }
.badge-perigo { background: var(--perigo-fundo); color: var(--perigo-texto); }
.badge-alerta { background: var(--alerta-fundo); color: var(--alerta-texto); }
.badge-info { background: var(--info-fundo); color: var(--info-texto); }
.badge-roxo { background: var(--roxo-fundo); color: var(--roxo-texto); }
.badge-laranja { background: var(--laranja-fundo); color: var(--laranja-texto); }
.badge-neutro { background: var(--neutro-fundo); color: var(--neutro-texto); }
.badge-marca { background: var(--marca-suave); color: var(--marca-escura); }
.badge-escuro { background: var(--texto); color: var(--superficie); }
.avatar { width: var(--tam); height: var(--tam); border-radius: 50%; background: var(--cor); color: #fff; display: inline-grid; place-items: center; font-size: calc(var(--tam) * .38); font-weight: 650; flex: none; letter-spacing: .02em; }
.avatares { display: inline-flex; }
.avatares .avatar { border: 2px solid var(--superficie); margin-left: -8px; }
.avatares .avatar:first-child { margin-left: 0; }
.barra { display: block; height: var(--alto); border-radius: 99px; background: var(--superficie-3); overflow: hidden; }
.barra i { display: block; height: 100%; border-radius: 99px; transition: width .8s var(--ease); }
.barra-marca i { background: var(--marca); } .barra-ok i { background: var(--ok); } .barra-perigo i { background: var(--perigo); }
.barra-alerta i { background: var(--alerta); } .barra-info i { background: var(--info); }
.ponto { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

/* ---------- Tabelas ---------- */
.tabela { overflow-x: auto; border-radius: var(--raio); }
.tabela table { width: 100%; border-collapse: collapse; min-width: 640px; }
.tabela th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--texto-3); padding: 12px 14px; border-bottom: 1px solid var(--borda); background: var(--superficie-2); white-space: nowrap; }
.tabela td { padding: 12px 14px; border-bottom: 1px solid var(--borda); vertical-align: middle; }
.tabela tr:last-child td { border-bottom: 0; }
.tabela tbody tr { transition: background .15s; }
.tabela tbody tr:hover { background: var(--superficie-2); }
.tabela tr.clicavel { cursor: pointer; }
.tabela td.num, .tabela th.num { text-align: right; }
.tabela .principal-cel { display: grid; gap: 1px; }
.tabela .principal-cel strong { font-weight: 600; }
.tabela .principal-cel small { color: var(--texto-3); font-size: 12px; }
.tabela tfoot td { font-weight: 650; background: var(--superficie-2); }
.lista-simples { display: grid; }
.lista-simples > * { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--borda); }
.lista-simples > *:last-child { border-bottom: 0; }
.lista-simples .cresce { flex: 1; min-width: 0; display: grid; }
.lista-simples small { color: var(--texto-3); font-size: 12px; }

/* ---------- Formulários ---------- */
.form { display: grid; gap: 14px; }
.campos-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.campos-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.campo { display: grid; gap: 6px; min-width: 0; }
.campo label { font-size: 13px; font-weight: 600; color: var(--texto-2); }
.campo label b { color: var(--perigo); }
.campo small { color: var(--texto-3); font-size: 12px; }
.campo input:not([type=checkbox]):not([type=radio]), .campo select, .campo textarea, .entrada {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--borda-forte); background: var(--superficie); color: var(--texto); outline: none; transition: border-color .2s, box-shadow .2s; }
.campo textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.campo input:focus, .campo select:focus, .campo textarea:focus, .entrada:focus { border-color: var(--marca-escura); box-shadow: 0 0 0 3px var(--marca-suave); }
.entrada-prefixo { display: flex; align-items: center; border: 1px solid var(--borda-forte); border-radius: 10px; background: var(--superficie); overflow: hidden; }
.entrada-prefixo:focus-within { border-color: var(--marca-escura); box-shadow: 0 0 0 3px var(--marca-suave); }
.entrada-prefixo span { padding: 0 10px; color: var(--texto-3); font-weight: 600; font-size: 13px; background: var(--superficie-2); align-self: stretch; display: grid; place-items: center; }
.campo .entrada-prefixo input { border: 0 !important; box-shadow: none !important; border-radius: 0; text-align: right; font-variant-numeric: tabular-nums; }
.entrada-prefixo.sufixo span { border-left: 1px solid var(--borda); }
.campo-check { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--texto); cursor: pointer; }
.campo-check input { width: 18px; height: 18px; accent-color: var(--marca-escura); }
.erro-campo { color: var(--perigo-texto); font-size: 12.5px; font-weight: 600; }
select.entrada, .filtros select { height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--borda-forte); background: var(--superficie); color: var(--texto); }
.filtros { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.busca-local { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--borda-forte); border-radius: 10px; background: var(--superficie); color: var(--texto-3); flex: 1 1 220px; max-width: 340px; }
.busca-local input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; color: var(--texto); }
.filtros .direita { margin-left: auto; display: flex; gap: 8px; }

/* ---------- Abas e controle segmentado ---------- */
.abas { display: flex; gap: 4px; border-bottom: 1px solid var(--borda); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.abas::-webkit-scrollbar { display: none; }
.abas a { display: inline-flex; align-items: center; gap: 7px; padding: 10px 12px; font-weight: 600; font-size: 13.5px; color: var(--texto-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.abas a:hover { color: var(--texto); }
.abas a.ativa { color: var(--texto); border-bottom-color: var(--marca); }
.abas-n { min-width: 20px; height: 20px; border-radius: 10px; background: var(--superficie-3); font-size: 11px; display: grid; place-items: center; padding: 0 6px; }
.segmentado { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--superficie-3); gap: 2px; }
.segmentado button { border: 0; background: transparent; height: 32px; padding: 0 12px; border-radius: 8px; font-weight: 600; font-size: 12.5px; color: var(--texto-2); white-space: nowrap; }
.segmentado button.ativo { background: var(--superficie); color: var(--texto); box-shadow: var(--sombra); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--borda); background: var(--superficie); font-weight: 600; font-size: 12.5px; color: var(--texto-2); }
.chip.ativo { background: var(--texto); border-color: var(--texto); color: var(--superficie); }
.chip .n { opacity: .65; font-weight: 500; }

/* ---------- Kanban ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(264px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; scroll-snap-type: x proximity; }
.kanban-col { background: var(--superficie-3); border-radius: var(--raio); padding: 10px; min-height: 160px; scroll-snap-align: start; border: 1px solid transparent; transition: background .2s, border-color .2s; }
.kanban-col.alvo { background: var(--marca-suave); border-color: var(--marca-borda); }
.kanban-col header { display: flex; align-items: center; gap: 8px; padding: 4px 4px 10px; flex-wrap: wrap; }
.kanban-col header strong { font-size: 13px; font-weight: 650; }
.kanban-col header small { width: 100%; color: var(--texto-3); font-size: 12px; padding-left: 16px; }
.kanban-ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--cor); }
.kanban-n { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--texto-3); background: var(--superficie); border-radius: 6px; padding: 1px 7px; }
.kanban-lista { display: grid; gap: 8px; }
.kanban-vazio { color: var(--texto-3); font-size: 12.5px; text-align: center; padding: 18px 0; border: 1px dashed var(--borda-forte); border-radius: 10px; }
.cartao-k { background: var(--superficie); border: 1px solid var(--borda); border-radius: 12px; padding: 12px; box-shadow: var(--sombra); display: grid; gap: 8px; cursor: grab; transition: box-shadow .2s, transform .2s, border-color .2s; text-align: left; width: 100%; }
.cartao-k:hover { border-color: var(--borda-forte); box-shadow: 0 6px 16px -8px rgba(16, 24, 40, .2); }
.cartao-k.arrastando { opacity: .5; transform: rotate(1.5deg); }
.cartao-k .k-topo { display: flex; align-items: flex-start; gap: 8px; }
.cartao-k .k-topo strong { font-size: 13.5px; font-weight: 650; line-height: 1.3; flex: 1; min-width: 0; }
.cartao-k .k-sub { color: var(--texto-3); font-size: 12px; line-height: 1.35; }
.cartao-k .k-linha { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--texto-2); }
.cartao-k .k-valor { font-weight: 650; font-variant-numeric: tabular-nums; color: var(--texto); font-size: 13.5px; }
.cartao-k .k-rodape { display: flex; align-items: center; gap: 6px; justify-content: space-between; border-top: 1px solid var(--borda); padding-top: 8px; font-size: 12px; color: var(--texto-3); }
.cartao-k .k-proximo { font-size: 12px; color: var(--texto-2); background: var(--superficie-2); border-radius: 8px; padding: 6px 8px; display: flex; gap: 6px; line-height: 1.35; }
.mover-celular { display: none; }

.score { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px 0 6px; border-radius: 7px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.score.quente { background: var(--ok-fundo); color: var(--ok-texto); }
.score.morno { background: var(--alerta-fundo); color: var(--alerta-texto); }
.score.frio { background: var(--info-fundo); color: var(--info-texto); }

/* ---------- Camadas: modal, gaveta, aviso, menu ---------- */
#camadas { position: relative; z-index: 80; }
.modal-fundo, .gaveta-fundo { position: fixed; inset: 0; background: rgba(12, 14, 18, .48); display: grid; place-items: center; padding: 20px; animation: aparece .2s ease; backdrop-filter: blur(2px); }
.modal-fundo.saindo, .gaveta-fundo.saindo { animation: some .2s ease forwards; }
@keyframes aparece { from { opacity: 0; } }
@keyframes some { to { opacity: 0; } }
.modal { width: min(100%, var(--largura)); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--superficie); border-radius: var(--raio-lg); box-shadow: var(--sombra-lg); animation: sobe .3s var(--ease); overflow: hidden; }
@keyframes sobe { from { transform: translateY(14px) scale(.98); opacity: 0; } }
.modal-topo, .gaveta-topo { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--borda); }
.modal-topo h2, .gaveta-topo h2 { font-size: 17px; font-weight: 650; letter-spacing: -.01em; flex: 1; }
.modal-corpo { padding: 20px; overflow-y: auto; }
.modal-rodape { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--borda); background: var(--superficie-2); flex-wrap: wrap; }
.texto-modal { color: var(--texto-2); line-height: 1.55; }
.gaveta-fundo { place-items: stretch end; padding: 0; }
.gaveta { width: min(100vw, var(--largura)); height: 100vh; background: var(--fundo); display: flex; flex-direction: column; box-shadow: var(--sombra-lg); animation: entraLado .35s var(--ease); }
@keyframes entraLado { from { transform: translateX(40px); opacity: 0; } }
.gaveta-topo { background: var(--superficie); flex-wrap: wrap; }
.gaveta-titulo { flex: 1; min-width: 200px; }
.gaveta-titulo p { color: var(--texto-2); font-size: 13px; margin-top: 2px; }
.gaveta-corpo { flex: 1; overflow-y: auto; padding: 20px; }
#avisos { position: fixed; bottom: 20px; right: 20px; z-index: 120; display: grid; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.aviso { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--texto); color: var(--superficie); box-shadow: var(--sombra-lg); font-weight: 500; animation: sobe .3s var(--ease); }
.aviso-ok .ic { color: #4fd08a; } .aviso-perigo .ic { color: #ff8a7a; } .aviso-alerta .ic { color: #f0c063; }
.aviso.saindo { animation: some .25s forwards; }
.menu-flutuante { position: fixed; z-index: 130; min-width: 220px; max-width: min(380px, calc(100vw - 16px)); background: var(--superficie); border: 1px solid var(--borda); border-radius: 12px; box-shadow: var(--sombra-lg); padding: 6px; animation: sobe .2s var(--ease); }
.menu-flutuante button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; background: transparent; border-radius: 8px; text-align: left; font-size: 13.5px; color: var(--texto); }
.menu-flutuante button:hover:not([disabled]), .menu-flutuante button:focus { background: var(--superficie-2); outline: none; }
.menu-flutuante button[disabled] { color: var(--texto-3); cursor: default; }
.menu-flutuante button.perigo { color: var(--perigo-texto); }
.menu-flutuante hr { border: 0; border-top: 1px solid var(--borda); margin: 5px 0; }

/* ---------- Gráficos ---------- */
.grafico svg { width: 100%; height: var(--alto-g, 170px); overflow: visible; display: block; }
.grafico-rotulos { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); margin-top: 6px; font-size: 11.5px; color: var(--texto-3); text-align: center; }
.grafico-rotulos span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grafico text { font-size: 11px; fill: var(--texto-3); font-family: var(--fonte); }
.grafico .grade { stroke: var(--borda); stroke-width: 1; stroke-dasharray: 3 4; }
.grafico .meta-g { stroke: var(--texto-2); stroke-width: 1.2; stroke-dasharray: 5 4; }
.grafico .meta-t { fill: var(--texto-2); font-weight: 600; }
.legenda { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 8px; font-size: 12px; color: var(--texto-2); }
.legenda span { display: inline-flex; align-items: center; gap: 6px; }
.legenda i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.rosca { position: relative; width: var(--tam); height: var(--tam); margin: 0 auto; }
.rosca svg { width: 100%; height: 100%; }
.rosca-centro { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.rosca-centro strong { font-size: 24px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rosca-centro small { color: var(--texto-3); font-size: 12px; }

/* ---------- Diversos ---------- */
.vazio { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 40px 20px; color: var(--texto-3); }
.vazio strong { color: var(--texto); font-size: 15px; }
.vazio p { max-width: 420px; }
.linha-tempo { display: grid; gap: 0; }
.linha-tempo > div { display: grid; grid-template-columns: 30px 1fr; gap: 10px; position: relative; padding-bottom: 16px; }
.linha-tempo > div::before { content: ''; position: absolute; left: 14px; top: 28px; bottom: 0; width: 2px; background: var(--borda); }
.linha-tempo > div:last-child::before { display: none; }
.linha-tempo i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--superficie-3); color: var(--texto-2); font-style: normal; }
.linha-tempo p { line-height: 1.4; }
.linha-tempo small { color: var(--texto-3); font-size: 12px; }
.nota-fase2 { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--info-fundo); color: var(--info-texto); font-size: 13px; line-height: 1.45; }
.nota-fase2 .ic { margin-top: 1px; }
.nota-alerta { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--alerta-fundo); color: var(--alerta-texto); font-size: 13px; line-height: 1.45; }
.nota-perigo { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--perigo-fundo); color: var(--perigo-texto); font-size: 13px; line-height: 1.45; }
.pill-fase2 { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 11px; font-weight: 700; letter-spacing: .02em; background: var(--roxo-fundo); color: var(--roxo-texto); }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13.5px; }
.dl dt { color: var(--texto-3); }
.dl dd { margin: 0; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.valor-grande { font-size: 28px; font-weight: 700; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.separador { border: 0; border-top: 1px solid var(--borda); margin: 14px 0; }
.passos { display: flex; gap: 6px; flex-wrap: wrap; }
.passos button, .passos span { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--borda); background: var(--superficie); font-size: 12.5px; font-weight: 600; color: var(--texto-2); }
.passos .feito { background: var(--superficie-3); color: var(--texto); }
.passos .atual { background: var(--texto); color: var(--superficie); border-color: var(--texto); }
.passos .ganho { background: var(--ok-fundo); color: var(--ok-texto); border-color: transparent; }
.passos .perdido { background: var(--perigo-fundo); color: var(--perigo-texto); border-color: transparent; }

/* ---------- Faixa da loja de exemplo (com o botão de voltar ao primeiro acesso) ---------- */
.faixa-exemplo { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 8px 28px; background: var(--marca-suave); border-bottom: 1px solid var(--marca-borda); font-size: 13px; color: var(--texto); }
.faixa-exemplo > .ic { color: var(--marca-escura); flex: none; }
.faixa-exemplo > span { flex: 1; min-width: 180px; }

/* ---------- Entrada (primeiro acesso e perfis) ---------- */
.app-entrada { display: block; }
.tela-entrada { min-height: 100vh; display: grid; justify-items: center; align-content: safe center; gap: 18px; padding: 32px 16px; background: radial-gradient(1200px 600px at 10% -10%, var(--marca-suave), transparent 60%), var(--fundo); }
.entrada-cartao { width: min(100%, 680px); background: var(--superficie); border: 1px solid var(--borda); border-radius: 24px; box-shadow: var(--sombra-lg); padding: 32px; }
.entrada-marca .marca { color: var(--texto); }
.entrada-marca .marca-simbolo { background: var(--texto); }
.entrada-marca .marca-simbolo img { filter: none; }
.tela-entrada h1 { font-size: 26px; font-weight: 700; letter-spacing: -.025em; margin-top: 26px; }
.entrada-sub { color: var(--texto-2); margin-top: 6px; }
.entrada-perfis { display: grid; gap: 16px; margin-top: 22px; }
.entrada-grupo > p { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--texto-3); margin-bottom: 8px; }
.entrada-grupo > p small { text-transform: none; letter-spacing: 0; font-weight: 500; margin-left: 6px; }
.entrada-grupo { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.entrada-grupo > p { grid-column: 1 / -1; margin-bottom: 0; }
.entrada-usuario { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--borda); background: var(--superficie); text-align: left; transition: border-color .2s, box-shadow .2s, transform .2s; }
.entrada-usuario:hover { border-color: var(--marca-borda); box-shadow: 0 0 0 3px var(--marca-suave); transform: translateY(-1px); }
.entrada-usuario > span:not(.avatar) { flex: 1; display: grid; min-width: 0; }
.entrada-usuario strong { font-weight: 600; font-size: 13.5px; }
.entrada-usuario small { color: var(--texto-3); font-size: 12px; }
.entrada-usuario .ic { color: var(--texto-3); }
.entrada-nota { margin-top: 22px; display: flex; gap: 8px; align-items: flex-start; color: var(--texto-3); font-size: 12.5px; }
.entrada-rodape { color: var(--texto-3); font-size: 12px; }
.entrada-form { display: grid; gap: 14px; margin-top: 22px; }
.entrada-form .btn-bloco { height: 48px; font-size: 15px; margin-top: 4px; }
.entrada-erro { color: var(--perigo-texto); font-size: 13px; font-weight: 600; }
.entrada-exemplo { margin-top: 16px; text-align: center; font-size: 13px; color: var(--texto-3); }
.entrada-exemplo button { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--marca-escura); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- Responsivo ---------- */
@media (max-width: 1280px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) {
  .g3, .g21, .g12 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1024px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .lateral { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .35s var(--ease); }
  .menu-aberto .lateral { transform: none; box-shadow: var(--sombra-lg); }
  .menu-aberto .lateral-fundo { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 35; }
  .btn-icone.so-celular { display: inline-grid; }
  .topo { padding: 0 14px; }
  #tela { padding: 20px 16px 72px; }
}
@media (max-width: 720px) {
  .faixa-exemplo { padding: 8px 14px; }
  .faixa-exemplo .btn { width: 100%; }
  .g4, .g2 { grid-template-columns: minmax(0, 1fr); }
  .g4.manter-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .g4.manter-2 .kpi { padding: 14px; }
  .g4.manter-2 .kpi strong { font-size: 17px; }
  .topo { gap: 8px; }
  .campos-2, .campos-3 { grid-template-columns: minmax(0, 1fr); }
  .tela-titulo h1 { font-size: 20px; }
  .tela-icone { width: 40px; height: 40px; }
  .kpi strong { font-size: 21px; }
  .kanban { grid-auto-columns: 84vw; }
  .mover-celular { display: block; }
  .cartao { padding: 16px; }
  .modal-fundo { padding: 0; place-items: end stretch; }
  .modal { width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0; }
  .entrada-cartao { padding: 22px; }
  .busca { max-width: none; }
  #avisos { left: 16px; right: 16px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media print {
  body { background: #fff; }
  .lateral, .topo, .tela-acoes, .abas, .nao-imprimir, #avisos { display: none !important; }
  .app { display: block; }
  #tela { padding: 0; max-width: none; }
  .cartao { box-shadow: none; border-color: #ccc; break-inside: avoid; }
}
.legenda i.tracejado { width: 16px; height: 0; border-radius: 0; background: none; border-top: 2px dashed var(--texto-2); }
