/* Layout Principal */
* {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Ubuntu", "Segoe UI", "Helvetica Neue", sans-serif;
}

a {
  text-decoration: none;
  color: #b8c9df;
}

/* CORES */
:root {
  --color-url-shortened: #e685b5;
  --color-url-links: #b8c9df;
  --color-app-url-links: #008f7a;
  --color-app-form-green: #008f7a;
  --color-app-form-red: #e685b5;
}

/* DASHBOARD */
.card-body {
  background-color: #161e25;
  border-radius: 0 0 10px 10px;
}

.card {
  background-color: #161e25 !important;
}

.card .list-group-item {
  background-color: #161e25 !important;
  color: var(--color-url-links) !important;
}

.card ul li .badge {
  background-color: #7562b8 !important;
  color: #e5f0ff !important;
  font-weight: normal !important;
}

.sidebar {
  width: 250px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background-color: #212529;
  padding-top: 20px;
  transition: all 0.3s;
  z-index: 1000;
}

.main-content {
  padding: 20px;
  width: calc(100% - 250px);
  margin-left: 250px; /* Empurra o conteúdo para a direita da sidebar */
  transition: all 0.3s;
}

.text-green {
  color: var(--color-app-form-green);
}

/* Estilos para a navegação na Sidebar */
.sidebar {
  background-color: #2d3741;
}

/* Customizando cores dos ícones Font Awesome Duotone */
.sidebar .nav-link .fad {
  --fa-primary-color: #aab2bd; /* Cor principal (mais clara) */
  --fa-secondary-color: #495057; /* Cor secundária (mais escura) */
  --fa-primary-opacity: 1;
  --fa-secondary-opacity: 0.8;
}

.sidebar .navbar-brand {
  padding: 0 1.5rem 1rem 1.5rem;
  font-size: 1.5rem;
}

.sidebar .nav-link {
  padding: 0.75rem 1.5rem;
  color: rgba(255, 255, 255, 0.75);
}

.sidebar .nav-link:hover {
  background-color: #343a40;
  color: #fff;
}

.sidebar .nav-link.active {
  color: #fff;
  font-weight: bold;
}

/* Botão de Toggle para Mobile (hambúrguer) */
.mobile-toggler {
  display: none; /* Escondido no desktop */
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1100;
  background: #343a40;
  border: 1px solid #495057;
}

/* Layout Responsivo para Telas Menores */
@media (max-width: 991.98px) {
  .sidebar {
    left: -250px; /* Esconde a sidebar para fora da tela */
  }

  .sidebar.active {
    left: 0; /* Mostra a sidebar quando ativa */
  }

  .main-content {
    width: 100%;
    margin-left: 0;
  }

  .mobile-toggler {
    display: block; /* Mostra o botão hambúrguer no mobile */
  }
}

/* Estilos para o Toast com Barra de Progresso */
/* Estilos para o Toast com Barra de Progresso */
.toast {
  position: relative; /* ESSENCIAL: Torna o toast o "pai" posicional da barra */
  overflow: hidden; /* Garante que a barra não "vaze" para fora das bordas arredondadas */
}

.toast-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.7);
}

/* Quando o toast é exibido, a animação da barra começa */
.toast.show .toast-progress-bar {
  animation: progressBarShrink 5s linear forwards;
}

@keyframes progressBarShrink {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

/* ======================================================================== */
/* Estilos para a Validação de Senha em Tempo Real
/* ======================================================================== */
.password-criteria {
  font-size: 0.875em;
  padding-left: 0; /* Remove o padding padrão da lista */
  padding-bottom: 15px;
  list-style-type: none; /* Remove os marcadores padrão da lista */
}

.password-criteria li {
  transition: color 0.3s ease-in-out;
}

.password-criteria li.valid {
  color: #198754; /* Verde Bootstrap 'success' */
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.3);
}

.password-criteria li.invalid {
  color: #cf5460 !important;
}

.password-criteria li.valid::before {
  content: "✓ ";
  font-weight: bold;
}

.password-criteria li.invalid::before {
  content: "✗ ";
  font-weight: bold;
}

