/* ============================ RESET ============================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

/* ============================ FONDO ============================ */
body {
  background: url("../Img/Fondo_Tesch.jpeg") no-repeat center center fixed;
  background-size: cover;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}

body::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(3px);
  z-index: 0;
}

/* ============================ LOGOS ============================ */
.logo {
  position: absolute;
  top: 20px;
  width: 80px;
  height: auto;
  z-index: 2;
}

.logo-izq {
  left: 20px;
}
.logo-der {
  right: 20px;
}

/* ============================ CAJA LOGIN / REGISTRO ============================ */
.login-box {
  position: relative;
  width: 400px;
  max-height: 95vh; /* Ajuste para que no haga scroll */
  padding: 30px 25px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  box-shadow: 0 0 30px rgba(0, 255, 120, 0.25);
  z-index: 1;
  animation: float 3s ease-in-out infinite;
  overflow: hidden; /* Evita scroll interno */
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.3s ease;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ============================ TÍTULOS ============================ */
.titulo-login {
  text-align: center;
  color: #00ff9d;
  font-size: 2.4em;
  margin-bottom: 10px;
  text-shadow: 0 0 10px rgba(0, 255, 120, 0.8);
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    text-shadow:
      0 0 8px #00ff9d,
      0 0 20px #00ff9d;
  }
  to {
    text-shadow:
      0 0 20px #00c3ff,
      0 0 40px #00c3ff;
  }
}

.subtitulo-login {
  text-align: center;
  color: #fff;
  font-size: 1em;
  margin-bottom: 20px;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}

/* ============================ INPUTS ============================ */
.input-group {
  position: relative;
  width: 100%;
  margin-bottom: 15px;
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 12px 45px 12px 40px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: #fff;
  font-size: 0.95em;
  outline: none;
  transition: all 0.3s ease;
}

.input-group input::placeholder,
.input-group select::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.input-group input:focus,
.input-group select:focus {
  border-color: rgba(0, 255, 120, 0.6);
  box-shadow: 0 0 10px rgba(0, 255, 120, 0.4);
}

/* ============================ ICONOS DENTRO DE INPUTS ============================ */
.input-group i {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.3em;
}

/* Íconos específicos */
.input-group .fa-user,
.input-group .fa-id-card {
  left: 12px;
}

.input-group .fa-envelope {
  left: 12px;
}

.input-group .fa-lock {
  left: 12px;
}

/* Ojo para mostrar/ocultar contraseña */
.toggle-password {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  cursor: pointer;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.3em;
  transition:
    color 0.3s ease,
    transform 0.3s ease;
}

.toggle-password:hover {
  color: #00ff9d;
  transform: scale(1.2);
}

/* Espacios para íconos izquierdo y derecho */
.input-group input,
.input-group select {
  padding-left: 45px;
  padding-right: 45px;
}

/* ============================ BOTÓN ============================ */
.btn-login {
  width: 100%;
  padding: 12px;
  background: linear-gradient(45deg, #00ff9d, #00c3ff);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 1.05em;
  cursor: pointer;
  transition:
    all 0.3s ease,
    filter 0.3s ease,
    box-shadow 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 255, 120, 0.4);
}

.btn-login:hover {
  transform: scale(1.05);
  box-shadow:
    0 8px 25px rgba(0, 255, 120, 0.8),
    0 0 15px rgba(0, 255, 255, 0.6);
  filter: brightness(1.2);
}

/* ============================ LINKS ============================ */
.links {
  text-align: center;
  margin-top: 10px;
}

.links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.85em;
  transition: all 0.3s ease;
}

.links a:hover {
  color: #00ff9d;
  text-shadow: 0 0 6px rgba(0, 255, 120, 0.6);
}

/* ============================ ERROR ============================ */
.mensaje-error {
  background: rgba(255, 0, 0, 0.2);
  color: #ff4444;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 15px;
  text-align: center;
  font-size: 0.9em;
}

/* ============================ RESPONSIVE ============================ */
@media screen and (max-width: 480px) {
  .login-box {
    width: 90%;
    max-height: 90vh;
    padding: 25px 15px;
  }

  .logo {
    width: 60px;
  }
  .titulo-login {
    font-size: 1.8em;
  }
  .subtitulo-login {
    font-size: 0.9em;
  }

  .input-group input,
  .input-group select {
    font-size: 0.9em;
  }

  .btn-login {
    font-size: 1em;
  }
}
/* ============================================================
   ESTILOS FORMULARIO DE REGISTRO (OPTIMIZADO Y RESPONSIVO)
   ============================================================ */

