:root {
  --black: #000;
  --ink: #0b0b0b;
  --panel: #111;
  --panel-2: #161616;
  --white: #f4f4f4;
  --muted: #8f8f8f;
  --muted-2: #5f5f5f;
  --stroke: rgba(255,255,255,.1);
  --stroke-2: rgba(255,255,255,.18);
  --ok: #cfe8d6;
  --warn: #f1dcb5;
  --bad: #f2c0c0;
  --r: 20px;
  --r-sm: 12px;
  --font: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body { font-family: var(--font); background: var(--black); color: var(--white); -webkit-font-smoothing: antialiased; font-size: 15px; line-height: 1.45; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
.logo-svg { height: 17px; width: auto; display: block; color: var(--white); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.label { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
h1 { font-weight: 300; font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -.025em; line-height: 1.08; }
h2 { font-weight: 400; font-size: 19px; letter-spacing: -.01em; }
h3 { font-weight: 400; font-size: 16px; }
.pre { white-space: pre-wrap; }

/* ---------- botões e campos ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px; font-size: 14px; border: 1px solid var(--stroke-2); transition: background .2s, border-color .2s, opacity .2s; white-space: nowrap; }
.btn:hover { background: rgba(255,255,255,.07); }
.btn.primary { background: var(--white); color: #000; border-color: var(--white); }
.btn.primary:hover { background: #fff; }
.btn.ghost { border-color: transparent; }
.btn.danger { color: var(--bad); border-color: rgba(242,192,192,.3); }
.btn.sm { height: 32px; padding: 0 13px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: default; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; background: rgba(255,255,255,.04); border: 1px solid var(--stroke); border-radius: var(--r-sm); padding: 11px 13px; outline: none; transition: border-color .2s, background .2s; }
.input:focus { border-color: var(--stroke-2); background: rgba(255,255,255,.06); }
textarea.input { min-height: 96px; resize: vertical; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
select.input option { background: #111; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.erro { color: var(--bad); font-size: 13px; min-height: 18px; }

/* ---------- login ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(90% 70% at 50% 0%, #1b1b1b 0%, #050505 60%, #000 100%); }
.auth-card { width: min(400px, 100%); display: flex; flex-direction: column; gap: 22px; }
.auth-card .logo-svg { height: 22px; margin-bottom: 18px; }
.auth-card h1 { font-size: 30px; }
.auth-foot { font-size: 12px; color: var(--muted-2); display: flex; align-items: center; gap: 8px; }
.auth-foot svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.6; }

/* ---------- estrutura ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--stroke); padding: 26px 16px 18px; display: flex; flex-direction: column; gap: 26px; background: var(--ink); }
.side .marca { padding: 0 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.topo-mob .logo-svg, .auth-card .logo-svg { align-self: flex-start; }
.side .cliente-nome { font-size: 13px; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-size: 14px; transition: color .2s, background .2s; }
.nav a:hover { color: var(--white); }
.nav a.on { color: var(--white); background: rgba(255,255,255,.07); }
.nav a svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nav .badge { margin-left: auto; font-size: 11px; background: var(--white); color: #000; border-radius: 999px; padding: 1px 7px; }
.nav-sep { height: 1px; background: var(--stroke); margin: 10px 12px; }
.side .eu { margin-top: auto; padding: 12px; border-top: 1px solid var(--stroke); display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.side .eu button { color: var(--muted); font-size: 12px; }
.side .eu button:hover { color: var(--white); }
.main { padding: 38px clamp(18px, 4vw, 56px) 80px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 30px; flex-wrap: wrap; }
.page-head .label { margin-bottom: 10px; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 12px; display: inline-flex; gap: 6px; }
.crumb:hover { color: var(--white); }
.tabs { display: flex; gap: 4px; margin: -8px 0 26px; border-bottom: 1px solid var(--stroke); overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 11px 14px; font-size: 14px; color: var(--muted); border-bottom: 1px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.on { color: var(--white); border-color: var(--white); }

/* ---------- cartões e listas ---------- */
.card { background: var(--panel); border: 1px solid var(--stroke); border-radius: var(--r); padding: 22px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.dash > .card { grid-column: span 6; display: flex; flex-direction: column; gap: 14px; }
.dash > .card.wide { grid-column: span 12; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.stat { background: var(--panel); border: 1px solid var(--stroke); border-radius: var(--r); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.stat b { font-weight: 300; font-size: clamp(20px, 2.4vw, 30px); white-space: nowrap; letter-spacing: -.02em; }
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--stroke); }
.item:first-child { border-top: 0; }
.item .grow { flex: 1; min-width: 0; }
.item .t { overflow: hidden; text-overflow: ellipsis; }
a.item:hover .t { text-decoration: underline; text-underline-offset: 3px; }
.vazio { color: var(--muted); font-size: 14px; padding: 8px 0; }
.vazio-grande { border: 1px dashed var(--stroke-2); border-radius: var(--r); padding: 44px 20px; text-align: center; color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--stroke-2); color: var(--muted); white-space: nowrap; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag.ok { color: var(--ok); border-color: rgba(207,232,214,.3); }
.tag.warn { color: var(--warn); border-color: rgba(241,220,181,.3); }
.tag.bad { color: var(--bad); border-color: rgba(242,192,192,.3); }
.tag.plain::before { display: none; }
.valor { font-variant-numeric: tabular-nums; }
.bar { height: 4px; background: rgba(255,255,255,.08); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--white); border-radius: 4px; }

/* projetos */
.proj { display: flex; flex-direction: column; gap: 16px; }
.etapas { display: flex; flex-direction: column; }
.etapa { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--stroke); font-size: 14px; }
.etapa .ck { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--stroke-2); flex: none; display: grid; place-items: center; }
.etapa.feita .ck { background: var(--white); border-color: var(--white); }
.etapa.feita .ck::after { content: ""; width: 8px; height: 4px; border: solid #000; border-width: 0 0 1.5px 1.5px; transform: rotate(-45deg) translate(1px, -1px); }
.etapa.feita .t { color: var(--muted); text-decoration: line-through; }
button.ck:hover { border-color: var(--white); }

/* aprovações */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.thumb { background: var(--panel); border: 1px solid var(--stroke); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s; }
.thumb:hover { border-color: var(--stroke-2); }
.thumb .img { aspect-ratio: 4/3; background: #0d0d0d; display: grid; place-items: center; overflow: hidden; color: var(--muted-2); }
.thumb .img img { width: 100%; height: 100%; object-fit: cover; }
.thumb .img svg { width: 34px; height: 34px; stroke: currentColor; fill: none; stroke-width: 1.2; }
.thumb .info { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.aprov { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.preview { background: #0a0a0a; border: 1px solid var(--stroke); border-radius: var(--r); overflow: hidden; min-height: 300px; display: grid; place-items: center; }
.preview img, .preview video { max-width: 100%; max-height: 78vh; display: block; }
.preview iframe { width: 100%; height: 78vh; border: 0; background: #fff; }
.preview .sem { padding: 60px 20px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 14px; align-items: center; }
.painel-aprov { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 20px; }
.versoes { display: flex; gap: 6px; flex-wrap: wrap; }
.versoes button { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--stroke); color: var(--muted); }
.versoes button.on { color: #000; background: var(--white); border-color: var(--white); }
.timeline { display: flex; flex-direction: column; gap: 14px; max-height: 360px; overflow-y: auto; }
.ev { display: flex; flex-direction: column; gap: 4px; font-size: 13px; padding-left: 14px; border-left: 1px solid var(--stroke-2); }
.ev .quem { color: var(--muted); font-size: 12px; }
.ev.aprovado { border-color: var(--ok); }
.ev.ajustes { border-color: var(--warn); }
.selo { font-size: 12px; color: var(--muted); border: 1px solid var(--stroke); border-radius: var(--r-sm); padding: 10px 12px; word-break: break-all; }

/* arquivos */
.pasta { margin-bottom: 26px; }
.pasta h3 { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.pasta h3 svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.5; color: var(--muted); }
.icone-arq { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.06); display: grid; place-items: center; font-size: 10px; letter-spacing: .04em; color: var(--muted); flex: none; text-transform: uppercase; }

/* fatura */
.pix { display: flex; gap: 8px; align-items: center; }
.pix code { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); background: rgba(255,255,255,.04); border: 1px solid var(--stroke); border-radius: 10px; padding: 8px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* reuniões */
.reuniao { display: flex; flex-direction: column; gap: 14px; }
.reuniao .bloco { display: flex; flex-direction: column; gap: 6px; }

/* modal e aviso */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.72); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 18px; z-index: 40; overflow-y: auto; }
.modal { width: min(560px, 100%); background: var(--panel-2); border: 1px solid var(--stroke-2); border-radius: var(--r); padding: 26px; display: flex; flex-direction: column; gap: 18px; max-height: calc(100vh - 36px); overflow-y: auto; }
.modal .acoes { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.segredo { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 18px; letter-spacing: .04em; background: rgba(255,255,255,.06); border: 1px solid var(--stroke-2); border-radius: var(--r-sm); padding: 14px; text-align: center; user-select: all; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--white); color: #000; font-size: 14px; padding: 11px 18px; border-radius: 999px; opacity: 0; transition: .35s; pointer-events: none; z-index: 60; max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.mal { background: var(--bad); }
.carregando { color: var(--muted); padding: 40px 0; }
.file-drop { border: 1px dashed var(--stroke-2); border-radius: var(--r-sm); padding: 16px; font-size: 13px; color: var(--muted); }
.file-drop input { width: 100%; }
table.tab { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tab th { text-align: left; font-weight: 400; color: var(--muted); padding: 8px 10px 10px 0; font-size: 12px; }
table.tab td { padding: 10px 10px 10px 0; border-top: 1px solid var(--stroke); vertical-align: top; }
.tabela-wrap { overflow-x: auto; }

/* ---------- celular ---------- */
.topo-mob { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 268px; z-index: 30; transform: translateX(-100%); transition: transform .3s; }
  .shell.menu .side { transform: none; box-shadow: 0 0 0 100vw rgba(0,0,0,.6); }
  .topo-mob { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--stroke); position: sticky; top: 0; background: rgba(0,0,0,.9); backdrop-filter: blur(10px); z-index: 20; }
  .topo-mob button svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; }
  .main { padding-top: 26px; }
  .dash > .card { grid-column: span 12; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aprov { grid-template-columns: 1fr; }
  .painel-aprov { position: static; }
  .grid2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