/* ======================================================================== */
/* Página Home
/* ======================================================================== */
.color-app-url-links {
  color: var(--color-app-url-links) !important;
}

.navbar {
  background-color: var(--dark-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-brand {
  font-weight: bold;
  color: var(--primary-color) !important;
}

.hero {
  background: linear-gradient(135deg, var(--dark-bg), #343a40);
  min-height: calc(100vh - 70px);
  /* Ajusta para a altura da navbar */
  display: flex;
  align-items: center;
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(
    to right top,
    #845ec2,
    #6b6ac9,
    #5074cb,
    #337cc9,
    #1582c4,
    #0086bf,
    #008ab8,
    #008db0,
    #008fa7,
    #00909a,
    #00908b,
    #008f7a
  );
  opacity: 0.05;
  /* Transparência para o background */
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white;
  max-width: 900px;
  margin: auto;
}

.hero h1 {
  font-size: 3.8rem;
  font-weight: 800;
  margin-bottom: 0.5em;
  letter-spacing: -1px;
  background: linear-gradient(90deg, #89f7fe, #66a6ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p.lead {
  font-size: 1.4rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2em;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--color-app-url-links);
  border: 1px solid var(--color-app-url-links);
}

.features-section {
  background-color: #1a1d20;
  /* Um tom ligeiramente mais claro que o dark-bg */
  padding: 80px 0;
  color: #e0e0e0;
}

.feature-item {
  padding: 30px;
  border-radius: 10px;
  background-color: #2c3034;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  height: 100%;
  /* Garante que todos os cards tenham a mesma altura */
}

.feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  background-color: #343a40;
}

.feature-item i {
  font-size: 3.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  display: block;
}

.feature-item h3 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: white;
}

.feature-item p {
  color: rgba(255, 255, 255, 0.7);
}

.cta-section {
  background: linear-gradient(45deg, #1f2a36, #3b4249);
  padding: 80px 0;
  text-align: center;
  color: white;
}

.cta-section h2 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 1em;
}

.footer {
  background-color: var(--dark-bg);
  color: var(--secondary-color);
  padding: 30px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9em;
}

/* Animações (opcional, pode ser movido para style.css) */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-hero-text {
  animation: fadeInScale 1s ease-out forwards;
}

.animate-feature-item {
  animation: fadeInScale 0.8s ease-out forwards;
  opacity: 0;
  /* Começa invisível */
}

.animate-delay-1 {
  animation-delay: 0.2s;
}

.animate-delay-2 {
  animation-delay: 0.4s;
}

.animate-delay-3 {
  animation-delay: 0.6s;
}

/* Media Queries para responsividade */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p.lead {
    font-size: 1.1rem;
  }

  .feature-item {
    margin-bottom: 30px;
  }
}

/* ======================================================================== */
/* Estilos Customizados para Janelas de Forms
/* ======================================================================== */

.form {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate3d(-50%, -50%, 0);
  width: 90%;
  max-width: 400px;
  padding: 20px;
  overflow: hidden;
  background: inherit;
  border-radius: 12px;
  /* border: 1px solid rgba(255, 255, 255, 0.5); */
  transition: transform 200ms ease-in-out, opacity 100ms linear;
  transition-delay: 600ms;
}

.form:before {
  content: "";
  position: absolute;
  width: 110%;
  height: 110%;
  background: inherit;
  left: -5%;
  top: -5%;
  filter: blur(4px);
  -webkit-filter: blur(4px);
  z-index: -1;
}

.form .forceColor {
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  background-color: rgba(230, 230, 230, 0.123);
  z-index: -1;
}

.form.goAway {
  opacity: 0;
  transform: scale(0.6) translate3d(-50%, -50%, 0);
}

.topbar {
  position: relative;
}

.topbar .spanColor {
  position: absolute;
  width: 0px;
  right: 0;
  top: 0;
  height: 100%;
  opacity: 0.8;
  background-color: white;
  border-radius: 6px;
  transition: width 150ms ease-in-out, background-color 150ms 250ms ease-in-out;
}

