/* ===========================
   Bootstrap Theme Overrides
   =========================== */

[data-bs-theme="dark"] {
  --bs-body-bg: #1a1a1a;
  --bs-body-color: #ffffff;
  --bs-primary: #5DFF9B;
  --bs-primary-rgb: 93, 255, 155;
  --bs-secondary-color: #e0e0e0;
  --bs-tertiary-color: #bbbbbb;
  --bs-danger: #ff4466;
  --bs-danger-rgb: 255, 68, 102;
  --bs-warning: #ffcc00;
  --bs-warning-rgb: 255, 204, 0;
  --bs-border-radius: 8px;
  --bs-font-sans-serif: 'Montserrat', sans-serif;
  --bs-link-color: #5DFF9B;
  --bs-link-hover-color: #39FF88;

  /* Custom vars sem equivalente Bootstrap */
  --neon: #5DFF9B;
  --neon-hover: #39FF88;
  --neon-dim: rgba(93, 255, 155, 0.05);
  --neon-glow: 0 0 12px rgba(93, 255, 155, 0.6);
  --card: #242424;
  --bg-header: #222226;
  --border: rgba(93, 255, 155, 0.25);
  --red: #ff4466;
  --yellow: #ffcc00;
  --min-viewport: 380px;
}

/* ===========================
   Base / Global
   =========================== */

html {
  scroll-behavior: smooth;
  min-width: var(--min-viewport);
}

body {
  font-family: 'Montserrat', sans-serif;
  min-width: var(--min-viewport);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  padding: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--neon) var(--bs-body-bg);
}

h1 {
  font-size: 4.0625rem;
  font-weight: 700;
}

a {
  transition: color 0.2s;
}

/* ===========================
   Fade-in animations
   =========================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.fade-in-d1 {
  animation-delay: 0.1s;
}

.fade-in-d2 {
  animation-delay: 0.2s;
}

.fade-in-d3 {
  animation-delay: 0.3s;
}

.fade-in-d4 {
  animation-delay: 0.4s;
}

/* ===========================
   Toast slide-up
   =========================== */

.toast {
  transition: transform 0.4s ease, opacity 0.4s ease;
  transform: translateX(100%);
  opacity: 0;
}

.toast.showing,
.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.hiding {
  transform: translateX(100%);
  opacity: 0;
}

/* ===========================
   Navbar (Bootstrap override)
   =========================== */

/* Navbar desktop: links centralizados */
@media (min-width: 768px) {
  .navbar {
    position: relative;
  }

  .navbar .offcanvas-body {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }
}

/* Navbar mobile: hamburger left, logo centered */
@media (max-width: 767.98px) {
  .navbar {
    position: relative;
    justify-content: center;
  }

  .navbar-toggler {
    position: absolute;
    left: 0;
  }

  .navbar-brand {
    margin: 0;
  }
}

/* Offcanvas drawer (mobile) */
.offcanvas {
  background: var(--bg-header) !important;
  border-right: 1px solid rgba(93, 255, 155, 0.12) !important;
  max-width: 280px;
}

.offcanvas-header {
  border-bottom: 1px solid rgba(93, 255, 155, 0.08);
}

.offcanvas-body .navbar-nav {
  gap: 0.25rem;
}

.offcanvas-body .nav-link {
  padding: 0.75rem 1rem;
  border-radius: var(--bs-border-radius);
  transition: background 0.15s, color 0.15s;
}

.offcanvas-body .nav-link:hover {
  background: rgba(93, 255, 155, 0.05);
}

.nav-link.active {
  color: var(--neon) !important;
  font-weight: 600;
  position: relative;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 2px;
  background: var(--neon);
  border-radius: 1px;
}

.nav-link:hover {
  color: var(--neon-hover) !important;
}

/* ===========================
   Hero (index.html)
   =========================== */

.hero__title {
  font-size: 4.0625rem;
  font-weight: 700;
  color: var(--neon);
  line-height: 1.1;
  margin-bottom: 28px;
}

@media (max-width: 767.98px) {

  .hero__title,
  .section-hero h1,
  .research-hero h1 {
    font-size: 2.625rem;
  }

  .success-page__card {
    padding: 36px 24px;
  }
}

/* ===========================
   CTA Button
   =========================== */

