/* --- Reset y fuentes --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Manrope', sans-serif;
  background-color: #F0F0F0;
  -webkit-text-size-adjust: 100%;
  /* Prevent iOS text size adjustment */
  -webkit-tap-highlight-color: transparent;
  /* Remove tap highlight on iOS */
}

/* Smooth scrolling for all devices */
html {
  scroll-behavior: smooth;
}

/* Viewport meta tag should be added to HTML head:
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=yes">
*/

/* --- Contenedor principal --- */
.container {
  display: flex;
  justify-content: center;
  height: 100%;
  flex-wrap: wrap;

}

.centrar-vertical {
  align-items: center;
  min-height: 100vh;
}

.container-inputs {
  display: flex;

  width: 100%;
  height: 100%;
}

/* --- Tarjeta del formulario --- */
.register {
  background-color: #fff;
  padding: 40px 30px;
  width: 90%;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);

  max-width: 100%;
}

.register h1 {
  font-size: 1.8rem;
  color: #70C3B6;
}

/* --- Input containers --- */
.input-container {
  position: relative;
  margin-bottom: 20px;
}

/* Inputs y select */
/* Usamos el mismo estilo para ambos */
.input-container input,
.input-container select {
  width: 100%;
  padding: 10px 40px 10px 0;
  border: none;
  border-bottom: 1px solid #E0E0E0;
  font-size: 1rem;
  color: #A0A0A0;
  background: transparent;
}

.msj-exito {
  margin: 12px 0;
  padding: 10px 12px;
  background: #c1f7ef;
  color: #70C3B6;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  animation: fadeIn .25s ease-in-out;
  text-align: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn-remove {
  cursor: pointer;
}

.mas-button {
  cursor: pointer;
}

.input-container input::placeholder,
select {
  color: #A0A0A0;
}

/* Color de cada opción en el desplegable */
select option {
  color: #A0A0A0;
  /* color del texto de las opciones */
}

/* 1) Forzar renderizado en tema claro */
input[type="date"] {

  color: #A0A0A0;

}

label {
  color: #A0A0A0;
  font-size: 1rem;
  margin-bottom: 5px;
  display: block;
  font-family: 'DM Sans', sans-serif;
}

/* 2) Color del texto interno (día / mes / año) en WebKit */
input[type="date"]::-webkit-datetime-edit,
input[type="date"]::-webkit-datetime-edit-text,
input[type="date"]::-webkit-datetime-edit-fields-wrapper,
input[type="datetime-local"]::-webkit-datetime-edit,
input[type="datetime-local"]::-webkit-datetime-edit-text,
input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper {
  color: #A0A0A0;
}

/* 3) Estilizar el icono de calendario nativo */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  opacity: 1;
  cursor: pointer;
  filter: invert(0.6);
  position: absolute;
  right: 0px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
}

.upload-button {
  background-color: #70C3B6;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: 0.3s ease;
}

.upload-button:hover {
  background-color: #00c2d0;
}

.file-name {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #666;
}



.input-container select {
  appearance: none;
  /* Oculta flecha nativa */
}

.mb-20 {
  margin-bottom: 40px;
}

/* Iconos dentro del input */
.input-container i {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #A0A0A0;
  font-size: 1.2rem;
  pointer-events: none;
}

/* Botón enviar */
.input-container button[type="submit"],
.add-button {
  width: 100%;
  background-color: #70C3B6;
  color: #fff;
  font-size: 1rem;
  padding: 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity .2s;
}

/* Botones con enlaces: padding en el enlace para área clickeable completa */
.add-button:has(a),
.btn:has(a) {
  padding: 0;
}

.add-button a {
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 12px;
  box-sizing: border-box;
}

.btn a {
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 6px 18px;
  box-sizing: border-box;
}

.input-container button[type="submit"]:hover,
.add-button:hover {
  opacity: 0.9;
}

.add-button {
  width: 80px;
}

/* Texto pequeño de términos */
.terms {
  display: block;
  text-align: center;
  font-size: 0.75rem;
  color: #999;
  margin-top: 15px;
}

.terms a {
  color: #70C3B6;
  text-decoration: none;
}

.d-1-input,
.d-2-input {
  flex: 1 0 48%;
  max-width: 48%;
  margin-right: 10px;
}