.topbar .input {
  display: block;
  width: 100%;
  position: relative;
  border-radius: 6px;
  font-size: 1.2rem;
  background: transparent;
  border: 1px solid var(--base-border);
  margin-bottom: 15px;
  color: white;
  padding: 12px 20px;
  font-family: "Raleway", sans-serif;
  font-weight: 200;
}

.topbar .input::placeholder {
  color: white;
  opacity: 0.8;
}

.topbar .input:focus {
  outline: none;
  border: 1px solid white;
}

.topbar .input:hover {
  border: 1px solid white;
}

.submit {
  padding: 12px 20px;
  width: 100%;
  font-size: 1.2rem;
  font-family: "Raleway", sans-serif;
  font-weight: 200;
  display: block;
  color: white;
  position: relative;
  border: 1px solid var(--base-border);
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  cursor: pointer;
}

.submit:focus {
  outline: none;
}

.submit:hover {
  background: var(--color-app-form-green);
}

.topbar.error .spanColor {
  width: calc(100%);
  background-color: var(--red);
}

.topbar.success .spanColor {
  width: calc(100%);
  background-color: var(--green);
}

.form-title {
  font-size: 2.2rem;
  color: white;
  text-align: center;
  font-weight: 600;
  margin-bottom: 20px;
}

.form-link {
  font-size: 1.1rem;
  text-align: center;
  margin-top: 15px;
}

.form-link a {
  color: white;
  text-decoration: none;
  border-bottom: 1px dotted white;
}

.form-green:hover {
  color: var(--color-app-form-green);
}

.form-red:hover {
  color: var(--color-app-form-red);
}

/* Estilos para os critérios da senha */
.password-criteria {
  font-size: 1rem;
  padding-left: 0;
  list-style-type: none;
  color: var(--color-app-url-links);
}

.password-criteria li.valid {
  color: var(--green);
}

.password-criteria li.invalid {
  color: var(--red);
}

.password-criteria li.valid::before {
  content: "✓ ";
}

.password-criteria li.invalid::before {
  content: "✗ ";
}

/* ======================================================================== */
/* Estilos Customizados para Textos dentro do Formulário Auth
/* ======================================================================== */

/* Estilo para parágrafos informativos dentro da área do formulário */
.form .topbar p {
  font-size: 1.3rem; /* Ajuste para o tamanho desejado, 1.1rem é um bom começo */
  line-height: 1.5; /* Garante um bom espaçamento entre linhas */
  color: rgba(
    255,
    255,
    255,
    0.85
  ); /* Cor mais visível, mas ainda translúcida */
}

/* Você pode querer ajustar a mensagem de link "já tem conta" também, se quiser */
.form-link a {
  font-size: 1.05rem; /* Um pouco maior que o padrão */
}

/* E, se ainda não tiver, certifique-se de que o título do formulário tenha um bom tamanho */
.form .form-title {
  font-size: 2.2rem; /* Exemplo, ajuste conforme seu gosto */
  margin-bottom: 1.5rem;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

/* ======================================================================== */
/* Estilos Customizados para Notificações (Flash Messages)
/* ======================================================================== */

/* Estilo base para todos os alertas dentro do formulário 'auth' */
.form .alert {
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px); /* Para compatibilidade com Safari */
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); /* Sombra no texto para legibilidade */
  padding: 0.8rem 1rem;
  font-size: 1rem; /* Ajusta o tamanho da fonte */
}

/* Estilo para alertas de ERRO */
.form .alert-danger {
  background-color: rgba(
    220,
    53,
    69,
    0.25
  ) !important; /* Fundo vermelho translúcido */
  color: #f8d7da !important; /* Texto vermelho claro */
  border-color: rgba(255, 126, 145, 0.4) !important;
}

/* Estilo para alertas de SUCESSO */
.form .alert-success {
  background-color: rgba(
    25,
    135,
    84,
    0.25
  ) !important; /* Fundo verde translúcido */
  color: #d1e7dd !important; /* Texto verde claro */
  border-color: rgba(60, 158, 120, 0.4) !important;
}