.registro-wrapper {
  position: relative;
  width: 90%;
  max-width: 600px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 20px;
  box-shadow: 0 0 25px rgba(0, 195, 255, 0.25);
  padding: 25px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 0.8s ease-in-out;
  z-index: 1;
  transition: all 0.3s ease;
}

.registro-wrapper:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 25px rgba(0, 255, 200, 0.4);
}

/* Título */
.registro-titulo {
  text-align: center;
  margin-bottom: 20px;
}

.registro-titulo h1 {
  font-size: 1.8em;
  color: #007e66;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.registro-titulo p {
  color: #333;
  font-size: 1em;
}

/* Formulario */
.registro-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  width: 100%;
}

.form-columna {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-columna label {
  font-weight: 600;
  color: #00594a;
  font-size: 0.95em;
}

/* Inputs y Selects */
.input-icon {
  position: relative;
}

.input-icon i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #00c3ff;
  font-size: 1.1em;
}

.input-icon input,
.input-icon select {
  width: 100%;
  padding: 10px 12px 10px 38px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 0.95em;
  color: #222;
  background: #fff;
  transition: all 0.3s ease;
}

.input-icon input::placeholder {
  color: #777;
}

.input-icon input:focus,
.input-icon select:focus {
  outline: none;
  border-color: #00c3ff;
  box-shadow: 0 0 8px rgba(0, 195, 255, 0.4);
}

/* Ícono del ojo (mostrar contraseña) */
.toggle-pass {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #00c3ff;
  font-size: 1.1em;
  transition: color 0.3s ease;
}

.toggle-pass:hover {
  color: #007e66;
}

/* Botones */
.botones {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
  width: 100%;
}