.d-3-input {
  flex: 1 0 70%;
  max-width: 70%;
  margin-right: 10px;
}

.d-4-input {
  flex: 1 0 25%;
  max-width: 25%;
  margin-right: 10px;
}


.btn-secondary {
  width: 100%;
  background-color: #ffffff;
  color: #70C3B6;
  font-size: 1rem;
  padding: 12px;
  border: 2px solid #70C3B6;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background-color: #70C3B6;
  color: white;
}

/* --- Ajustes de la columna derecha --- */
.d-2,
.d-1 {
  flex-basis: 1;
  display: flex;
  justify-content: center;
  align-items: center;

}

.d-2 .contact {
  text-align: left;

}

.d-2 .contact h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.d-2 .contact h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.d-2 .contact p {
  font-family: 'DM Sans', sans-serif;
  margin: 4px 0;
  color: #14110F;
}

.d-2 .contact p:first-of-type {
  font-weight: bold;
}

.dias-horas {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dias-horas input {
  width: auto;
  flex: 0 0 auto;
}

.mas-button,
.btn-remove {
  color: #A0A0A0;
  margin-left: 20px;
  font-size: 14px;
  font-weight: bold;
  font-family: 'DM Sans', sans-serif;
  width: 25px;
  height: 25px;
  background-color: transparent;
  border: 2px solid #A0A0A0;
  border-radius: 3px;
  cursor: pointer;

}

.msg-no-more {
  margin-bottom: 20px;
}

.btn-remove {
  width: 15px;
  height: 25px;
  font-size: 10px;
}

.p-proveedor {
  color: #A0A0A0;
  font-size: 14px;
  margin-bottom: 20px;
}

/* Ajusta iconos y espaciados internos de la sección de contacto según necesites */







/* 1. Estilos al enfocar (focus) */
input:focus,
select:focus {
  outline: none;
  /* quitamos el outline por defecto */
  border: 0px;
  /* borde destacado */
  border-bottom: 1px solid #70C3B6;
  /* Cambia el color del borde al enfocar */
}

.d-2 .contact {
  max-width: 320px;
  width: 100%;
}

/* Títulos */
.d-2 .contact h2 {
  font-family: 'Manrope', sans-serif;
  font-weight: bold;
  font-size: 1.5rem;
  color: #70C3B6;
  margin-bottom: 8px;
}

.d-2 .contact h3 {
  font-family: 'Antonio', sans-serif;
  font-weight: bold;
  font-size: 2rem;
  color: #14110F;
  margin: 4px 0;
}

/* Cada bloque de contacto */
.contact-item {
  display: flex;
  align-items: flex-start;
  margin-top: 50px;
}

/* Iconos */
.contact-item i {
  font-size: 2rem;
  color: #14110F;
  margin-right: 16px;
  /* para alinear un poco hacia arriba si el texto ocupa varias líneas */
  margin-top: 8px;
  margin-right: 30px;
}

/* Texto de cada bloque */
.contact-info {
  display: flex;
  flex-direction: column;
}

.contact-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  margin: 0;
  color: #14110F;
}

.contact-detail {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  margin: 2px 0 0;
  color: #444;
  /* puedes ajustar el gris */
}

.container-menu {
  min-height: 100vh;
  background-color: #70C3B6;
  flex-basis: 20%;
  padding-top: 0px;
  margin-top: 0px;
}

.logo {
  width: 150px;
}

.container-registros {
  flex-basis: 80%;
}

/* --- Contenedor de las dos opciones --- */
.radio-options {
  display: flex;
  align-items: center;
  gap: 24px;
  /* espacio entre “Sí” y “No” */
  margin-top: 4px;
  /* un pelín de espacio tras la pregunta */
  margin-top: 20px;
}

/* --- Cada opción --- */
.radio-option {
  display: flex;
  align-items: center;
  gap: 6px;
  /* espacio icono/texto */
  cursor: pointer;
}

/* --- Estilo del radio propiamente dicho --- */
.radio-option input[type="radio"] {
  appearance: none;

  border: 1px solid #A0A0A0;
  border-radius: 3px;
  position: relative;
  /* para el ::after */
}

/* --- Al estar CHECKED, pintamos el cuadradito interior --- */
.radio-option input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 4px;
  width: 80%;
  height: 16px;
  background-color: #70C3B6;
  border-radius: 1px;
}

