/* css/zclera.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@100;200;400&display=swap');

/* Reset & Basics */
*,
*::before,
*::after {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  outline: 0;
  border: 0;
}

/* Variables */
:root {
  --primary-color: #1a1a20;
  --secondary-color: #1f1f25;
  --font-white: #c5c5c5;
  --font-gray: #929292;
  --accent-color: #1ca1b0;

  /* Font Weights */
  --weight-light: 100;
  --weight-normal: 200;
  --weight-bold: 400;

  /* Perspective Effects */
  --big-shadow: 10px 43px 59px 0px #0000004a, -1px 1px 0px 0px #2a2c36 inset;
  --small-shadow: 1px 1px 4px 0px #2a2c36;
}

/* ========================================
   HTML & BODY
   ======================================== */

html {
  background: var(--primary-color);
  height: 100%;
  width: 100%;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-user-zoom: none;
}

body {
  display: flex;
  flex-direction: column;
  color: var(--font-white);
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: var(--weight-normal);
  font-size: 16px;
  width: 100%;
  height: 100%;
  text-align: center;
  justify-content: space-between;
  align-items: center;
}

main {
  flex: 1;
  min-width: 320px;
  max-width: 920px;
  width: 100%;
  padding: 20px;
}

header,
footer {
  position: relative;
  margin: 0 auto;
  width: 100%;
  flex: 0;
}

#logoutForm {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  font-size: 15px;
  font-weight: var(--weight-bold);
  transform: translateY(1px);
}

.logout-btn {
  background: none;
  border: none;
  padding: 0 0 9px 0 !important;
  font: inherit;
  cursor: pointer;
  height: 100%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  transform: translateY(5.2px);
  width: 100%;
}

.alert-container {
  width: 100%;
  max-width: 300px;
  margin: 10px auto;
  padding: 10px;
  background: rgba(255, 0, 0, 0.1);
  border: 1px solid rgba(255, 0, 0, 0.3);
  border-radius: 8px;
  text-align: center;
}

.alert-error {
  color: #ff4d4d;
  font-size: 14px;
  margin: 0;
}

/* ========================================
   FOOTER NAVIGATION
   ======================================== */

footer {
  background: linear-gradient(135deg, #050505 0%, #15191c 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 1.5rem;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1rem;
}

footer nav a {
  color: var(--font-gray);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  position: relative;
  transition: color 0.3s ease;
}

footer nav a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #00d4ff, #7b2cbf);
  transition: width 0.3s ease, left 0.3s ease;
}

footer nav a:hover {
  color: #ffffff;
}

footer nav a:hover::before {
  width: 80%;
  left: 10%;
}

@media (max-width: 800px) {
  footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    transform: translateY(calc(100% - 15px));
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
    background: #101415;
    /* Asegurar fondo sÃ³lido */
    border-radius: 15px 15px 0 0;
  }

  footer.expanded {
    transform: translateY(0);
  }

  footer::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
  }

  footer nav {
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding-top: 10px;
  }

  footer nav a {
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
  }
}

h1 {
  font-weight: var(--weight-light);
  font-size: 1.5em;
}

h2,
h3 {
  font-weight: var(--weight-normal);
}

.zclera-logo-login {
  width: 200px;
}

.separador_oscuro {
  position: relative;
  margin: 66px auto;
  border-top: 1px solid #25252b;
  border-bottom: 1px solid #14141f;
  width: 100%;
  height: 0px;
}

.login-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.login-form input:is([type="text"], [type="password"]) {
  width: 250px;
  height: 40px;
  margin: 10px 0;
  padding: 5px;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  font-size: 1em;
}

.login-form button {
  width: 250px;
  height: 40px;
  margin: 10px 0;
  padding: 5px;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  background-color: transparent;
  color: #e0e0e0;
  cursor: pointer;
  font-size: 1em;
  transition: all 0.3s ease;
}

.login-form button:hover {
  background-color: #e0e0e0;
  color: #141414;
}

/* ========================================
   HEADER / NAVEGACIÃ“N RESPONSIVA
   ======================================== */