.btn-registrar {
  background: linear-gradient(45deg, #00c3ff, #00ff9d);
  border: none;
  color: white;
  padding: 12px;
  border-radius: 10px;
  font-size: 1em;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Efecto de brillo */
.btn-registrar::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: 0.6s;
}

.btn-registrar:hover::before {
  left: 125%;
}

.btn-registrar:hover {
  transform: scale(1.03);
  box-shadow: 0 0 15px rgba(0, 255, 120, 0.7);
}

.btn-volver {
  text-align: center;
  display: inline-block;
  background: #eee;
  color: #333;
  padding: 10px;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-volver:hover {
  background: #00c3ff;
  color: #fff;
}

/* Animación de entrada */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsivo */
@media (max-width: 768px) {
  .registro-form {
    grid-template-columns: 1fr;
  }

  .registro-wrapper {
    padding: 20px;
    max-width: 90%;
  }

  .registro-titulo h1 {
    font-size: 1.5em;
  }

  .form-columna label {
    font-size: 0.9em;
  }

  .input-icon input,
  .input-icon select {
    font-size: 0.9em;
    padding: 10px 10px 10px 36px;
  }

  .btn-registrar {
    font-size: 0.9em;
    padding: 10px;
  }
}
/* Estilos para mensajes de alerta */
.alert {
  width: 90%;
  max-width: 400px;
  margin: 10px auto;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 15px;
  text-align: center;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.6s ease-in-out;
}

.alert.success {
  background: rgba(46, 204, 113, 0.2);
  border: 1px solid #2ecc71;
  color: #2ecc71;
}

.alert.error {
  background: rgba(231, 76, 60, 0.2);
  border: 1px solid #e74c3c;
  color: #e74c3c;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.alerta-exito,
.alerta-error {
  width: 90%;
  max-width: 600px;
  margin: 15px auto;
  padding: 12px;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
  animation: fadeIn 0.5s ease;
}

.alerta-exito {
  background: #d4edda;
  color: #155724;
  border: 2px solid #28a745;
  box-shadow: 0 0 10px rgba(40, 167, 69, 0.4);
}

.alerta-error {
  background: #f8d7da;
  color: #721c24;
  border: 2px solid #dc3545;
  box-shadow: 0 0 10px rgba(220, 53, 69, 0.4);
}
/* ============================ FEEDBACK EN TIEMPO REAL ============================ */
.input-icon input.error,
.input-icon select.error {
  border-color: #ff4d4d !important;
  box-shadow: 0 0 8px rgba(255, 0, 0, 0.4);
}

.input-icon input.success,
.input-icon select.success {
  border-color: #00ff9d !important;
  box-shadow: 0 0 8px rgba(0, 255, 150, 0.4);
}

.error-text {
  color: #ff4d4d;
  font-size: 0.8em;
  margin-top: 2px;
  display: block;
}
.links a i {
  margin-right: 6px;
}

/* --- TARJETAS ELEGANTES DEL SISTEMA (dashboard, menus) --- */
.card {
  background: rgba(20, 20, 20, 0.55);
  border: 1px solid rgba(0, 255, 157, 0.25);
  backdrop-filter: blur(12px);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 0 22px rgba(0, 255, 157, 0.12);
  transition: 0.25s ease;
}

.card:hover {
  transform: scale(1.02);
  border-color: rgba(0, 255, 157, 0.5);
  box-shadow: 0 0 32px rgba(0, 255, 157, 0.25);
}

/* Títulos */
.titulo-seccion {
  font-size: 28px;
  color: #00ff9d;
  margin-bottom: 12px;
  text-shadow: 0 0 5px rgba(0, 255, 157, 0.7);
}

/* --- BOTONES GESERP --- */
.btn-geserp {
  background: #00ff9d;
  border: none;
  color: #000;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.25s ease;
}

.btn-geserp:hover {
  background: #00cc7f;
  transform: scale(1.05);
}

/* --- TABLAS MODERNAS --- */
.tabla {
  width: 100%;
  border-collapse: collapse;
  background: rgba(30, 30, 30, 0.6);
  border-radius: 12px;
  overflow: hidden;
}

.tabla th {
  background: rgba(0, 255, 157, 0.15);
  color: #00ff9d;
  padding: 12px;
  text-transform: uppercase;
}

.tabla td {
  padding: 10px;
  color: #eee;
  border-bottom: 1px solid rgba(0, 255, 157, 0.1);
}

.tabla tr:hover {
  background: rgba(0, 255, 157, 0.08);
}
.logo-login {
  width: 120px;
  display: block;
  margin: 0 auto 15px auto;
}
/* =========================
   SIDEBAR COLAPSABLE
========================= */

.sidebar {
  width: 240px;
  transition: all 0.3s ease;
}

.sidebar.collapsed {
  width: 70px;
}

.sidebar.collapsed .menu-text {
  display: none;
}

.sidebar.collapsed .logo-text {
  display: none;
}

.sidebar.collapsed i {
  margin-right: 0;
  text-align: center;
  width: 100%;
}

/* Ajustar contenido */
.main-content {
  margin-left: 240px;
  transition: margin-left 0.3s ease;
}

.sidebar.collapsed ~ .main-content {
  margin-left: 70px;
}

/* Botón toggle */
.toggle-sidebar {
  background: #00ff9d;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  margin-right: 15px;
  color: #0f2027;
  font-size: 16px;
  transition: 0.2s;
}

.toggle-sidebar:hover {
  background: #00e089;
}
/* =========================
   SIDEBAR PRO
========================= */

.sidebar {
  width: 240px;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  transition: all 0.3s ease;
  z-index: 1000;
}

.sidebar.collapsed {
  width: 70px;
}

.sidebar.collapsed .menu-text,
.sidebar.collapsed .logo-text {
  opacity: 0;
  pointer-events: none;
}

.sidebar i {
  transition: 0.2s;
}

.main-content {
  margin-left: 240px;
  transition: margin-left 0.3s ease;
}

.sidebar.collapsed + .main-content {
  margin-left: 70px;
}

/* BOTÓN MENU */
.toggle-sidebar {
  background: #00ff9d;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  margin-right: 15px;
  color: #0f2027;
  font-size: 16px;
  transition: 0.2s;
}

.toggle-sidebar:hover {
  background: #00e089;
}

/* =========================
   MODO MÓVIL
========================= */

@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
    width: 240px;
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0 !important;
  }

  .overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 900;
    display: none;
  }

  .overlay.active {
    display: block;
  }
}
.sidebar.collapsed ul li a {
  justify-content: center;
}