.cta-btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  background: transparent;
  border: 1.5px solid rgba(93, 255, 155, 0.18);
  color: var(--bs-body-color);
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: background .20s ease, transform .12s ease, box-shadow .12s ease, color .12s ease;
}

.cta-btn:hover {
  background: rgba(93, 255, 155, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(93, 255, 155, 0.06);
  color: var(--bs-body-color);
}

.cta-btn:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(93, 255, 155, 0.06);
}

/* ===========================
   About page (two-col media backgrounds)
   =========================== */

.section-hero h1 {
  font-size: 4.0625rem;
  font-weight: 700;
  color: var(--neon);
  margin-bottom: 20px;
}

.two-col__media {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  min-height: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.two-col__media--motivation {
  background-image: url(../assets/motivacao.svg);
}

.two-col__media--solution {
  background-image: url(../assets/solucao.svg);
}

/* ===========================
   Research page
   =========================== */

.research-hero {
  padding: 64px 0 20px;
  text-align: left;
}

.research-hero h1 {
  font-size: 4.0625rem;
  font-weight: 700;
  color: var(--neon);
  margin-bottom: 28px;
  line-height: 1.2;
}

.table__platform {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--bs-body-color);
}

.table__badge {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 800;
}

.badge--high {
  background: rgba(93, 255, 155, 0.12);
  color: var(--neon);
  border: 1px solid rgba(93, 255, 155, 0.3);
}

.badge--medium {
  background: rgba(255, 204, 0, 0.12);
  color: var(--yellow);
  border: 1px solid rgba(255, 204, 0, 0.3);
}

.research-section {
  padding: 48px 0;
  border-top: 1px solid rgba(93, 255, 155, 0.1);
}

.media-block {
  margin: 40px 0 0;
  border-radius: var(--bs-border-radius);
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.media-block video {
  width: 100%;
  max-width: 1030px;
  aspect-ratio: 1030 / 557;
  border-radius: var(--bs-border-radius);
  border: 1px solid var(--border);
  display: block;
  object-fit: cover;
}


/* ===========================
   Success page
   =========================== */

.success-page__bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 40px;
  opacity: 0.25;
  filter: blur(3px);
  pointer-events: none;
}

.success-page__bg img {
  max-width: 460px;
}

.success-page__card {
  position: relative;
  z-index: 1;
  background: #1e2a1e;
  border: 1.5px solid var(--neon);
  border-radius: 16px;
  padding: 56px 52px;
  text-align: center;
  max-width: 480px;
  width: 100%;
}

.success-page__card h2 {
  font-size: 2.625rem;
  font-weight: 800;
  color: var(--neon);
  margin-bottom: 16px;
}

.success-page__card p {
  font-size: 1rem;
  font-weight: normal;
  color: var(--bs-secondary-color);
  line-height: 1.7;
  margin-bottom: 32px;
}

.success-page__cta {
  display: inline-block;
  padding: 10px 32px;
  background: transparent;
  color: var(--bs-body-color);
  border: 1.5px solid var(--neon);
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.success-page__cta:hover {
  background: rgba(93, 255, 155, 0.1);
  color: var(--neon);
}

/* ===========================
   Dashboard (test.html)
   =========================== */

.dashboard {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  background: var(--bg-header);
  border-right: 1px solid rgba(93, 255, 155, 0.06);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar .nav__logo {
  height: 48px;
}

.nav-vertical ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-vertical a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--bs-secondary-color);
  padding: 10px;
  border-radius: 8px;
  width: 100%;
  transition: background .15s, color .15s, transform .12s;
}

.nav-vertical a:hover {
  background: rgba(93, 255, 155, 0.03);
  color: var(--neon);
  transform: translateX(6px);
}

.nav-vertical img.icon {
  width: 20px;
  height: 20px;
}

.main-dashboard {
  flex: 1;
  padding: 28px 36px;
  overflow: auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.greeting {
  display: flex;
  align-items: center;
  gap: 14px;
}

.greeting img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
}

.greeting h2 {
  color: var(--neon);
  margin: 0;
  font-size: 1.25rem;
}

.greeting p {
  margin: 0;
  color: var(--bs-secondary-color);
  font-size: 0.8125rem;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.metric-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 22px;
  border-radius: 14px;
  display: block;
  transition: transform .12s, box-shadow .12s;
  position: relative;
  overflow: hidden;
}