/* --- Texto de las opciones --- */
.radio-option span {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: #A0A0A0;
}


.cirguia {
  display: flex;
  font-size: 15px;
  margin-bottom: 0px;
  padding-top: 18px;
}

.cirugia-input-check {
  margin-left: 10px;
  font-weight: bold;
  font-family: 'DM Sans', sans-serif;
  width: 20px !important;
  height: 20px;
  border: 3px solid #A0A0A0;
  border-radius: 3px;
  cursor: pointer;
}

.w-48 {
  flex-basis: 48%;
}

/* Mobile First Responsive Design */

/* Extra small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
  .container {
    height: auto;
    min-height: 100vh;
  }

  /* Desactivar centrado vertical en móviles */
  .centrar-vertical {
    align-items: flex-start;
    padding-top: 20px;
  }

  .register {
    width: 95%;
    padding: 15px;
    margin: 10px 0;
    background-color: #fff !important;
  }

  .register h1 {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 20px;
  }

  h1 {
    font-size: 1.8rem !important;
  }

  .titulo-listado h1 {
    font-size: 1.6rem !important;
  }

  .add-button {
    width: 20%;
    padding: 6px 12px;
    font-size: 12px;
  }

  .mas-button {
    width: 20px;
    height: 20px;
    font-size: 12px;
    margin-left: 8px;
  }

  .btn-remove {
    width: 20px;
    height: 20px;
    font-size: 10px;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
  }

  /* Form inputs */
  .input-container {
    margin-bottom: 15px;
  }

  .input-container input,
  .input-container select {
    padding: 12px 10px;
    font-size: 16px;
    /* Prevent zoom on iOS */
  }

  /* Flex inputs for mobile */
  .d-1-input,
  .d-2-input,
  .d-3-input,
  .d-4-input {
    flex: 1 0 100%;
    max-width: 100%;
    margin-right: 0;
    margin-bottom: 15px;
  }

  .container-inputs {
    flex-direction: column;
  }

  /* Buttons */
  .input-container button[type="submit"],
  .add-button {
    padding: 15px;
    font-size: 16px;
    margin-top: 10px;
  }

  .add-button {
    width: 100%;
  }

  /* Layout columns */
  .d-1,
  .d-2 {
    flex: 1 0 100%;
    max-width: 100%;
  }

  /* Reducir margen del formulario */
  .d-1 {
    margin-bottom: 10px;
  }

  /* Reducir margen de la sección de ayuda */
  .d-2 {
    margin-bottom: 20px;
    margin-top: 10px;
  }

  /* Contact section mobile */
  .d-2 .contact {
    max-width: 100%;
    text-align: center;
  }

  .contact-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 15px;
  }

  .contact-item i {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
  }

  /* Menu container mobile */
  .container-menu {
    flex-basis: 100%;
    min-height: auto;
    padding: 0;
    margin: 0;
  }

  .container-registros {
    flex-basis: 100%;
  }

  /* Sidebar mobile */
  .sidebar {
    border-radius: 0;
    margin: 0;
    padding: 0;
  }

  .avatar {
    width: 100px;
    height: 100px;
    border-width: 4px;
  }

  .care-name {
    font-size: 1rem;
  }

  /* Patient list mobile */
  .listado-pacientes {
    padding: 10px;
  }

  .titulo-listado {
    flex-basis: 100%;
    flex-direction: column;
    gap: 15px;
    padding: 15px;
  }

  .titulo-con-back {
    gap: 10px;
    justify-content: center;
  }

  .listado {
    width: 100%;
  }

  .list-item {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    padding: 15px;
    gap: 12px;
  }

  .paciente-avatar {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
    min-width: 60px;
    margin: 0;
    border-radius: 50%;
  }

  .paciente-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
  }

  .paciente-info p {
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    font-size: 14px;
    margin: 0;
  }

  .paciente-nombre {
    font-weight: 600;
    font-size: 16px !important;
    color: #14110F;
    margin-bottom: 2px !important;
  }

  .paciente-genero,
  .paciente-fecha {
    color: #606060;
    font-size: 13px !important;
  }

  .acciones {
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 6px;
    align-items: center;
  }

  .btn {
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
  }

  .btn-ver {
    padding: 0;
    font-size: 11px;
    line-height: 1.2;
  }

  .btn-editar {
    padding: 6px 10px;
  }

  .btn a {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Cards mobile */
  .cards {
    flex-direction: column;
    gap: 10px;
  }

  .card {
    min-width: auto;
    width: 100%;
  }

  /* Submenu mobile */
  .sub-menu-items {
    flex-direction: column;
    gap: 10px;
    padding: 10px 15px;
  }

  .tipo-item-menu {
    text-align: center;
    padding: 10px 15px;
  }

  /* Calendar mobile */
  #calendar {
    margin-top: 10px;
    padding: 10px;
  }

  .fc-toolbar {
    flex-direction: column;
    gap: 10px;
  }

  .fc-toolbar-title {
    font-size: 1.2rem;
  }

  /* Radio options mobile */
  .radio-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  /* File upload mobile */
  .upload-button {
    width: 100%;
    padding: 12px;
  }

  /* Indicators mobile */
  .indicadores-contenedor {
    width: 100%;
    padding: 0 10px;
  }

  .filtros-row {
    flex-direction: row;
    gap: 10px;
    flex-wrap: wrap;
  }

  .filtro-item {
    flex: 1 1 45%;
    max-width: 48%;
    min-width: 120px;
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {

  /* Desactivar centrado vertical */
  .centrar-vertical {
    align-items: flex-start;
    padding-top: 20px;
  }

  .register {
    width: 90%;
    padding: 25px;
  }

  /* Mantener columnas en vertical */
  .d-1,
  .d-2 {
    flex: 1 0 100%;
    max-width: 100%;
  }

  .d-1 {
    margin-bottom: 15px;
  }

  .d-2 {
    margin-bottom: 20px;
    margin-top: 15px;
  }

  .d-2 .contact {
    max-width: 100%;
    text-align: center;
  }

  .contact-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* Reducir espacio del menú/sidebar */
  .container-menu {
    min-height: auto;
    padding: 10px 0;
  }

  .avatar {
    width: 100px;
    height: 100px;
    border-width: 4px;
  }

  .care-name {
    font-size: 1rem;
    margin: 0.5rem 0 0;
  }

  .profile {
    padding: 0.5rem 1rem;
  }

  .nav {
    padding: 0.25rem 0.5rem 0.5rem;
  }

  .nav a {
    padding: 10px 14px;
  }

  .d-1-input,
  .d-2-input {
    flex: 1 0 48%;
    max-width: 48%;
    margin-right: 10px;
  }

  .d-3-input,
  .d-4-input {
    flex: 1 0 100%;
    max-width: 100%;
    margin-right: 0;
    margin-bottom: 15px;
  }

  .list-item {
    flex-direction: row;
    align-items: center;
  }

  .paciente-info {
    flex-direction: row;
  }

  .paciente-info p {
    flex: 1 0 33.333%;
  }

  .sub-menu-items {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
  }

  h1 {
    font-size: 1.6rem !important;
  }

  .titulo-listado h1 {
    font-size: 1.5rem !important;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .register {
    width: 85%;
    padding: 30px;
  }

  .d-1,
  .d-2 {
    flex: 1 0 100%;
    max-width: 100%;
    margin-bottom: 30px;
  }

  .contact-item {
    align-items: flex-start;
    margin-top: 20px;
  }

  .container {
    height: auto;
  }

  .container-menu {
    flex-basis: 25%;
  }

  .container-registros {
    flex-basis: 75%;
  }

  .list-item-half {
    flex-basis: 100%;
    margin-bottom: 15px;
  }

  .listado-half {
    flex-direction: column;
  }

  h1 {
    font-size: 1.7rem !important;
  }

  .titulo-listado h1 {
    font-size: 1.6rem !important;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .register {
    max-width: 1000px;
  }

  .container-menu {
    flex-basis: 20%;
  }

  .container-registros {
    flex-basis: 80%;
  }

  .list-item-half {
    flex-basis: 48%;
  }

  .listado-half {
    flex-direction: row;
  }
}

.verde {
  color: #70C3B6;
  font-weight: bold;
}

.listado-pacientes {
  align-items: start;
  justify-content: center;
  height: 100%;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
}

.titulo-listado {
  flex-basis: 95%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  background-color: white;
  padding: 20px;
  border-radius: 20px;
}

.titulo-listado h1 {
  flex-basis: 95%;
}

.titulo-con-back {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
}

.register .titulo-con-back {
  margin-bottom: 20px;
}



/* contenedor general */
.listado {
  width: 95%;

  height: 90%;
  display: flex;
  flex-direction: column;

  /* separación entre filas */
}

/* contenedor general */
.listado-half {
  width: 95%;

  height: 90%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;

  /* separación entre filas */
}

/*  FILA (toda la tarjeta)  */
.list-item {
  display: flex;
  /* fila principal */
  align-items: center;
  padding: 20px;
  border-radius: 20px;
  background: #fff;
  gap: 12px;
  /* separación opcional */
  margin-top: 20px;
}

.list-item-half {
  display: flex;
  flex-basis: 48%;
  align-items: center;
  padding: 20px;
  border-radius: 20px;
  background: #fff;
  gap: 12px;
  margin-top: 20px;
}

/*  Columna 1: avatar — 10 %  */
.paciente-avatar {
  flex: 0 0 5%;
  /* grow 0, shrink 0, basis 10% */

  aspect-ratio: 1/1;
  /* mantiene el círculo proporcional */
  border-radius: 50%;

}

/*  Columna 2: info — 70 %  */
.paciente-info {
  flex: 0 0 60%;
  max-width: 75%;
  display: flex;
  /* reparte los <p> en horizontal */
  gap: 8px;
  /* separación entre textos (opcional) */
}

/*  Columna 2: info — 70 %  */
.runtina-info {
  flex: 0 0 75%;
}

.paciente-info p {
  flex: 0 0 33.333%;
  /* cada uno ocupa exactamente 1/3 del bloque */
  margin: 0;
  /* quita márgenes por defecto */
  overflow: hidden;
  /* texto largo → se corta sin romper diseño */
  text-overflow: ellipsis;
  white-space: nowrap;
}

/*  Columna 3: acciones — 20 %  */
.acciones {
  flex: 0 0 20%;
  max-width: 20%;
  display: flex;
  justify-content: flex-end;
  /* alinea botones a la derecha */
  gap: 8px;
}

/* botones (ejemplo rápido) */
.btn {
  border: none;
  border-radius: 6px;
  padding: 6px 18px;
  font-size: .85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-ver {
  background: #70C3B6;
  color: #fff;
}

.btn-editar {
  background: transparent;
  color: #70C3B6;
}


/* ── Panel principal ─────────────────────────────────────────── */
.panel {

  margin: 0 auto;
  flex-basis: 95%;
  background: var(--bg-section);
  margin-top: 20px;

}

/* ── Encabezado de cada sección ──────────────────────────────── */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  padding: 12px 20px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  font-weight: 600;
  color: var(--mint);
  font-size: 1.05rem;
  color: #70C3B6;
}

.section-header .edit {
  font-size: 1rem;
  color: var(--mint);
  cursor: pointer;
}

.mt-20 {
  margin-top: 20px;
}

/* ── Contenedor de tarjetas ──────────────────────────────────── */
.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 16px;
  margin-bottom: 28px;
}

/* ── Tarjeta individual ──────────────────────────────────────── */
.card {
  background: #ffffff;
  border-radius: 8px;
  padding: 16px 22px;
  min-width: 180px;
  /* ancho mínimo para quepan varias en fila */
  box-shadow: 0 3px 6px var(--card-shadow);
}

.card .title {
  font-weight: 600;
}

.card .subtitle {
  font-size: 0.85rem;
  color: #606060;
}

/* === ANIMACIONES REUTILIZABLES === */

/* Fade In */
.animate-fade-in {
  opacity: 0;
  animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Slide Up */
.animate-slide-up {
  opacity: 0;
  transform: translateY(8px);
  animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Slide Right */
.animate-slide-right {
  opacity: 0;
  transform: translateX(-8px);
  animation: slideRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Slide Left */
.animate-slide-left {
  opacity: 0;
  transform: translateX(8px);
  animation: slideLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Zoom In */
.animate-zoom-in {
  opacity: 0;
  transform: scale(0.98);
  animation: zoomIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Bounce */
.animate-bounce {
  animation: bounce 1s ease infinite;
}

/* Delay Modifiers */
.delay-1 {
  animation-delay: 0.2s;
}

.delay-2 {
  animation-delay: 0.4s;
}

.delay-3 {
  animation-delay: 0.6s;
}

.delay-4 {
  animation-delay: 0.8s;
}

.delay-5 {
  animation-delay: 1s;
}

/* Mobile touch optimization */
@media (max-width: 991.98px) {

  /* Increase touch targets */
  .btn,
  a,
  .upload-button,
  .btn-secondary {
    min-height: 35px;
    min-width: 60px;
  }

  /* Navigation touch targets */
  .nav a {
    padding: 16px 18px;
  }

  /* Form elements */
  .input-container input,
  .input-container select {
    min-height: 44px;
  }

  /* Radio and checkbox touch targets */
  .radio-option input[type="radio"],
  .cirugia-input-check {
    min-width: 24px !important;
    min-height: 24px !important;
  }

  /* Calendar touch targets */
  .fc-daygrid-day {
    min-height: 40px;
  }

  .fc-button {
    min-height: 44px;
    padding: 8px 12px;
  }

  /* Menu items */
  .tipo-item,
  .tipo-item-menu {
    min-height: 44px;
    padding: 12px 20px;
  }
}

/* Prevent horizontal scroll on small screens */
@media (max-width: 767.98px) {
  body {
    overflow-x: hidden;
  }

  .container,
  .register,
  .listado-pacientes,
  .panel {
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* Hide horizontal scroll on inputs */
  .input-container input,
  .input-container select {
    max-width: 100%;
  }

  /* Stack navigation vertically on very small screens */
  .nav {
    padding: 10px;
  }

  .nav a {
    justify-content: flex-start;
  }
}

/* Landscape phone optimizations */
@media (max-width: 767.98px) and (orientation: landscape) {
  .avatar {
    width: 80px;
    height: 80px;
  }

  .profile {
    padding: 0.5rem 1rem;
  }

  .care-name {
    margin: 0.5rem 0 0;
    font-size: 1rem;
  }

  .sidebar {
    min-height: 100vh;
  }
}

/* === Keyframes === */

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideRight {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideLeft {
  from {
    opacity: 0;
    transform: translateX(8px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }

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

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

.error {
  color: rgb(203, 140, 140);
  font-size: 0.85rem;
  margin-top: 4px;
  display: block;
}

.success {
  color: #70C3B6;
  font-size: 1rem;
  margin-bottom: 10px;
  font-weight: bold;
}

.mb-15 {
  margin-bottom: 15px;
}

.mt-20p {
  margin-top: 20px;
}

.fa-solid {
  color: #70C3B6;
}


/* CONTENEDOR DEL SIDEBAR */
.sidebar {
  width: 100%;
  max-width: 100%;
  height: 100%;
  background: var(--mint);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  border-radius: 0 18px 18px 0;
  overflow: hidden;
  color: white;
}

/* CABECERA (flecha atrás + texto) */
.sidebar__top {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem .9rem;
  font-size: .9rem;
  opacity: .95;
  user-select: none;
}

.btn-back {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
}

/* PERFIL */
.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: .5rem 1rem 1rem;
  text-align: center;
}

.avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  border: 6px solid rgba(255, 255, 255, .35);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12) inset;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.care-name {
  margin: .9rem 0 0;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: .2px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .06);
}

/* NAV */
.nav {
  padding: .25rem .5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.nav a {
  --pad-y: 14px;
  --pad-x: 18px;
  display: flex;
  align-items: center;
  gap: .85rem;
  text-decoration: none;
  color: var(--ink);
  padding: var(--pad-y) var(--pad-x);
  border-radius: 14px;
  font-weight: 600;
  letter-spacing: .2px;
  transition: background .15s ease, transform .05s ease;
}

.nav a:hover {
  background: var(--item-hover);
}

.nav a:active {
  transform: translateY(1px);
}

.nav a .icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
}

.nav a .icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
}

/* ÍTEM ACTIVO */
.nav a.active {
  background: #34668B;
}

.sidebar__top {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

/* FOOTER LOGO */
.sidebar__footer {
  margin-top: auto;
  padding: 1.1rem 1.2rem 1.4rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  opacity: .95;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.6rem;
  font-weight: 700;
}

.brand-lockup svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
}

.green-link {
  color: #70C3B6;
}

/* Responsive toque pequeño */
@media (max-height: 720px) {
  .btn-historico {
    width: 40px;
  }

  .avatar {
    width: 120px;
    height: 120px;
    border-width: 5px;
  }

  .care-name {
    font-size: 1.1rem
  }
}

.nav a .icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

/* Fuerza a que las figuras del SVG usen el color del texto */
.nav a .icon svg * {
  stroke: white;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  /* por defecto, íconos de línea */
}

.icon--heart svg path {
  fill: white;
  stroke: none;
}

.tipoProveedorSelect {
  width: 95% !important;
}

.tipo-item {
  cursor: pointer;
  padding: 8px 20px;
  border-radius: 6px;
  transition: background 0.3s;
  list-style: none;
  color: #606060;
}

hr {
  border: none;
  height: 1px;
  background-color: #70C3B6;
}

.tipo-item:hover {
  background: #f2f2f2;
}

.sub-menu {
  display: flex;
}

.tipo-item.active {
  color: #70C3B6;
  text-decoration: underline;
}

.w-95-flex {
  flex-basis: 95%;
  display: flex;
}

.sub-menu-items {
  list-style: none;
  flex-basis: 100%;
  display: flex;
  gap: 40px;
  padding: 15px 25px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  align-items: center;
  margin: 0;
}

.tipo-item-menu {
  font-size: 15px;
  color: #555;
  cursor: pointer;
  padding: 8px 18px;
  border-radius: 8px;
  transition: 0.2s ease-in-out;
}

/* El item activo seleccionado */
.tipo-item-menu.active {
  background: #66c4b3;
  color: white !important;
  font-weight: 500;
}

/* Hover */
.tipo-item-menu:hover {
  color: #111;
}

/* Centrado para ver-calendario-dia.php */
.calendario-item-centered {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-radius: 20px;
  background: #fff;
  gap: 20px;
  margin-top: 20px;
}

.calendario-info-centered {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.calendario-acciones-centered {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.indicadores-contenedor {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 95%;
  margin: 0 auto;
}

.card {
  background: #ffffff;
  border-radius: 10px;
  padding: 15px 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.indicadores-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.indicadores-header h2 {
  margin: 0;
  color: #39a287;
  /* verde similar al de la imagen */
}

.btn-agregar {
  background: #39a287;
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
}

.indicadores-filtros {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.indicadores-filtros .pregunta {
  font-size: 16px;
  margin-bottom: 5px;
  color: #A0A0A0;
}

.filtros-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.filtro-item {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  flex: 1;
  max-width: 25%;
}

.filtro-item select {
  border: none;
  border-bottom: 1px solid #ccc;
  padding: 4px 0;
  background: transparent;
  outline: none;
}

.indicadores-box {
  background: #d9d9d9;
  border-radius: 20px;
  text-align: center;
  padding: 40px 10px;
  color: #555;
  font-size: 14px;
}

.btn-back {
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  background-color: #70C3B6 !important;
  font-size: 18px;
  color: white;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 35px;
  min-height: 35px;
}

.btn-back:hover {
  background-color: rgba(112, 195, 182, 0.1);
  transform: translateX(-2px);
}

#calendar {
  margin-top: 20px;
  background: white;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  width: 100%;
  align-self: center;
}

.fc-daygrid-day-frame {
  cursor: pointer;
}

/* Color del título (Ej: verde) */
.fc-toolbar-title {
  color: #70C3B6;
  font-weight: 700;

}

/* Botones normales */
.fc .fc-button {
  background-color: #70C3B6;
  /* azul oscuro */
  color: #fff;
  /* texto blanco */
  border: none;
  border-radius: 8px;
  /* redondeados */
}

.fc .fc-button:hover {
  background-color: #2a5b53;
  /* naranja */
  color: white;
}

.fc .fc-day-today {
  background-color: #FFF4E5 !important;
  /* tono crema */
}

/* Botón Today */
.fc .fc-today-button {
  background-color: #70C3B6;
  /* azul oscuro */
  color: #fff;
  border: none;
  border-radius: 8px;
  transition: 0.2s;
}

/* Hover del botón Today */
.fc .fc-today-button:hover {
  background-color: #2a5b53;
  /* naranja */
  color: white;
}

/* Estado deshabilitado (cuando ya estás en el mes actual) */
.fc .fc-today-button:disabled {
  background-color: #bdbdbd;
  color: #fff;
  opacity: 0.6;
  cursor: not-allowed;
}

.fc-toolbar-title::first-letter,
.fc-today-button::first-letter {
  text-transform: uppercase;
}

/* Mensaje "No hay rutinas" */
.no-rutinas {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, #f8f8f8 0%, #ffffff 100%);
  border-radius: 16px;
  margin-top: 20px;
  border: 2px dashed #e0e0e0;
  min-height: 200px;
}

.no-rutinas p {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.1rem;
  color: #A0A0A0;
  text-align: center;
  margin: 0;
  max-width: 400px;
  line-height: 1.6;
}

/* Versión alternativa con icono (opcional) */
.no-rutinas::before {
  content: "📋";
  display: block;
  position: absolute;
  font-size: 3rem;
  opacity: 0.2;
  margin-top: -80px;
}

/* Animación sutil */
.no-rutinas {
  animation: fadeIn 0.5s ease-in-out;
}

/* Responsive para móviles */
@media (max-width: 767.98px) {
  .no-rutinas {
    padding: 40px 15px;
    min-height: 150px;
  }

  .no-rutinas p {
    font-size: 0.95rem;
  }

  .no-rutinas::before {
    font-size: 2rem;
    margin-top: -60px;
  }
}

.w-100 {
  width: 100% !important;
}

.err-msj {
  background-color: #fee;
  border: 1px solid #fcc;
  color: #c33;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.success-msj {
  background-color: #e8f5e9;
  border: 1px solid #a5d6a7;
  color: #2e7d32;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.warning-msj {
  background-color: #fff3e0;
  border: 1px solid #ffcc80;
  color: #e65100;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-weight: 500;
}

/* Popup de advertencia */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.popup-content {
  background: white;
  padding: 30px;
  border-radius: 16px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  animation: popupAppear 0.3s ease-out;
}

@keyframes popupAppear {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.popup-content.warning {
  border-top: 4px solid #e65100;
}

.popup-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.popup-content h3 {
  color: #e65100;
  margin: 0 0 15px 0;
  font-size: 1.4rem;
}

.popup-content p {
  color: #555;
  margin: 0 0 20px 0;
  line-height: 1.5;
}

.popup-btn {
  background-color: #e65100;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.popup-btn:hover {
  background-color: #bf360c;
}

/* Estilos para perfil de usuario */
.perfil-card {
  flex: 1 1 calc(33.333% - 18px);
  min-width: 250px;
}

.perfil-campo {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.perfil-label {
  font-size: 0.85rem;
  color: #A0A0A0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.perfil-valor {
  font-size: 1rem;
  color: #14110F;
  margin: 0;
  font-weight: 500;
}

.titulo-seccion-password {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.texto-seccion-password {
  font-size: 0.85rem;
  margin-bottom: 15px;
}

@media (max-width: 767.98px) {
  .perfil-card {
    flex: 1 1 100%;
    min-width: auto;
  }
}

/* Loading Spinner */
.loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.loading-overlay.active {
  display: flex;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #f3f3f3;
  border-top: 6px solid #70C3B6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Placeholder para foto de perfil */
.foto-perfil-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #E0E0E0;
  color: #888;
  font-size: 13px;
  text-align: center;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  line-height: 1.3;
  padding: 15px;
  box-sizing: border-box;
  border: 2px solid #D0D0D0;
}

/* Para el perfil (grande) */
.foto-perfil-placeholder.perfil {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  font-size: 12px;
}

/* Para el menú (avatar) */
.foto-perfil-placeholder.menu {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
}

/* Para el perfil mostrado (más grande) */
.foto-perfil-placeholder.perfil-display {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  font-size: 14px;
  border: 4px solid #D0D0D0;
}

.img-comida{
  max-width: 200px;
  border-radius: 8px;
}

.file-name.is-big {
  margin-top: 8px;
  padding: 10px 16px;

  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.4px;

  color: #0d2333;
  background: rgba(112, 195, 182, 0.12); /* versión suave del color */
  border: 2px solid #70C3B6;
  border-radius: 10px;

  box-shadow: 0 6px 14px rgba(112, 195, 182, 0.25);
  transition: all 0.3s ease;
}

.file-name.is-big:hover {
  background: rgba(112, 195, 182, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(112, 195, 182, 0.35);
}
