/* ========== GOOGLE FONT: POPPINS ========== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');


:root {
  --violeta-principal: #7b529d;
  --violeta-claro: #d7c6ec;
  --fondo-claro: #f9f9f9;
  --texto-oscuro: #333;
  --gris: #ccc;
}

/* ====== General ====== */
body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--fondo-claro);
  color: var(--texto-oscuro);
}

h1, h2 {
  margin: 0;
}

/* ====== Contenedor principal ====== */
.contenedor-principal {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ====== Header tipo dashboard ====== */
.dashboard-header-row {
  background-color: var(--violeta-principal);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  border-bottom: 4px solid #5c3e7a;
  border-radius: 0 0 20px 20px;
}

.dashboard-logo {
  height: 60px;
  margin-right: 15px;
}

.dashboard-header-row h1 {
  color: white;
  font-size: 22px;
  flex-grow: 1;
}

.btn-logout {
  color: white;
  font-weight: bold;
  text-decoration: none;
  margin-left: auto;
}

/* ====== Grid de tarjetas ====== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  padding: 30px;
}

/* ====== Tarjeta residencia ====== */
.residencia-card {
  background-color: white;
  padding: 20px;
  border-radius: 16px;
  border-left: 6px solid var(--violeta-principal);
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  transition: transform 0.2s ease;
  text-decoration: none;
  color: var(--texto-oscuro);
}

.residencia-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.residencia-card h2 {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--violeta-principal);
}

.residencia-card p {
  margin: 0;
}

/* ====== Footer ====== */
.footer-fijo {
  text-align: center;
  font-size: 13px;
  color: #666;
  margin-top: auto;
  padding: 20px;
}


}
/* ---------- TABLA ESTILO MODERNO ---------- */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 20px;
  background-color: #fff;
  border-radius: 12px;
  overflow: hidden;
  font-family: 'Segoe UI', sans-serif;
  font-size: 14px;
  box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.05);
}

thead {
  background-color: #7b529d;
  color: white;
  text-align: left;
}

thead th {
  padding: 12px 16px;
  font-weight: bold;
}

tbody tr {
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s;
}

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

tbody td {
  padding: 10px 16px;
  color: #333;
  vertical-align: middle;
}

tbody td a {
  color: #7b529d;
  font-weight: 500;
  text-decoration: none;
}

tbody td a:hover {
  text-decoration: underline;
}

/* Iconos dentro de tablas (editar, ver, agregar) */
td .icono-accion {
  font-size: 16px;
  margin: 0 5px;
  cursor: pointer;
  transition: transform 0.1s;
}

td .icono-accion:hover {
  transform: scale(1.2);
}
.tabla-residentes tr:hover td {
  background-color: #f3ecfa;
  transition: background-color 0.2s;
}

.tabla-residentes td a {
  color: var(--violeta-principal);
  text-decoration: none;
  font-weight: 500;
}

.tabla-residentes td a:hover {
  text-decoration: underline;
}

.tabla-residentes .icono-accion {
  font-size: 16px;
  margin: 0 5px;
  cursor: pointer;
  transition: transform 0.1s;
}

.tabla-residentes .icono-accion:hover {
  transform: scale(1.2);
}
.tabla-residentes-wrapper {
  max-width: 1650px;
  margin: 30px auto; /* centra la tabla horizontalmente y le da separación vertical */
  padding: 0 20px; /* margen interno lateral para que no quede pegada */
}

.btn-agregar {
  text-decoration: none;
  color: #5a2a82;
  font-weight: bold;
  font-size: 16px;
}

.btn-agregar:hover {
  text-decoration: underline;
}

.icono-agregar {
  font-size: 18px;
  margin-right: 5px;
  vertical-align: middle;
}


/* ====== Formulario familiar ====== */
.formulario-familiar {
  background: #fff;
  padding: 30px 40px;
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  margin: 30px auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  font-family: 'Poppins', sans-serif;
}