.metric-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--neon-glow);
}

.metric-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.metric-badge img {
  width: 24px;
  height: 24px;
  display: block;
}

.metric-meta {
  margin-left: 0;
}

.metric-label {
  color: var(--bs-secondary-color);
  font-size: 0.875rem;
  margin-bottom: 8px;
}

.metric-value {
  font-size: 2rem;
  font-weight: 600;
  color: var(--bs-body-color);
  line-height: 1;
  margin-bottom: 8px;
}

.metric-percent {
  font-size: 0.875rem;
  color: var(--bs-secondary-color);
  display: inline-block;
}

.metric-percent .percent-number {
  font-weight: 700;
  margin-right: 8px;
}

.metric-percent .percent-note {
  color: var(--bs-secondary-color);
  font-weight: 400;
  opacity: 0.9;
}

.metric-percent .percent-number.positive {
  color: #27e36a;
}

.metric-percent .percent-number.negative {
  color: var(--red);
}

.metric-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.transactions {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}

.transactions-header {
  padding-left: 8px;
}

.transactions-header h1 {
  margin: 0 0 4px 0;
  color: var(--bs-body-color);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
}

.transactions-subtitle {
  margin: 0 0 10px 0;
  color: var(--bs-secondary-color);
  font-size: 0.875rem;
  font-weight: 300;
}

.transaction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background .12s;
}

.transaction-item:last-child {
  border-bottom: none;
}

.transaction-item:hover {
  background: rgba(93, 255, 155, 0.03);
}

.trans-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trans-avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
}

.trans-title {
  font-weight: 700;
  color: var(--bs-body-color);
  font-size: 0.875rem;
}

.trans-meta {
  font-size: 0.75rem;
  color: var(--bs-tertiary-color);
}

.trans-amount {
  font-weight: 800;
}

.trans-amount.positive {
  color: #27e36a;
}

.trans-amount.negative {
  color: var(--red);
}

.footer-dashboard {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--bs-tertiary-color);
}


@media (max-width: 991.98px) {
  .metrics {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .main-dashboard {
    padding: 18px;
  }

  .metric-value {
    font-size: 1.75rem;
  }

  .topbar {
    gap: 8px;
  }

  .greeting {
    margin-left: 6px;
  }

  .transactions {
    padding: 14px;
  }

  .transaction-item {
    padding: 10px 6px;
  }

  .trans-title {
    font-size: 0.8125rem;
  }

  .trans-meta {
    font-size: 0.6875rem;
  }
}

/* Dashboard body layout */
body.dashboard-body {
  background-color: #1a1a1a !important;
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  margin: 0;
}

.dashboard-body .dashboard-wrapper {
  display: flex;
  width: 100%;
  height: 100%;
}

.dashboard-body .sidebar {
  min-width: 260px;
  max-width: 260px;
  height: 100vh;
  background: var(--bg-header) !important;
  border-right: 1px solid rgba(93, 255, 155, 0.1);
  flex-shrink: 0;
}

.dashboard-body .main-content {
  flex-grow: 1;
  height: 100vh;
  overflow-y: auto;
  background-color: #1a1a1a;
  padding: 2rem;
}

.dashboard-body .metric-card {
  background: #242424;
  border: 1px solid rgba(93, 255, 155, 0.2);
  transition: transform 0.2s, box-shadow 0.2s;
}

.dashboard-body .metric-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 15px rgba(93, 255, 155, 0.1);
}

.dashboard-body .main-content::-webkit-scrollbar {
  width: 6px;
}

.dashboard-body .main-content::-webkit-scrollbar-thumb {
  background: #5DFF9B;
  border-radius: 10px;
}


/* ===========================
   Bootstrap Modal overrides
   =========================== */

.modal-content {
  border-radius: 16px;
  box-shadow: 0 0 30px rgba(93, 255, 155, 0.15), 0 15px 40px rgba(0, 0, 0, 0.8);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--neon);
  box-shadow: none;
  background: #1a1a20;
}

.form-control.is-invalid:focus,
.form-control.is-valid:focus,
.form-control.is-invalid,
.form-control.is-valid {
  box-shadow: none !important;
  background-image: none !important;
}

