/* Jota Intelligence — Sistema de Gestão
   Estilo escuro fintech: grafite profundo, verde para dinheiro que entra,
   vermelho para o que sai ou venceu. O saldo é o protagonista. */
:root {
  --bg: #0e1217;
  --panel: #161c23;
  --panel-2: #1b222b;
  --raise: #202833;
  --ink: #f3f6f9;
  --ink-2: #c3ccd6;
  --muted: #8b96a3;
  --line: #262f3a;
  --line-2: #1f2730;
  --field: #0f141a;
  --side: #0a0d11;
  --side-ink: #8b96a3;

  --acc: #22c55e;          /* verde Jota */
  --acc-ink: #04210f;
  --acc-soft: #12261b;
  --pos: #4ade80;
  --neg: #f87171;
  --warn: #fbbf24;
  --info: #38bdf8;
  --pos-bg: #13261b;
  --neg-bg: #2b171a;
  --warn-bg: #2a2310;
  --info-bg: #10243a;
  --focus: #4ade80;

  /* nomes antigos usados em alguns templates */
  --sol: var(--acc);
  --sol-ink: var(--acc-ink);

  --r-sm: 8px;
  --r: 14px;
  --f-ui: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-head: "Manrope", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 500 14.5px/1.5 var(--f-ui); font-feature-settings: "tnum" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-head); line-height: 1.15; margin: 0; letter-spacing: -.015em; }
