/* ============================================================
   UPCAPITAL — Curva de Capital
   Tema dark premium: navy profundo, azul, detalhes verde/vermelho
   Fundo com efeitos animados (aurora, grid, partículas, gráfico)
   ============================================================ */

:root {
  --bg: #050b1a;
  --bg-2: #071022;
  --navy-950: #060d1f;
  --navy-900: #0a1428;
  --navy-800: #0f1d38;
  --navy-700: #16294d;
  --navy-600: #1e3a6d;
  --blue-600: #1d5fd6;
  --blue-500: #2e74f0;
  --blue-400: #5b93f5;
  --blue-100: #dce9fd;
  --card: rgba(11, 22, 44, .72);
  --card-solid: #0b1629;
  --card-head: rgba(17, 31, 59, .8);
  --border: rgba(91, 147, 245, .14);
  --border-strong: rgba(91, 147, 245, .28);
  --text: #eaf1fd;
  --text-2: #c4d2ea;
  --text-dim: #8fa2c0;
  --muted: #6d7f9d;
  --green-600: #10b981;
  --green-100: rgba(16, 185, 129, .14);
  --red-600: #f0475a;
  --red-100: rgba(240, 71, 90, .13);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 2px 8px rgba(2, 6, 16, .35), 0 8px 28px rgba(2, 6, 16, .28);
  --shadow-lg: 0 12px 44px rgba(2, 6, 16, .55);
  --glow-blue: 0 0 18px rgba(46, 116, 240, .35);
  --font: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--blue-400); text-decoration: none; }
a:hover { color: var(--blue-100); }

img, svg { vertical-align: middle; }

/* ============================================================
   FUNDO ANIMADO (aurora + grid + partículas + linha de gráfico)
   ============================================================ */
.bg-fx {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1100px 640px at 78% -12%, rgba(29, 95, 214, .16), transparent 60%),
    radial-gradient(900px 560px at -8% 108%, rgba(22, 41, 77, .55), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 55%, var(--bg) 100%);
}

.bg-fx .grid-layer {
  position: absolute; inset: -60px;
  background-image:
    linear-gradient(rgba(91, 147, 245, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 147, 245, .05) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, black 30%, transparent 75%);
  animation: gridDrift 40s linear infinite;
}
@keyframes gridDrift {
  from { transform: translate(0, 0); }
  to   { transform: translate(54px, 54px); }
}

.bg-fx .blob {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5;
  will-change: transform;
}
.bg-fx .b1 {
  width: 620px; height: 620px; left: -160px; top: -220px;
  background: radial-gradient(circle, rgba(29, 95, 214, .34), transparent 65%);
  animation: blobFloat1 26s ease-in-out infinite alternate;
}
.bg-fx .b2 {
  width: 700px; height: 700px; right: -240px; top: 8%;
  background: radial-gradient(circle, rgba(46, 116, 240, .22), transparent 65%);
  animation: blobFloat2 32s ease-in-out infinite alternate;
}
.bg-fx .b3 {
  width: 520px; height: 520px; left: 30%; bottom: -280px;
  background: radial-gradient(circle, rgba(16, 185, 129, .10), transparent 65%);
  animation: blobFloat3 38s ease-in-out infinite alternate;
}
@keyframes blobFloat1 { from { transform: translate(0, 0) scale(1); } to { transform: translate(120px, 90px) scale(1.15); } }
@keyframes blobFloat2 { from { transform: translate(0, 0) scale(1.1); } to { transform: translate(-140px, 120px) scale(.92); } }
@keyframes blobFloat3 { from { transform: translate(0, 0) scale(.95); } to { transform: translate(150px, -80px) scale(1.12); } }