.input-group:focus-within {
  border-radius: var(--bs-border-radius);
  box-shadow: none !important;
}

.input-group:focus-within .input-group-text,
.input-group:focus-within .form-control,
.input-group:focus-within .toggle-password,
.input-group:focus-within .btn {
  border-color: var(--neon) !important;
}

/* Tratamento de Erro (is-invalid) sobrepondo o verde */
.input-group:has(.is-invalid):focus-within {
  box-shadow: none !important;
}

.input-group:has(.is-invalid) .input-group-text,
.input-group:has(.is-invalid) .form-control,
.input-group:has(.is-invalid) .toggle-password {
  border-color: var(--red) !important;
}

.input-group:has(.is-valid):focus-within {
  box-shadow: 0 0 0 4px rgba(57, 255, 136, 0.15) !important;
}

.input-group:has(.is-valid) .form-control,
.input-group:has(.is-valid) .input-group-text,
.input-group:has(.is-valid) .toggle-password,
.input-group:has(.is-valid) .btn {
  border-color: var(--bs-form-valid-border-color) !important;
}

.form-check-input:checked {
  background-color: var(--neon) !important;
  border-color: var(--neon) !important;
}

.form-check-input.is-valid:checked {
  background-color: var(--bs-form-valid-border-color) !important;
  border-color: var(--bs-form-valid-border-color) !important;
}

.form-check-input.is-invalid {
  border-color: var(--bs-form-invalid-border-color) !important;
}

/* Remover ícones de fundo do Bootstrap nas validações para não encavalar */
input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #121214 inset !important;
  -webkit-text-fill-color: var(--bs-body-color) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.icon-emoji {
  font-size: 2.5rem;
  margin: 0;
  line-height: 1;
}

.title-danger {
  color: var(--red);
  text-shadow: 0 0 15px rgba(255, 68, 102, 0.4);
  margin-bottom: 16px;
  font-size: 1.5rem;
  font-weight: 700;
}

.btn-danger {
  background: var(--red);
  color: #121214;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(255, 68, 102, 0.4);
}

.btn-danger:hover {
  background: #ff6680;
  box-shadow: 0 0 25px rgba(255, 68, 102, 0.8);
  transform: translateY(-2px);
}

#modal-duplicate .modal-content-custom {
  border: 1px solid rgba(255, 204, 0, 0.3);
  box-shadow: 0 0 30px rgba(255, 204, 0, 0.15), 0 15px 40px rgba(0, 0, 0, 0.8);
}

.title-warning {
  color: var(--yellow);
  text-shadow: 0 0 15px rgba(255, 204, 0, 0.4);
  margin-bottom: 16px;
  font-size: 1.5rem;
  font-weight: 700;
}

.btn-warning {
  background: var(--yellow);
  color: #121214;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(255, 204, 0, 0.4);
}

.btn-warning:hover {
  background: #ffe066;
  box-shadow: 0 0 25px rgba(255, 204, 0, 0.8);
  transform: translateY(-2px);
}

.btn-edit,
.btn-delete {
  background: var(--bg-header);
  border: 1px solid transparent;
  color: var(--bs-tertiary-color);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.btn-edit:hover,
.btn-edit:focus-visible {
  color: var(--neon);
  background: rgba(93, 255, 155, 0.1);
  border: 1px solid rgba(93, 255, 155, 0.3);
  box-shadow: 0 0 10px rgba(93, 255, 155, 0.3);
  outline: none;
}

.btn-delete:hover,
.btn-delete:focus-visible {
  color: var(--red);
  background: rgba(255, 68, 102, 0.1);
  border: 1px solid rgba(255, 68, 102, 0.3);
  box-shadow: 0 0 10px rgba(255, 68, 102, 0.3);
  outline: none;
}

/* Projeção Financeira */
.projection-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}

/* Animação de entrada do ícone de sucesso no modal */
@keyframes popIn {
  0%   { transform: scale(0.5); opacity: 0; }
  70%  { transform: scale(1.1); }
  100% { transform: scale(1);   opacity: 1; }
}

#modal-sucesso .modal-content {
  animation: none;
}

#modal-sucesso.show .modal-content > .modal-body > div:first-child {
  animation: popIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}