@font-face { font-family: 'Bricolage Grotesque'; src: url(app/fonts/bricolage.woff2) format('woff2'); font-weight: 200 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Bricolage Grotesque'; src: url(app/fonts/bricolage-ext.woff2) format('woff2'); font-weight: 200 800; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --bg: #14100d; --panel: #1e1813; --panel2: #272019; --line: #3d3329; --grid: #2e261f;
  --ink: #f5ecda; --ink2: #cfc3ad; --muted: #a39682; --gold: #e0b050; --orange: #ff7a1a; --orange-ink: #1c0e03;
  --good: #5fc79a; --warn: #e0b050; --bad: #ff8a7a;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --neutral: #8a7d6b; --neutral2: #5a4f43;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
.brand { color: var(--gold); font-weight: 700; }
.btn { font: inherit; font-weight: 600; border-radius: 10px; padding: 9px 14px; cursor: pointer; border: 1.5px solid transparent; color: var(--ink); background: var(--panel2); }
.btn.primary { background: var(--orange); color: var(--orange-ink); }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn.sm { padding: 6px 10px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--panel); border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 11px; }
textarea { width: 100%; resize: vertical; line-height: 1.4; }
.err { color: var(--bad); min-height: 20px; }

#login { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.logincard { width: min(380px, 100%); background: var(--panel); padding: 28px; border-radius: 16px; display: grid; gap: 10px; }
.logincard h1 { font-size: 26px; margin-bottom: 8px; } .logincard input { width: 100%; }

.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 24px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.bar-l { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; } .title { color: var(--ink2); }
.bar-r { display: flex; gap: 12px; align-items: center; }
.pill { padding: 3px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; }
.st-draft { background: rgba(224,176,80,.16); color: var(--gold); } .st-live { background: rgba(95,199,154,.16); color: var(--good); } .st-closed { background: rgba(255,138,122,.16); color: var(--bad); }
.live { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.live.off i { background: var(--bad); }
.live.pulse i { animation: pulse 1.2s ease 1; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(95,199,154,.25); } }
@media (prefers-reduced-motion: reduce) { .live.pulse i { animation: none; } }

