@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@300;400;500;600;700&family=Roboto:ital,wght@0,300;0,400;1,300;1,400&family=Rubik:ital,wght@0,300;0,400;0,500;0,600;1,400;1,700&display=swap');
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css");
@import url("https://cdn.jsdelivr.net/npm/remixicon@4.2.0/fonts/remixicon.css");
@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;400;600;700;800;900&display=swap");
/* 
font-family: 'Comfortaa', cursive;
font-family: 'Rubik', sans-serif;
font-family: 'Roboto', sans-serif;
CSS Document */
.custom-popover {
  border-color: red;
}
.custom-popover .popover-header {
  color: white;
  background-color: red;
}
/* Patient control panel
------------------------------*/
.bg-marca {
  background-color: #63af88;
}
.body {
  background-color: #229058;
  padding: 5px;
  margin: 5px;
  background-position: top left;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}
/* #alpha visibility now controlled by grid layout */
/* Fix para modales cargados vía fetch */
.modal-backdrop {
  z-index: 1040 !important;
}
.modal {
  z-index: 1050 !important;
}
#alpha .modal-backdrop {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
}
#epsilon {
  display: block;
  width: 100vw;
  height: 100vh;
  position: fixed;
  z-index: 10000;
  background-color: #FFF
}
html {
  height: 100%;
  width: 100%;
  padding: 0;
  margin: 0;
  font-family: 'Comfortaa', cursive;
  font-size: 12px;
}
body {
  font-family: 'Comfortaa', cursive;
  font-size: 12px;
  /* Grid layout and dimensions defined below in responsive section */
}
a {
  text-decoration: none;
}
[data-toggle="buttons"] > label:required, .cke:required, textarea:required, select:required, input:required {
  border: 1px solid #FF6700 !important;
}
select[multiple] {
  height: auto !important;
  background-color: #f8f9fa !important;
  padding: 2rem 0.5rem !important;
}
select option {
  padding: 3px 5px;
  line-height: 1.5;
}
.marker {
  background-color: coral;
  padding: 3px;
}
[class^="col-"] {}
[data-toggle="buttons"] label.btn-dark {
  background-color: #212529;
}
[data-toggle="buttons"] label.btn-dark.active {
  background-color: #157347;
}
input[type="number"] {
  text-align: end;
}
input[type="checkbox"], input[type="radio"] {
  box-sizing: border-box;
  padding: 0;
  margin: 4px 0 0;
  margin-top: 1px \9;
}
input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus {
  outline: thin dotted #333;
  outline: 5px auto -webkit-focus-ring-color;
  outline-offset: -2px;
}
textarea.form-textarea {
  min-height: 250px !important;
}
textarea.pac-textarea {
  min-height: 150px !important;
}
[data-toggle="buttons"] > .btn > input[type="radio"], [data-toggle="buttons"] > .btn > input[type="checkbox"] {
  display: none;
}
::-webkit-scrollbar {
  width: 6px; /* Ancho de la barra de desplazamiento */
}
::-webkit-scrollbar-thumb {
  background-color: #888; /* Color del pulgar */
  border-radius: 3px; /* Borde redondeado */
}
::-webkit-scrollbar-track {
  background-color: #f1f1f1;
}
::-webkit-scrollbar-thumb:hover {
  background-color: #555;
}
select[multiple] {
  min-height: 150px !important;
}
.btn.btn-dark {
  background-color: #5B5B5B;
}
.btn.btn-dark:hover, .btn.btn-dark:focus {
  background-color: #000;
}
.btn.btn-dark.active {
  background-color: #000;
  text-decoration: none;
}
.btn.btn-marca {
  background-color: #343a40;
  color: white;
}
.btn.btn-marca:hover, .btn.btn-marca:focus {
  background-color: #0a3622;
}
.btn.btn-marca.active {
  background-color: #198754;
  text-decoration: none;
}
.w-15 {
  width: 15%;
}
.w-85 {
  width: 84%;
}
.w-18 {
  width: 18%;
}
.w-33 {
  width: 33.34%;
}
.w-49 {
  width: 49%;
}
.vh-25 {
  height: 25vh;
  overflow: auto;
}
.vh-50 {
  height: 50vh;
  overflow: auto;
}
.vh-65 {
  height: 65vh;
  overflow: auto;
}
.vh-75 {
  height: 75vh;
  overflow: auto;
}
.npoint {
  cursor: default !important;
}
.cpoint {
  cursor: pointer;
}
.h50 {
  height: 120px;
}
.table-fixed {
  table-layout: fixed;
  width: 100%;
}
/* Login */
#togglePassword {
  position: absolute;
  right: 15px;
  top: 8px;
}
.form-signin {
  width: 100%;
  max-width: 330px;
  padding: 15px;
  margin: auto;
}
.form-signin .checkbox {
  font-weight: 400;
}
.form-signin .form-floating:focus-within {
  z-index: 2;
}
.form-signin select {
  margin-bottom: -1px;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}