.bg-fx .fx-chart {
  position: absolute; bottom: -2%; width: 58%; min-width: 480px; opacity: .5;
}
.bg-fx .fx-chart.left { left: -6%; }
.bg-fx .fx-chart.right { right: -8%; transform: scaleX(-1); opacity: .34; }
.bg-fx .fx-line {
  fill: none; stroke: rgba(46, 116, 240, .35); stroke-width: 2;
  stroke-dasharray: 6 7;
  animation: lineFlow 30s linear infinite;
}
.bg-fx .fx-area { fill: url(#fxGrad); opacity: .5; }
@keyframes lineFlow { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -520; } }

.bg-fx .candles { position: absolute; bottom: 4%; opacity: .18; }
.bg-fx .candles.left { left: 2%; }
.bg-fx .candles.right { right: 3%; }

.bg-fx .particles span {
  position: absolute; bottom: -12px; border-radius: 50%;
  background: rgba(91, 147, 245, .55);
  box-shadow: 0 0 8px rgba(91, 147, 245, .7);
  animation: rise linear infinite;
  opacity: 0;
}
@keyframes rise {
  0%   { transform: translateY(0); opacity: 0; }
  8%   { opacity: .7; }
  85%  { opacity: .35; }
  100% { transform: translateY(-108vh); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .bg-fx .blob, .bg-fx .grid-layer, .bg-fx .fx-line, .bg-fx .particles span,
  .kpi, .card, .robot-card, .feature { animation: none !important; }
}

/* ---------- Utilidades ---------- */
.pos { color: var(--green-600) !important; }
.neg { color: var(--red-600) !important; }
.neu { color: var(--text-dim) !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-variant-numeric: tabular-nums; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex { display: flex; gap: 12px; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- Header público ---------- */
.site-header {
  background: rgba(5, 11, 26, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand .logo-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-400));
  display: grid; place-items: center;
  font-weight: 800; font-size: 15px; color: #fff; letter-spacing: -.5px;
  box-shadow: var(--glow-blue);
}
.brand .logo-text { font-size: 17px; font-weight: 800; letter-spacing: 2px; color: #fff; }
.brand .logo-text small { display: block; font-size: 9.5px; font-weight: 500; letter-spacing: 3px; color: var(--blue-400); text-transform: uppercase; }
.brand:hover { color: var(--white); }

.main-nav { display: flex; gap: 4px; align-items: center; }
.main-nav a {
  color: var(--text-dim); padding: 9px 15px; border-radius: 9px;
  font-size: 14px; font-weight: 500; transition: all .15s; position: relative;
}
.main-nav a:hover { color: #fff; background: rgba(91, 147, 245, .08); }
.main-nav a.active { color: #fff; background: rgba(46, 116, 240, .16); }
.main-nav a.active::after {
  content: ''; position: absolute; left: 15px; right: 15px; bottom: 3px; height: 2px;
  border-radius: 2px; background: var(--blue-500); box-shadow: 0 0 8px var(--blue-500);
}

.btn-client {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  color: #fff !important; padding: 10px 18px;
  border-radius: 9px; font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: all .18s; box-shadow: 0 4px 16px rgba(29, 95, 214, .35);
}
.btn-client:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(46, 116, 240, .5); }

.nav-toggle { display: none; background: none; border: 0; color: #fff; cursor: pointer; padding: 6px; }

/* ---------- Container ---------- */
.container { max-width: 1440px; margin: 0 auto; padding: 30px 28px 60px; }

.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: 26px; font-weight: 800; color: #fff; letter-spacing: -.3px; }
.page-head .sub { color: var(--text-dim); margin-top: 3px; font-size: 14px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  padding: 4px 11px; border-radius: 99px; border: 1px solid transparent;
}
.badge-green { background: var(--green-100); color: var(--green-600); border-color: rgba(16, 185, 129, .25); }
.badge-red { background: var(--red-100); color: var(--red-600); border-color: rgba(240, 71, 90, .25); }
.badge-blue { background: rgba(46, 116, 240, .14); color: var(--blue-400); border-color: rgba(46, 116, 240, .3); }
.badge-gray { background: rgba(143, 162, 192, .1); color: var(--text-dim); border-color: rgba(143, 162, 192, .2); }
.badge-navy { background: rgba(46, 116, 240, .1); color: var(--blue-400); border-color: var(--border); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }
.badge-green .dot { animation: pulseDot 2s ease-in-out infinite; }
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.demo-banner {
  background: rgba(46, 116, 240, .07);
  border: 1px solid rgba(91, 147, 245, .3);
  color: var(--blue-400);
  border-radius: var(--radius-sm); padding: 12px 18px; font-size: 13px;
  display: flex; align-items: center; gap: 10px; margin-bottom: 22px;
  backdrop-filter: blur(6px);
}
.demo-banner strong { letter-spacing: .5px; color: var(--blue-100); }
.demo-banner div { color: var(--text-dim); }
.demo-banner div strong { color: var(--blue-400); }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.card-body { padding: 20px 22px; }
.card-title {
  font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--text-dim); padding: 18px 22px 0;
}
.card-title + .card-body { padding-top: 12px; }

/* ---------- KPIs com ícone ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.kpi {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  display: flex; gap: 14px; align-items: flex-start;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color .2s, transform .2s, box-shadow .2s;
  animation: cardIn .5s ease both;
}
.kpi:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.kpi-grid .kpi:nth-child(2) { animation-delay: .05s; }
.kpi-grid .kpi:nth-child(3) { animation-delay: .1s; }
.kpi-grid .kpi:nth-child(4) { animation-delay: .15s; }
.kpi-grid .kpi:nth-child(5) { animation-delay: .2s; }
.kpi-grid .kpi:nth-child(6) { animation-delay: .25s; }
.kpi-grid .kpi:nth-child(7) { animation-delay: .3s; }
.kpi-grid .kpi:nth-child(8) { animation-delay: .35s; }
.kpi-grid .kpi:nth-child(n+9) { animation-delay: .4s; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.kpi .ic {
  flex-shrink: 0;
  width: 42px; height: 42px; border-radius: 11px;
  display: grid; place-items: center;
}
.ic-blue    { background: rgba(46, 116, 240, .14); color: var(--blue-400); box-shadow: 0 0 16px rgba(46, 116, 240, .22), inset 0 0 0 1px rgba(46, 116, 240, .28); }
.ic-green   { background: rgba(16, 185, 129, .12); color: var(--green-600); box-shadow: 0 0 16px rgba(16, 185, 129, .18), inset 0 0 0 1px rgba(16, 185, 129, .26); }
.ic-red     { background: rgba(240, 71, 90, .11); color: var(--red-600); box-shadow: 0 0 16px rgba(240, 71, 90, .16), inset 0 0 0 1px rgba(240, 71, 90, .24); }
.ic-neutral { background: rgba(143, 162, 192, .1); color: var(--text-dim); box-shadow: inset 0 0 0 1px rgba(143, 162, 192, .2); }

.kpi .kpi-body { min-width: 0; }
.kpi .label {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-dim);
}
.kpi .value { font-size: 21px; font-weight: 700; margin-top: 5px; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: -.2px; }
.kpi .value.pos { color: var(--green-600); text-shadow: 0 0 22px rgba(16, 185, 129, .35); }
.kpi .value.neg { color: var(--red-600); text-shadow: 0 0 22px rgba(240, 71, 90, .3); }
.kpi .hint { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

/* ---------- Robô cards ---------- */
.robot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 20px; }

.robot-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
  backdrop-filter: blur(10px);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  animation: cardIn .5s ease both;
}
.robot-grid .robot-card:nth-child(2) { animation-delay: .08s; }
.robot-grid .robot-card:nth-child(3) { animation-delay: .16s; }
.robot-grid .robot-card:nth-child(4) { animation-delay: .24s; }
.robot-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg), var(--glow-blue); border-color: var(--border-strong); }

.robot-card .head {
  background: linear-gradient(135deg, rgba(22, 41, 77, .9), rgba(15, 29, 56, .9));
  border-bottom: 1px solid var(--border);
  color: #fff; padding: 18px 20px;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
}
.robot-card .head h3 { font-size: 16px; font-weight: 700; letter-spacing: .3px; }
.robot-card .head .market { font-size: 12px; color: var(--blue-400); margin-top: 2px; }

.robot-card .stats { padding: 16px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; flex: 1; }
.robot-card .stat .l { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); }
.robot-card .stat .v { font-size: 15.5px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }

.robot-card .foot { padding: 0 20px 18px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  color: #fff; border: 0; border-radius: 9px;
  padding: 10px 18px; font-size: 13px; font-weight: 700; letter-spacing: .5px;
  cursor: pointer; transition: all .18s; font-family: var(--font);
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(29, 95, 214, .3);
}
.btn:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(46, 116, 240, .45); }
.btn.block { width: 100%; }
.btn.btn-outline {
  background: transparent; color: var(--blue-400);
  border: 1.5px solid rgba(91, 147, 245, .45); box-shadow: none;
}
.btn.btn-outline:hover { background: rgba(46, 116, 240, .12); color: var(--blue-100); }
.btn.btn-ghost { background: rgba(143, 162, 192, .1); color: var(--text-2); text-transform: none; box-shadow: none; }
.btn.btn-ghost:hover { background: rgba(143, 162, 192, .18); }
.btn.btn-danger { background: linear-gradient(135deg, #c4293b, var(--red-600)); box-shadow: 0 4px 14px rgba(220, 53, 69, .25); }
.btn.btn-sm { padding: 7px 12px; font-size: 11.5px; }

/* ---------- Filtros ---------- */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 16px; box-shadow: var(--shadow); margin-bottom: 20px;
  backdrop-filter: blur(10px);
}
.seg {
  display: inline-flex; background: rgba(5, 11, 26, .5); border: 1px solid var(--border);
  border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap;
}
.seg button, .seg a {
  border: 0; background: transparent; padding: 6px 13px; border-radius: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--text-dim); cursor: pointer;
  font-family: var(--font); transition: all .15s; white-space: nowrap;
}
.seg button:hover, .seg a:hover { color: #fff; }
.seg button.active, .seg a.active {
  background: rgba(46, 116, 240, .22); color: var(--blue-100);
  box-shadow: inset 0 0 0 1px rgba(46, 116, 240, .4);
}

.filter-bar .dates { display: flex; gap: 8px; align-items: center; margin-left: auto; flex-wrap: wrap; }

input[type="date"], input[type="text"], input[type="email"], input[type="password"],
input[type="number"], select, textarea {
  border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px;
  font-size: 13.5px; font-family: var(--font); color: var(--text);
  background: rgba(5, 11, 26, .55);
  color-scheme: dark;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(46, 116, 240, .18);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input[readonly] { opacity: .72; }
select option { background: var(--card-solid); color: var(--text); }

/* ---------- Gráficos ---------- */
.chart-card { margin-bottom: 20px; animation: cardIn .5s ease both; }
.chart-card .chart-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px 0; gap: 12px; flex-wrap: wrap;
}
.chart-card .chart-head h2 { font-size: 15px; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 9px; }
.chart-wrap { position: relative; padding: 12px 16px 16px; height: 380px; }
.chart-wrap.short { height: 230px; }
.chart-wrap.mid { height: 290px; }

.chart-legend-stats { display: flex; gap: 24px; flex-wrap: wrap; padding: 4px 22px; }
.chart-legend-stats .item .l { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.chart-legend-stats .item .v { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; color: #fff; }

/* ---------- Tabelas ---------- */
.table-wrap { overflow-x: auto; }
table.data {
  width: 100%; border-collapse: collapse; font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
table.data th {
  text-align: left; padding: 12px 14px; font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; color: var(--text-dim);
  border-bottom: 1px solid var(--border-strong); white-space: nowrap;
  background: rgba(5, 11, 26, .4);
}
table.data td { padding: 12px 14px; border-bottom: 1px solid rgba(91, 147, 245, .07); white-space: nowrap; color: var(--text-2); }
table.data td strong { color: #fff; }
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover { background: rgba(46, 116, 240, .05); }
table.data td.num, table.data th.num { text-align: right; }

.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; padding: 16px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 8px; border-radius: 8px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--border); color: var(--text-dim); background: rgba(5, 11, 26, .4);
}
.pagination a:hover { border-color: var(--blue-500); color: var(--blue-100); }
.pagination .current { background: var(--blue-600); color: #fff; border-color: var(--blue-600); box-shadow: var(--glow-blue); }
.pagination .dots { border: 0; background: transparent; }

/* ---------- Formulários ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 12px; font-size: 14px; }
.field textarea { resize: vertical; min-height: 90px; }
.field .help { font-size: 12px; color: var(--muted); margin-top: 4px; }

.alert { border-radius: var(--radius-sm); padding: 13px 16px; font-size: 13.5px; margin-bottom: 18px; border: 1px solid transparent; backdrop-filter: blur(6px); }
.alert-success { background: rgba(16, 185, 129, .1); color: #5ee6b6; border-color: rgba(16, 185, 129, .3); }
.alert-error { background: rgba(240, 71, 90, .1); color: #ff8f9c; border-color: rgba(240, 71, 90, .3); }
.alert-info { background: rgba(46, 116, 240, .1); color: var(--blue-400); border-color: rgba(46, 116, 240, .3); }
.alert ul { margin: 6px 0 0 18px; }
.alert a { text-decoration: underline; }

/* ---------- Login ---------- */
.login-page {
  min-height: 100vh; display: grid; place-items: center;
  padding: 24px;
}
.login-box { width: 100%; max-width: 400px; }
.login-box .card-body { padding: 34px; }
.login-brand { text-align: center; margin-bottom: 26px; }
.login-brand .logo-mark {
  width: 54px; height: 54px; border-radius: 15px; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-400));
  display: grid; place-items: center; font-weight: 800; font-size: 22px; color: #fff;
  box-shadow: var(--glow-blue);
}
.login-brand h1 { font-size: 20px; letter-spacing: 3px; color: #fff; }
.login-brand p { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--text-dim); margin-top: 4px; }

/* ---------- Admin layout ---------- */
.admin-shell { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 244px; flex-shrink: 0;
  background: rgba(5, 11, 26, .85);
  backdrop-filter: blur(14px);
  border-right: 1px solid var(--border);
  color: var(--text-dim); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.admin-sidebar .brand { padding: 20px 20px 16px; border-bottom: 1px solid var(--border); }
.admin-sidebar nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.admin-sidebar nav a {
  display: flex; align-items: center; gap: 11px; color: var(--text-dim);
  padding: 10px 12px; border-radius: 9px; font-size: 13.5px; font-weight: 500; transition: all .13s;
}
.admin-sidebar nav a:hover { color: #fff; background: rgba(91, 147, 245, .08); }
.admin-sidebar nav a.active {
  color: #fff; background: rgba(46, 116, 240, .18);
  box-shadow: inset 0 0 0 1px rgba(46, 116, 240, .3);
}
.admin-sidebar nav a svg { flex-shrink: 0; opacity: .8; }
.admin-sidebar .side-foot { padding: 14px 20px; border-top: 1px solid var(--border); font-size: 12.5px; }
.admin-sidebar .side-foot .u { color: var(--text); font-weight: 600; }
.admin-sidebar .side-foot a { color: var(--blue-400); font-size: 12px; }

.admin-main { flex: 1; min-width: 0; }
.admin-topbar {
  background: rgba(5, 11, 26, .7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 28px; height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  position: sticky; top: 0; z-index: 50;
}
.admin-topbar h1 { font-size: 17px; font-weight: 700; color: #fff; }
.admin-content { padding: 26px 28px 60px; max-width: 1240px; }

.admin-menu-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 8px; padding: 7px 9px; cursor: pointer; color: var(--text-2); }

/* ---------- Landing / hero ---------- */
.hero { color: #fff; padding: 84px 28px 90px; position: relative; }
.hero .inner { max-width: 1440px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 42px; line-height: 1.14; font-weight: 800; letter-spacing: -.8px; }
.hero h1 .hl {
  background: linear-gradient(120deg, var(--blue-400), #7fb0ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { color: var(--text-dim); font-size: 16.5px; margin-top: 16px; max-width: 540px; }
.hero .actions { margin-top: 30px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero .mini-stats { margin-top: 44px; display: flex; gap: 40px; flex-wrap: wrap; }
.hero .mini-stats .v { font-size: 23px; font-weight: 800; font-variant-numeric: tabular-nums; color: #fff; }
.hero .mini-stats .l { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.2px; margin-top: 2px; }

.hero-chart-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px; padding: 22px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg);
  animation: cardIn .6s ease both .15s;
}
.hero-chart-card .t { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--text-dim); margin-bottom: 12px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.hero-chart-card .v { color: var(--green-600); font-weight: 700; }

.section { padding: 56px 28px; position: relative; }
.section .inner { max-width: 1440px; margin: 0 auto; }
.section h2.sec-title { font-size: 27px; font-weight: 800; color: #fff; letter-spacing: -.4px; }
.section p.sec-sub { color: var(--text-dim); margin-top: 4px; margin-bottom: 28px; }
.section.alt { background: rgba(7, 16, 34, .5); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); backdrop-filter: blur(10px);
  transition: transform .2s, border-color .2s;
  animation: cardIn .5s ease both;
}
.feature-grid .feature:nth-child(2) { animation-delay: .1s; }
.feature-grid .feature:nth-child(3) { animation-delay: .2s; }
.feature:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.feature .ic {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(46, 116, 240, .14); color: var(--blue-400);
  display: grid; place-items: center; margin-bottom: 15px;
  box-shadow: 0 0 16px rgba(46, 116, 240, .2), inset 0 0 0 1px rgba(46, 116, 240, .28);
}
.feature h3 { font-size: 15.5px; color: #fff; margin-bottom: 6px; }
.feature p { font-size: 13.5px; color: var(--text-dim); }

/* ---------- Rodapé ---------- */
.site-footer {
  background: rgba(4, 9, 20, .8);
  border-top: 1px solid var(--border);
  color: var(--text-dim); padding: 38px 28px; margin-top: 0;
  backdrop-filter: blur(10px);
}
.site-footer .inner { max-width: 1440px; margin: 0 auto; }
.site-footer .disclaimer {
  font-size: 12.5px; line-height: 1.6; color: var(--muted); border-top: 1px solid var(--border);
  padding-top: 18px; margin-top: 18px;
}
.site-footer .top { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }

.disclaimer-box {
  background: rgba(143, 162, 192, .05); border: 1px solid var(--border);
  border-left: 3px solid rgba(143, 162, 192, .35);
  border-radius: var(--radius-sm); padding: 14px 18px; font-size: 12.5px; color: var(--muted);
  margin-top: 28px; line-height: 1.6;
}

/* ---------- Import dropzone ---------- */
.dropzone {
  border: 2px dashed rgba(91, 147, 245, .3); border-radius: var(--radius);
  padding: 40px 24px; text-align: center; color: var(--text-dim);
  background: rgba(5, 11, 26, .35); transition: all .18s; cursor: pointer; display: block;
}
.dropzone:hover, .dropzone.drag { border-color: var(--blue-500); background: rgba(46, 116, 240, .08); color: var(--blue-400); }
.dropzone input[type=file] { display: none; }

pre.code-sample {
  background: rgba(3, 7, 16, .8); color: #c8d6ee;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px; font-size: 12.5px; overflow-x: auto; line-height: 1.7;
  font-family: Consolas, 'Courier New', monospace;
}

/* ---------- Polimento premium ---------- */

/* Scrollbar dark */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(91, 147, 245, .22); border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: rgba(91, 147, 245, .4); }
::selection { background: rgba(46, 116, 240, .35); color: #fff; }

/* Linha de brilho no topo dos cards ao passar o mouse */
.kpi, .card, .robot-card { position: relative; }
.kpi::before, .robot-card::before {
  content: ''; position: absolute; top: 0; left: 14px; right: 14px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(91, 147, 245, .55), transparent);
  opacity: 0; transition: opacity .25s;
}
.kpi:hover::before, .robot-card:hover::before { opacity: 1; }

/* Ícone do KPI cresce levemente no hover */
.kpi .ic { transition: transform .2s ease; }
.kpi:hover .ic { transform: scale(1.1) rotate(-3deg); }

/* Brilho varrendo os botões principais */
.btn { position: relative; overflow: hidden; }
.btn:not(.btn-ghost):not(.btn-outline)::after {
  content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .22), transparent);
  transform: skewX(-20deg); transition: left .45s ease;
}
.btn:not(.btn-ghost):not(.btn-outline):hover::after { left: 130%; }

/* Sparkline nos cards de robô */
.spark-wrap {
  height: 58px; padding: 10px 18px 0; position: relative;
  border-bottom: 1px solid rgba(91, 147, 245, .08);
}

/* Cabeçalho do card de robô com reflexo sutil */
.robot-card .head { position: relative; overflow: hidden; }
.robot-card .head::after {
  content: ''; position: absolute; top: -60%; right: -20%; width: 60%; height: 200%;
  background: radial-gradient(circle, rgba(91, 147, 245, .13), transparent 70%);
  pointer-events: none;
}

/* Títulos de gráfico com ícone brilhante */
.chart-card .chart-head h2 svg { filter: drop-shadow(0 0 6px currentColor); }

/* Zebra sutil nas tabelas */
table.data tbody tr:nth-child(even) { background: rgba(91, 147, 245, .025); }
table.data tbody tr:nth-child(even):hover { background: rgba(46, 116, 240, .06); }

/* Página: título com barra de destaque */
.page-head h1 { position: relative; display: inline-block; padding-bottom: 2px; }
.page-head .flex h1 { padding-bottom: 0; }
.page-head > div > h1::after, .page-head > h1::after {
  content: ''; position: absolute; left: 0; bottom: -6px; width: 44px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--blue-500), transparent);
  box-shadow: 0 0 10px rgba(46, 116, 240, .5);
}

/* Filter bar com respiro melhor */
.filter-bar { row-gap: 10px; }

/* ---------- Responsivo ---------- */
@media (max-width: 1080px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .hero .inner { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
}

@media (max-width: 860px) {
  .main-nav {
    display: none; position: absolute; top: 66px; left: 0; right: 0;
    background: rgba(5, 11, 26, .97); flex-direction: column; align-items: stretch;
    padding: 10px 16px 16px; gap: 4px; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg); backdrop-filter: blur(16px);
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }

  .admin-sidebar {
    position: fixed; z-index: 200; left: -260px; transition: left .2s ease; height: 100vh;
    background: rgba(5, 11, 26, .98);
  }
  .admin-sidebar.open { left: 0; box-shadow: var(--shadow-lg); }
  .admin-menu-toggle { display: inline-flex; }
  .admin-content { padding: 20px 16px 60px; }
  .admin-topbar { padding: 0 16px; }
  .form-grid, .form-grid.cols-4 { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .kpi-grid, .kpi-grid.cols-3 { grid-template-columns: 1fr 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .container { padding: 20px 14px 48px; }
  .chart-wrap { height: 280px; padding: 8px; }
  .robot-card .stats { grid-template-columns: 1fr 1fr; }
  .filter-bar .dates { margin-left: 0; }
  .hero { padding: 48px 18px 56px; }
  .hero h1 { font-size: 27px; }
  .kpi .value { font-size: 17px; }
  .kpi .ic { width: 36px; height: 36px; }
  .bg-fx .fx-chart { min-width: 380px; }
}

@media (max-width: 420px) {
  .kpi-grid, .kpi-grid.cols-3 { grid-template-columns: 1fr; }
}
