/* language: CSS, file: panel/static/style.css
   Console — preto absoluto, acento violeta, cards de métrica. Sem CDN. */

:root {
  --bg:       #000000;
  --bg-soft:  #050506;
  --card:     #111112;
  --card-2:   #17171a;
  --card-3:   #1c1c20;
  --line:     #1e1e22;
  --line-2:   #2a2a30;
  --txt:      #f4f4f5;
  --txt-2:    #a1a1aa;
  --txt-3:    #6c6c76;
  --acc:      #a78bfa;
  --acc-2:    #8b5cf6;
  --acc-bg:   rgba(139, 92, 246, .13);
  --acc-line: rgba(167, 139, 250, .32);
  --ok:       #a78bfa;
  --warn:     #c4b5fd;
  --danger:   #f87171;
  --r:        14px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; }

body {
  background: var(--bg);
  color: var(--txt);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { display: block; }
::selection { background: rgba(139, 92, 246, .35); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #232329; border-radius: 99px; border: 2px solid #000; }
::-webkit-scrollbar-thumb:hover { background: #33333c; }

/* ---------------------------------------------------------------- layout */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }

/* --------------------------------------------------------------- sidebar */
.side {
  background: var(--bg);
  border-right: 1px solid var(--line);
  padding: 18px 12px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 2px; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, #6d28d9, #2a1259);
  border: 1px solid #4c1d95;
  color: #c4b5fd;
}
.brand-txt b { display: block; font-size: 14.5px; font-weight: 750; letter-spacing: .3px; line-height: 1.1; }
.brand-txt span { font-size: 10px; letter-spacing: 2.4px; color: var(--txt-3); font-weight: 600; }

.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-label {
  font-size: 10.5px; letter-spacing: .8px; color: var(--txt-3);
  padding: 0 10px 7px; font-weight: 500;
}
.nav {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 9px;
  color: var(--txt-2); font-size: 13.5px; font-weight: 480;
  transition: background .13s, color .13s;
  position: relative;
}
.nav svg { width: 15px; height: 15px; color: var(--txt-3); flex: none; transition: color .13s; }
.nav:hover { background: #101012; color: var(--txt); }
.nav:hover svg { color: var(--txt-2); }
.nav.on { background: var(--acc-bg); color: #ddd6fe; font-weight: 520; }
.nav.on svg { color: var(--acc); }
.nav.on::before {
  content: ""; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 17px; border-radius: 0 3px 3px 0; background: var(--acc);
}
.nav .tag {
  margin-left: auto; font-size: 10px; padding: 1px 6px; border-radius: 99px;
  background: #1b1b20; color: var(--txt-3); font-variant-numeric: tabular-nums;
}
.nav.on .tag { background: rgba(167,139,250,.16); color: var(--acc); }

.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.status { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--txt-3); padding: 0 10px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 3px rgba(167,139,250,.16); }
.dot.pulse { animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ------------------------------------------------------------------- top */
.topbar {
  height: 56px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px; gap: 16px; background: var(--bg);
  position: sticky; top: 0; z-index: 20;
}
.topbar .ptitle { font-size: 13px; font-weight: 650; letter-spacing: .5px; color: var(--txt-2); }
.topbar .ptitle b { color: var(--txt); }

.top-right { display: flex; align-items: center; gap: 10px; }

.license {
  display: flex; align-items: center; gap: 8px;
  background: #0d0d0f; border: 1px solid var(--line);
  border-radius: 9px; padding: 6px 10px; height: 34px;
}
.license .lb { font-size: 9.5px; letter-spacing: .9px; color: var(--txt-3); font-weight: 600; }
.license code { font-family: var(--mono); font-size: 11.5px; color: var(--txt-2); letter-spacing: .4px; }

.user-pill {
  display: flex; align-items: center; gap: 8px; height: 34px;
  padding: 0 12px; border-radius: 9px;
  background: #0d0d0f; border: 1px solid var(--line);
  font-size: 12.5px; color: var(--txt-2);
}

/* ------------------------------------------------------------------ main */
.main { padding: 30px 32px 70px; min-width: 0; }
.page-head { margin-bottom: 26px; }
.page-head h1 { font-size: 30px; font-weight: 750; letter-spacing: -.6px; }
.page-head p { color: var(--txt-3); font-size: 13px; margin-top: 5px; }
.page-head .row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ----------------------------------------------------------------- cards */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }

.kpi {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 18px 20px; position: relative; overflow: hidden;
  min-height: 102px;
}
.kpi .k { font-size: 10.5px; letter-spacing: 1.1px; color: var(--txt-3); font-weight: 550; text-transform: uppercase; }
.kpi .v { font-size: 28px; font-weight: 750; letter-spacing: -1px; margin-top: 10px; font-variant-numeric: tabular-nums; line-height: 1; }
.kpi .v.sm { font-size: 21px; letter-spacing: -.5px; }
.kpi .sub { font-size: 11.5px; color: var(--txt-3); margin-top: 8px; }
.kpi .sub b { color: var(--acc); font-weight: 600; }
.kpi .spark { position: absolute; right: 16px; bottom: 12px; opacity: .8; }
.kpi .spark path { fill: none; stroke: var(--acc); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 20px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h2 { font-size: 13.5px; font-weight: 650; letter-spacing: -.1px; }
.card-head .sub { font-size: 11.5px; color: var(--txt-3); }

.grid2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 14px; }

/* ----------------------------------------------------------------- table */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: left; font-size: 10px; letter-spacing: .9px; text-transform: uppercase;
  color: var(--txt-3); font-weight: 600; padding: 0 10px 9px; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
tbody td { padding: 11px 10px; border-bottom: 1px solid #151518; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .1s; }
tbody tr:hover { background: #131315; }
tbody tr.click { cursor: pointer; }

.host { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 30px; height: 30px; border-radius: 8px; flex: none; display: grid; place-items: center;
  font-weight: 700; font-size: 12px; background: var(--card-2);
  border: 1px solid var(--line-2); color: var(--acc);
}
.host b { display: block; font-weight: 600; font-size: 13px; }
.host span { display: block; font-size: 11.5px; color: var(--txt-3); font-family: var(--mono); }

.mono { font-family: var(--mono); font-size: 12px; }
.dim { color: var(--txt-3); }
.nowrap { white-space: nowrap; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2.5px 8px;
  border-radius: 99px; font-size: 11px; font-weight: 550;
  background: #191920; border: 1px solid var(--line-2); color: var(--txt-2); white-space: nowrap;
}
.badge.acc { background: rgba(139,92,246,.11); border-color: var(--acc-line); color: #c4b5fd; }
.badge.warn { background: rgba(196,181,253,.09); border-color: rgba(196,181,253,.25); color: #e9e3ff; }
.badge.danger { background: rgba(248,113,113,.09); border-color: rgba(248,113,113,.28); color: var(--danger); }
.badge.ok { background: rgba(167,139,250,.11); border-color: rgba(167,139,250,.30); color: #ddd6fe; }

.bar-row { display: grid; grid-template-columns: 92px 1fr 30px; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 12.5px; }
.bar-row:last-child { margin-bottom: 0; }
.bar { height: 5px; border-radius: 99px; background: #1a1a1e; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #6d28d9, var(--acc)); }
.bar-row b { text-align: right; color: var(--txt-2); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 12px; }

.chart { display: flex; align-items: flex-end; gap: 4px; height: 74px; }
.chart i { flex: 1; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, var(--acc), #4c1d95); opacity: .55; }
.chart i:hover { opacity: 1; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 15px; border-radius: 9px; cursor: pointer; font-weight: 570; font-size: 13px;
  background: var(--card-2); border: 1px solid var(--line-2); color: var(--txt);
  transition: background .14s, border-color .14s, transform .06s;
  white-space: nowrap;
}
.btn:hover { background: var(--card-3); border-color: #35353d; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; }
.btn.primary {
  background: linear-gradient(180deg, #9d7bff, #7c4cf0);
  border-color: #8b5cf6; color: #fff;
  box-shadow: 0 6px 20px -10px rgba(139,92,246,.9);
}
.btn.primary:hover { background: linear-gradient(180deg, #ab8cff, #8a5cf7); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; }
.btn.danger { color: #fca5a5; border-color: rgba(248,113,113,.28); background: rgba(248,113,113,.07); }
.btn.block { width: 100%; }

/* ------------------------------------------------------------------ forms */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; color: var(--txt-2); margin-bottom: 7px; font-weight: 550; }
.field .hint { font-size: 11.5px; color: var(--txt-3); margin-top: 6px; }
.input, .select, textarea.input {
  width: 100%; padding: 10px 12px; border-radius: 9px;
  background: #0b0b0d; border: 1px solid var(--line-2); outline: 0;
  transition: border-color .14s, box-shadow .14s;
}
.input:focus, .select:focus { border-color: #6d4bb8; box-shadow: 0 0 0 3px rgba(139,92,246,.12); }
.input::placeholder { color: var(--txt-3); }
.select { appearance: none; background-image: none; cursor: pointer; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 6px; }

/* --------------------------------------------------------------- switches */
.opt {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 0; border-bottom: 1px solid #151518;
}
.opt:last-child { border-bottom: 0; }
.opt .t { font-size: 13px; font-weight: 550; }
.opt .d { font-size: 11.5px; color: var(--txt-3); margin-top: 2px; }

.switch { position: relative; display: inline-flex; flex: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span {
  width: 40px; height: 22px; border-radius: 99px; background: #232329;
  border: 1px solid var(--line-2); cursor: pointer; transition: background .16s, border-color .16s;
  position: relative; display: block;
}
.switch span::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: #6c6c76; transition: transform .16s, background .16s;
}
.switch input:checked + span { background: rgba(139,92,246,.28); border-color: var(--acc-line); }
.switch input:checked + span::after { transform: translateX(18px); background: var(--acc); }

/* -------------------------------------------------------------- build fmt */
.fmt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fmt { position: relative; }
.fmt input { position: absolute; opacity: 0; }
.fmt label {
  display: block; padding: 14px 16px; border-radius: 11px; cursor: pointer;
  background: #0b0b0d; border: 1px solid var(--line-2); transition: border-color .14s, background .14s;
}
.fmt label b { display: block; font-size: 13px; font-weight: 650; }
.fmt label span { display: block; font-size: 11.5px; color: var(--txt-3); margin-top: 3px; }
.fmt input:checked + label {
  border-color: var(--acc-line); background: rgba(139,92,246,.09);
  box-shadow: inset 0 0 0 1px rgba(139,92,246,.18);
}
.fmt input:checked + label b { color: #ddd6fe; }

.range { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 99px; background: #232329; outline: 0; }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%;
  background: var(--acc); cursor: pointer; border: 2px solid #0b0b0d;
  box-shadow: 0 0 0 3px rgba(139,92,246,.2);
}
.range::-moz-range-thumb { width: 13px; height: 13px; border: 2px solid #0b0b0d; border-radius: 50%; background: var(--acc); cursor: pointer; }

.range-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.range-head .val { font-family: var(--mono); font-size: 12px; color: var(--acc); }

.drop {
  border: 1px dashed #2e2e36; border-radius: 11px; padding: 26px 16px;
  text-align: center; cursor: pointer; transition: border-color .14s, background .14s;
  background: #08080a;
}
.drop:hover { border-color: var(--acc-line); background: rgba(139,92,246,.04); }
.drop svg { margin: 0 auto 10px; color: var(--acc); width: 22px; height: 22px; }
.drop b { display: block; font-size: 13px; font-weight: 600; }
.drop span { display: block; font-size: 10.5px; letter-spacing: .6px; color: var(--txt-3); margin-top: 5px; text-transform: uppercase; }
.drop input { display: none; }
.drop.filled { border-style: solid; border-color: var(--acc-line); background: rgba(139,92,246,.06); }

/* -------------------------------------------------------------------- tabs */
.tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--line); margin-bottom: 20px; flex-wrap: wrap; }
.tab {
  padding: 9px 14px; cursor: pointer; border: 0; background: none; color: var(--txt-3);
  font-weight: 550; font-size: 13px; border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .14s, border-color .14s;
}
.tab:hover { color: var(--txt-2); }
.tab.on { color: var(--acc); border-bottom-color: var(--acc); }
.tab .n { font-size: 10.5px; background: #1b1b20; padding: 1px 6px; border-radius: 99px; margin-left: 6px; color: var(--txt-3); }
.tab.on .n { background: rgba(139,92,246,.16); color: var(--acc); }

.pane { display: none; }
.pane.on { display: block; animation: fade .16s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(3px); } }

/* ------------------------------------------------------------------- misc */
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px 20px; }
.kv dt { font-size: 10px; letter-spacing: .9px; text-transform: uppercase; color: var(--txt-3); margin-bottom: 3px; }
.kv dd { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pw { display: flex; align-items: center; gap: 6px; }
.pw code { font-family: var(--mono); font-size: 12px; }
.pw.mask code { color: var(--txt-3); letter-spacing: 1px; }

.icon-btn {
  border: 1px solid var(--line); background: #141418; border-radius: 7px;
  width: 26px; height: 26px; display: grid; place-items: center; cursor: pointer;
  color: var(--txt-3); flex: none; transition: color .14s, border-color .14s, background .14s;
}
.icon-btn:hover { color: var(--acc); border-color: var(--acc-line); background: rgba(139,92,246,.08); }
.icon-btn svg { width: 13px; height: 13px; }

.empty { text-align: center; padding: 44px 20px; color: var(--txt-3); font-size: 13px; }
.empty code { color: var(--txt-2); font-family: var(--mono); font-size: 12px; }

.shot { border-radius: 10px; border: 1px solid var(--line); width: 100%; display: block; }

pre.json {
  background: #08080a; border: 1px solid var(--line); border-radius: 10px; padding: 16px;
  overflow: auto; font-family: var(--mono); font-size: 12px; color: #b9b9c4;
  max-height: 560px; line-height: 1.55;
}

.jsbox {
  width: 100%; min-height: 360px; background: #08080a;
  border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
  font-family: var(--mono); font-size: 11.5px; color: #b9b9c4; line-height: 1.6;
  resize: vertical; outline: 0; white-space: pre; overflow: auto;
  transition: border-color .16s, box-shadow .16s;
}
.jsbox:focus { border-color: var(--acc-line); box-shadow: 0 0 0 3px rgba(139,92,246,.08); }

.pager { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; gap: 10px; }
.pager .info { font-size: 12px; color: var(--txt-3); }
.pager .links { display: flex; gap: 6px; }
.pager a, .pager span {
  padding: 6px 11px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card); font-size: 12.5px; color: var(--txt-2);
}
.pager a:hover { border-color: var(--line-2); color: var(--txt); }
.pager .off { opacity: .3; }

.flash {
  background: rgba(139,92,246,.10); border: 1px solid rgba(167,139,250,.28);
  color: #ddd6fe; padding: 10px 14px; border-radius: 10px; font-size: 12.5px; margin-bottom: 16px;
}

/* ------------------------------------------------------------------ login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; }
.login-wrap::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(560px 280px at 50% -6%, rgba(139,92,246,.16), transparent 70%);
}
.login {
  width: 100%; max-width: 372px; background: #0b0b0d;
  border: 1px solid var(--line-2); border-radius: 18px; padding: 32px 28px;
  position: relative; box-shadow: 0 40px 90px -50px #7c4cf0;
}
.login .brand { justify-content: center; margin-bottom: 24px; }
.login h1 { font-size: 18px; text-align: center; font-weight: 700; letter-spacing: -.2px; }
.login p.sub { text-align: center; color: var(--txt-3); font-size: 12.5px; margin: 6px 0 24px; }
.err {
  background: rgba(248,113,113,.08); border: 1px solid rgba(248,113,113,.25);
  color: #fca5a5; padding: 9px 12px; border-radius: 9px; font-size: 12.5px; margin-bottom: 14px;
}

/* -------------------------------------------------------------- responsive */
@media (max-width: 1240px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; gap: 14px; overflow-x: auto; padding: 12px; }
  .nav-label, .side-foot, .brand-txt { display: none; }
  .nav-group { flex-direction: row; }
  .nav.on::before { display: none; }
  .main { padding: 20px 16px 60px; }
  .stats, .form-row, .fmt-grid { grid-template-columns: minmax(0, 1fr); }
  .topbar { padding: 0 14px; }
  .license .lb { display: none; }
}

/* ============================================================== animacoes */
@keyframes rise      { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadein    { from { opacity: 0; } to { opacity: 1; } }
@keyframes grow      { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes draw      { to { stroke-dashoffset: 0; } }
@keyframes toast-in  { from { opacity: 0; transform: translate(-50%, 14px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@keyframes rowIn     { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes glowPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(139,92,246,0); } 50% { box-shadow: 0 0 0 4px rgba(139,92,246,.12); } }

body { animation: fadein .32s ease both; }

/* entrada escalonada por bloco da pagina */
.main > * { animation: rise .52s cubic-bezier(.16, 1, .3, 1) both; }
.main > *:nth-child(1) { animation-delay: .02s; }
.main > *:nth-child(2) { animation-delay: .07s; }
.main > *:nth-child(3) { animation-delay: .12s; }
.main > *:nth-child(4) { animation-delay: .17s; }
.main > *:nth-child(5) { animation-delay: .22s; }

/* cards de metrica */
.stats .kpi { animation: rise .55s cubic-bezier(.16, 1, .3, 1) both; }
.stats .kpi:nth-child(1) { animation-delay: .06s; }
.stats .kpi:nth-child(2) { animation-delay: .12s; }
.stats .kpi:nth-child(3) { animation-delay: .18s; }
.stats .kpi:nth-child(4) { animation-delay: .24s; }

.card, .kpi { transition: border-color .22s, transform .22s, box-shadow .28s; }
.kpi:hover {
  transform: translateY(-2px);
  border-color: #322c46;
  box-shadow: 0 10px 34px -20px rgba(139, 92, 246, .95);
}
.card:hover { border-color: #26262e; }

/* sparkline desenhando */
.kpi .spark path {
  stroke-dasharray: 460;
  stroke-dashoffset: 460;
  animation: draw 1.15s cubic-bezier(.16, 1, .3, 1) .35s forwards;
}

/* barras do grafico crescendo */
.chart i { transform-origin: bottom; animation: grow .75s cubic-bezier(.16, 1, .3, 1) both; }
.chart i:nth-child(1)  { animation-delay: .04s; }
.chart i:nth-child(2)  { animation-delay: .08s; }
.chart i:nth-child(3)  { animation-delay: .12s; }
.chart i:nth-child(4)  { animation-delay: .16s; }
.chart i:nth-child(5)  { animation-delay: .20s; }
.chart i:nth-child(6)  { animation-delay: .24s; }
.chart i:nth-child(7)  { animation-delay: .28s; }
.chart i:nth-child(8)  { animation-delay: .32s; }
.chart i:nth-child(9)  { animation-delay: .36s; }
.chart i:nth-child(10) { animation-delay: .40s; }
.chart i:nth-child(11) { animation-delay: .44s; }
.chart i:nth-child(12) { animation-delay: .48s; }
.chart i:nth-child(13) { animation-delay: .52s; }
.chart i:nth-child(14) { animation-delay: .56s; }

/* barras horizontais preenchendo */
.bar i { transform-origin: left; animation: grow-bar .8s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes grow-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* tabela */
tbody tr { animation: fadein .35s ease both; }
tbody tr:nth-child(2)  { animation-delay: .03s; }
tbody tr:nth-child(3)  { animation-delay: .06s; }
tbody tr:nth-child(4)  { animation-delay: .09s; }
tbody tr:nth-child(5)  { animation-delay: .12s; }
tbody tr:nth-child(6)  { animation-delay: .15s; }
tbody tr:nth-child(7)  { animation-delay: .18s; }
tbody tr:nth-child(8)  { animation-delay: .21s; }
tbody tr:nth-child(9)  { animation-delay: .24s; }
tbody tr:nth-child(10) { animation-delay: .27s; }

/* navegacao */
.nav svg { transition: transform .18s ease, color .13s; }
.nav:hover svg { transform: translateX(2px) scale(1.07); }
.nav.on { animation: glowPulse 3.4s ease-in-out infinite; }

/* botoes */
.btn { transition: background .14s, border-color .14s, transform .12s, box-shadow .22s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn.primary:hover { box-shadow: 0 12px 30px -14px rgba(139, 92, 246, 1); }
.btn.primary { position: relative; overflow: hidden; }
.btn.primary::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.22) 50%, transparent 80%);
  background-size: 220% 100%; opacity: 0;
  transition: opacity .2s;
}
.btn.primary:hover::after { opacity: 1; animation: sheen 1s linear; }
@keyframes sheen { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* tabs */
.tab { position: relative; }
.tab::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -2px; height: 2px;
  background: var(--acc); border-radius: 2px;
  transform: scaleX(0); transform-origin: center;
  transition: transform .22s cubic-bezier(.16, 1, .3, 1);
}
.tab.on::after { transform: scaleX(1); }

/* dropzone */
.drop { transition: border-color .16s, background .16s, transform .16s; }
.drop:hover { transform: translateY(-1px); }
.drop.filled { animation: fadein .3s ease; }

/* linha de log do build */
.logrow { display: none; }
.logrow.on { display: table-row; animation: fadein .25s ease; }
.logrow pre { margin: 4px 0 10px; }

/* barra de progresso de navegacao */
.pbar {
  position: fixed; top: 0; left: 0; height: 2px; width: 0; z-index: 9999;
  background: linear-gradient(90deg, #7c4cf0, #a78bfa, #ddd6fe);
  box-shadow: 0 0 12px rgba(139, 92, 246, .9);
  opacity: 0; transition: width .3s ease, opacity .35s ease;
}

/* toast de copia */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 0);
  background: #17171a; border: 1px solid var(--acc-line); color: #ddd6fe;
  padding: 10px 18px; border-radius: 10px; font-size: 13px; z-index: 9999;
  animation: toast-in .26s cubic-bezier(.16, 1, .3, 1) both;
  box-shadow: 0 18px 50px -20px rgba(0,0,0,.9);
  display: flex; align-items: center; gap: 8px;
}
.toast svg { width: 14px; height: 14px; color: var(--acc); }

/* pagina saindo */
body.leaving { opacity: .55; transition: opacity .18s ease; }

/* ============================================================ animações 2 */
/* fundo aurora: html pinta o preto, body fica transparente pra camada aparecer */
html { background: #000; }
body { background: transparent; }

body::before {
  content: ""; position: fixed; inset: -18%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 36% at 16% 10%, rgba(139, 92, 246, .17), transparent 62%),
    radial-gradient(36% 40% at 84% 20%, rgba(167, 139, 250, .12), transparent 60%),
    radial-gradient(46% 40% at 52% 94%, rgba(109, 40, 217, .16), transparent 66%);
  filter: blur(10px);
  animation: aurora 30s ease-in-out infinite alternate;
}
@keyframes aurora {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(2.2%, -1.8%, 0) scale(1.07); }
  100% { transform: translate3d(-2%, 2.2%, 0) scale(1.03); }
}

/* holofote que segue o mouse dentro dos cards */
.card { position: relative; }
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%),
              rgba(167, 139, 250, .11), transparent 62%);
  opacity: 0; transition: opacity .3s ease;
}
.card:hover::after { opacity: 1; }

/* reveal no scroll (só esconde se o JS marcar body.js) */
body.js .reveal { opacity: 0; transform: translateY(16px) scale(.995); }
body.js .reveal.in {
  opacity: 1; transform: none;
  transition: opacity .55s cubic-bezier(.16, 1, .3, 1),
              transform .55s cubic-bezier(.16, 1, .3, 1);
}

/* ripple no clique */
.btn { position: relative; overflow: hidden; }
.ripple {
  position: absolute; border-radius: 50%; transform: scale(0);
  background: rgba(255, 255, 255, .28); pointer-events: none;
  animation: ripple .62s ease-out forwards;
}
@keyframes ripple { to { transform: scale(2.8); opacity: 0; } }

/* botão em processamento */
.btn.loading { pointer-events: none; opacity: .8; }
.btn.loading::before {
  content: ""; width: 13px; height: 13px; margin-right: 7px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  display: inline-block; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* marca respirando */
.brand-mark { animation: brandGlow 5.5s ease-in-out infinite; }
@keyframes brandGlow {
  50% { box-shadow: 0 0 0 7px rgba(139, 92, 246, .07), 0 10px 28px -12px rgba(139, 92, 246, .85); }
}

/* barra do item ativo deslizando */
.nav::before {
  content: ""; position: absolute; left: -12px; top: 50%;
  width: 3px; height: 17px; margin-top: -8.5px; border-radius: 0 3px 3px 0;
  background: var(--acc); transform: scaleY(0);
  transition: transform .24s cubic-bezier(.16, 1, .3, 1);
}
.nav.on::before { transform: scaleY(1); height: 17px; }

/* card de métrica inclinando */
.kpi:hover { transform: translateY(-3px) rotateX(1.4deg); }

/* brilho na linha da tabela */
tbody tr td:first-child { transition: box-shadow .18s ease; }
tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--acc); }

/* skeleton do screenshot enquanto carrega */
.shot {
  background: linear-gradient(100deg, #101016 20%, #1c1c26 40%, #101016 60%);
  background-size: 220% 100%; animation: shimmer 1.5s linear infinite;
  min-height: 140px;
}
.shot.loaded { animation: none; background: #08080a; }
@keyframes shimmer { from { background-position: 130% 0; } to { background-position: -130% 0; } }

/* entrada escalonada da sidebar */
.nav-group .nav { animation: navIn .42s cubic-bezier(.16, 1, .3, 1) both; }
.nav-group:nth-of-type(1) .nav:nth-child(2) { animation-delay: .04s; }
.nav-group:nth-of-type(1) .nav:nth-child(3) { animation-delay: .08s; }
.nav-group:nth-of-type(2) .nav:nth-child(2) { animation-delay: .10s; }
.nav-group:nth-of-type(2) .nav:nth-child(3) { animation-delay: .13s; }
.nav-group:nth-of-type(2) .nav:nth-child(4) { animation-delay: .16s; }
.nav-group:nth-of-type(3) .nav:nth-child(2) { animation-delay: .18s; }
@keyframes navIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }

/* pulso no badge de novidade */
.badge.pop { animation: pop .35s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