.form-signin input[type="email"] {
  margin-bottom: -1px;
  border-radius: 0;
}
.form-signin input[type="text"], .form-signin input[type="password"] {
  margin-bottom: 10px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
/* End login */
/* Layout responsive con Grid */
body {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "sidebar topsearch"
    "sidebar alpha";
  height: 100vh;
  width: 100vw;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
aside {
  grid-area: sidebar;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
  width: auto; /* Ancho automático basado en contenido */
  min-width: auto;
  overflow: hidden; /* Sin overflow */
  z-index: 100;
  background-color: #f8f9fa;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  padding: 0 5px; /* Pequeño padding */
}
/* NO hay comportamiento hover - el aside nunca se expande */
/* Dropdowns completamente fuera del aside usando position: fixed */
aside .nav-item.dropdown {
  position: static; /* Rompe el contexto de posicionamiento */
}
aside .dropdown-menu {
  position: fixed !important; /* Posición fija respecto al viewport */
  left: auto !important;
  top: auto !important;
  margin: 0 !important;
  transform: none !important;
  z-index: 1050;
}
/* JavaScript calculará la posición, pero establecemos un fallback */
aside .dropdown-menu.show {
  /* La posición será calculada por Bootstrap, pero forzamos que esté a la derecha */
  margin-left: 0 !important;
}
aside .link-dark span a {
  color: #000;
}
aside .link-dark:hover {
  background-color: #DDD;
  color: #000;
}
#liveAlertPlaceholder {
  position: fixed;
  overflow: hidden;
  height: auto;
  width: auto;
  top: 0px;
  left: 20vw;
  z-index: 10;
}
#alphaPrime {
  grid-area: alpha;
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
  height: calc(100vh - 60px); /* Altura total menos altura de topsearch */
  min-height: calc(100vh - 60px);
  width: 100%;
  padding: 0 10px;
  margin: 0;
  z-index: 99;
  background-repeat: no-repeat;
  background-size: cover;
}
#alpha {
  grid-area: alpha;
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
  height: calc(100vh - 60px); /* Altura total menos altura de topsearch */
  min-height: calc(100vh - 60px);
  width: 100%;
  padding: 0 10px;
  margin: 0;
  z-index: 99;
}
foo {
  position: fixed;
  bottom: 0px;
  left: 0;
  width: 100vw;
  height: auto;
  font-size: 0.6rem;
  line-height: 10px;
  padding: 5px 0;
  text-align: center;
  z-index: 98;
  -webkit-box-shadow: 0px -15px 32px -14px rgba(0, 0, 0, 0.90);
  -moz-box-shadow: 0px -15px 32px -14px rgba(0, 0, 0, 0.90);
  box-shadow: 0px -15px 32px -14px rgba(0, 0, 0, 0.90);
  background-color: rgba(48, 48, 48, 0.5);
}
/* Elementos dentro de #topsearch - ahora usan flexbox */
#alerts {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  padding: 0;
  font-size: 1rem;
}
#alphaHelp {
  position: relative;
  flex: 2;
  text-align: center;
  font-weight: 600;
}
#ntfcns {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #343a40;
}
time {
  position: relative;
  padding: 5px 12px;
  border-radius: 5px;
  background-color: #3D7AF3;
  color: #FFF;
  font-size: 0.9rem;
  font-family: 'Roboto', sans-serif;
  white-space: nowrap;
}
#help {
  position: relative;
  padding: 0 10px;
  font-size: 1.8rem;
  color: #28a745;
  cursor: pointer;
}
#topsearch {
  grid-area: topsearch;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 60px;
  min-height: 60px;
  padding: 0 20px;
  font-size: 1rem;
  z-index: 100;
  background-color: rgba(126, 126, 126, 0.2);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
}
/*navbar-dark bg-dark text-white*/
#nav-h a.nav-link {
  color: #FFF;
}
#nav-h {
  background-color: #151414;
  margin-top: 2px;
  margin-left: 8px;
  color: #000;
  background: rgb(213, 213, 213);
  background: linear-gradient(90deg, rgba(255, 255, 255, 1) 0%, rgba(213, 213, 213, 1) 60%, rgba(48, 48, 48, 1) 100%) !important;
  border: 1px solid rgba(48, 48, 48, 0.5);
}
#nav-h .nav-item a.nav-link {
  color: #000;
}
#nav-h .nav-item.tabaco a.nav-link {
  color: #FFF !important;
  background-color: #575FF5;
}
#nav-h .nav-item.tabaco a.nav-link:hover, #nav-h .nav-item a.nav-link:hover {
  color: #FFF !important;
  background-color: #0038BB;
}
h6.fw-bolder {
  color: blue;
}
#message .nav-pills .nav-link.active, #message .nav-pills .show > .nav-link {
  color: #000;
  background-color: #f8f9fa
}
.wrapper {
  -webkit-box-shadow: 0px 0px 21px 2px rgba(3, 51, 51, 0.50);
  -moz-box-shadow: 0px 0px 21px 2px rgba(3, 51, 51, 0.50);
  box-shadow: 0px 0px 21px 2px rgba(3, 51, 51, 0.50);
  background: rgba(240, 240, 240, 0.75);
  padding: 1%;
  border-radius: 5px;
  border-top-left-radius: none;
  border-top-right-radius: none;
  margin-top: 0px;
  margin-left: 8px;
  height: calc(100vh - 140px) !important;
  overflow-y: auto;
  overflow-x: hidden;
  /*
    background: -moz-linear-gradient(top, rgba(240,240,240,1) 0%, rgba(250,250,250,1) 100%);
    background: -webkit-gradient(left top, left bottom, color-stop(0%, rgba(240,240,240,1)), color-stop(100%, rgba(250,250,250,1)));
    background: -webkit-linear-gradient(top, rgba(240,240,240,1) 0%, rgba(250,250,250,1) 100%);
    background: -o-linear-gradient(top, rgba(240,240,240,1) 0%, rgba(250,250,250,1) 100%);
    background: -ms-linear-gradient(top, rgba(240,240,240,1) 0%, rgba(250,250,250,1) 100%);
    background: linear-gradient(to bottom, rgba(240,240,240,1) 0%, rgba(250,250,250,1) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f0f0f0', endColorstr='#fafafa', GradientType=0 );
    */
}
.wrapper-nofix {
  padding: 1%;
  border-radius: 5px;
  margin-top: 0px;
  height: calc(100vh - 120px) !important;
  overflow-y: hidden;
  overflow-x: hidden;
}
.container-fix {
  height: calc(100vh - 220px);
  overflow-y: auto;
  overflow-x: hidden;
}
.container-subfix {
  height: calc(100vh - 260px);
  overflow-y: auto;
  overflow-x: hidden;
}
.inneWrapper {
  background: rgba(240, 240, 240, 0.75);
  padding: 1%;
  border-radius: 5px;
  height: auto;
}
.dropdown-menu {
  margin-left: 7.5rem !important;
  margin-top: -48px !important;
}
.xl {
  width: 200px !important;
}
.xl .nav-item {
  padding: 5px 3px !important;
  border-bottom: 1px solid #CCC;
}
.nav-item {
  padding: 0px !important;
}
.nav-item span.small {
  font-size: 0.65rem;
  color: #828282;
}
.modal-fullscreen {
  width: 86vw;
  height: calc(100vh - 60px);
  max-width: none;
  margin: 30px auto
}
.modal-fullscreen .modal-content {
  height: 100%;
  border: 1px solid #333;
  border-radius: 5px
}
.caja {
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Rubik', sans-serif;
}
.has-error {
  border-width: 5px;
}
.nav-tune a.nav-link {
  border-left: 2px solid darkblue;
  border-right: 2px solid darkblue;
  cursosr: pointer;
  border-radius: 3px;
  margin-right: 3px;
}
/* RESPONSIVE */

