/* 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-text-green-5: #00201b;
  --color-app-card-text-green-1: #93b9b4;
  --color-app-card-text-gray-1: #868686;
  --color-app-form-green: #008f7a;
  --color-app-form-red: #e685b5;
  --color-app-form-text-dark-1: #5c5c5c;
  --color-app-button-text-gray-1: #b9b9b9;
  --color-app-button-primary-1: #313131;
  --color-app-button-border-1: #5c5c5c;
}

/* DASHBOARD */
.card-body {
  border-radius: 0 0 10px 10px;
}

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

/* Novas Cores e Estilos para os Cards de Estatísticas */
.card-stats {
  border: none;
  color: #fff;
  transition: transform 0.2s ease-in-out;
  position: relative; /* Para posicionar o ícone */
  overflow: hidden; /* Para o ícone não vazar */
}
.card-stats:hover {
  transform: translateY(-5px);
}
.card-stats .card-body {
  padding: 1.5rem;
  position: relative;
  z-index: 2;
}
.card-stats .stat-icon {
  font-size: 4rem; /* Aumentei o ícone */
  opacity: 0.15; /* Deixei mais sutil */
  position: absolute;
  right: 15px;
  bottom: -10px; /* Posicionei no canto inferior direito */
  z-index: 1;
  transition: all 0.3s ease;
}
.card-stats:hover .stat-icon {
  transform: scale(1.1);
  opacity: 0.2;
}
.card-stats .stat-number {
  font-size: 2.2rem;
  font-weight: 700;
}
.card-stats .stat-label {
  font-size: 0.9rem;
  font-weight: 300;
  opacity: 0.9;
}

.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;
}

/* Gradientes Modernos */
.card-gradient-1 {
  background-image: linear-gradient(45deg, #845ec2, #d65db1);
}
.card-gradient-2 {
  background-image: linear-gradient(45deg, #d65db1, #ff6f91);
}
.card-gradient-3 {
  background-image: linear-gradient(45deg, #ff6f91, #ff9671);
}
.card-gradient-4 {
  background-image: linear-gradient(45deg, #ff9671, #ffc75f);
}
.card-gradient-5 {
  background-image: linear-gradient(45deg, #2c73d2, #0089ba);
}
.card-gradient-6 {
  background-image: linear-gradient(45deg, #0089ba, #009e9d);
}
.card-gradient-7 {
  background-image: linear-gradient(45deg, #009e9d, #00a96e);
}
.card-gradient-8 {
  background-image: linear-gradient(45deg, #00a96e, #64b239);
}

.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: var(--color-app-url-links);
  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;
  right: 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 */
  }
}

/* ======================================================================== */
/* Tabelas Responsivas (Layout de Cards em Telas Pequenas)
/* ======================================================================== */

/* Força o layout fixo em telas de desktop/tablet para que o text-truncate funcione */
@media (min-width: 992px) {
  .table-layout-fixed-desktop {
    table-layout: fixed;
  }
}

/* Larguras de coluna específicas para Desktop para evitar quebra em tablets */
@media (min-width: 992px) {
  .w-lg-30 {
    width: 30%;
  }
  .w-lg-35 {
    width: 35%;
  }
  .w-lg-40 {
    width: 40%;
  }
}

@media (max-width: 991.98px) {
  /* Breakpoint ativado para tablets e celulares */
  .table-responsive-cards thead {
    display: none; /* Esconde o cabeçalho da tabela */
  }

  .table-responsive-cards,
  .table-responsive-cards tbody,
  .table-responsive-cards tr {
    display: block; /* Faz cada elemento ocupar uma linha */
    width: 100%;
  }

  .table-responsive-cards tr {
    margin-bottom: 1rem; /* Espaçamento entre os "cards" */
    border: 1px solid #343a40;
    border-radius: var(--bs-border-radius);
    overflow: hidden; /* Garante que os cantos arredondados sejam respeitados */
  }

  .table-responsive-cards td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border: none;
    border-bottom: 1px solid #2d3741;
  }

  .table-responsive-cards tr td:last-child {
    border-bottom: 0;
  }

  .table-responsive-cards td::before {
    content: attr(data-label); /* Pega o texto do atributo data-label */
    text-align: left;
    font-weight: bold;
    padding-right: 1rem; /* Espaço entre o label e o conteúdo */
  }

  /* Garante que o conteúdo do lado direito possa ser truncado se necessário */
  .table-responsive-cards td > *:not(::before) {
    text-align: right;
    min-width: 0; /* Essencial para o text-truncate funcionar em flexbox */
  }
}

/* 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 {
  color: var(--color-app-button-text-gray-1);
  background-color: var(--color-app-button-primary-1);
  /* border-color: var(--color-app-button-border-1); */
  border-color: var(--color-app-button-primary-1);
  transition: all 0.5s ease;
}

.btn-primary:hover {
  color: var(--color-app-text-green-5);
  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 {
  display: flex;
  flex-direction: column;
}

.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);
  flex-grow: 1; /* Faz o parágrafo ocupar o espaço disponível, empurrando o que vier depois para o final. */
}

.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) */
@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;
  }
}

/* ======================================================================== */
/* Página Perfil
/* ======================================================================== */

.profile-rounded-circle {
  margin-right: 0 !important;
  padding-right: 0 !important;
}

/* ======================================================================== */
/* 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-label {
  color: var(--color-app-card-text-green-1);
}

.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);
}

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

/* 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 {
  /* Fundo vermelho translúcido */
  background-color: rgba(220, 53, 69, 0.25) !important;
  color: #f8d7da !important; /* Texto vermelho claro */
  border-color: rgba(255, 126, 145, 0.4) !important;
}

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