h1 { font-size: 1.7rem; font-weight: 800; }
h2 { font-size: 1.02rem; font-weight: 700; }
h3 { font-size: .95rem; font-weight: 700; }
p { margin: 0 0 .75em; }
small, .muted { color: var(--muted); }
small { font-weight: 500; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: #22c55e55; }

/* ------------------------------------------------------------------ shell */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side {
  background: var(--side); color: var(--side-ink); padding: 18px 12px 24px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--line-2);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--acc); color: var(--acc-ink);
  display: grid; place-items: center; font: 800 19px/1 var(--f-head);
}
.brand-name { font: 800 1rem/1.15 var(--f-head); color: var(--ink); }
.brand-name small { display: block; font: 600 .72rem var(--f-ui); color: var(--muted); }
.nav-group { margin: 16px 0 4px; padding: 0 10px; font-size: .72rem; font-weight: 700; color: #5d6874; letter-spacing: .02em; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px;
  text-decoration: none; color: var(--side-ink); font-size: .9rem; font-weight: 600;
}
.nav a:hover { background: #141a21; color: var(--ink); }
.nav a.on { background: var(--acc-soft); color: var(--pos); }
.nav svg { width: 18px; height: 18px; flex: none; }
.side-foot { margin-top: 24px; padding: 14px 10px 0; border-top: 1px solid var(--line-2); font-size: .84rem; color: var(--ink-2); }
.side-foot a { color: var(--muted); }

.main { min-width: 0; }
.topbar { display: none; }
.page { max-width: 1320px; margin: 0 auto; padding: 28px 32px 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.page-head small a { color: var(--muted); text-decoration: none; }
.page-head small a:hover { color: var(--ink); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ------------------------------------------------------------------ panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.panel-body { padding: 16px 18px; }
.panel + .panel, .grid + .panel, .panel + .grid, .kpis + .grid, .kpis + .panel, .filters + .panel, section.hero + .grid { margin-top: 16px; }
.grid { display: grid; gap: 16px; }
.grid > * { min-width: 0; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }

/* indicadores: cada número no seu cartão */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.kpi .lbl { font-size: .8rem; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.kpi .lbl svg { width: 16px; height: 16px; }
.kpi .val { font: 800 1.55rem/1.15 var(--f-head); margin-top: 6px; letter-spacing: -.025em; white-space: nowrap; }
.kpi .sub { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.kpi.hero { background: var(--acc-soft); border-color: #1d3d2a; }
.kpi.hero .lbl, .kpi.hero .sub { color: #8fd3a8; }

/* bloco de saldo do painel */
section.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr); gap: 16px; }
.hero-saldo {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 22px 24px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  position: relative; overflow: hidden;
}
.hero-saldo::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  border: 36px solid #22c55e14; pointer-events: none;
}
.hero-saldo .lbl { color: var(--muted); font-weight: 600; font-size: .85rem; }
.hero-saldo .big { font: 800 clamp(2rem, 4.2vw, 2.9rem)/1 var(--f-head); letter-spacing: -.035em; margin-top: 8px; }
.hero-saldo .big span { color: var(--muted); font-size: .55em; font-weight: 700; margin-right: 4px; letter-spacing: 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: .8rem; color: var(--ink-2); }
.chip b { color: var(--ink); font-weight: 700; margin-left: 4px; }
section.hero .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ico { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; }
.ico svg { width: 15px; height: 15px; }
.ico.g { background: var(--pos-bg); color: var(--pos); }
.ico.r { background: var(--neg-bg); color: var(--neg); }
.ico.b { background: var(--info-bg); color: var(--info); }
.ico.y { background: var(--warn-bg); color: var(--warn); }

.pos { color: var(--pos); }
.neg { color: var(--neg); }
.big-money { font: 800 clamp(1.8rem, 7vw, 2.4rem)/1 var(--f-head); letter-spacing: -.03em; }

/* ------------------------------------------------------------------ tables */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line-2); }
th { font-size: .74rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
tbody tr:hover td { background: #1a2129; }
tbody tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; white-space: nowrap; }
td.act { text-align: right; white-space: nowrap; width: 1%; }
tr.sub td { font-weight: 800; background: var(--panel-2); }
tr.det td:first-child { padding-left: 32px; color: var(--muted); font-size: .88rem; }
tr.det td { color: var(--muted); }
tr.total td { font-weight: 800; border-top: 1px solid var(--acc); }
tr.muted-row td { color: var(--muted); }
table.dre td:first-child, table.dre th:first-child { min-width: 250px; position: sticky; left: 0; background: var(--panel); z-index: 1; }
table.dre tr.sub td:first-child { background: var(--panel-2); }
.empty { padding: 30px 18px; text-align: center; color: var(--muted); }
.empty a { color: var(--pos); }

/* ------------------------------------------------------------------ badges */
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700; background: var(--raise); color: var(--ink-2); white-space: nowrap; }
.b-pos { background: var(--pos-bg); color: var(--pos); }
.b-neg { background: var(--neg-bg); color: var(--neg); }
.b-warn { background: var(--warn-bg); color: var(--warn); }
.b-info { background: var(--info-bg); color: var(--info); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: 0; margin-right: 8px; }

/* ------------------------------------------------------------------ buttons & forms */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); font: 700 .85rem var(--f-ui);
  text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s;
}
.btn:hover { border-color: #3a4552; background: var(--raise); }
.btn.primary { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.btn.primary:hover { background: #2fd36b; border-color: #2fd36b; }
.btn.sol { background: var(--pos-bg); border-color: #1d3d2a; color: var(--pos); }
.btn.sol:hover { background: #18331f; }
.btn.danger { color: var(--neg); }
.btn.danger:hover { border-color: #5a2a2e; background: var(--neg-bg); }
.btn.sm { padding: 5px 10px; font-size: .78rem; }
.btn.link { border: 0; background: none; padding: 4px 6px; color: var(--info); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.inline { display: inline; }

label { display: block; font-size: .78rem; font-weight: 700; color: var(--ink-2); margin-bottom: 5px; }
input, select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--field); color: var(--ink); font: 500 .9rem var(--f-ui);
}
input:hover, select:hover, textarea:hover { border-color: #33404d; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px #22c55e22; }
input::placeholder, textarea::placeholder { color: #5d6874; }
input[type=checkbox] { width: auto; accent-color: var(--acc); }
input[type=color] { padding: 3px; height: 40px; }
textarea { min-height: 84px; resize: vertical; }
.f { margin-bottom: 12px; }
.fr { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.check { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.hint { font-size: .76rem; color: var(--muted); margin-top: 4px; font-weight: 500; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.filters .f { margin: 0; min-width: 140px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; background: var(--field); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.tabs a { padding: 5px 12px; border-radius: 999px; text-decoration: none; font-size: .82rem; font-weight: 700; color: var(--muted); }
.tabs a:hover { color: var(--ink); }
.tabs a.on { background: var(--raise); color: var(--ink); }

/* dialog */
dialog.dlg { border: 1px solid var(--line); border-radius: 18px; padding: 0; width: min(640px, 94vw); background: var(--panel); color: var(--ink); }
dialog.dlg[open] { animation: abrir .16s ease-out; }
@keyframes abrir { from { opacity: 0; transform: translateY(8px) scale(.99); } }
dialog.dlg::backdrop { background: rgba(3, 6, 9, .72); backdrop-filter: blur(2px); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.dlg-body { padding: 18px 20px 6px; max-height: 70vh; overflow-y: auto; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 18px; }
.x { border: 0; background: none; font-size: 1.4rem; cursor: pointer; color: var(--muted); line-height: 1; }
.x:hover { color: var(--ink); }

/* flash */
.flash { padding: 11px 14px; border-radius: var(--r-sm); margin-bottom: 14px; font-size: .88rem; font-weight: 600; border: 1px solid transparent; }
.flash.ok { background: var(--pos-bg); color: var(--pos); border-color: #1d3d2a; }
.flash.erro { background: var(--neg-bg); color: var(--neg); border-color: #4a2328; }
.flash.aviso { background: var(--warn-bg); color: var(--warn); border-color: #4a3c14; }

/* ------------------------------------------------------------------ projetos */
.progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; min-width: 80px; }
.progress > span { display: block; height: 100%; background: var(--acc); border-radius: 99px; }
.proj-name { font-weight: 700; text-decoration: none; }
.proj-name:hover { color: var(--pos); }
.prazo-late { color: var(--neg); font-weight: 700; }
.prio-urgente td:first-child { box-shadow: inset 3px 0 0 var(--neg); }
.prio-alta td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
article.prio-urgente { box-shadow: inset 3px 0 0 var(--neg); }
article.prio-alta { box-shadow: inset 3px 0 0 var(--warn); }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.checklist li:last-child { border-bottom: 0; }
.checklist li.done span { text-decoration: line-through; color: var(--muted); }
.tick { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid #3a4552; background: transparent; cursor: pointer; display: grid; place-items: center; padding: 0; color: var(--acc-ink); font-weight: 800; }
.tick:hover { border-color: var(--acc); }
.done .tick { background: var(--acc); border-color: var(--acc); }
.idea-col h3 { margin: 0 0 10px; }
.idea { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); margin-bottom: 10px; }
.idea p { color: var(--ink-2); font-size: .87rem; margin: 6px 0; white-space: pre-line; }
.desc { white-space: pre-line; color: var(--ink-2); }
dl.meta { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; font-size: .9rem; }
dl.meta dt { color: var(--muted); }
dl.meta dd { margin: 0; }
hr { border: 0; border-top: 1px solid var(--line-2); }

/* barras do painel (SVG) */
.bars text { font: 600 11px var(--f-ui); fill: var(--muted); }
.legend { display: flex; gap: 16px; font-size: .78rem; color: var(--muted); font-weight: 600; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: var(--side); border-right: 1px solid var(--line-2); color: var(--side-ink); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art::after { content: ""; position: absolute; left: -120px; bottom: -160px; width: 520px; height: 520px; border-radius: 50%; border: 70px solid #22c55e10; }
.login-art h1 { color: var(--ink); font-size: 2.7rem; max-width: 13ch; position: relative; z-index: 1; }
.login-form { display: grid; place-items: center; padding: 32px; }
.login-form form { width: min(360px, 100%); }

/* ------------------------------------------------------------------ responsivo */
@media (max-width: 1080px) {
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main, section.hero { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 25% 0 0; z-index: 50; transform: translateX(-102%); transition: transform .2s ease; height: 100%; }
  body.menu-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.6); }
  .topbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--side); border-bottom: 1px solid var(--line-2); position: sticky; top: 0; z-index: 40; }
  .topbar button { background: none; border: 0; color: var(--ink); font-size: 1.4rem; cursor: pointer; }
  .page { padding: 20px 16px 48px; }
  .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  section.hero .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi .val { font-size: 1.25rem; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { padding: 28px; border-right: 0; border-bottom: 1px solid var(--line-2); }
  .login-art h1 { font-size: 1.9rem; }
  h1 { font-size: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) { *, dialog.dlg[open] { transition: none !important; animation: none !important; } }
@media print {
  :root { --bg: #fff; --panel: #fff; --panel-2: #f3f4f6; --ink: #111; --ink-2: #333; --muted: #555; --line: #ccc; --line-2: #ddd; --pos: #166534; --neg: #b91c1c; color-scheme: light; }
  .side, .topbar, .actions, .filters, .act, .no-print { display: none !important; }
  .shell { display: block; }
}
td a, .side-foot a, small a { text-decoration: none; }
td a:hover, small a:hover { color: var(--pos); }
td small a { color: var(--muted); }

/* ------------------------------------------------------------------ projetos de clientes */
.warn { color: var(--warn); }
.site-link { color: var(--info); text-decoration: none; font-weight: 600; margin-left: 4px; }
.site-link:hover { text-decoration: underline; }
.etapas { list-style: none; margin: 0 0 16px; padding: 14px 16px; display: flex; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; }
.etapas li { flex: 1; min-width: 118px; display: flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; color: var(--muted); position: relative; }
.etapas li:not(:last-child)::after { content: ""; flex: 1; height: 2px; background: var(--line); margin: 0 4px; min-width: 10px; }
.etapas .bol { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid #3a4552; font-size: .74rem; flex: none; }
.etapas .nm { white-space: nowrap; }
.etapas li.feita { color: var(--ink-2); }
.etapas li.feita .bol { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.etapas li.feita::after { background: var(--acc); }
.etapas li.atual { color: var(--ink); }
.etapas li.atual .bol { border-color: var(--acc); color: var(--pos); box-shadow: 0 0 0 4px #22c55e22; }

.status-line { display: flex; align-items: center; gap: 12px; }
.status-line small { display: block; }
.pulse { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; }
.pulse.sm { width: 8px; height: 8px; vertical-align: 1px; }
.pulse.on { background: var(--acc); box-shadow: 0 0 0 4px #22c55e26; }
.pulse.off { background: var(--neg); box-shadow: 0 0 0 4px #f8717126; animation: pisca 1.4s infinite; }
.pulse.warn { background: var(--warn); }
@keyframes pisca { 50% { opacity: .35; } }
.checks { display: flex; gap: 2px; margin-top: 14px; height: 22px; }
.checks i { flex: 1; border-radius: 2px; background: var(--acc); opacity: .85; }
.checks i.ko { background: var(--neg); opacity: 1; }

.vis-tot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.vis-tot .n { font: 800 1.4rem/1.1 var(--f-head); }
.vis-tot .muted { font-size: .76rem; font-weight: 600; }
.vis-bars { display: flex; align-items: flex-end; gap: 2px; height: 70px; border-bottom: 1px solid var(--line); }
.vis-bars i { flex: 1; background: var(--info); border-radius: 2px 2px 0 0; min-height: 2px; opacity: .9; }
h3.mini { font-size: .76rem; color: var(--muted); margin: 16px 0 6px; }
.mini-tbl td { padding: 5px 0; font-size: .86rem; border-bottom: 1px solid var(--line-2); }
.mini-tbl td:first-child { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.sec summary { cursor: pointer; font-weight: 700; font-size: .85rem; color: var(--ink-2); padding: 8px 0; }
details.sec summary:hover { color: var(--ink); }
.nota { padding: 10px 0; border-top: 1px solid var(--line-2); }
.nota-meta { font-size: .76rem; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.alerta-sites { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.alerta-sites a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: var(--neg-bg); border: 1px solid #4a2328; color: var(--ink-2); font-size: .84rem; text-decoration: none; }
.alerta-sites a b { color: var(--ink); }

/* ------------------------------------------------------------------ quadro de pendências */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; margin-top: 16px; overflow-x: auto; padding-bottom: 6px; }
.kcol { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r); padding: 10px; min-height: 300px; display: flex; flex-direction: column; transition: border-color .12s, background .12s; }
.kcol.alvo { border-color: var(--acc); background: #12201a; }
.kcol header { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: .86rem; padding: 4px 4px 10px; }
.kcount { margin-left: auto; font-size: .74rem; color: var(--muted); background: var(--panel); border-radius: 999px; padding: 2px 8px; }
.kdot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.k-andamento .kdot { background: var(--info); }
.k-aguardando .kdot { background: var(--warn); }
.k-concluida .kdot { background: var(--acc); }
.klist { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 40px; }
.kcard { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: grab; }
.kcard:hover { border-color: #33404d; }
.kcard.arrastando { opacity: .45; }
.kcard.prio-urgente { box-shadow: inset 3px 0 0 var(--neg); }
.kcard.prio-alta { box-shadow: inset 3px 0 0 var(--warn); }
.k-concluida .kcard { opacity: .7; }
.k-concluida .ktit { text-decoration: line-through; color: var(--muted); }
.ktop { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.kproj { font-size: .72rem; font-weight: 700; color: var(--muted); text-decoration: none; }
.kproj:hover { color: var(--pos); }
.kedit { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 0 2px; }
.kedit:hover { color: var(--ink); }
.ktit { font-weight: 700; margin-top: 4px; }
.kdesc { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.kfoot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: .78rem; gap: 6px; }
.avatar { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--raise); font-size: .72rem; font-weight: 800; color: var(--ink-2); }
.kmove { display: none; margin: 8px 0 0; font-size: .72rem; }
.kmove select { padding: 4px 6px; font-size: .78rem; margin-top: 3px; }
@media (hover: none), (max-width: 820px) { .kmove { display: block; } .kanban { grid-template-columns: repeat(4, minmax(250px, 82vw)); } }

/* ------------------------------------------------------------------ menu lateral recolhível */
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 2px 2px 16px 6px; }
.brand-row .brand { padding: 0; min-width: 0; }
.side-toggle { border: 0; background: none; color: var(--muted); width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; flex: none; }
.side-toggle:hover { background: #141a21; color: var(--ink); }
.side-toggle svg { width: 16px; height: 16px; transition: transform .2s; }
.grp-btn { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 9px; color: var(--side-ink); font: 600 .9rem var(--f-ui); }
.grp-btn:hover { background: #141a21; color: var(--ink); }
.grp-btn svg { width: 18px; height: 18px; flex: none; }
.grp-btn .chev { margin-left: auto; width: 14px; height: 14px; opacity: .55; transition: transform .15s; }
.grp.aberto .chev { transform: rotate(90deg); }
.grp.ativo > .grp-btn { color: var(--ink); }
.grp + .grp, .nav .solo + .grp { margin-top: 2px; }
.grp-itens { display: none; padding: 2px 0 8px 30px; position: relative; }
.grp-itens::before { content: ""; position: absolute; left: 19px; top: 4px; bottom: 10px; width: 1px; background: var(--line); }
.grp.aberto .grp-itens { display: block; }
.nav .grp-itens a { display: block; padding: 6px 10px; font-size: .86rem; border-radius: 8px; }
.side-foot { display: flex; gap: 10px; align-items: center; }
.eu { width: 32px; height: 32px; border-radius: 50%; background: var(--raise); display: grid; place-items: center; font-weight: 800; color: var(--ink) !important; text-decoration: none; flex: none; }

@media (min-width: 821px) {
  /* recolhido: só ícones */
  body.side-min .shell { grid-template-columns: 72px 1fr; }
  body.side-min:not(.side-peek) .side { padding: 14px 10px; z-index: 30; }
  body.side-min:not(.side-peek) .brand-name, body.side-min:not(.side-peek) .grp-btn span,
  body.side-min:not(.side-peek) .nav a.solo span, body.side-min:not(.side-peek) .grp-btn .chev,
  body.side-min:not(.side-peek) .eu-nome, body.side-min:not(.side-peek) .grp-itens { display: none; }
  body.side-min:not(.side-peek) .brand-row { flex-direction: column; gap: 10px; padding: 2px 0 14px; }
  body.side-min .side-toggle svg { transform: rotate(180deg); }
  body.side-min:not(.side-peek) .nav a.solo, body.side-min:not(.side-peek) .grp-btn { justify-content: center; padding: 11px; }
  body.side-min:not(.side-peek) .grp.ativo > .grp-btn { background: var(--acc-soft); color: var(--pos); }
  body.side-min:not(.side-peek) .side-foot { justify-content: center; padding: 12px 0 0; }
  /* ao clicar numa categoria com o menu recolhido: o menu se abre por cima e a categoria abre para baixo */
  body.side-min.side-peek .side { position: fixed; left: 0; top: 0; bottom: 0; width: 248px; height: 100vh; z-index: 60;
    box-shadow: 18px 0 50px rgba(0, 0, 0, .55); animation: deslizar .14s ease-out; }
  body.side-min.side-peek .main { pointer-events: none; }
  .side { grid-column: 1; grid-row: 1; }
  .main { grid-column: 2; grid-row: 1; }
}
@keyframes deslizar { from { transform: translateX(-24px); opacity: .6; } }
}

/* ------------------------------------------------------------------ integrações */
code.cod { font: 600 .74rem ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--raise); color: var(--ink-2); padding: 2px 6px; border-radius: 5px; }
pre.code { background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 14px; overflow-x: auto; font: 500 .8rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-2); margin: 0 0 10px; white-space: pre; }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -1px; }
.lg.ativa { background: var(--acc); }
.lg.teste { background: var(--info); }
.lg.suspensa { background: var(--neg); }
.lg.vazio { background: transparent; border: 1.5px dashed #3a4552; }
.legend .lg { margin-right: 6px; }
table.cat { table-layout: fixed; }
table.cat col.c-num { width: 120px; }
table.cat col.c-act { width: 86px; }
table.matriz th.mcol { height: 140px; vertical-align: bottom; padding: 6px 2px; width: 34px; }
table.matriz th.mcol span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-size: .72rem; }
table.matriz td.mcel { text-align: center; padding: 8px 2px; }
table.matriz td.mcel .lg { width: 16px; height: 16px; border-radius: 5px; }

/* ordem de execução (checklist e pendências) */
.checklist li .alca { cursor: grab; color: #4a5562; font-size: 1rem; user-select: none; }
.checklist li.arrastando { opacity: .4; }
.num { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 6px; background: var(--raise);
  font-size: .72rem; font-weight: 800; color: var(--ink-2); flex: none; }
.checklist li.done .num { opacity: .5; }
.setas { display: inline-flex; gap: 2px; }
.setas button { border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); width: 24px; height: 22px; border-radius: 6px;
  font-size: .62rem; cursor: pointer; padding: 0; line-height: 1; }
.setas button:hover:not([disabled]) { color: var(--ink); border-color: #3a4552; }
.setas button[disabled] { opacity: .3; cursor: default; }
td.ordem-cel { white-space: nowrap; }
td.ordem-cel .setas { display: none; margin-left: 4px; vertical-align: middle; }
tr:hover td.ordem-cel .setas { display: inline-flex; }
@media (hover: none) { td.ordem-cel .setas { display: inline-flex; } }
.modelo-lista { margin: 0; padding: 12px 18px 16px 40px; font-size: .88rem; color: var(--ink-2); }
.modelo-lista li { padding: 3px 0; }
.modelo-lista li.alta { color: var(--ink); font-weight: 700; }
.modelo-lista li.alta::marker { color: var(--warn); }

/* checklist dentro da pendência */
.sub-toggle { border: 0; background: none; padding: 3px 0 0; margin: 0; color: var(--muted); font: 700 .74rem var(--f-ui); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; }
.sub-toggle:hover { color: var(--ink); }
.sub-toggle.tem { color: var(--info); }
.sub-toggle[aria-expanded="true"] { color: var(--pos); }
.mini-bar { display: inline-block; width: 46px; height: 5px; border-radius: 99px; background: var(--line); overflow: hidden; vertical-align: middle; }
.mini-bar i { display: block; height: 100%; background: var(--acc); border-radius: 99px; }
tr.sub-row td { background: var(--panel-2); border-bottom: 1px solid var(--line); padding-top: 4px; }
tbody tr.sub-row:hover td { background: var(--panel-2); }
.sub-box { border-left: 2px solid var(--line); padding: 4px 0 6px 14px; }
.sub-lista li { padding: 6px 0; font-size: .9rem; }
.sub-add { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.sub-form { display: flex; gap: 6px; align-items: flex-start; flex: 1; min-width: 220px; }
.sub-form textarea { min-height: 34px; padding: 7px 10px; font-size: .86rem; }
.sub-form select { padding: 6px 10px; font-size: .84rem; }
.kitens { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: .74rem; font-weight: 700; color: var(--muted); text-decoration: none; }
.kitens:hover { color: var(--ink); }

/* logomarca (app/static/img/logo.png) no lugar do "J" */
.brand-mark {
  width: 30px; height: 42px; border-radius: 0; flex: none;
  background: url("/static/img/logo.png") center / contain no-repeat;
  color: transparent; font-size: 0;
  filter: drop-shadow(0 0 10px rgba(0, 150, 255, .25));
}

/* ------------------------------------------------------------------ integrações: vitrine */
.loja-hero {
  position: relative; overflow: hidden; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 26px 28px; border-radius: 18px; border: 1px solid #1d3d2a;
  background: radial-gradient(120% 140% at 0% 0%, #1a3a28 0%, #12201a 45%, var(--panel) 100%);
}
.loja-hero::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, #22c55e33, transparent 70%); pointer-events: none; }
.loja-hero-txt { max-width: 620px; position: relative; z-index: 1; }
.eyebrow { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--pos); margin-bottom: 8px; }
.loja-hero h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.loja-hero p { margin: 10px 0 0; color: var(--ink-2); }
.loja-hero p strong { color: var(--ink); }
.loja-stats { display: flex; gap: 10px; position: relative; z-index: 1; flex-wrap: wrap; }
.loja-stats > div { background: #0e1217b3; border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; min-width: 120px; }
.loja-stats span { display: block; font-size: .74rem; color: var(--muted); font-weight: 600; }
.loja-stats strong { font: 800 1.2rem/1.2 var(--f-head); }

.loja-filtro { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0 6px; }
.loja-filtro button { display: inline-flex; align-items: center; gap: 7px; font: 700 .82rem var(--f-ui); color: var(--ink-2); cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; }
.loja-filtro button i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.loja-filtro button b { font-weight: 700; color: var(--muted); font-size: .76rem; }
.loja-filtro button:hover { border-color: #344150; color: var(--ink); }
.loja-filtro button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.loja-filtro button.on b { color: #55606c; }

.loja-sec { margin-top: 26px; }
.loja-sec > header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.loja-sec > header h2 { font-size: 1.15rem; }
.cat-ico { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex: none;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 28%, transparent); }
.cat-ico svg { width: 21px; height: 21px; }
.cat-ico.sm { width: 36px; height: 36px; border-radius: 10px; }
.cat-ico.sm svg { width: 18px; height: 18px; }

.loja-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(255px, calc((100% - 28px) / 3)), 1fr)); gap: 14px; }
.produto {
  position: relative; display: flex; flex-direction: column; padding: 18px 18px 14px; border-radius: 16px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.produto::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; border-radius: 16px 16px 0 0; background: var(--c); opacity: .7; }
.produto:hover { border-color: color-mix(in srgb, var(--c) 45%, var(--line)); transform: translateY(-2px); box-shadow: 0 10px 28px #0006; }
.produto.sel { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc), 0 10px 28px #0006; }
.produto.fora { opacity: .55; }
.produto-top { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 14px; }
.selos { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; justify-content: flex-end; padding-top: 2px; }
.selo { font-size: .7rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--info-bg); color: var(--info); white-space: nowrap; }
.selo.hot { background: var(--warn-bg); color: var(--warn); }
.icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; flex: none; cursor: pointer;
  background: transparent; border: 1px solid transparent; color: var(--muted); }
.icon-btn:hover { background: var(--raise); border-color: var(--line); color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; }
.produto h3 { font-size: 1.06rem; font-weight: 800; }
.produto .desc { color: var(--muted); font-size: .86rem; margin: 6px 0 16px; flex: 1; }
.preco { display: flex; align-items: baseline; color: var(--ink); line-height: 1; }
.preco .cur { font-size: .9rem; font-weight: 700; color: var(--ink-2); margin-right: 3px; align-self: flex-start; padding-top: 6px; }
.preco .int { font: 800 2.15rem/1 var(--f-head); letter-spacing: -.035em; }
.preco .cents { font: 800 1.05rem/1 var(--f-head); }
.preco .per { font-size: .85rem; color: var(--muted); font-weight: 600; margin-left: 6px; }
.impl { font-size: .78rem; color: var(--muted); margin-top: 6px; }
.produto footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.produto .uso { font-size: .78rem; color: var(--muted); }
.produto .uso b { color: var(--ink); }
.produto .add { white-space: nowrap; }
.produto .add .ok { display: none; }
.produto.sel .add { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.produto.sel .add .ok { display: inline; }
.produto.sel .add .mais { display: none; }

.proposta { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 40; width: min(860px, calc(100vw - 32px)); }
.proposta-in { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 12px 14px 12px 20px; border-radius: 16px;
  background: #11171ef2; border: 1px solid #2c5a3d; box-shadow: 0 18px 50px #000a; backdrop-filter: blur(8px); }
.proposta-res { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; flex: 1; min-width: 0; }
.proposta .qtd { font-size: .8rem; font-weight: 800; color: var(--pos); text-transform: uppercase; letter-spacing: .05em; }
.proposta .tot { font: 800 1.35rem/1 var(--f-head); }
.proposta .tot small { font-size: .8rem; margin-left: 3px; }
.proposta .sub { font-size: .8rem; color: var(--muted); }
.desc-inp { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.desc-inp input { width: 58px; padding: 6px 8px; background: var(--field); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font: inherit; text-align: right; }
.proposta-acts { display: flex; gap: 8px; }
body.com-proposta .main { padding-bottom: 110px; }
@media (max-width: 820px) {
  .loja-hero { padding: 20px; }
  .loja-hero h2 { font-size: 1.2rem; }
  .loja-stats > div { min-width: 0; flex: 1; }
  .proposta { bottom: 10px; }
  .proposta-in { gap: 10px; padding: 12px; }
  .proposta-acts { width: 100%; }
  .proposta-acts .btn { flex: 1; justify-content: center; }
}
.chip.conectado { background: var(--pos-bg); border-color: #1d3d2a; color: #8fd3a8; }
.chip.conectado b { color: var(--pos); }
.chip.parado { background: var(--warn-bg); border-color: #4a3c14; color: var(--warn); }
.produto .rota { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; font-size: .72rem; color: var(--muted); }
.produto .rota code { font: 600 .7rem ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--field); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; color: var(--ink-2); }
dl.ficha { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 12px; margin: 0; font-size: .86rem; }
dl.ficha dt { color: var(--muted); font-weight: 600; }
dl.ficha dd { margin: 0; overflow-wrap: anywhere; }
dl.ficha dd small { display: block; color: var(--muted); }
dl.ficha dd small.pos { color: var(--pos); }
.mini-link { font-size: .76rem; font-weight: 700; color: var(--info); text-decoration: none; margin-left: 6px; }
#ficha pre.code { margin: 0 0 6px; white-space: pre-wrap; word-break: break-all; }

/* ------------------------------------------------------------------ integrações do projeto: categorias + chaves */
.lic-grupos { padding: 6px 12px 12px; }
.lic-cat { border: 1px solid var(--line); border-radius: 12px; margin-top: 10px; background: var(--panel-2); overflow: hidden; }
.lic-cat > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; }
.lic-cat > summary::-webkit-details-marker { display: none; }
.lic-cat > summary::before { content: "▸"; color: var(--muted); margin-right: 2px; transition: transform .15s; }
.lic-cat[open] > summary::before { transform: rotate(90deg); }
.lic-cat-nome { flex: 1; font-weight: 800; font-size: .92rem; }
.lic-cat-cont { font-size: .74rem; font-weight: 700; color: var(--muted); background: var(--raise); border-radius: 999px; padding: 3px 10px; }
.lic-cat-cont.tem { color: var(--pos); background: var(--pos-bg); }
.lic-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 70px; align-items: center; gap: 14px; padding: 11px 14px; border-top: 1px solid var(--line-2); background: var(--panel); }
.lic-row.on { background: linear-gradient(90deg, #13261b66, var(--panel) 60%); }
.lic-row.bloq { background: linear-gradient(90deg, #2b171a66, var(--panel) 60%); }
.lic-info strong { display: block; font-size: .9rem; }
.lic-info small { display: block; color: var(--muted); font-size: .76rem; margin-top: 1px; }
.lic-valor { font-weight: 800; white-space: nowrap; text-align: right; }
.lic-valor small { color: var(--muted); font-weight: 600; font-size: .72rem; margin-left: 2px; }
.lic-row:not(.on) .lic-valor { color: var(--ink-2); font-weight: 700; }
.lic-mais { text-align: right; }
.lic-mais .btn.link { color: var(--muted); }
form.lic-sw { margin: 0; display: flex; }
form.lic-sw.enviando { opacity: .5; pointer-events: none; }
.switch { position: relative; display: inline-block; width: 44px; height: 24px; cursor: pointer; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--raise); border: 1px solid var(--line); transition: background .15s, border-color .15s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.switch input:checked + span { background: var(--acc); border-color: var(--acc); }
.switch input:checked + span::after { transform: translateX(20px); background: #fff; }
.lic-row.bloq .switch span { border-color: #4a2328; }
.switch input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (max-width: 820px) {
  .lic-row { grid-template-columns: minmax(0, 1fr) auto; }
  .lic-valor { grid-column: 1; text-align: left; }
  .lic-mais { grid-column: 2; grid-row: 2; }
}
.desc-tag { display: inline-block; font-size: .7rem; font-weight: 800; color: var(--warn); background: var(--warn-bg); border-radius: 999px; padding: 1px 8px; margin-left: 4px; }
.lic-valor s, td s { color: var(--muted); font-weight: 600; font-size: .8em; }

/* ------------------------------------------------------------------ pedidos dos sites */
.aviso-pedidos { display: flex; align-items: center; gap: 14px; text-decoration: none; margin-bottom: 16px; padding: 14px 18px;
  border-radius: var(--r); background: linear-gradient(90deg, #1a3a28, var(--panel)); border: 1px solid #2c5a3d; }
.aviso-pedidos .ap-ico { font-size: 1.4rem; }
.aviso-pedidos > span:nth-child(2) { flex: 1; }
.aviso-pedidos small { display: block; color: var(--muted); margin-top: 2px; }
.aviso-pedidos .ap-btn { font-weight: 800; color: var(--pos); white-space: nowrap; }
.aviso-pedidos:hover { border-color: var(--acc); }
.pedido-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px;
  background: var(--acc-soft); border: 1px solid #2c5a3d; }
.pedido-box small { display: block; color: #8fd3a8; margin-top: 2px; }
.ped-tag { display: inline-block; font-size: .7rem; font-weight: 800; color: var(--pos); background: var(--pos-bg); border-radius: 999px; padding: 1px 8px; margin-left: 4px; }
.btn .cont { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--acc); color: var(--acc-ink); font-size: .72rem; font-weight: 800; margin-left: 4px; }
.btn.pedido-alerta { border-color: #2c5a3d; }
.ped-cliente { margin-top: 16px; }

/* ------------------------------------------------------------------ projeto: abas */
.abas-proj { position: sticky; top: 0; z-index: 20; display: flex; gap: 4px; overflow-x: auto; margin: 16px 0 0; padding: 6px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 14px; scrollbar-width: none; }
.abas-proj::-webkit-scrollbar { display: none; }
.abas-proj a { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; padding: 9px 14px; border-radius: 10px; text-decoration: none;
  font-weight: 700; font-size: .86rem; color: var(--muted); transition: background .15s, color .15s; }
.abas-proj a:hover { color: var(--ink); background: var(--panel-2); }
.abas-proj a.on { color: var(--ink); background: var(--raise); box-shadow: inset 0 -2px 0 var(--acc); }
.abas-proj a b { font-size: .72rem; font-weight: 800; padding: 1px 8px; border-radius: 999px; background: var(--panel-2); color: var(--ink-2); }
.abas-proj a b.ok { background: var(--pos-bg); color: var(--pos); }
.abas-proj a b.novo { background: var(--acc); color: var(--acc-ink); }
.abas-proj a b.alerta { background: var(--neg-bg); color: var(--neg); }
.g-main.abas-on { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; align-items: start; }
.g-main.abas-on > div { display: contents; }
.g-main.abas-on > div > .panel { margin-top: 0; grid-column: 1 / -1; }
.g-main.abas-on > div > .panel[data-aba="site"], .g-main.abas-on > div > .panel[data-aba="detalhes"] { grid-column: auto; }
.g-main.abas-on > div > .panel#ficha { grid-row: span 2; }
@media (max-width: 1080px) { .g-main.abas-on > div > .panel[data-aba] { grid-column: 1 / -1; } .g-main.abas-on > div > .panel#ficha { grid-row: auto; } }

/* ------------------------------------------------------------------ checklist */
.ck-resumo { display: block; color: var(--muted); margin-top: 2px; }
.ck-resumo b { color: var(--ink); }
.ck-barra { height: 4px; background: var(--line-2); margin: 0 18px; border-radius: 999px; overflow: hidden; }
.ck-barra i { display: block; height: 100%; background: var(--acc); border-radius: 999px; transition: width .3s; }
.ck-ocultar { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); font-weight: 600; cursor: pointer; }
ul.checklist.ck li { gap: 10px; padding: 8px 10px; border-radius: 10px; }
ul.checklist.ck li:hover { background: var(--panel-2); }
ul.checklist.ck li.done .ck-texto { color: var(--muted); text-decoration: line-through; }
ul.checklist.ck.ocultar-feitos li.done { display: none; }
.ck-texto { flex: 1; min-width: 0; padding: 4px 6px; border-radius: 6px; outline: none; cursor: text; overflow-wrap: anywhere; }
.ck-texto.editando { background: var(--field); box-shadow: 0 0 0 2px var(--acc); text-decoration: none !important; color: var(--ink) !important; }
.ck-acoes { display: flex; align-items: center; gap: 4px; opacity: 0; transition: opacity .15s; }
ul.checklist.ck li:hover .ck-acoes, ul.checklist.ck li:focus-within .ck-acoes { opacity: 1; }
.ck-acoes .setas { display: inline-flex !important; }
.ck-btn { width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; font-size: .9rem; line-height: 1; }
.ck-btn:hover { color: var(--ink); border-color: #344150; }
.ck-btn.del:hover { color: var(--neg); border-color: #4a2328; background: var(--neg-bg); }
.ck-acoes form { margin: 0; }
.ck-vazio { color: var(--muted); padding: 14px 4px; }
.ck-vazio a { color: var(--pos); font-weight: 700; }
.ck-novo { display: flex; gap: 8px; margin-top: 12px; align-items: flex-start; }
.ck-novo textarea { min-height: 42px; resize: none; overflow: hidden; }
@media (hover: none), (max-width: 820px) { .ck-acoes { opacity: 1; } }
.aviso-tipo { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; padding: 14px 18px;
  border-radius: var(--r); background: var(--info-bg); border: 1px solid #1d3a57; }
.aviso-tipo small { display: block; color: var(--ink-2); margin-top: 3px; }
@media (max-width: 820px) { .aviso-tipo { flex-direction: column; align-items: flex-start; } }

/* ---------- Mercado Pago */
.mp-status { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--r); border: 1px solid #1d3d2a; background: var(--pos-bg); }
.mp-status.pend { background: var(--warn-bg); border-color: #4a3c14; }
.mp-status small { display: block; color: var(--ink-2); margin-top: 3px; }
.mp-aviso { margin-top: 10px; padding: 10px 14px; border-radius: var(--r); background: var(--warn-bg); color: var(--warn); border: 1px solid #4a3c14; font-size: .88rem; }
.mp-passos { display: grid; gap: 18px; }
.mp-passo { display: grid; grid-template-columns: 30px 1fr; gap: 12px; }
.mp-passo > span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--line); color: var(--ink); }
.mp-passo.feito > span { background: var(--pos-bg); color: var(--pos); border: 1px solid #1d3d2a; }
.mp-passo.feito > span::before { content: "✓"; }
.mp-passo.feito > span { font-size: 0; }
.mp-passo.feito > span::before { font-size: .95rem; }
.mp-passo p { margin: 6px 0 0; color: var(--ink-2); font-size: .9rem; line-height: 1.5; }
.mp-passo code { background: var(--bg); padding: 1px 6px; border-radius: 4px; font-size: .82rem; }
.mp-migrar { margin-top: 8px; display: grid; gap: 10px; }
.mp-migrar .f { margin: 0; }
.mp-migrar .chk { display: flex; gap: 8px; align-items: center; font-size: .9rem; color: var(--ink-2); }

/* ---------- financeiro do projeto */
.fin-proj { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.fin-proj > div { background: var(--panel); padding: 14px 18px; display: grid; gap: 2px; }
.fin-proj > div > span { color: var(--muted); font-size: .8rem; }
.fin-proj b { font: 700 1.35rem var(--f-head); }
.fin-proj small { color: var(--ink-2); font-size: .8rem; }
.fin-proj .dest { background: var(--acc-soft); }
.fin-orc { padding: 12px 18px; border-bottom: 1px solid var(--line); }
.fin-orc .lin { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .86rem; color: var(--ink-2); margin-bottom: 8px; }
.fin-cats { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.fin-cats span { font-size: .8rem; padding: 4px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); }
.fin-cats b { color: var(--ink); margin-left: 4px; }
.tag-proj { display: inline-block; margin-top: 3px; font-size: .74rem; padding: 1px 8px; border-radius: 999px; background: var(--info-bg); color: var(--ink-2); text-decoration: none; }
@media (max-width: 720px) { .fin-proj { grid-template-columns: 1fr; } }

/* ---------- configurações */
.cfg { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: start; }
.cfg-nav { position: sticky; top: 16px; display: grid; gap: 2px; }
.cfg-nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: .9rem; }
.cfg-nav a:hover { background: var(--panel); color: var(--ink); }
.cfg-body { display: grid; gap: 16px; min-width: 0; }
.cfg-sec { margin: 0; scroll-margin-top: 16px; }
.cfg-sec .panel-head small { display: block; margin-top: 2px; font-weight: 400; }
.cfg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.cfg-grid .wide { grid-column: 1 / -1; }
.cfg-orig { font-weight: 500; font-size: .7rem; padding: 1px 7px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); margin-left: 6px; }
.cfg-form .chk { display: inline-flex; gap: 6px; align-items: center; font-size: .82rem; color: var(--ink-2); margin-top: 6px; font-weight: 400; }
.cfg-acoes { display: flex; justify-content: flex-end; margin-top: 4px; }
.cfg-info { margin: 16px 18px 0; padding: 12px 14px; border-radius: var(--r); background: var(--info-bg); border: 1px solid #1d3a57; font-size: .88rem; color: var(--ink-2); }
.cfg-extra { padding: 0 18px 16px; margin-top: -8px; }
@media (max-width: 860px) { .cfg { grid-template-columns: 1fr; } .cfg-nav { position: static; display: flex; flex-wrap: wrap; } .cfg-grid { grid-template-columns: 1fr; } }

/* ---------- propostas */
.prop-sit { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: var(--r); border: 1px solid #1d3a57; background: var(--info-bg); }
.prop-sit span { color: var(--ink-2); font-size: .9rem; }
.prop-sit .actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.prop-sit.aceita { background: var(--pos-bg); border-color: #1d3d2a; }
.prop-sit.vencida { background: var(--warn-bg); border-color: #4a3c14; }
.prop-sit.recusada, .prop-sit.cancelada { background: var(--panel); border-color: var(--line); }

/* ---------- central do cliente */
.cli-alerta { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; margin-top: 14px; padding: 12px 16px; border-radius: var(--r); background: var(--warn-bg); border: 1px solid #4a3c14; color: var(--warn); }
.cli-alerta span { color: var(--ink-2); font-size: .9rem; }
[data-aba] > .panel:first-child { margin-top: 16px; }
.site-card { margin-top: 16px; overflow: hidden; }
.site-card .panel-head small { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; color: var(--muted); font-weight: 400; }
.site-card h2 a { color: inherit; text-decoration: none; }
.site-card h2 a:hover { text-decoration: underline; }
.site-total { text-align: right; }
.site-total span { display: block; font-size: .78rem; color: var(--muted); }
.site-total b { font: 800 1.35rem var(--f-head); color: var(--acc); white-space: nowrap; }
.site-total small { font-size: .6em; color: var(--muted); font-weight: 500; }
.site-mensal { display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.site-mensal .rot small { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.site-mensal .val strong { font-size: 1.1rem; }
.site-mensal .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.site-lics td.act { white-space: nowrap; }
.site-cobrar { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; padding: 14px 18px; background: var(--warn-bg); border-top: 1px solid #4a3c14; }
.site-cobrar .txt { color: var(--ink); font-size: .92rem; flex: 1; min-width: 260px; }
.site-cobrar .txt > b { color: var(--warn); }
.site-cobrar .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.site-cobrar .chips label { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: .82rem; cursor: pointer; }
.site-cobrar .chips small { color: var(--muted); }
.site-cobrar .campos { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.site-cobrar .f { margin: 0; width: 140px; }
.site-pe { display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .site-mensal { grid-template-columns: 1fr; } .site-mensal .acts { justify-content: flex-start; } }

/* ---------- mascote */
.masc-hero { display: grid; grid-template-columns: 96px 1fr auto; gap: 20px; align-items: center; padding: 18px 22px; border-radius: var(--r); border: 1px solid #1d3a57; background: linear-gradient(120deg, var(--info-bg), var(--panel)); margin-bottom: 16px; }
.masc-hero ol { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); font-size: .9rem; line-height: 1.6; }
.masc-num { text-align: right; display: grid; gap: 2px; }
.masc-num span { font-size: .78rem; color: var(--muted); }
.masc-num b { font: 800 2rem var(--f-head); }
.masc-passos { margin: 0 0 10px; padding-left: 18px; color: var(--ink-2); font-size: .9rem; line-height: 1.6; }
.tut-passos { margin: 0 0 10px; padding: 0; list-style: none; counter-reset: passo; display: grid; gap: 10px; }
.tut-passos li { counter-increment: passo; display: grid; grid-template-columns: 34px 1fr 1.6fr auto; gap: 12px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.tut-passos li::before { content: counter(passo); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--acc-soft); color: var(--acc); font-weight: 800; margin-top: 22px; }
.tut-passos .f { margin: 0; }
.tut-acts { display: flex; gap: 2px; margin-top: 22px; }
@media (max-width: 820px) { .masc-hero { grid-template-columns: 1fr; } .masc-num { text-align: left; } .tut-passos li { grid-template-columns: 1fr; } .tut-passos li::before { margin: 0; } }
.impl-parc { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.impl-p { font-size: .74rem; padding: 2px 8px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; }
.impl-p.paga { background: var(--pos-bg); color: var(--pos); border-color: #1d3d2a; }
.impl-p.vencida { background: var(--neg-bg); color: var(--neg); border-color: #4a2328; }
.desc-rapido { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 12px; font-size: .84rem; color: var(--muted); }
.desc-rapido .chip { cursor: pointer; }
.desc-rapido .chip.cortesia { border-color: #1d3a57; color: var(--info); background: var(--info-bg); }

/* ---------- contratos */
.tabs a b { margin-left: 4px; font-size: .74rem; padding: 0 6px; border-radius: 999px; background: var(--line); }
.ct-status { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 18px; border-radius: var(--r); border: 1px solid #1d3d2a; background: var(--pos-bg); }
.ct-status small { display: block; color: var(--ink-2); margin-top: 3px; }
.ct-status.vencendo { background: var(--warn-bg); border-color: #4a3c14; }
.ct-status.vencido { background: var(--neg-bg); border-color: #4a2328; }
.ct-status.encerrado { background: var(--panel); border-color: var(--line); }
.ct-renovar { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.ct-renovar .f { margin: 0; }
.ct-anexos { list-style: none; margin: 0; padding: 0; }
.ct-anexos li { display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.ct-arq { display: flex; gap: 12px; align-items: center; flex: 1; min-width: 0; text-decoration: none; color: var(--ink); }
.ct-arq b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.ct-arq small { color: var(--muted); font-size: .78rem; }
.ct-arq .ext { flex: none; width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; font-size: .66rem; font-weight: 800; background: var(--neg-bg); color: var(--neg); }
.ct-up { display: flex; gap: 8px; align-items: center; padding: 14px 18px; flex-wrap: wrap; }
.ct-up input[type=file] { flex: 1; min-width: 200px; font-size: .86rem; color: var(--ink-2); }

/* ---------- ficha da integração */
.prod-link { color: inherit; text-decoration: none; }
.prod-link:hover { text-decoration: underline; }
.ficha-chip { display: inline-block; width: fit-content; align-self: flex-start; margin-top: 8px; font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; text-decoration: none; background: var(--neg-bg); color: var(--neg); border: 1px solid #4a2328; }
.ficha-chip.meio { background: var(--warn-bg); color: var(--warn); border-color: #4a3c14; }
.ficha-chip.ok { background: var(--pos-bg); color: var(--pos); border-color: #1d3d2a; }
.fc-topo { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; padding: 16px 20px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); margin-bottom: 16px; }
.fc-pct { display: flex; gap: 14px; align-items: center; }
.fc-pct small { display: block; color: var(--ink-2); margin-top: 3px; max-width: 520px; }
.fc-anel { --p: 0; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--acc) calc(var(--p) * 1%), var(--line) 0); }
.fc-anel span { width: 46px; height: 46px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; font-weight: 800; font-size: .86rem; }
.fc-info { display: flex; gap: 22px; }
.fc-info div { display: grid; gap: 2px; }
.fc-info span { font-size: .76rem; color: var(--muted); }
.fc-info b { font-size: .95rem; }
.fc-ro { padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px dashed var(--line); color: var(--ink-2); font-size: .9rem; }
.fc-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .84rem; line-height: 1.5; }
.fc-deps { display: flex; flex-wrap: wrap; gap: 6px; }
.fc-deps label { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); font-size: .8rem; color: var(--ink-2); cursor: pointer; font-weight: 500; }
.fc-deps label.on, .fc-deps label:has(input:checked) { border-color: #1d3d2a; background: var(--pos-bg); color: var(--pos); }
.fc-salvar { position: sticky; bottom: 12px; display: flex; justify-content: flex-end; margin: 12px 96px 0 0; z-index: 5; }
.fc-salvar .btn { box-shadow: 0 8px 24px rgba(0,0,0,.35); }