/* Mobile y tablet - ocultar aside por defecto */
@media (max-width: 991.98px) {
  body {
    grid-template-columns: 1fr;
    grid-template-areas:
      "topsearch"
      "alpha";
  }

  aside {
    position: fixed;
    left: -280px;
    top: 0;
    width: 280px;
    height: 100vh;
    z-index: 1100;
    transition: left 0.3s ease-in-out;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
  }

  aside.show {
    left: 0;
  }

  /* Overlay para cerrar el sidebar */
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1099;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
  }

  .sidebar-overlay.show {
    display: block;
    opacity: 1;
  }

  /* Ajustar el área de contenido */
  #alpha {
    width: 100%;
    padding: 0 5px;
  }

  /* Mostrar el botón del menú en móvil */
  #toggleSidebar {
    display: inline-block !important;
  }

  /* Optimizar topsearch para móvil/tablet */
  #topsearch {
    padding: 0 8px;
    gap: 5px;
    flex-wrap: nowrap;
  }

  /* Dar más espacio a #alerts */
  #alerts {
    flex: 2;
    gap: 5px;
    min-width: 0;
  }

  /* Ocultar #alphaHelp en móvil */
  #alphaHelp {
    display: none;
  }

  /* Hacer más compacto el span de razón social */
  #rzsoc {
    font-size: 0.7rem !important;
    padding: 4px 8px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
  }

  /* Botones más compactos en móvil */
  #alerts .btn {
    padding: 6px 10px;
    font-size: 0.9rem;
  }

  /* Notificaciones más compactas */
  #ntfcns {
    gap: 5px;
    padding: 0 !important;
  }

  #ntfcns .btn {
    padding: 4px 8px;
  }

  #ntfcns .h5 {
    font-size: 1rem !important;
  }

  /* Time más compacto */
  time {
    font-size: 0.75rem;
    padding: 4px 8px;
  }

  /* Help icon más pequeño */
  #help {
    font-size: 1.3rem;
    padding: 0 5px;
  }
}