.tabs { display: flex; gap: 4px; padding: 10px 24px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { font: inherit; font-weight: 600; background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); padding: 10px 14px; cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--orange); }
.toolbar { display: flex; gap: 16px; align-items: end; padding: 14px 24px; flex-wrap: wrap; border-bottom: 1px solid var(--line); background: #17120f; }
.toolbar label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); } .toolbar select { min-width: 170px; }
.tb-n { margin-left: auto; color: var(--ink2); font-size: 14px; }
main { padding: 24px; max-width: 1280px; margin: 0 auto; }
.section { margin: 0 0 34px; }
.section > h2 { font-size: 22px; margin-bottom: 4px; }
.section > .sub { color: var(--muted); margin: 0 0 16px; max-width: 80ch; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 18px; }
.card { background: var(--panel); border-radius: 14px; padding: 18px 20px; min-width: 0; }
.card h3 { font-size: 16px; margin-bottom: 2px; } .card .cap { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.card .foot { color: var(--muted); font-size: 12.5px; margin-top: 12px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--panel); border-radius: 14px; padding: 14px 16px; }
.kpi .v { font-size: 32px; font-weight: 700; line-height: 1.1; } .kpi .l { color: var(--ink2); font-size: 14px; margin-top: 2px; } .kpi .s { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.kpi.hl .v { color: var(--orange); }
.good { color: var(--good); } .warn { color: var(--warn); } .bad { color: var(--bad); }

.bars { display: grid; gap: 7px; }
.brow { display: grid; grid-template-columns: minmax(110px, 38%) 1fr 74px; align-items: center; gap: 10px; font-size: 14px; }
.brow .lb { color: var(--ink2); overflow-wrap: anywhere; }
.brow .tr { height: 14px; background: var(--grid); border-radius: 0 4px 4px 0; position: relative; }
.brow .fi { position: absolute; left: 0; top: 0; bottom: 0; background: var(--neutral); border-radius: 0 4px 4px 0; min-width: 2px; }
.brow.hl .fi { background: var(--orange); } .brow.hl .lb { color: var(--ink); font-weight: 600; }
.brow .vl { text-align: right; font-variant-numeric: tabular-nums; }
.brow .vl small { color: var(--muted); }
.stack1 { display: flex; height: 26px; border-radius: 6px; overflow: hidden; gap: 2px; }
.stack1 > div { min-width: 2px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--ink2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 13px; position: sticky; top: 0; background: var(--panel); }
table.t td { padding: 8px 10px; border-bottom: 1px solid var(--grid); vertical-align: middle; }
table.t tr.hl td { background: rgba(255,122,26,.08); } table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: var(--panel2); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.cellbar { display: flex; align-items: center; gap: 8px; } .cellbar .b { height: 8px; border-radius: 0 3px 3px 0; background: var(--neutral); } .cellbar.hl .b { background: var(--orange); } .cellbar span { min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; }
.scroll { overflow-x: auto; max-height: 560px; overflow-y: auto; }
.cols { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding-top: 10px; }
.cols .c { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; }
.cols .c .bar1 { width: 100%; background: var(--neutral); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.cols .c .bar1.o { background: var(--orange); } .cols .c .bar1.b { background: var(--s1); }
.cols .c .bar1 i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--orange); border-radius: 4px 4px 0 0; display: block; }
.cols .lbl { font-size: 11px; color: var(--muted); margin-top: 6px; white-space: nowrap; }
.cols .twin { display: flex; gap: 3px; align-items: flex-end; width: 100%; height: 100%; justify-content: center; }
.cols .twin > div { flex: 1; border-radius: 4px 4px 0 0; min-height: 2px; }
.funnel { display: grid; gap: 8px; }
.frow { display: grid; grid-template-columns: 130px 1fr 110px; gap: 10px; align-items: center; }
.frow .tr { height: 26px; background: var(--grid); border-radius: 0 6px 6px 0; } .frow .fi { height: 100%; background: var(--neutral); border-radius: 0 6px 6px 0; min-width: 2px; } .frow:last-child .fi { background: var(--orange); }
.frow small { color: var(--muted); }
svg text { fill: var(--muted); font-family: inherit; font-size: 11px; }
svg .ax { stroke: var(--line); } svg .gr { stroke: var(--grid); }
.empty { color: var(--muted); padding: 20px 0; }
.note { background: rgba(224,176,80,.1); border: 1px solid rgba(224,176,80,.35); color: var(--gold); padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.check { display: grid; gap: 8px; }
.check .it { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 10px 12px; background: var(--panel2); border-radius: 10px; }
.check .it .ic { font-weight: 700; } .check .it.ok .ic { color: var(--good); } .check .it.no .ic { color: var(--warn); } .check .it small { color: var(--muted); display: block; }
.form { display: grid; gap: 14px; } .form label { display: grid; gap: 5px; color: var(--ink2); font-size: 14px; } .form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; } .seg button { font: inherit; background: none; border: 0; color: var(--ink2); padding: 9px 16px; cursor: pointer; } .seg button[aria-pressed="true"] { background: var(--orange); color: var(--orange-ink); font-weight: 700; }
.inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.verb { display: grid; gap: 8px; } .verb .v { background: var(--panel2); padding: 10px 12px; border-radius: 10px; } .verb .v small { color: var(--muted); display: block; margin-bottom: 2px; }
#tip { position: fixed; pointer-events: none; z-index: 50; background: var(--ink); color: #20170f; padding: 6px 10px; border-radius: 8px; font-size: 13px; max-width: 280px; opacity: 0; transform: translateY(4px); transition: opacity .1s; }
#tip.on { opacity: 1; transform: none; }
#drawer { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.55); display: flex; justify-content: flex-end; }
#drawer[hidden] { display: none; }
.dr-in { width: min(560px, 100%); background: var(--panel); height: 100%; overflow-y: auto; padding: 22px; position: relative; }
.dr-x { position: absolute; right: 16px; top: 16px; }
.qa { padding: 10px 0; border-bottom: 1px solid var(--grid); } .qa .q { color: var(--muted); font-size: 13px; } .qa .a { margin-top: 2px; } .qa .ms { color: var(--muted); font-size: 12px; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #20170f; padding: 10px 16px; border-radius: 10px; opacity: 0; pointer-events: none; transition: .25s; z-index: 60; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 720px) { main, .bar, .toolbar, .tabs { padding-left: 14px; padding-right: 14px; } .brow { grid-template-columns: 1fr 70px; } .brow .tr { grid-column: 1 / -1; order: 3; } .frow { grid-template-columns: 90px 1fr 90px; } .grid2 { grid-template-columns: 1fr; } }
#login[hidden], #shell[hidden] { display: none; }
.toolbar label[hidden] { display: none; }
.t th.num{text-align:right}

/* ---- central: lista de pesquisas, equipe, upload ---- */
.crumbs { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 14px; }
.crumbs a { color: var(--gold); text-decoration: none; } .crumbs a:hover { text-decoration: underline; }
.topnav { display: flex; gap: 4px; }
.topnav a { color: var(--muted); text-decoration: none; font-weight: 600; padding: 6px 10px; border-radius: 8px; }
.topnav a.on, .topnav a:hover { color: var(--ink); background: var(--panel2); }
.slist { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.scard { display: block; background: var(--panel); border-radius: 16px; padding: 20px 22px; color: inherit; text-decoration: none; border: 1.5px solid transparent; transition: border-color .15s; }
.scard:hover { border-color: var(--line); }
.scard h3 { font-size: 18px; margin-bottom: 2px; } .scard .cl { color: var(--muted); font-size: 13px; }
.scard .nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.scard .nums b { display: block; font-size: 24px; font-weight: 700; line-height: 1.1; } .scard .nums span { color: var(--muted); font-size: 12px; }
.scard .meter { height: 6px; background: var(--grid); border-radius: 3px; margin-top: 14px; overflow: hidden; } .scard .meter i { display: block; height: 100%; background: var(--orange); }
.scard .ft { display: flex; justify-content: space-between; margin-top: 10px; color: var(--muted); font-size: 12.5px; }
.scard.arq { opacity: .6; }
.drop { display: block; border: 2px dashed var(--line); border-radius: 14px; padding: 28px; text-align: center; color: var(--muted); cursor: pointer; }
.drop.on { border-color: var(--orange); color: var(--ink); }
.drop input { display: none; }
code { background: var(--panel2); padding: 1px 6px; border-radius: 5px; font-size: 13px; }
pre { background: var(--panel2); padding: 12px 14px; border-radius: 10px; overflow-x: auto; font-size: 13px; line-height: 1.45; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 99px; background: var(--panel2); color: var(--ink2); font-size: 12px; }
.tag.admin { background: rgba(224,176,80,.16); color: var(--gold); }
.qcard { background: var(--panel); border-radius: 14px; padding: 18px 20px; min-width: 0; }
.qcard h3 { font-size: 15px; margin-bottom: 2px; } .qcard .cap { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.blk { margin: 0 0 28px; } .blk > h2 { font-size: 20px; margin-bottom: 12px; color: var(--ink); }
.sdrow { margin-bottom: 14px; } .sdrow .lr { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink2); } .sdrow .tr { position: relative; height: 14px; background: var(--grid); border-radius: 7px; margin-top: 4px; } .sdrow .dot { position: absolute; top: -2px; width: 18px; height: 18px; border-radius: 50%; background: var(--orange); }
.toolbar .btn { align-self: end; }
.toolbar[hidden], #subhead[hidden], .live[hidden], .pill[hidden] { display: none; }
.guia { max-width: 860px; }
.guia .gdl { margin-bottom: 26px; }
.guia .mdh1 { font-size: 28px; margin: 0 0 14px; } .guia .mdh2 { font-size: 20px; margin: 34px 0 10px; color: var(--gold); } .guia .mdh3 { font-size: 16px; margin: 22px 0 8px; }
.guia p { margin: 0 0 12px; color: var(--ink2); max-width: 80ch; line-height: 1.55; }
.guia .mdl { margin: 0 0 14px; padding-left: 22px; color: var(--ink2); line-height: 1.5; } .guia .mdl li { margin-bottom: 6px; } .guia .mdl .mdl { margin: 6px 0 0; }
.guia strong { color: var(--ink); }
.guia .mdcode { position: relative; margin: 0 0 16px; } .guia .mdcode .cp { position: absolute; right: 10px; top: 10px; } .guia pre { white-space: pre-wrap; padding-right: 90px; }
.guia table.t { margin-bottom: 16px; } .guia table.t td { vertical-align: top; }
