@tailwind base;
@tailwind components;
@tailwind utilities;

/* Estilos personalizados */
body {
    min-height: 100vh;
    background: linear-gradient(135deg, #4b0082, #800080, #6a0dad) !important;
    background-attachment: fixed;
    font-family: 'Inter', sans-serif;
    color: #333;
}

/* Estilo del logo */
.logo {
    filter: drop-shadow(0 0 4px #ffffff);
}

/* Estilo de los contenedores */
.container {
  background-color: rgba(255,255,255,0.0) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 20px;
  border-radius: 16px;  
  max-width: 1600px;
  margin-top: 0px !important;
  border-radius: 0px !important;
  box-shadow: none !important;
  
}

/* Estilo del contenedor principal */
.container#principal {
    background-color: rgb(255, 255, 255, 0.9) !important;
    border-radius: 16px !important;
}

/* Tipografía cabeceras y etiquetas*/
h1,
h3,
label {
  font-weight: 700;
}

/* Tipografía labels de checkboxes */
.form-check-label {
  font-weight: 500;
}

/* Estilo de los botones */
.btn {
  --bs-btn-font-weight: 600;
}

/* Botones primarios */
.btn-primary {
    background: linear-gradient(90deg, #7c3aed, #9333ea, #a855f7);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Efecto hover botones primarios */
.btn-primary:hover {
    background-position: right center;
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

/* === BOTONES GRADIENTE OSCUROS Y ELEGANTES === */
.btn-gradient-primary {
    background: linear-gradient(90deg, #6d28d9, #9333ea);
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-gradient-primary:hover {
    background: linear-gradient(90deg, #5b21b6, #7e22ce);
    color: #fff !important;
}

/* Gris oscuro con toque lila */
.btn-gradient-secondary {
    background: linear-gradient(90deg, #4b5563, #6b7280);
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-gradient-secondary:hover {
    background: linear-gradient(90deg, #374151, #4b5563);
    color: #fff !important;
}

/* Verde más intenso */
.btn-gradient-success {
    background: linear-gradient(90deg, #047857, #059669);
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-gradient-success:hover {
    background: linear-gradient(90deg, #065f46, #047857);
    color: #fff !important;
}

/* Rojo oscuro, para acciones críticas */
.btn-gradient-danger {
    background: linear-gradient(90deg, #b91c1c, #dc2626);
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-gradient-danger:hover {
    background: linear-gradient(90deg, #991b1b, #b91c1c);
    color: #fff !important;
}

/* Iconos dentro de los botones */
.btn-gradient-primary img,
.btn-gradient-secondary img,
.btn-gradient-success img,
.btn-gradient-danger img {
    margin-right: 8px;
    vertical-align: middle;
}


/* Botones gradiente */
.btn-gradient {
    background: linear-gradient(90deg, #7c3aed, #9333ea, #a855f7);
    background-size: 200% 200%;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    transition: 0.5s background-position;
}

/* Efecto hover botones gradiente */
.btn-gradient:hover {
    background-position: right center;
    color: #fff !important;
}


/* Tablas */
.table {
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    overflow: hidden;
}

/* Alineación vertical de celdas */
.table th, .table td {
    vertical-align: middle;
}

/* Estilo del encabezado de la tabla */
.table thead {
    background: rgba(255,255,255,0.2);
}

/* Scroll en tablas largas */
.table-responsive {
    overflow-x: auto;
}

/* === Paginación con estilo moderno morado === */
.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding-left: 0;
  margin-top: 0.5rem;
}

/* Enlaces de paginación */
.pagination .page-link {
  color: #6d28d9; /* morado base */
  background-color: #fff;
  border: 1px solid rgba(128, 0, 128, 0.25);
  border-radius: 8px;
  padding: 0.55rem 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* Hover */
.pagination .page-link:hover {
  color: #fff;
  background: linear-gradient(90deg, #7c3aed, #9333ea);
  border-color: #7c3aed;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
  transform: translateY(-2px);
}

/* Página activa */
.pagination .page-item.active .page-link {
  color: #fff;
  background: linear-gradient(90deg, #6b21a8, #7c3aed);
  border-color: #6b21a8;
  box-shadow: 0 4px 10px rgba(107, 33, 168, 0.4);
}

/* Enlace deshabilitado */
.pagination .page-item.disabled .page-link {
  color: #ccc;
  background-color: #f3f4f6;
  border-color: #e5e7eb;
  cursor: not-allowed;
  box-shadow: none;
}

/* Suaviza el rebote al hacer clic */
.pagination .page-link:active {
  transform: scale(0.97);
}


.bg-gray-800 {
  --tw-bg-opacity: 1;
  background-color: purple;
}

/* Estilo del contenido del modal */
#descripcionModal > div {
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* Estilo para la columna Descripción */
td.descripcion {
    max-width: 400px;
    /* ancho máximo de la columna */
    white-space: nowrap;
    /* evita que el texto se rompa en varias líneas */
    overflow: hidden;
    /* recorta el texto que sobra */
    text-overflow: ellipsis;
    /* añade "..." al final si no cabe */
}

/* Estilo del modal */
#descripcionModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 9999;

}

/* Estilo para la columna Registro */
td.registro {
    max-width: 200;
    white-space: nowrap;
}

/* Estilo para la columna DNI */
td.dni {
    max-width: 100;
    white-space: nowrap;
}

/* Estilo de las badges de filtros activos */
#active-filters .badge {
    padding: 0.5rem 0.75rem;
    background-color: #6c757d;
    font-size: 0.85rem;
}

/* Estilo al pasar el ratón sobre las badges */
#active-filters .badge:hover {
    background-color: #5a6268;
}

/* Estilo de la barra de desplazamiento */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7c3aed, #a855f7);
    border-radius: 5px;
}

/* Estilo de la barra de navegación */
.navbar {
    background-color: rgba(255,255,255,0.5) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 0px;
}

/* Estilo de los elementos de navegación */
.nav-item{
  font-size: large;
  font-weight: 700;
}

/* Estilo de la marca de la barra de navegación */
.navbar-brand{
  font-size: x-large;
  font-weight: 550;
}

/* Estilo del botón cerrar sesión */
#cerrar-sesion{
  margin-left: 10px;
  font-size: medium;
  font-weight: 700;
}

/* Estilo de los formularios */
input.form-control, select.form-control {
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

/* Estilo al enfocar los formularios */
input.form-control:focus, select.form-control:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.2);
}

/* Línea vertical */
.vl {
  border-left: 2px solid rgb(128, 128, 128, 0.5);
  height: 45px;
}

/* Estilo del total de resultados */
#total-resultados{
  color: rgb(145, 0, 230) !important;
  font-size: x-large
}


/*****************************************
** Páginas de login/register/contraseñas *
*****************************************/

/* Contenedor centrado */
.auth-container {
  max-width: 1000px;
  margin: 20px auto;
  margin-bottom: 100px;
  padding: 2rem 2.5rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2);
  align-items: center;
}

/* Título */
.auth-title {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.5rem;
}

/* Solo inputs con clase .login-input */
input.auth-input {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 0.75rem;
  width: 400px;
  transition: all 0.3s ease;
}

input.auth-input:focus {
  border-color: #a855f7;
  background: rgba(255, 255, 255, 0.25);
  outline: none;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
}


/* Mensajes */
.alert {
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 0.95rem;
}

.auth-container .alert {
  max-width: 400px;
}

.alert.success {
  background-color: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  color: #d1fae5;
}
.alert.error {
  background-color: rgba(239, 68, 68, 0.15);
  border: 1px solid #f87171;
  color: #fee2e2;
}

/* Links */
.auth-link {
  color: #e9d5ff;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease;
  margin-right: 15px !important;
}
.auth-link:hover {
  color: #fff;
  text-decoration: underline;
}

/* Botón principal coherente con la web */
.auth-button {
  background: linear-gradient(90deg, #4b5563, #6b7280);
  border: none;
  border-radius: 8px;
  color: white !important;
  font-size: 0.9rem !important;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  transition: all 0.25s ease;
  box-shadow: 0 4px 10px rgba(147, 51, 234, 0.4);
}
.auth-button:hover {
  background: linear-gradient(90deg, #374151, #4b5563);
  color: white !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(147, 51, 234, 0.5);
}

.auth-form{
  width: 400px;
}

/* Ajustes responsive */
@media (max-width: 480px) {
  .auth-container {
    margin: 40px 16px;
    padding: 1.5rem;
  }
}
/* Éxito (success) */
.session-status-success {
    color: #48ff57; /* azul muy claro para destacar sobre morado */
}

/* Error */
.session-status-error {
    color: #000000; /* rojo claro para que resalte */
}

/* Información */
.session-status-info {
    color: #9e88ff; /* lila claro */
}

.text-red-600 {
  color: rgb(253, 116, 116) !important;
}

.text-green-600 {
  color: rgb(30, 223, 101) !important;
}

#qr-container {
    display: flex;
    justify-content: center;
    align-items: center;
}