/* Móviles pequeños - ajustes adicionales */
@media (max-width: 576px) {
  #topsearch {
    padding: 0 5px;
  }

  /* Ocultar el reloj en móviles muy pequeños */
  time {
    display: none;
  }

  /* Reducir aún más el texto de razón social */
  #rzsoc {
    max-width: 120px;
    font-size: 0.65rem !important;
  }

  /* Botón fullscreen solo icono */
  #toggleFullscreen {
    padding: 6px 8px;
  }

  /* Hacer los badges de notificaciones más pequeños */
  #ntfcns span.rounded-circle {
    font-size: 0.7rem;
    padding: 2px 6px !important;
  }
}

@media (min-width:1200px) {
  /* Grid layout handles aside positioning */
  aside {
    padding: 0 5px;
  }
  /* Mantener el ancho del sidebar extendido en pantallas grandes */
  aside:not(:hover) {
    width: auto;
    min-width: 60px;
  }
  foo {
    font-size: 0.9rem;
    width: 100vw;
  }
  .wrapper {
    margin-top: 20px;
    height: calc(100vh - 100px);
  }
  html, body {
    font-size: 16px;
  }
}

@media (min-width:992px) {
  html, body {
    font-size: 14px;
  }

  /* Ocultar el botón del menú en desktop */
  #toggleSidebar {
    display: none !important;
  }
}

