/* estilos.css — Versión Unificada y Corregida */

/* ── RESET MÍNIMO ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── TIPOGRAFÍA GLOBAL ── */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f5f7fa;
  color: #333;
  min-height: 100vh;
  position: relative;
  padding-bottom: 60px; /* espacio para footer */
}

/* ── CONTENEDOR FORMULARIOS ── */
.login-container {
  height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* ── TARJETA ── */
.login-card {
  background: #fff;
  border: none;
  border-radius: 1rem;
  overflow: hidden;
  padding: 2rem 1.5rem;
  max-width: 500px;
  width: 100%;
  transition: transform .2s, box-shadow .2s;
}
.login-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

/* ── LOGO ── */
.login-card img {
  display: block;
  margin: 0 auto 1rem;
  max-height: 80px;
}

/* ── TITULO E INSTRUCCIONES ── */
.login-card h2 {
  font-weight: 500;
  letter-spacing: .5px;
  margin-bottom: .5rem;
  text-align: center;
}
.login-card p {
  font-size: .95rem;
  color: #555;
  line-height: 1.4;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* ── CAMPOS FLOTANTES ── */
.login-field {
  position: relative;
  margin-bottom: 1.75rem;
}
.field-border {
  position: relative;
  border: 1px solid #ccc;
  border-radius: .75rem;
  padding: .75rem 1rem .5rem 3rem;
  transition: border-color .2s, background-color .2s;
  background: #fff;
}
.field-border:focus-within {
  border-color: #0d6efd;
  background-color: #f0f8ff;
}
.login-field label {
  position: absolute;
  top: -0.6em;
  left: 2.75rem;
  background: #fff;
  padding: 0 .25rem;
  color: #0d6efd;
  font-size: .85rem;
  pointer-events: none;
}

/* ── ICONO IZQUIERDA ── */
.field-icon {
  position: absolute;
  top: 50%;
  left: 1rem;
  transform: translateY(-50%);
  color: #0d6efd;
  font-size: 1.2rem;
}

/* ── INPUT / SELECT ── */
.login-field input,
.field-border select {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 1rem;
  padding: 0;
}
.field-border select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}

/* ── FLECHA CUSTOM SOLO PARA SELECTS ── */
.field-border.select-field {
  padding-right: 3rem; /* espacio extra */
}
.field-border.select-field::after {
  content: "\25BC";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #0d6efd;
  font-size: .8rem;
}

/* ── BOTÓN TOGGLE ── */
.btn-toggle {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #0d6efd;
  font-size: 1.2rem;
  transition: color .2s;
}
.btn-toggle:hover {
  color: #084298;
}

/* ── BOTÓN PRINCIPAL ── */
.login-card .btn-primary {
  border-radius: .75rem;
  padding: .75rem;
  font-size: 1.05rem;
  width: 100%;
  transition: background-color .2s, transform .1s;
}
.login-card .btn-primary:hover {
  background-color: #0b5ed7;
  transform: translateY(-1px);
}
.login-card .btn-primary:active {
  transform: translateY(0);
}

/* ── ENLACES SECUNDARIOS ── */
.login-card .small a {
  color: #0d6efd;
  transition: color .2s;
}
.login-card .small a:hover {
  color: #084298;
}

/* ── FOOTER FRANJA ── */
.login-footer-stripe {
  background: #0d6efd;
  color: #fff;
  font-size: .85rem;
  position: fixed;
  bottom: 0;
  width: 100%;
  text-align: center;
  padding: .5rem 0;
  z-index: 1050;
}
.login-footer-stripe a {
  color: #fff;
  margin: 0 .5rem;
  text-decoration: none;
  transition: color .2s;
}
.login-footer-stripe a:hover {
  color: #dbe5ff;
}
.login-footer-stripe p {
  margin: .25rem 0 0;
  font-size: .75rem;
}

/* ── RESPONSIVE ── */
@media (max-width:768px) {
  .login-card { max-width: 90%; }
}

/* ── Ajustes extras para que el select y los campos sean más amplios y claros ── */

/* Hacer que el <select> flotante sea un poco más alto */
.field-border.select-field {
  padding: .9rem 1rem .6rem 3rem;  /* un poco más de padding vertical */
}

/* Aumentar ancho mínimo del dropdown para que no recorte texto */
.field-border.select-field select {
  min-width: 100%;                /* ocupa todo el ancho del contenedor */
}

/* Al hacer focus, la sombra interior nos ayuda a visualizar mejor */
.field-border:focus-within {
  box-shadow: inset 0 0 0 1px #0d6efd;
}

/* ── Override logo header ── */
header.app-header .header-logo {
  height: 40px !important;
  width: auto !important;
}

/* GRID DE AVATARES */
.avatar-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
}

/* CADA OPCIÓN */
.avatar-option {
  position: relative;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: .5rem;
  overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.avatar-option img {
  display: block;
  width: 48px;
  height: 48px;
}
.avatar-option:hover {
  transform: scale(1.05);
}

/* INPUT RADIO oculto */
.avatar-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* borde cuando está seleccionado */
.avatar-option input:checked + img {
  border: 2px solid #0d6efd;
  border-radius: .5rem;
}
.avatar-option input:checked + img,
.avatar-option input:checked {
  outline: 2px solid #0d6efd;
}

/* AVATAR PRINCIPAL */
.avatar-lg {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #0d6efd;
}

/* GRID DE AVATARES PEQUEÑOS */
.avatar-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
}

/* CADA OPCIÓN */
.avatar-option {
  position: relative;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: .5rem;
  overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.avatar-option img {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: cover;
}
.avatar-option:hover {
  transform: scale(1.1);
}

/* INPUT RADIO oculto */
.avatar-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* borde cuando está seleccionado */
.avatar-option input:checked + img {
  border: 2px solid #0d6efd;
  border-radius: .5rem;
}

/* Al seleccionar, actualizamos el preview (JS puro) */

/* ── Layout wrapper ── */
#wrapper {
  display: flex;
  transition: all .3s ease;
}

/* sidebar por defecto */
#sidebar {
  width: 250px;
  transition: width .3s ease;
}

/* contenido se adapta */
#page-content-wrapper {
  flex: 1;
  transition: margin-left .3s ease;
}

/* Cuando tenga la clase sidebar-collapsed */
#wrapper.sidebar-collapsed #sidebar {
  width: 0;
  overflow: hidden;
}

#wrapper.sidebar-collapsed #page-content-wrapper {
  margin-left: 0;
}

/* Asegura que el toggle button siempre visible */
.app-header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Ajusta la altura del logo */
.header-logo {
  height: 40px;
  object-fit: contain;
}

/* Contenedor principal */
#wrapper {
  display: flex;
  transition: all .3s;
}

/* Sidebar abierto por defecto */
#sidebar {
  width: 250px;
  transition: width .3s;
}

/* Contenido principal */
#page-content-wrapper {
  flex: 1;
  transition: margin-left .3s;
}

/* Cuando colapsa el sidebar */
#wrapper.sidebar-collapsed #sidebar {
  width: 0;
  overflow: hidden;
}
#wrapper.sidebar-collapsed #page-content-wrapper {
  margin-left: 0;
}

/* Logo reducido */
.header-logo {
  height: 40px;
  object-fit: contain;
}

.table-sm th, .table-sm td {
  padding: .3rem .5rem;
}

/* Compactar un poco más las tablas y textos pequeños */
.table-sm th,
.table-sm td {
  padding: 0.3rem;
  font-size: 0.85rem;
}
.alert-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}



