@import url("https://fonts.googleapis.com/css?family=Exo:100");
@import '../../../styles/variables.scss';

:host {
  display: block;
  height: 100vh;
  width: 100vw;
  font-family: 'Exo', sans-serif;
  overflow: hidden;
  position: relative;
}

// Fondo animado
.background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  background: url("data:image/png;base64,...") repeat 0 0;
  animation: bg-scrolling-reverse 0.92s infinite linear;
}

@keyframes bg-scrolling-reverse {
  100% {
    background-position: 50px 50px;
  }
}

// Contenido principal con sidebar
.main-content {
  margin-left: 220px; // espacio para sidebar
  padding: 2rem;
  height: 100vh;
  overflow-y: auto;

  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

// Centrado y padding interno
.dashboard-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 2rem;
  box-sizing: border-box;
}

// Tarjeta principal
.dashboard-card {
  background-color: $background-table-color;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  width: 90%;
  max-width: 1200px;
}

// Título principal
.dashboard-title {
  margin-bottom: 2rem;
  font-size: 1.8rem;
  font-weight: 600;
  color: $primary-color;
}

// Botón al lado del título
.dashboard-title-with-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

// Botón personalizado
.add-user-btn {
  background-color: $primary-color;
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;

  &:hover {
    background-color: $primary-color;
  }
}

// Tabla responsive
.table-responsive {
  overflow-x: auto;
}

// Tabla tipo tarjeta por fila
.routes-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.5rem;

  th, td {
    padding: 0.9rem 1rem;
    background-color: #ffffff;
    border-bottom: none;
    font-size: 0.95rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border-radius: 6px;
  }

  th {
    background-color: #e0e0e0;
    color: $primary-color;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
  }

  tbody tr {
    transition: background-color 0.3s ease;
  }

  tbody tr:hover {
    background-color: #f0f9f7;
  }

  td:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
  }

  td:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
  }
}

// Botones de acción
button.btn-sm {
  margin-right: 0.5rem;
}

// Múltiples tarjetas pequeñas
.dashboard-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

// Tarjeta mini (si quieres mostrar usuarios por estatus o stats)
.mini-card {
  background-color: white;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  flex: 1 1 45%;
  min-height: 120px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.mini-card:hover {
  transform: translateY(-5px);
}

.mini-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  color: #00796b;
}

.mini-card p {
  margin: 0;
  color: #555;
  font-size: 0.95rem;
}

// Lista de usuarios con puntos de estado
.user-list {
  list-style: none;
  padding: 0;
  margin: 0;

  li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
  }

  .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
  }

  .green {
    background-color: #4caf50;
  }

  .red {
    background-color: #f44336;
  }
}