.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #15191c 0%, #050505 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 100px;
}

/* Logo */
.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.logo-link:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.logo-link img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

/* NavegaciÃ³n principal */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 0.5rem;
}

.nav-link {
  display: block;
  padding: 0.6rem 1.2rem;
  color: #e0e0e0;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: var(--weight-bold);
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #00d4ff, #7b2cbf);
  transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover {
  color: #ffffff;
  /*   background: rgba(255, 255, 255, 0.08); */
}

.nav-link:hover::before {
  width: 80%;
  left: 10%;
}

.nav-link.active {
  color: #00d4ff;
}

/* Underscore visible en el link activo */
.nav-link.active::before {
  width: 80%;
  left: 10%;
}

/* BotÃ³n Hamburguesa - Oculto por defecto */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 8px;
  background-color: transparent;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.3s ease;
}

.hamburger-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #e0e0e0;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* AnimaciÃ³n hamburguesa activa (X) */
.hamburger-btn.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ========================================
   RESPONSIVE - Móvil (Max 800px)
   ======================================== */

@media (max-width: 800px) {
  .hamburger-btn {
    display: flex;
  }

  .main-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 70vh;
    background: linear-gradient(135deg, #15191c 0%, #050505 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px 24px 0 0;
    padding: 1.5rem 1rem 2rem;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    text-align: center;
  }

  .main-nav.open {
    transform: translateY(0);
  }

  /* Indicador de arrastre (pill) */
  .main-nav::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
  }

  .nav-list {
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.5rem;
    width: 100%;
  }

  .nav-link {
    padding: 1.1rem 1.4rem;
    font-size: 1.15rem;
    border-radius: 12px;
    /* background: rgba(255, 255, 255, 0.05); */
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  .nav-link:hover,
  .nav-link:active {
    /* background: rgba(255, 255, 255, 0.12); */
    transform: scale(0.98);
  }
}

/* Overlay para cerrar menÃº al hacer clic afuera */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.nav-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* ========================================
   CALENDARIO
   ======================================== */

.calendario {
  position: relative;
  margin: 70px auto 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  min-width: 300px;
  max-width: 400px;
  width: 100%;
  height: 200px;
  background-color: #1a1d22;
  border-radius: 8px;
  padding: 10px;
  font-weight: var(--weight-normal);
  text-align: center;
  border: 1px solid #33384e;
  box-shadow: var(--big-shadow);
}

#hora_actual {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  flex-direction: row;
  gap: 0px;
  transform: translateX(-25px);
}

#hora_actual span {
  display: flex;
  gap: 5px;
  text-shadow: -2px 9px 9px #0000008f;
}

#hora_actual span:nth-child(-n+3) {
  font-size: 5.5em;
  text-shadow: -2px 9px 9px #0000003b;
}

#hora {
  min-width: 136px;
  max-width: 136px;
  width: 100%;
  justify-content: right;
}

#minutos {
  min-width: 136px;
  max-width: 136px;
  width: 100%;
  justify-content: left;
}


#segundos {
  width: 25px;
  position: absolute;
  transform: translate(0px, 14px);
  justify-content: center;
  font-size: 11px;
  opacity: .5;
}

#puntos {

  width: 30px;
  justify-content: center;
  align-items: center;
}

#ampm_actual {
  justify-content: left;
  font-size: 38px;
  position: absolute;
  right: -35px;
  top: 56px;
  font-weight: var(--weight-light);
  text-shadow: -2px 9px 9px #0000008f;
}

#fecha_actual {
  font-size: 1.4em;
}

/* ========================================
   HOME LAB STATUS TABLE
   ======================================== */

.home-status_container {
  position: relative;
  margin: 54px auto 0 auto;
  background-color: #1a1d22;
  min-width: 340px;
  max-width: 480px;
  width: 100%;
  padding: 21px 0 35px 0;
  border-radius: 10px;
  border: 1px solid #272c3d;
  box-shadow: var(--big-shadow);
}

.home-status-table {
  width: 100%;
  border-collapse: collapse;
}

.home-status-table h2 {
  font-weight: var(--weight-light);
  color: #9e9e9e;
}

