:root {
  --rosa: #e26ea1;
  --rosa-oscuro: #a92f68;
  --texto: #2b2024;
  --borde: #d9c6cf;
  --alerta-fondo: #fdecef;
  --alerta-texto: #9b1c3a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--rosa);
  color: var(--texto);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

.contenedor {
  width: 100%;
  max-width: 380px;
}

.logo {
  display: block;
  width: 180px;
  max-width: 60%;
  height: auto;
  margin: 0 auto 16px;
}

.tarjeta {
  padding: 24px;
  background: #fff;
  border-radius: 12px;
}

h1 {
  margin: 0 0 16px;
  font-size: 1.4rem;
}

label {
  display: block;
  margin: 14px 0 4px;
  font-weight: 600;
}

input:not([type="hidden"]) {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: inherit;
  border: 1px solid var(--borde);
  border-radius: 8px;
}

input:focus,
button:focus-visible {
  outline: 2px solid var(--rosa-oscuro);
  outline-offset: 1px;
}

button {
  width: 100%;
  margin-top: 20px;
  padding: 11px 12px;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--rosa-oscuro);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

a {
  color: var(--rosa-oscuro);
}

.alerta {
  margin: 0 0 8px;
  padding: 10px 12px;
  color: var(--alerta-texto);
  background: var(--alerta-fondo);
  border-radius: 8px;
}

/* Páginas con sesión iniciada */
body.cuerpo-app {
  display: block;
  padding: 0;
  background: #fbf3f7;
}

.barra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding: 10px 16px;
  background: var(--rosa);
}

.barra-logo {
  display: block;
  width: 56px;
  height: auto;
}

.barra-menu {
  display: flex;
  gap: 16px;
}

.barra-menu a {
  color: var(--texto);
  font-weight: 600;
}

.barra-usuario {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-left: auto;
}

.app {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px;
}

.encabezado {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.encabezado h1 {
  margin: 0;
}

.tarjeta-formulario {
  max-width: 480px;
  margin: 0 auto;
}

.volver {
  margin: 16px 0 0;
}

.boton {
  display: inline-block;
  padding: 9px 14px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: var(--rosa-oscuro);
  border-radius: 8px;
}

button.boton-secundario,
.boton.boton-secundario {
  width: auto;
  margin: 0;
  padding: 6px 12px;
  font-weight: 600;
  color: var(--rosa-oscuro);
  background: #fff;
  border: 1px solid var(--rosa-oscuro);
  border-radius: 8px;
}

.tabla-scroll {
  overflow-x: auto;
  background: #fff;
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--borde);
}

tbody tr:last-child td {
  border-bottom: 0;
}

tr.inactiva td {
  color: #6f6168;
}

.acciones {
  display: flex;
  gap: 8px;
}

.estado {
  padding: 2px 10px;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 999px;
}

.estado-activo {
  color: #17603a;
  background: #e3f5ea;
}

.estado-inactivo {
  color: #5c5057;
  background: #eee6ea;
}

.aviso {
  margin: 0 0 16px;
  padding: 10px 12px;
  color: #17603a;
  background: #e3f5ea;
  border-radius: 8px;
}