.formulario-familiar h2 {
  color: var(--violeta-principal);
  margin-bottom: 25px;
  font-size: 22px;
  text-align: center;
}

.formulario-familiar label {
  font-weight: 600;
  margin-top: 15px;
  display: block;
  font-size: 14px;
}

.formulario-familiar input {
  width: 100%;
  padding: 10px 12px;
  margin-top: 6px;
  border: 1px solid var(--gris);
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  transition: border-color 0.2s;
}

.formulario-familiar input:focus {
  border-color: var(--violeta-principal);
  outline: none;
  box-shadow: 0 0 4px rgba(123, 82, 157, 0.3);
}

/* ====== Botones formulario ====== */
.form-buttons {
  margin-top: 30px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.btn-familiares {
  background-color: #28a745
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-familiares:hover {
  background-color: #5c3e7a;
}

.btn-volver {
  background-color: #f2f2f2;
  color: #333;
  padding: 10px 20px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s;
  display: inline-block;
}

.btn-volver:hover {
  background-color: #e0e0e0;
}

.titulo-residencia {
  color: white;
  font-size: 20px;
  margin-left: 10px;
  flex-grow: 1;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-volver-derecha {
  color: white;
  margin-left: auto;   
  text-decoration: none;
  background-color: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 10px;
  transition: background-color 0.2s ease;
}

.btn-volver-derecha:hover {
  background-color: rgba(255, 255, 255, 0.1);
}
.tabla-residentes {
  font-size: 13px;
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
}

.tabla-residentes th,
.tabla-residentes td {
  padding: 6px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.tabla-residentes {
  font-size: 13px;
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
}
.tarjeta-alerta {
  background-color: #fff8e1;
  border-left: 6px solid #ff9800;
  padding: 15px 20px;
  margin: 30px auto;
  border-radius: 10px;
  max-width: 600px;
  box-shadow: 0 0 6px rgba(0,0,0,0.1);
}
.tarjeta-alerta h3 {
  color: #d17d00;
  margin-top: 0;
}
.tarjeta-alerta ul {
  list-style: none;
  padding-left: 0;
  margin: 10px 0 0;
}
.tarjeta-alerta li {
  margin-bottom: 8px;
}

.alertas-laterales {
  max-width: 300px;
  position: absolute;
  top: 180px;
  right: 30px;
  background: #fff8e1;
  border-left: 6px solid #ff9800;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 6px rgba(0,0,0,0.1);
}

.alertas-laterales h2 {
  margin-top: 0;
  color: #d17d00;
  font-size: 20px;
  border-bottom: 2px dashed #ffcc80;
  padding-bottom: 5px;
}

.bloque-alerta h4 {
  margin: 10px 0 5px;
  color: #7b529d;
}

.bloque-alerta ul {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.bloque-alerta li {
  font-size: 14px;
  margin-bottom: 6px;
}
/* ====== LOGIN & REGISTRO ====== */
.auth-container {
  max-width: 400px;
  margin: 80px auto;
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  font-family: 'Poppins', sans-serif;
}

.auth-logo {
  height: 60px;
  margin-bottom: 20px;
}

.auth-title {
  color: var(--violeta-principal);
  text-align: center;
  font-size: 24px;
  margin-bottom: 20px;
}

.auth-form input {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-family: 'Poppins', sans-serif;
}

.auth-form button {
  width: 100%;
  background-color: var(--violeta-principal);
  color: white;
  padding: 10px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.auth-form button:hover {
  background-color: #5c3e7a;
}

.auth-links {
  margin-top: 15px;
  text-align: center;
  font-size: 14px;
}

.auth-links a {
  color: var(--violeta-principal);
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

.auth-error {
  color: #d9534f;
  background-color: #f9d6d5;
  padding: 10px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 15px;
  text-align: center;
}

.auth-footer {
  text-align: center;
  margin-top: 40px;
  font-size: 14px;
  color: #555;
}