.home-status-table th,
.home-status-table td {
  border: 1px solid #404141;
  padding: 8px;
  text-align: center;
}

.home-status-table th {
  background-color: #404141;
  font-weight: var(--weight-light);
  color: #b8b8b8;
}

.home-status-table td {
  background-color: #22252e;
}

/* ========================================
   HOME LAB STATUS TABLE
   ======================================== */

.btns-container {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  position: relative;
  margin: 54px auto 0 auto;
  align-items: center;
  flex-direction: row;
  flex-wrap: wrap;
  min-width: 320px;
  max-width: 480px;
  width: 100%;
  padding: 10px;
  background-color: #101317;
  border-radius: 10px;
  border: 1px solid #262c3d;
  box-shadow: var(--big-shadow);
}

.btns-container .btn {
  padding: 35px 0;
  border-radius: 5px;
  border: none;
  background-color: #1a1d22;
  color: white;
  cursor: pointer;
  flex: 1 0 auto;
  width: 33%;
  color: #c5c5c5;
  transition: all 0.3s ease;
}

.btns-container .btn:hover {
  background-color: #303247;
}

/* ========================================
   BUSCADOR DE PACIENTES
   ======================================== */

#searchContainer {
  position: absolute;
  top: 84px;
  z-index: 100;
  width: 100%;
  height: 50px;
}

.search-wrapper {
  position: absolute;
  top: 0;
  left: 21px;
  display: flex;
  align-items: center;
  flex-direction: row;
  background: linear-gradient(145deg, #1a1d22, #15181c);
  border-radius: 25px;
  padding: 4px;
  box-shadow:
    inset 2px 2px 5px rgba(0, 0, 0, 0.4),
    inset -1px -1px 3px rgba(255, 255, 255, 0.05),
    0 4px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  width: 50px;
  height: 50px;
  overflow: hidden;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.search-wrapper.expanded {
  width: 280px;
  border-color: rgba(28, 161, 176, 0.3);
  box-shadow:
    inset 2px 2px 5px rgba(0, 0, 0, 0.4),
    inset -1px -1px 3px rgba(255, 255, 255, 0.05),
    0 4px 20px rgba(28, 161, 176, 0.15);
}

#searchInput {
  flex: 1;
  min-width: 0;
  width: 0;
  background: transparent;
  border: none;
  outline: none;
  padding: 12px 0;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: var(--weight-normal);
  color: var(--font-white);
  letter-spacing: 0.3px;
  opacity: 0;
  transition: opacity 0.2s ease 0s,
    padding 0.3s ease,
    width 0.3s ease;
}

.search-wrapper.expanded #searchInput {
  width: 100%;
  padding: 12px 16px;
  opacity: 1;
  transition: opacity 0.3s ease 0.1s,
    padding 0.3s ease,
    width 0.3s ease;
}

#searchInput::placeholder {
  color: var(--font-gray);
  opacity: 0.7;
  font-weight: var(--weight-light);
}

#searchBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #101417;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

#searchBtn svg {
  width: 18px;
  height: 18px;
  color: var(--font-gray);
  transition: color 0.3s ease;
}

#searchBtn:hover {
  background: linear-gradient(145deg, #2a2e35, #1f2328);
}

#searchBtn:hover svg {
  color: var(--accent-color);
}

.search-wrapper.expanded #searchBtn svg {
  color: var(--accent-color);
}

#searchBtn:active {
  transform: scale(0.95);
}

/* Resultados de búsqueda */
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: linear-gradient(145deg, #1a1d22d7, #15181ce0);
  border-radius: 16px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  max-height: 300px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 101;
  /* blure elements behind container */
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);

}

.search-results.active {
  opacity: 1;
  visibility: visible;
  transform: translate(0px, 32px);
  position: relative;
  margin: 0 auto;
  width: 370px;
}

#searchList {
  list-style: none;
  margin: 0;
  padding: 8px;
}

#searchList li {
  padding: 12px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

#searchList li:hover {
  background: rgba(28, 161, 176, 0.1);
}

