/* Abas, funis (kanban), ficha do estabelecimento e dashboard. Usa as mesmas cores e fontes do radar (variáveis em index.html). */
:root {
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);
  --tabbar-h: 64px;
  --col-bg: #EDF5F3;
  --warn-bg: #FCEFD9;
  --warn-ink: #7A4B06;
  --bad-bg: #FCE8E6;
}
::selection { background: var(--mint); color: var(--ink); }
body { padding-bottom: calc(var(--tabbar-h) + 30px + env(safe-area-inset-bottom, 0px)); }
body.sheet-open { overflow: hidden; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- ilha dinâmica (abas) em liquid glass ----------
   vidro claro translúcido: desfoca e satura o que passa por trás, borda acesa por cima (luz batendo),
   sombra macia embaixo; a aba ativa é uma "gota" de vidro mais densa que desliza com mola */
.island {
  position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 20;
  translate: -50% 0;
  display: block; max-width: calc(100vw - 20px); padding: 6px;
  border-radius: 30px; overflow: hidden; isolation: isolate;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .62) 0%, rgba(255, 255, 255, .34) 100%);
  -webkit-backdrop-filter: blur(18px) saturate(190%);
  backdrop-filter: blur(18px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow:
    0 18px 40px rgba(2, 40, 36, .22),
    0 3px 10px rgba(2, 40, 36, .12),
    inset 0 1.5px 0 rgba(255, 255, 255, .95),
    inset 0 -1px 1px rgba(255, 255, 255, .35),
    inset 0 0 0 .5px rgba(7, 66, 62, .12);
}
/* brilho especular: um reflexo largo no topo e um ponto de luz na quina */
.island::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background:
    radial-gradient(120% 70% at 18% -10%, rgba(255, 255, 255, .85) 0%, rgba(255, 255, 255, 0) 55%),
    radial-gradient(80% 60% at 100% 120%, rgba(125, 227, 207, .28) 0%, rgba(125, 227, 207, 0) 60%);
}
.island::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .25) 50%, rgba(255, 255, 255, 0) 100%);
  mask: linear-gradient(180deg, #000 0, transparent 45%);
  -webkit-mask: linear-gradient(180deg, #000 0, transparent 45%);
}
.isl-row { position: relative; display: flex; gap: 2px; }
.isl-pill {
  position: absolute; top: 0; left: 0; height: 100%; width: 0; border-radius: 24px; pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 66, 62, .92) 0%, rgba(10, 85, 80, .86) 100%);
  box-shadow:
    0 6px 14px rgba(3, 43, 40, .28),
    inset 0 1px 0 rgba(255, 255, 255, .35),
    inset 0 -2px 4px rgba(0, 0, 0, .18),
    inset 0 0 0 .5px rgba(255, 255, 255, .25);
}
.isl-pill::before {
  content: ""; position: absolute; left: 10%; right: 10%; top: 2px; height: 45%; border-radius: 20px 20px 50% 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .38), rgba(255, 255, 255, 0));
}
.island a {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; flex: none;
  height: 48px; padding: 0 14px; border-radius: 24px;
  color: rgba(11, 47, 44, .74); text-decoration: none; font: 600 .88rem var(--body); white-space: nowrap;
  -webkit-tap-highlight-color: transparent; user-select: none; cursor: pointer;
  transition: color .2s ease, background-color .2s ease;
}
.island a .ico { width: 22px; height: 22px; stroke-width: 1.9; }
.island .isl-lab { display: none; }
.island a.on { color: #fff; padding-right: 18px; text-shadow: 0 1px 1px rgba(0, 0, 0, .2); }
.island a.on .isl-lab { display: inline; }
.island a.gone { display: none; }
@media (hover: hover) and (pointer: fine) { .island a:not(.on):hover { color: var(--brand); background: rgba(255, 255, 255, .45); } }
.island a:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.island a.on:focus-visible { outline-color: var(--mint); }
.tbadge {
  position: absolute; top: 5px; left: 28px;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--brand); color: #fff; font: 700 .64rem/17px var(--body); text-align: center; font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .9);
}
.island a.on .tbadge { background: var(--mint); color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.isl-live { display: flex; align-items: center; gap: 10px; min-height: 48px; max-width: min(520px, calc(100vw - 32px)); padding: 6px 16px 6px 10px; font: 600 .9rem/1.35 var(--body); color: var(--ink); cursor: pointer; }
.isl-live .ico { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: var(--brand); color: #fff; stroke-width: 2.4; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 3px 8px rgba(3, 43, 40, .25); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 420px) { .island a { padding: 0 11px; } .island a.on { padding-right: 14px; } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .island { background: rgba(255, 255, 255, .94); } }
@media (prefers-reduced-transparency: reduce) { .island { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; } }
@media (prefers-contrast: more) { .island { background: #fff; border-color: var(--ink); } }
.totop { bottom: calc(var(--tabbar-h) + 34px); }
.fxbtn { bottom: calc(var(--tabbar-h) + 30px); }
@media (max-width: 560px) { .totop { bottom: calc(var(--tabbar-h) + 54px); } .fxbtn { bottom: calc(var(--tabbar-h) + 28px); } }
body:not([data-view="radar"]) .totop, body:not([data-view="radar"]) .fxbtn { visibility: hidden; }
body.sheet-open .totop, body.sheet-open .fxbtn { visibility: hidden; }
body.sheet-open .island:not(.live) { visibility: hidden; }
body.sheet-open .island.live { z-index: 30; }

/* ---------- cabeçalho das abas ---------- */
.view[hidden] { display: none !important; }
.vhead { background: linear-gradient(115deg, var(--brand) 0%, var(--brand-2) 100%); color: var(--on-brand); padding: 22px 16px 20px; }
.vwrap { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; max-width: 1568px; margin-inline: auto; }
.vtitle { min-width: 0; }
.vhead h1 { margin: 0; font: 700 clamp(2.2rem, 6vw, 3rem)/.95 var(--display); letter-spacing: -.01em; text-wrap: balance; }
.vsub { margin: 8px 0 0; max-width: 62ch; color: rgba(255, 255, 255, .88); font-size: .92rem; }
.vacts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
@media (min-width: 700px) { .vacts { flex-wrap: nowrap; } }
.vacts input[type="search"] { width: min(260px, 100%); min-height: 44px; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .1); color: #fff; }
.vacts input[type="search"]::placeholder { color: rgba(255, 255, 255, .7); }
.go.sm { min-height: 44px; padding: 0 18px; font-size: 1.2rem; background: var(--mint); color: var(--brand); }
.go.sm:hover:not(:disabled) { box-shadow: 0 4px 10px rgba(0, 0, 0, .18); }
.vtip { max-width: 1600px; margin: 4px auto 0; padding: 0 16px 24px; color: var(--muted); font-size: .85rem; }
.vbody { max-width: 1280px; margin-inline: auto; padding: 22px 16px 40px; }
.mnav { gap: 6px; }
.mnav .btn { min-height: 40px; width: 40px; padding: 0; display: grid; place-items: center; color: #fff; border-color: rgba(255, 255, 255, .4); }
.mnav .btn:hover { background: rgba(255, 255, 255, .12); }
.mnav .btn:disabled { opacity: .35; cursor: default; }
.mlabel { min-width: 150px; text-align: center; font: 700 1.3rem var(--display); }

/* ---------- kanban ---------- */
.board {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(205px, 1fr); gap: 10px;
  max-width: 1600px; margin: 0 auto; padding: 18px 16px 14px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
  scrollbar-color: var(--line-strong) transparent; scrollbar-width: thin;
}
.board::-webkit-scrollbar { height: 8px; }
.board::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
@media (max-width: 760px) { .board { grid-auto-columns: 82%; scroll-padding-inline: 16px; } }
.kcol {
  display: flex; flex-direction: column; min-width: 0; min-height: 300px;
  background: var(--col-bg); border: 1px solid var(--line); border-radius: 10px;
  scroll-snap-align: start;
  transition: background-color .15s ease, border-color .15s ease;
}
.kcol.over { background: var(--hot-strong); border-color: var(--accent); }
.khead { display: flex; align-items: baseline; gap: 8px; padding: 12px 12px 8px; }
.khead h2 { margin: 0; font: 700 1.15rem var(--display); letter-spacing: .03em; text-transform: uppercase; }
.kcount { min-width: 22px; padding: 0 7px; border-radius: 11px; background: var(--surface); border: 1px solid var(--line); font: 600 .78rem/20px var(--body); text-align: center; font-variant-numeric: tabular-nums; color: var(--muted); }
.ksum { margin-left: auto; font: 600 .82rem var(--body); color: var(--good); font-variant-numeric: tabular-nums; }
.kcol[data-stage="fechado"] .khead h2, .kcol[data-stage="entregue"] .khead h2 { color: var(--good); }
.kcol[data-stage="perdido"] .khead h2 { color: var(--muted); }
.kcards { list-style: none; margin: 0; padding: 0 8px 10px; display: grid; gap: 8px; align-content: start; flex: 1; }
.kempty { padding: 14px 10px; border: 1.5px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: .82rem; text-align: center; }
.kcard {
  padding: 11px 12px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  box-shadow: 0 1px 2px rgba(3, 43, 40, .06);
  cursor: grab; outline-offset: 2px;
  transition: box-shadow .18s ease, transform .18s var(--ease-out), border-color .18s ease;
}
@media (hover: hover) and (pointer: fine) {
  .kcard:hover { border-color: var(--line-strong); box-shadow: 0 6px 16px rgba(3, 43, 40, .1); transform: translateY(-1px); }
}
.kcard:active { cursor: grabbing; }
.kcard.dragging { opacity: .45; transform: scale(.98); }
.kcol[data-stage="perdido"] .kcard { opacity: .7; }
.kname { margin: 0; font: 600 1.18rem/1.15 var(--display); overflow-wrap: anywhere; }
.kmeta { margin: 2px 0 0; color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.kchips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.kchip { padding: 1px 7px; border-radius: 4px; background: var(--chip); font: 500 .72rem/1.6 var(--body); font-variant-numeric: tabular-nums; }
.kchip.hot { background: var(--warn-bg); color: var(--warn-ink); font-weight: 600; }
.kchip.money { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.kfoot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line); }
.kago { color: var(--muted); font-size: .74rem; white-space: nowrap; }
.kmove { width: auto; max-width: 62%; min-height: 30px; padding: 0 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); color: var(--ink); font: 500 .76rem var(--body); cursor: pointer; }

/* situação de pagamento */
.pill { display: inline-block; padding: 1px 9px; border-radius: 99px; background: var(--chip); font: 600 .74rem/1.65 var(--body); white-space: nowrap; }
.pay-pago { background: #D6F2E6; color: #0B5E43; }
.pay-parcial { background: var(--warn-bg); color: var(--warn-ink); }
.pay-pendente { background: var(--bad-bg); color: #8A1C14; }

/* ---------- ficha (painel lateral) ---------- */
.sheet { position: fixed; inset: 0; z-index: 25; display: flex; justify-content: flex-end; background: rgba(2, 26, 24, 0); transition: background-color .24s ease; }
.sheet.open { background: rgba(2, 26, 24, .55); }
.shbox {
  display: flex; flex-direction: column; width: min(1120px, 100%); height: 100%;
  background: var(--bg); box-shadow: -18px 0 50px rgba(0, 0, 0, .25);
  transform: translateX(100%); transition: transform .4s var(--ease-drawer);
}
.sheet.open .shbox { transform: none; }
.shhead {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px 18px;
  padding: 16px 20px 0; background: var(--brand); color: #fff;
}
.shid { min-width: 0; padding-bottom: 12px; }
.shid h2 { margin: 0; font: 700 1.9rem/1.05 var(--display); overflow-wrap: anywhere; }
.shid p { margin: 3px 0 0; color: rgba(255, 255, 255, .82); font-size: .86rem; }
.shtabs { display: flex; gap: 2px; align-self: end; }
.shtabs button {
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 8px 8px 0 0;
  background: transparent; color: rgba(255, 255, 255, .78); font: 700 1.08rem var(--display); letter-spacing: .03em; text-transform: uppercase; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.shtabs button:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.shtabs button[aria-selected="true"] { background: var(--bg); color: var(--brand); }
.shtabs button:focus-visible { outline: 3px solid var(--mint); outline-offset: -3px; }
.shclose { align-self: start; color: #fff; border-color: rgba(255, 255, 255, .35); }
.shclose:hover { background: rgba(255, 255, 255, .12); }
.shbody { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); overflow: hidden; }
.shleft { overflow-y: auto; padding: 18px 20px 40px; border-right: 1px solid var(--line); background: var(--surface); }
.shout { overflow-y: auto; padding: 18px 22px 40px; }
.fhead { margin: 0 0 6px; font: 700 1.05rem var(--display); letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 860px) {
  .shhead { grid-template-columns: minmax(0, 1fr) auto; }
  .shtabs { grid-column: 1 / -1; grid-row: 2; }
  .shtabs button { flex: 1; padding: 0 8px; }
  .shbody { display: block; overflow-y: auto; }
  .shleft, .shout { overflow: visible; }
  .shleft { border-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
}

.ficha { display: grid; gap: 6px; }
.fgroup { margin: 0; padding: 12px 0 4px; border: 0; border-top: 1px solid var(--line); min-width: 0; }
.fgroup:first-child { border-top: 0; padding-top: 4px; }
.fgroup legend { padding: 0; margin-bottom: 8px; font: 600 .78rem var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.fgrid, .pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ff { display: grid; gap: 4px; min-width: 0; font-size: .8rem; color: var(--muted); }
.ff > span { font-weight: 500; }
.ff.wide { grid-column: 1 / -1; }
.ff.inline { display: inline-grid; grid-auto-flow: column; align-items: center; gap: 8px; }
body .ff input, body .ff select, body .ff textarea, body .ladd input, body .ladd select {
  width: 100%; min-height: 40px; padding: 8px 10px;
  border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); color: var(--ink);
  font: .92rem/1.4 var(--body);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ff textarea { resize: vertical; min-height: 64px; }
.ff input:focus, .ff select:focus, .ff textarea:focus, .ladd input:focus, .shout textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--hot-strong); outline: none; }
input.bad { border-color: var(--bad) !important; box-shadow: 0 0 0 3px rgba(168, 35, 27, .15) !important; }
.ff input::placeholder, .ff textarea::placeholder, .ladd input::placeholder { color: #6E8A86; }
body .ff.inline select { min-height: 36px; width: auto; padding: 0 8px; }
.saved { margin-left: 6px; font-style: normal; color: var(--good); font-weight: 600; opacity: 0; }
.saved.on { animation: savedFlash 1.6s ease-out; }
@keyframes savedFlash { 0%, 60% { opacity: 1; } 100% { opacity: 0; } }

/* saída (proposta / prompt / projeto) */
.oblock { padding: 4px 0 18px; }
.oblock + .oblock { border-top: 1px solid var(--line); padding-top: 16px; }
.orow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.shout h3, .dpanel h2 { margin: 0; font: 700 1.2rem var(--display); letter-spacing: .03em; text-transform: uppercase; }
.ohint { margin: 6px 0 0; color: var(--muted); font-size: .83rem; max-width: 70ch; }
.orow .ohint { margin: 0; }
.gline { margin: 10px 0 0; padding: 8px 12px; border-radius: 6px; background: var(--chip); font-size: .84rem; }
.sig { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; }
.sig li { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px 2px 8px; border-radius: 99px; background: var(--chip); font-size: .78rem; }
.sig li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.sig li.ok::before { background: var(--good); }
.sig li.no { color: var(--muted); background: transparent; border: 1px dashed var(--line-strong); }
.oopts { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 12px; }
.oopts .ff { flex: 1 1 170px; }
.shout textarea {
  width: 100%; margin-top: 10px; padding: 12px 14px;
  border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink);
  font: .95rem/1.55 var(--body); resize: vertical;
}
#prText { font-size: .86rem; line-height: 1.5; }
.shout textarea.pulse { animation: refresh .6s var(--ease-out); }
@keyframes refresh { 0% { border-color: var(--accent); box-shadow: 0 0 0 3px var(--hot-strong); } 100% { border-color: var(--line-strong); box-shadow: 0 0 0 0 transparent; } }
.obtns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.act { gap: 6px; transition: background-color .15s ease, transform .12s var(--ease-out), border-color .15s ease; }
.act .ico { width: 17px; height: 17px; }
.act.prim { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 600; }
.act.prim:hover { background: var(--brand); }
.act.done { background: var(--good); color: #fff; border-color: var(--good); }
.act.sm { min-height: 32px; padding: 0 10px; font-size: .8rem; }
.act[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.act.danger { color: var(--bad); border-color: rgba(168, 35, 27, .45); }
.act.danger:hover { background: var(--bad-bg); }
.act.danger.armed { background: var(--bad); color: #fff; border-color: var(--bad); }
.ofoot { padding-top: 18px; border-top: 1px solid var(--line); }
.oempty { padding: 24px 0; }
.icobtn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer;
  transition: background-color .15s ease, color .15s ease, transform .12s var(--ease-out);
}
.icobtn:hover { background: var(--chip); color: var(--ink); }
.icobtn:active, .act:active { transform: scale(.96); }
.lrows .icobtn { width: 34px; height: 34px; }
.lrows .icobtn:hover { color: var(--bad); background: var(--bad-bg); }
.filebtn { position: relative; overflow: hidden; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.filebtn:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }

/* projeto: resumo e lançamentos */
.psum { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; margin: 12px 0 14px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--line); }
.psum > div, .dnums > div { padding: 10px 12px; background: var(--surface); }
.psum dt, .dnums dt { color: var(--muted); font-size: .76rem; }
.psum dd, .dnums dd { margin: 2px 0 0; font: 700 1.35rem/1.1 var(--display); font-variant-numeric: tabular-nums; }
dd.neg { color: var(--bad); }
.lrows { list-style: none; margin: 10px 0 0; padding: 0; border-top: 1px solid var(--line); }
.lrows li { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.lrows .lempty { color: var(--muted); font-size: .84rem; }
.ldate { width: 64px; flex: none; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .8rem; }
.lnote { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.lval { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.lval.pos { color: var(--good); }
.lval.neg { color: var(--bad); }
.ladd { display: grid; grid-template-columns: 150px 120px minmax(0, 1fr) auto auto; gap: 8px; margin-top: 10px; align-items: center; }
body .ladd select { width: auto; }
@media (max-width: 620px) { .ladd { grid-template-columns: 1fr 1fr; } .ladd input:nth-child(3) { grid-column: 1 / -1; } }

/* ---------- dashboard ---------- */
.dstrip { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr); gap: 14px; margin-bottom: 16px; }
@media (max-width: 860px) { .dstrip { grid-template-columns: 1fr; } }
.dgoal { padding: 16px 18px; border-radius: 10px; background: var(--brand); color: #fff; }
.dlabel { margin: 0; color: rgba(255, 255, 255, .78); font-size: .82rem; }
.dbig { margin: 4px 0 10px; font: 700 clamp(2.4rem, 6vw, 3.2rem)/1 var(--display); font-variant-numeric: tabular-nums; }
.gbar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.gbar i { display: block; height: 100%; background: var(--mint); transform-origin: left; border-radius: 4px; transform: scaleX(0); }
@keyframes grow-x { from { transform: scaleX(0); } }
.dnote { margin: 8px 0 0; color: rgba(255, 255, 255, .85); font-size: .82rem; }
.dgoal .linkbtn { color: var(--mint); }
.dnums { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--line); align-content: stretch; }
@media (max-width: 560px) { .dnums { grid-template-columns: 1fr 1fr; } .dnums > div:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.dnums > div { display: flex; flex-direction: column; justify-content: center; padding: 14px 16px; }
.dgrid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; }
@media (max-width: 860px) { .dgrid { grid-template-columns: 1fr; } }
.dpanel { min-width: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.dpanel.wide { grid-column: 1 / -1; }
.dpanel > h2 { margin-bottom: 10px; }
.setgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; align-items: start; }
.setgrid .pgrid { margin-top: 10px; }

.dchart .orow { align-items: flex-start; }
.cwrap { position: relative; margin-top: 8px; }
.chart {
  position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 4px;
  height: 230px; padding-top: 22px; border-bottom: 1px solid var(--line-strong);
  background: linear-gradient(var(--line) 1px, transparent 1px) 0 22px / 100% calc((100% - 22px) / 4);
}
.ccol {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; height: 100%;
  padding: 0; border: 0; border-radius: 6px 6px 0 0; background: transparent; color: inherit; cursor: pointer;
  transition: background-color .15s ease;
}
@media (hover: hover) and (pointer: fine) { .ccol:hover { background: var(--hot); } }
.ccol.cur { background: var(--hot); }
.ccol:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.cbars { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 3px; min-height: 0; }
.bar { position: relative; display: block; width: min(20px, 34%); height: calc(var(--h) * 100%); min-height: 2px; }
.bar.off { visibility: hidden; }
.bar .fill { position: absolute; inset: 0; border-radius: 4px 4px 0 0; transform-origin: bottom; }
.cin .fill { background: var(--accent); }
.cout .fill { background: #D9877A; }
.ccol.cur .cin .fill { background: var(--brand); }
.cm { position: absolute; left: 0; right: 0; top: calc(100% + 6px); font-size: .76rem; color: var(--muted); text-align: center; }
.ccol.cur .cm { color: var(--ink); font-weight: 700; }
.chart { margin-bottom: 30px; }
.cgoal { position: absolute; left: 0; right: 0; bottom: calc(var(--g) * (100% - 22px)); border-top: 1.5px dashed var(--line-strong); pointer-events: none; }
.cgoal span { position: absolute; right: 0; top: -1.4em; padding: 0 4px; background: var(--surface); color: var(--muted); font-size: .7rem; font-variant-numeric: tabular-nums; }
.ctip {
  position: absolute; left: 0; top: 0; z-index: 2; display: grid; gap: 3px; min-width: 176px; padding: 9px 11px;
  border-radius: 8px; background: var(--ink); color: #fff; font-size: .8rem; font-variant-numeric: tabular-nums;
  box-shadow: 0 10px 26px rgba(2, 26, 24, .28); pointer-events: none; opacity: 0;
}
.ctip b { font: 700 .95rem var(--display); letter-spacing: .02em; }
.ctip span { display: flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, .8); }
.ctip strong { margin-left: auto; color: #fff; font-weight: 600; }
.ctip strong.neg { color: #FFB3A8; }
.ctip i { width: 8px; height: 8px; border-radius: 2px; }
.ctip .t-inc i { background: var(--mint); }
.ctip .t-out i { background: #E8A398; }
.ctip .t-pro { padding-top: 4px; margin-top: 2px; border-top: 1px solid rgba(255, 255, 255, .15); padding-left: 14px; }
.clegend { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.clegend button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--ink); font: 500 .8rem var(--body); cursor: pointer;
  transition: opacity .15s ease, background-color .15s ease, transform .12s var(--ease-out);
}
.clegend button:active { transform: scale(.96); }
.clegend button[aria-pressed="false"] { opacity: .5; text-decoration: line-through; }
.clegend i { width: 10px; height: 10px; border-radius: 3px; }
.lg-inc i { background: var(--accent); }
.lg-out i { background: #D9877A; }
.seg { position: relative; display: inline-flex; padding: 3px; border-radius: 99px; background: var(--chip); }
.seg-pill { position: absolute; top: 3px; bottom: 3px; left: 0; border-radius: 99px; background: var(--surface); box-shadow: 0 1px 3px rgba(3, 43, 40, .15); }
.seg button { position: relative; z-index: 1; min-height: 32px; padding: 0 14px; border: 0; border-radius: 99px; background: transparent; color: var(--muted); font: 600 .8rem var(--body); cursor: pointer; }
.seg button[aria-checked="true"] { color: var(--ink); }
.hrows { display: grid; gap: 4px; margin-top: 10px; }
.hrow {
  display: grid; grid-template-columns: minmax(84px, 34%) minmax(0, 1fr) auto; align-items: center; gap: 10px;
  width: 100%; min-height: 36px; padding: 2px 6px; border: 0; border-radius: 6px; background: none; color: var(--ink);
  font: .85rem var(--body); text-align: left;
}
button.hrow { cursor: pointer; transition: background-color .15s ease; }
@media (hover: hover) and (pointer: fine) { button.hrow:hover { background: var(--hot); } }
.hlab { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.htrack { height: 12px; border-radius: 6px; background: var(--chip); overflow: hidden; }
.hbar { position: relative; display: block; height: 100%; width: calc(var(--w) * 100%); }
.hbar .fill { position: absolute; inset: 0; border-radius: 6px; background: var(--accent); transform-origin: left; }
.st-fechado .hbar .fill { background: var(--good); }
.st-perdido .hbar .fill { background: var(--line-strong); }
.hval { min-width: 2.5ch; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.precv { display: grid; gap: 4px; }
.mini { display: block; width: 80%; height: 4px; border-radius: 2px; background: var(--chip); overflow: hidden; }
.mini .hbar .fill { border-radius: 2px; background: var(--good); }
.mrows { list-style: none; margin: 10px 0 0; padding: 0; }
.mrows li { display: flex; align-items: center; gap: 10px; min-height: 46px; border-bottom: 1px solid var(--line); }
.mrows .namebtn { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }

.ptable { margin-top: 10px; border-top: 1px solid var(--line); }
.prow {
  display: grid; grid-template-columns: minmax(0, 2.2fr) repeat(4, minmax(0, 1fr)) minmax(0, 1.2fr) minmax(0, 1fr); gap: 10px; align-items: center;
  width: 100%; min-height: 52px; padding: 8px 6px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink);
  font: .88rem var(--body); text-align: left; font-variant-numeric: tabular-nums; cursor: pointer;
  transition: background-color .15s ease;
}
button.prow:hover { background: var(--hot); }
.phead { min-height: 36px; cursor: default; color: var(--muted); font-size: .74rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.pname { display: grid; min-width: 0; }
.pname b { font: 600 1.08rem/1.2 var(--display); overflow-wrap: anywhere; }
.pname small { color: var(--muted); font-size: .74rem; }
@media (max-width: 760px) {
  .phead { display: none; }
  .prow { grid-template-columns: 1fr 1fr; gap: 4px 12px; padding: 12px 4px; }
  .prow .pname { grid-column: 1 / -1; }
  .prow [data-l]::before { content: attr(data-l) ": "; color: var(--muted); font-size: .76rem; }
}
.dempty { padding: 28px 8px 12px; text-align: center; }
.dempty h3 { margin: 0; font: 700 1.3rem var(--display); }
.dempty p { margin: 6px auto 14px; max-width: 46ch; color: var(--muted); font-size: .9rem; }
.dempty .act { margin-inline: auto; }


@media (prefers-reduced-motion: reduce) {
  :root:not(.mo-force) .shbox { transition: none !important; }
}
.knext {
  display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 0 8px 0 10px; margin-left: auto;
  border: 1px solid var(--line); border-radius: 99px; background: var(--bg); color: var(--accent); font: 600 .76rem var(--body); cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .12s var(--ease-out);
}
.knext .ico { width: 14px; height: 14px; transition: transform .2s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .knext:hover { background: var(--accent); border-color: var(--accent); color: #fff; } .knext:hover .ico { transform: translateX(2px); } }
.knext:active { transform: scale(.95); }
