/* ================================================================
   PORTAL V10 · APP SHELL
   Same Vértebra palette and typography, optimized for dense data.
   ================================================================ */

:root {
  --pt: #07162f;
  --pt-2: #0b2a59;
  --pt-soft: #eaf1fb;
  --vd: #2f6bff;
  --vd-2: #7da7ff;
  --vd-soft: #eaf1ff;
  --az: #2f6bff;
  --az-soft: #eaf1ff;
  --bg: #edf2f8;
  --card: #ffffff;
  --line: #d9e2ef;
  --line-2: #edf2f7;
  --tx: #16233a;
  --tx-2: #5b6a80;
  --tx-3: #8794a7;
  --r: 12px;
  --r-lg: 20px;
  --max: 1480px;
  --sh: 0 1px 2px rgb(7 22 47 / .04), 0 12px 38px rgb(7 22 47 / .07);
  --sh-md: 0 28px 90px rgb(7 22 47 / .16);
}

::selection { background: var(--vd); color: #fff; }
body {
  min-width: 320px;
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  background:
    radial-gradient(circle at 100% 0%, rgb(47 107 255 / .07), transparent 35rem),
    var(--bg);
  letter-spacing: -.005em;
}
h1, h2, h3, h4, h5 { font-family: "Manrope", "Inter", sans-serif; letter-spacing: -.035em; }
.wrap { max-width: var(--max); padding-inline: clamp(18px, 2.2vw, 34px); }

/* ---------- premium app header ---------- */
.top {
  position: relative;
  z-index: 90;
  background: rgb(7 22 47 / .96);
  border-bottom: 1px solid rgb(255 255 255 / .08);
  box-shadow: 0 14px 44px rgb(0 7 24 / .18);
  backdrop-filter: blur(18px) saturate(140%);
}
.top::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 78% -80%, rgb(47 107 255 / .48), transparent 36%);
}
.top::after { display: none; }
.top-in { min-height: 5rem; padding-block: .85rem; }
.brand { gap: .9rem; }
.brand .mk { display: inline-flex; align-items: center; gap: .62rem; font-size: 1.18rem; letter-spacing: -.055em; }
.brand .mk .brand-name { color: #fff; }
.brand .brand-name strong { color: var(--vd-2); font-weight: inherit; }
.brand-spine { width: 1.35rem; display: grid; gap: 2px; transform: rotate(-8deg); }
.brand-spine i { display: block; height: 3px; border-radius: 99px; background: #9fc5ff; }
.brand-spine i:nth-child(1) { width: 48%; margin-left: 10%; }
.brand-spine i:nth-child(2) { width: 70%; margin-left: 18%; }
.brand-spine i:nth-child(3) { width: 92%; margin-left: 8%; }
.brand-spine i:nth-child(4) { width: 70%; }
.brand-spine i:nth-child(5) { width: 48%; margin-left: 16%; }
.brand .div { background: rgb(255 255 255 / .14); }
.brand .pn { color: rgb(238 244 255 / .62); }
.demo-pill {
  color: #bcd1ff;
  border-color: rgb(125 167 255 / .36);
  background: rgb(47 107 255 / .12);
}
.top-user .av { color: #fff; background: linear-gradient(145deg, var(--vd), #6f9cff); box-shadow: 0 8px 24px rgb(47 107 255 / .28); }
.sair { border-color: rgb(255 255 255 / .16); background: rgb(255 255 255 / .04); }

.crumb { z-index: 5; border: 0; background: #091d3d; }
.crumb-in { min-height: 3.25rem; padding-block: .55rem; }
.crumb-back { color: #bcd1ff; border-color: rgb(125 167 255 / .26); background: rgb(47 107 255 / .1); }
.crumb-back:hover { border-color: rgb(125 167 255 / .55); background: rgb(47 107 255 / .2); }

.ev {
  overflow: hidden;
  padding: 2.2rem 0 2.5rem;
  background:
    linear-gradient(120deg, #0b2a59 0%, #103a7a 58%, #1747c8 145%);
}
.ev::before {
  content: "";
  position: absolute;
  width: 34rem;
  height: 34rem;
  top: -25rem;
  right: 4%;
  border: 1px solid rgb(159 197 255 / .2);
  border-radius: 50%;
  box-shadow: 0 0 0 5rem rgb(159 197 255 / .035), 0 0 0 10rem rgb(159 197 255 / .025);
}
.ev-in { position: relative; z-index: 2; }
.ev h1 { max-width: 48rem; font-size: clamp(1.55rem, 2.8vw, 2.4rem); font-weight: 650; line-height: 1.08; }
.ev .meta { margin-top: .85rem; color: rgb(235 242 255 / .7); }
.ev .meta svg { stroke: #9fc5ff; }
.selo { color: #c8ffed; border-color: rgb(104 239 203 / .34); background: rgb(21 138 103 / .22); }

/* ---------- desktop app shell ---------- */
.portal-shell {
  width: min(100%, 1660px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 17.25rem minmax(0, 1fr);
  align-items: start;
  gap: 0;
}
.portal-rail {
  position: sticky;
  z-index: 55;
  top: 1rem;
  height: calc(100svh - 2rem);
  margin: 1.25rem 0 1.25rem 1.25rem;
  padding: .55rem;
  display: flex;
  flex-direction: column;
  border: 1px solid rgb(159 197 255 / .13);
  border-radius: 1.5rem;
  color: #fff;
  background:
    radial-gradient(circle at 20% 0%, rgb(47 107 255 / .28), transparent 15rem),
    #07162f;
  box-shadow: 0 28px 90px rgb(7 22 47 / .22);
  overflow: hidden;
}
.tabs {
  position: static;
  flex: 1;
  min-height: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.tabs::before {
  content: "Relatório do evento";
  display: block;
  padding: 1.05rem 1rem .65rem;
  color: rgb(235 242 255 / .42);
  font-size: .66rem;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.tabs-in.wrap {
  width: 100%;
  max-width: none;
  height: 100%;
  padding: .35rem;
  display: flex;
  flex-direction: column;
  gap: .28rem;
  overflow-y: auto;
}
.tab {
  width: 100%;
  min-height: 3.1rem;
  justify-content: flex-start;
  padding: .8rem .9rem;
  border: 1px solid transparent;
  border-radius: .85rem;
  color: rgb(235 242 255 / .66);
  background: transparent;
  font-size: .82rem;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.tab .tn { width: 1.45rem; color: rgb(235 242 255 / .3); font-size: .62rem; }
.tab svg { width: 1.05rem; height: 1.05rem; opacity: .75; }
.tab:hover {
  color: #fff;
  border-color: rgb(159 197 255 / .12);
  background: rgb(255 255 255 / .065);
  transform: translateX(3px);
  box-shadow: none;
}
.tab.on, .tab.on:hover {
  color: #fff;
  border-color: rgb(159 197 255 / .2);
  background: linear-gradient(110deg, #2f6bff, #1747c8);
  box-shadow: 0 12px 32px rgb(47 107 255 / .3), inset 0 1px rgb(255 255 255 / .14);
  transform: none;
}
.tab.on .tn { color: rgb(255 255 255 / .58); }
.tab.on svg { stroke: #fff; }
.portal-rail-foot {
  margin: .65rem .35rem .35rem;
  padding: .9rem;
  border: 1px solid rgb(159 197 255 / .12);
  border-radius: 1rem;
  background: rgb(255 255 255 / .045);
}
.portal-rail-foot span { display: flex; align-items: center; gap: .45rem; color: #9fc5ff; font-size: .7rem; font-weight: 700; }
.portal-rail-foot span::before { content: ""; width: .42rem; height: .42rem; border-radius: 50%; background: #67e6c3; box-shadow: 0 0 12px #67e6c3; }
.portal-rail-foot p { margin-top: .42rem; color: rgb(235 242 255 / .48); font-size: .69rem; line-height: 1.45; }
.portal-stage { min-width: 0; }

/* ---------- demonstration notice ---------- */
.demo-bar {
  margin: 1.25rem 1.25rem 0 1rem;
  border: 1px solid rgb(47 107 255 / .17);
  border-radius: 1.15rem;
  background: linear-gradient(110deg, #edf3ff, #f8fbff);
  box-shadow: 0 8px 28px rgb(7 22 47 / .04);
}
.demo-in { padding-block: .85rem; }
.demo-in .ic { background: var(--vd); box-shadow: 0 8px 22px rgb(47 107 255 / .2); }
.demo-in p { color: #3f5b88; }
.demo-in p b { color: var(--pt); }
.demo-in button { color: var(--vd); border-color: rgb(47 107 255 / .25); }
.demo-in button:hover { color: #fff; background: var(--vd); border-color: var(--vd); }

main.wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 1.25rem clamp(1.25rem, 2.5vw, 2.2rem) 5rem 1rem;
}
.pane { transform-origin: 50% 0; }
.pane.on { animation: paneIn .42s cubic-bezier(.16, 1, .3, 1); }
.pane.on.is-leaving { animation: paneOut .16s ease-in forwards; }
@keyframes paneIn { from { opacity: 0; transform: translate3d(0, 14px, 0) scale(.995); } to { opacity: 1; transform: none; } }
@keyframes paneOut { to { opacity: 0; transform: translate3d(0, -7px, 0); } }
.hd { margin-bottom: 1.25rem; }
.hd h2 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); }
.hd p { max-width: 54rem; color: var(--tx-2); }

/* ---------- data surface polish ---------- */
.mapa, .card, .kpi, .pt-card, .rede {
  border-color: var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh);
}
.mapa {
  padding: clamp(1.2rem, 2.2vw, 1.8rem);
  background:
    radial-gradient(circle at 50% 15%, rgb(47 107 255 / .07), transparent 24rem),
    #fff;
}
.mapa-dica { color: var(--vd); border-color: rgb(47 107 255 / .2); background: var(--vd-soft); }
.no { border-color: var(--line); border-radius: 1rem; background: #f8fafd; }
.no:hover { border-color: rgb(47 107 255 / .4); background: var(--vd-soft); box-shadow: 0 14px 34px rgb(47 107 255 / .1); }
.no.result .t, .no.result .v { color: var(--vd); }
.mapa-centro { background: linear-gradient(145deg, #07162f, #1747c8); box-shadow: 0 20px 52px rgb(7 22 47 / .26); }
.mapa-centro .ev { color: #9fc5ff; background: none; padding: 0; overflow: visible; }
.mapa-centro .ev::before { display: none; }
.mapa-centro .sd b { color: #b9d0ff; }

.card, .kpi { background: rgb(255 255 255 / .94); }
.card { overflow: clip; }
.card-h { padding: 1.25rem 1.35rem 0; }
.card-b { padding: 1.2rem 1.35rem 1.35rem; }
.kpi {
  min-height: 9.6rem;
  padding: 1.25rem;
  border-top: 3px solid transparent;
  transition: transform 220ms cubic-bezier(.16, 1, .3, 1), border-color 220ms ease, box-shadow 220ms ease;
}
.kpi:hover { transform: translateY(-4px); border-top-color: rgb(47 107 255 / .35); box-shadow: 0 18px 44px rgb(7 22 47 / .1); }
.kpi.destaque { color: #fff; border: 0; background: linear-gradient(145deg, #07162f, #0f3675); box-shadow: 0 18px 45px rgb(7 22 47 / .2); }
.kpi.destaque .lb, .kpi.destaque .sub { color: rgb(235 242 255 / .62); }
.kpi.destaque .vl { color: #fff; }
.kpi.verde { border-top-color: #33b88e; background: linear-gradient(145deg, #fff, #effbf7); }
.kpi.verde .vl { color: #158a67; }
.vl { letter-spacing: -.045em; }
.expl { border: 1px solid rgb(47 107 255 / .2); border-left: 4px solid var(--vd); background: var(--vd-soft); }
.expl .ic { background: var(--vd); box-shadow: 0 8px 22px rgb(47 107 255 / .18); }
.expl h4 { color: var(--vd); }
.expl p { color: #3f5270; }
.bt-d { background: var(--vd); box-shadow: 0 10px 24px rgb(47 107 255 / .18); }
.bt-d:hover { background: #1747c8; }
.bg-ok { color: #0f7656; background: #e8f7f1; }
.fill { background: linear-gradient(90deg, #2f6bff, #78a4ff); }
.declara { border-radius: var(--r-lg); background: linear-gradient(135deg, #07162f, #0d2c60); box-shadow: 0 26px 70px rgb(7 22 47 / .18); }

table thead th { color: #5f6f86; background: #f3f6fa; }
table tbody tr { transition: background 160ms ease; }
table tbody tr:hover { background: #f7f9fc; }
.tb-wrap { border-radius: 1rem; }

.oferta { background: rgb(7 22 47 / .68); backdrop-filter: blur(10px); }
.oferta-c, .mod-c { border: 1px solid rgb(255 255 255 / .4); border-radius: 1.5rem; box-shadow: 0 35px 110px rgb(0 7 24 / .36); }
.oferta-k { color: var(--vd); border-color: rgb(47 107 255 / .2); background: var(--vd-soft); }
.op:hover { border-color: var(--vd); background: var(--vd-soft); }
.op .ic { background: var(--pt); }
.op:hover .ic { background: var(--vd); }

body > .wrap footer { margin-left: 17.5rem; color: var(--tx-3); }

/* ---------- tablet / mobile shell ---------- */
@media (max-width: 1080px) {
  .portal-shell { grid-template-columns: 14.5rem minmax(0, 1fr); }
  .portal-rail { margin-left: .8rem; }
  .tab { font-size: .76rem; }
  .tab .tn { display: none; }
  body > .wrap footer { margin-left: 14.5rem; }
  .g4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .top-in { min-height: 4.4rem; }
  .brand .pn, .brand .div { display: none; }
  .portal-shell { display: block; width: 100%; }
  .portal-rail {
    position: sticky;
    top: 0;
    height: auto;
    margin: 0;
    padding: .45rem .7rem;
    border: 0;
    border-radius: 0;
    background: rgb(255 255 255 / .94);
    box-shadow: 0 8px 28px rgb(7 22 47 / .1);
    backdrop-filter: blur(18px);
  }
  .tabs::before, .portal-rail-foot { display: none; }
  .tabs-in.wrap { width: auto; height: auto; padding: .15rem; flex-direction: row; gap: .4rem; overflow-x: auto; }
  .tab {
    width: auto;
    min-height: 2.65rem;
    flex: 0 0 auto;
    padding: .7rem .85rem;
    border-color: var(--line);
    color: var(--tx-2);
    background: #f7f9fc;
  }
  .tab .tn { display: none; }
  .tab svg { width: .95rem; height: .95rem; }
  .tab:hover { color: var(--pt); border-color: rgb(47 107 255 / .25); background: var(--vd-soft); transform: none; }
  .tab.on, .tab.on:hover { color: #fff; border-color: var(--pt); background: var(--pt); box-shadow: 0 8px 20px rgb(7 22 47 / .2); }
  .demo-bar { margin: .9rem .9rem 0; }
  main.wrap { padding: .9rem .9rem 4rem; }
  body > .wrap footer { margin-left: 0; }
}

@media (max-width: 560px) {
  .top-user > div:not(.av), .sair { display: none; }
  .brand { flex-wrap: wrap; }
  .demo-pill { font-size: .55rem; }
  .ev { padding-block: 1.6rem; }
  .ev-status { width: 100%; text-align: left; }
  .demo-in { padding: .8rem; }
  .demo-in .ic { display: none; }
  .demo-in p { min-width: 0; font-size: .77rem; }
  .g4, .g3, .g2, .g-2-1 { grid-template-columns: 1fr; }
  .kpi { min-height: 0; }
  .card-h, .card-b { padding-inline: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .pane.on, .pane.on.is-leaving { animation: none; }
  .tab, .no, .kpi { transition: none; }
  .tab:hover, .no:hover, .kpi:hover { transform: none; }
}

@media print {
  .portal-shell { display: block; width: 100%; }
  .portal-rail { display: none !important; }
  .portal-stage { display: block; }
  main.wrap { padding: 0; }
  body > .wrap footer { margin-left: 0; }
}