@media (min-width:768px) {
  /* Grid layout handles #alpha visibility */
  #epsilon {
    display: none
  }
}

@media (min-width:576px) {}
/*//////////// signature ///////////////*/
#signatureCanvas {
  width: 90%;
  margin: auto;
  height: 300px;
}
.signature-container {
  border: 3px dashed #667eea;
  border-radius: 15px;
  padding: 20px;
  background: #fafafa;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.signature-label {
  color: #667eea;
  font-weight: 600;
  margin-bottom: 15px;
  font-size: 1.1rem;
}
#signatureCanvas {
  border: 2px solid #ddd;
  border-radius: 10px;
  cursor: crosshair;
  background: white;
  display: block;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}
#signatureCanvas:hover {
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
}
.signature-controls {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-sign {
  padding: 10px 20px;
  border: none;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.btn-clear {
  background: #ff6b6b;
  color: white;
}
.btn-clear:hover {
  background: #ff5252;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}
.btn-save {
  background: #4ecdc4;
  color: white;
}
.btn-save:hover {
  background: #26d0ce;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}
.btn-submit {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  padding: 15px 40px;
  font-size: 16px;
  border-radius: 30px;
  width: 100%;
  margin-top: 20px;
  position: relative;
  overflow: hidden;
}
.btn-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}
.btn-submit:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}
.btn-submit:hover:before {
  left: 100%;
}
.signature-info {
  color: #888;
  font-size: 0.9rem;
  margin-top: 10px;
  font-style: italic;
}
.signature-status {
  margin-top: 10px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-block;
}
.status-empty {
  background: #fff3cd;
  color: #856404;
}
.status-signed {
  background: #d4edda;
  color: #155724;
}
.floating-particles {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}
.particle {
  position: absolute;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}
/* Animación del badge de mensajes */
@keyframes pulse-badge {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0);
  }
}
#timerMessage.pulse-animation {
  animation: pulse-badge 0.6s ease-in-out 3;
}
/* Efecto de brillo al aparecer */
#timerMessage {
  transition: all 0.3s ease;
}
#timerMessage:not(.d-none) {
  animation: fade-in 0.3s ease;
}
@keyframes fade-in {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
/* Badge hover effect */
#timerMessage:hover {
  transform: scale(1.15);
  cursor: pointer;
}
/*////////////// IFRAME DOCS /////////////////*/
/* Overlay frontal dentro del modal */
#modalInlineOverlay {
  position: absolute;
  inset: 0; /* top:0; right:0; bottom:0; left:0; */
  background: rgba(255, 255, 255, 0.98);
  z-index: 1060; /* > bootstrap modal-content */
  padding: 1rem;
  overflow: auto;
  display: none;
}
#modalInlineOverlay .overlay-controls {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  align-items: center;
  margin-bottom: .5rem;
}
#modalInlineOverlay .overlay-body {
  min-height: 300px;
}
/* imagen responsive */
#modalInlineOverlay img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}
/* mensaje fallback */
.overlay-error {
  padding: 2rem;
  text-align: center;
  color: #a00;
}
/*////////////// print /////////////////*/
@media print {
  .alert,    
  button {
    display: none;
  }
    
}