/* ============ Design tokens ============ */
:root {
  --bg: #0A0E0D;
  --surface: #121815;
  --surface-2: #1A211D;
  --border: #223028;
  --text: #E8F0EC;
  --text-muted: #8FA39A;

  --accent: #00D68A;
  --accent-dim: #0B5C43;
  --accent-glow: rgba(0, 214, 138, 0.18);

  --danger: #FF5A6E;
  --warning: #FFB020;

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============ Navbar ============ */
.navbar {
  border-bottom: 1px solid var(--border);
  background: rgba(10, 14, 13, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}
.navbar-links { display: flex; align-items: center; gap: 20px; }
.navbar-links a { color: var(--text-muted); font-size: 14px; font-weight: 500; }
.navbar-links a:hover { color: var(--text); text-decoration: none; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font-body);
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #04140D; }
.btn-primary:hover { background: #00E896; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: 14px 26px; font-size: 15px; }
.btn-block { width: 100%; margin-top: 8px; }

/* ============ Flash messages ============ */
.flash-stack { max-width: 1080px; margin: 16px auto 0; padding: 0 24px; }
.flash {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 10px;
  font-size: 14px;
  border: 1px solid var(--border);
}
.flash-success { border-color: var(--accent-dim); color: var(--accent); }
.flash-error { border-color: var(--danger); color: var(--danger); }
.flash-info { color: var(--text-muted); }

/* ============ Hero ============ */
.hero { padding: 96px 24px 64px; text-align: center; }
.hero-inner { max-width: 720px; margin: 0 auto; }
.hero h1 {
  font-size: 44px;
  line-height: 1.15;
  margin: 32px 0 16px;
}
.hero-subtitle {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 560px;
  margin: 0 auto 32px;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; }

/* Signature element: linha de fluxo PIX -> DePix com pulso animado */
.flow-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 32px;
  padding: 28px 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  max-width: fit-content;
  margin-left: auto;
  margin-right: auto;
}
.flow-node {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.flow-node-start { color: var(--text); }
.flow-node-end { color: var(--accent); border-color: var(--accent-dim); box-shadow: 0 0 0 1px var(--accent-dim); }
.flow-track {
  position: relative;
  width: 220px;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.flow-pulse {
  position: absolute;
  top: -4.5px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px 2px var(--accent-glow);
  animation: flow 2.2s ease-in-out infinite;
}
@keyframes flow {
  0%   { left: -12px; opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .flow-pulse { animation: none; left: 50%; opacity: 1; }
}
@media (max-width: 640px) {
  .flow-line { padding: 20px; gap: 12px; }
  .flow-node { font-size: 15px; padding: 9px 14px; }
  .flow-track { width: 100px; }
}

/* ============ Features ============ */
.features { padding: 32px 24px 96px; }
.features-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.feature-index {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 13px;
}
.feature-card h3 { margin-top: 12px; font-size: 17px; }
.feature-card p { color: var(--text-muted); font-size: 14px; margin: 0; }

/* ============ Generic simple page ============ */
.page-simple { padding: 64px 24px; }
.page-simple-inner { max-width: 640px; margin: 0 auto; }

.step-block { display: flex; gap: 18px; margin-bottom: 32px; }
.step-number { font-family: var(--font-mono); color: var(--accent); font-size: 14px; flex-shrink: 0; }
.step-block h3 { font-size: 16px; margin-bottom: 4px; }
.step-block p { color: var(--text-muted); font-size: 14px; margin: 0; }

/* ============ Auth ============ */
.auth-page { padding: 64px 24px; display: flex; justify-content: center; }
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
}
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field-hint { display: block; font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.field-error { display: block; font-size: 12px; color: var(--danger); margin-top: 4px; }
.form-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.auth-switch { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 20px; }

/* ============ Deposito: layout 2 colunas + valores rapidos ============ */
.deposit-layout {
  display: grid;
  grid-template-columns: minmax(0, 420px) 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 720px) {
  .deposit-layout { grid-template-columns: 1fr; }
}
.quick-amounts { display: flex; gap: 8px; margin: -6px 0 16px; flex-wrap: wrap; }
.quick-amount-btn {
  flex: 1;
  min-width: 64px;
  padding: 8px 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
}
.quick-amount-btn:hover { border-color: var(--accent); color: var(--accent); }

.fee-breakdown {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.fee-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  padding: 4px 0;
}
.fee-row-net {
  border-top: 1px dashed var(--border);
  margin-top: 4px;
  padding-top: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.fee-row-net span:last-child { color: var(--accent); font-family: var(--font-mono); }

.info-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.info-panel-title { font-size: 15px; margin-bottom: 16px; }
.info-step { display: flex; gap: 12px; margin-bottom: 18px; }
.info-step:last-child { margin-bottom: 0; }
.info-step-num {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent-glow);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.info-step strong { font-size: 13px; display: block; margin-bottom: 2px; }
.info-step p { font-size: 13px; color: var(--text-muted); margin: 0; }

/* ============ App shell (área logada, menu lateral) ============ */
.app-body { margin: 0; }
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.app-sidebar-brand { margin-bottom: 28px; padding: 0 6px; }
.app-sidebar-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.app-sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}
.app-sidebar-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.app-sidebar-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.app-sidebar-link.is-active { background: var(--accent-glow); color: var(--accent); }
.app-sidebar-link.is-disabled { opacity: 0.4; cursor: not-allowed; }
.app-sidebar-footer { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; }
.app-sidebar-user { font-size: 12px; color: var(--text-muted); padding: 0 10px 8px; }
.app-main { flex: 1; padding: 32px 40px; max-width: 920px; }

@media (max-width: 720px) {
  .app-shell { flex-direction: column; }
  .app-sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    padding: 12px 14px;
  }
  .app-sidebar-brand { margin-bottom: 0; margin-right: 12px; }
  .app-sidebar-nav { flex-direction: row; }
  .app-sidebar-footer { border-top: none; border-left: 1px solid var(--border); padding-top: 0; padding-left: 12px; margin-top: 0; margin-left: 12px; display: flex; align-items: center; gap: 10px; }
  .app-sidebar-user { display: none; }
  .app-main { padding: 20px; }
}

/* ============ Dashboard ============ */
.cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}
.balance-card {
  background: var(--surface);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}
.balance-label { font-size: 13px; color: var(--text-muted); }
.balance-value { font-family: var(--font-mono); font-size: 32px; font-weight: 600; font-variant-numeric: tabular-nums; }

.coming-soon-card {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 16px;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.section-subtitle { font-size: 16px; margin-bottom: 12px; }

.tx-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tx-table th, .tx-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.tx-table th { color: var(--text-muted); font-weight: 500; font-size: 12px; text-transform: uppercase; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-family: var(--font-mono);
}
.badge-approved { background: var(--accent-glow); color: var(--accent); }
.badge-pending, .badge-under_review { background: rgba(255, 176, 32, 0.15); color: var(--warning); }
.badge-failed { background: rgba(255, 90, 110, 0.15); color: var(--danger); }

.empty-state { color: var(--text-muted); font-size: 14px; }

/* ============ Footer ============ */
.site-footer { border-top: 1px solid var(--border); padding: 24px; margin-top: 48px; }
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ============ Responsive ============ */
@media (max-width: 640px) {
  .hero h1 { font-size: 32px; }
  .navbar-links { gap: 12px; }
  .navbar-links a { font-size: 13px; }
  .hero-cta { flex-direction: column; }
}