#searchList li:active {
  background: rgba(28, 161, 176, 0.15);
  transform: scale(0.98);
}

#searchList li .paciente-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-color), #0d7a86);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: var(--weight-bold);
  color: #fff;
  text-transform: uppercase;
  flex-shrink: 0;
}

#searchList li .paciente-info {
  flex: 1;
  text-align: left;
  overflow: hidden;
}

#searchList li .paciente-nombre {
  font-size: 0.9rem;
  font-weight: var(--weight-bold);
  color: var(--font-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#searchList li .paciente-detalle {
  font-size: 0.75rem;
  color: var(--font-gray);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Estados vacío y cargando */
.search-empty,
.search-loading {
  padding: 24px 16px;
  text-align: center;
  color: var(--font-gray);
  font-size: 0.85rem;
}

.search-loading span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.search-loading span::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid rgba(28, 161, 176, 0.3);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Scrollbar personalizado para resultados */
.search-results::-webkit-scrollbar {
  width: 6px;
}

.search-results::-webkit-scrollbar-track {
  background: transparent;
}

.search-results::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Responsive para móvil */
@media (max-width: 800px) {
  #searchContainer {
    position: absolute;
    top: 84px;
    left: 0;
    transform: none;
    margin: 0 auto;
    padding: 10px 20px;
    width: 100%;
  }

  .search-wrapper {
    min-width: 50px;
    max-width: 320px;
    position: absolute;
    left: 21px;
    top: 0;
  }

  .search-results {
    max-width: 368px;
    margin: 0 auto;
  }

  .search-results.active {
    position: relative;
    margin: 0 auto;
    opacity: 1;
    visibility: visible;
    transform: translate(0, 44px);
  }
}

.return-btn {
  display: block;
  margin-top: 20px;
  text-align: center;
  color: var(--font-gray);
  text-decoration: none;
  font-size: 0.9rem;
}

.return-btn:hover {
  color: var(--font-white);
}

.btn-primary,
.btn-secondary {
  padding: 12px 25px;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-weight: var(--weight-bold);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex: 1;
}

.btn-primary {
  background: var(--accent-color);
  color: white;
  border: none;
  box-shadow: 0 4px 15px rgba(28, 161, 176, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(28, 161, 176, 0.4);
  filter: brightness(1.1);
}


.progress-container {
  position: relative;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0px;
  min-width: 340px;
  max-width: 490px;
  width: 100%;
  padding: 0 14px 0 7px;
}

.progress-container label {
  color: #9b9b9bff;
  font-size: .7rem;
  width: 56px;
}

.progress-container progress {
  width: 90%;
  height: 2px;
  border-radius: 1px;
  border: none;
  background-color: #33384e;
  -webkit-appearance: none;
  appearance: none;
}

/* Barra de progreso - Chrome/Safari */
.progress-container progress::-webkit-progress-bar {
  background-color: #33384e;
  border-radius: 1px;
}

.progress-container progress::-webkit-progress-value {
  background-color: var(--accent-color);
  border-radius: 1px;
}

/* Barra de progreso - Firefox */
.progress-container progress::-moz-progress-bar {
  background-color: var(--accent-color);
  border-radius: 1px;
}

.forma-paciente {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 340px;
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  background-color: #1a1d22;
  border: 1px solid #272c3d;
}

.forma-paciente label {
  color: #fff;
}

.forma-paciente input {
  padding: 14px 7px;
  border-radius: 4px;
  border: 1px solid #262c3d;
  background-color: #101417;
  color: #cbcbcb;
}

.forma-paciente fieldset {
  display: flex;
  flex-direction: row;
  gap: 2px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.forma-paciente fieldset input {
  flex: 1 0;
}

.forma-paciente fieldset legend {
  margin-bottom: 10px;
}

.forma-paciente fieldset:nth-child(2) input:nth-child(2) {
  flex: 1 0 23%;
}

.forma-paciente fieldset:nth-child(2) input:nth-child(3) {
  flex: 1 0 64%;
}

.forma-paciente fieldset:nth-child(5) input:nth-child(2) {
  flex: 1 0 50%;
}

.forma-paciente fieldset:nth-child(5) input:nth-child(3) {
  flex: 1 0 20%;
}

.sexo input[type="radio"] {
  display: none;
}

.sexo label {
  flex: 1 25%;
  display: flex;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  cursor: pointer;
  opacity: .7;
  transition: opacity 0.3s ease;
}

.sexo label:hover {
  opacity: 1;
}

/* if input radio is checked */
.sexo input[type="radio"]:checked+label {
  opacity: 1;
  font-weight: bold;
}

.sexo input[type="radio"]:checked+label::before {
  content: '✓';
  margin-right: 6px;
  font-size: 0.85em;
  animation: checkIn 0.2s ease-out;
}

@keyframes checkIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.sexo label:nth-child(3) {
  background-color: #16526eff;
}

.sexo label:nth-child(5) {
  background-color: #603c69ff;
}

.toaster {
  position: fixed;
  bottom: -150px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #ffd453f1;
  color: #1a1a1a;
  padding: 14px 24px;
  border-radius: 10px 10px 0 0;
  font-weight: 600;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 50;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  text-align: center;
  max-width: 90%;
  min-width: 280px;
}

.toaster.show {
  bottom: 65px;
}

/* Antecedentes Clínicos */
h3 {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 5px;
}

/* Contenedor de los Chips */
.chip-container {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 30px;
}

/* El Input Checkbox real (oculto pero accesible) */
.chip-checkbox {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* El Estilo del Chip (Label) */
.chip-label {
  border-radius: 7px;
  padding: 7px 14px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  display: flex;
  align-items: center;
  user-select: none;
  border: 1px solid #27294a;
  background-color: #121517;
  justify-content: center;
  flex-direction: row;
}

/* Efecto Hover (Desktop) */
.chip-label:hover {
  border-color: #434789;
  background-color: #463d73;
}

/* Estado Seleccionado (Checked) */
.chip-checkbox:checked+.chip-label {
  background-color: rgba(99, 102, 241, 0.15);
  border-color: #434565;
  color: #fff;
  box-shadow: 0 0 8px #6a6fc491;
  font-weight: 300;
}

/* Pequeño indicador visual (opcional) */
.chip-checkbox:checked+.chip-label::before {
  /* content: "✓"; */
  margin-right: 8px;
  color: #bdc0e9ff;
  font-weight: bold;
}

/* Campo de texto para "Otros" u Observaciones */
.notes-area {
  width: 100%;
  background-color: #121518;
  border: 1px solid #262c3d;
  box-shadow: 0 0 21px #23282b;
  border-radius: 8px;
  color: #c0c0c0;
  padding: 12px;
  font-family: inherit;
  font-size: 16px;
  resize: vertical;
  outline: none;
  min-height: 80px;
}

.notes-area:focus {
  border-color: #02d4fe;
}

/* Refacción o Refractometría */

.forma-refaccion {
  min-width: 340px;
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  background-color: #1a1d22;
  border: 1px solid #272c3d;
}

.refraction-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .refraction-container {
    grid-template-columns: 1fr;
    /* Una columna en celular */
  }
}

.eye-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  position: relative;
}

/* Distinción sutil para OD y OI si quisieras */
.eye-card.od {
  border-top: 3px solid #bf2d47;
}

/* Azul/Morado Zclera */
.eye-card.oi {
  border-top: 3px solid #1db09aff;
}

/* Verde sutil o similar */

.eye-title {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
}

.rx-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.input-group {
  display: flex;
  flex-direction: column;
}

.input-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 5px;
  text-transform: uppercase;
}

.rx-input {
  background: #0f1115;
  border: 1px solid var(--border);
  color: #fff;
  padding: 10px;
  border-radius: 6px;
  font-size: 1rem;
  text-align: center;
  width: 100%;
  /* Asegura que llene el espacio */
}

.rx-input:focus {
  border-color: var(--accent);
  outline: none;
}

.av-section {
  margin-top: 15px;
  border-top: 1px solid var(--border);
  padding-top: 15px;
}

.nasopupilar {
  max-width: 200px;
  position: relative;
  margin: 35px auto;
}