html {
  height: 100%;
}
body {
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* Habilitar scroll vertical en móvil */
@media only screen and (max-width: 768px) {
  body {
    overflow-y: auto;
    overflow-x: hidden;
    height: auto;
    min-height: 100vh;
  }
}

@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300);
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-weight: 300;
}
body {
  font-family: 'Source Sans Pro', sans-serif; 
  color: white;
  font-weight: 300;
}
body ::-webkit-input-placeholder {
  /* WebKit browsers */
  font-family: 'Source Sans Pro', sans-serif;
  color: white;
  font-weight: 300;
}
body :-moz-placeholder {
  /* Mozilla Firefox 4 to 18 */
  font-family: 'Source Sans Pro', sans-serif;
  color: white;
  opacity: 1;
  font-weight: 300;
}
body ::-moz-placeholder {
  /* Mozilla Firefox 19+ */
  font-family: 'Source Sans Pro', sans-serif;
  color: white;
  opacity: 1;
  font-weight: 300;
}
body :-ms-input-placeholder {
  /* Internet Explorer 10+ */
  font-family: 'Source Sans Pro', sans-serif;
  color: white;
  font-weight: 300;
}

/* Habilitar scroll vertical en móvil */
@media only screen and (max-width: 768px) {
  html, body {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
    min-height: 100vh;
    -webkit-overflow-scrolling: touch;
  }
  
  .wrapper {
    position: relative !important;
    overflow-y: visible !important;
    overflow-x: hidden !important;
    height: auto !important;
    min-height: 100vh;
  }
  
  #page {
    overflow-y: visible !important;
    height: auto !important;
    min-height: 100vh;
  }
}
.wrapper {
  background: #792762;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  overflow: hidden;
}
/* Login Card - Tarjeta blanca centrada */
.login-card {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  max-width: 450px;
  width: 90%;
  margin: 0 auto;
  padding: 40px 30px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  -webkit-transform: translate(-50%, -50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wrapper.form-success .container h1 {
  -webkit-transform: translateY(85px);
          transform: translateY(85px);
}
.container {
  width: 100%;
  text-align: center;
  padding: 0;
}
.container h1 {
  font-size: 28px;
  color: #792762;
  -webkit-transition-duration: 1s;
          transition-duration: 1s;
  -webkit-transition-timing-function: ease-in-put;
          transition-timing-function: ease-in-put;
  font-weight: 200;
  margin-bottom: 25px;
}
.form {
  padding: 0;
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}
.form input {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  outline: 0;
  border: 1px solid #e0e0e0;
  background-color: #f5f5f5;
  width: 100%;
  max-width: 300px;
  border-radius: 6px;
  padding: 12px 15px;
  margin: 0 auto 15px auto;
  display: block;
  text-align: center;
  font-size: 16px;
  color: #333;
  -webkit-transition-duration: 0.25s;
          transition-duration: 0.25s;
  font-weight: 300;
  box-sizing: border-box;
}
.form input::placeholder {
  color: #999;
  opacity: 1;
}
.form input:hover {
  background-color: #eeeeee;
  border-color: #792762;
}
.form input:focus {
  background-color: white;
  border-color: #792762;
  color: #792762;
  box-shadow: 0 0 0 3px rgba(121, 39, 98, 0.1);
}
.form button,
.form input[type="button"],
.form input[type="submit"],
.form .loginbutton,
#loginbutton {
  -webkit-appearance: none !important;
     -moz-appearance: none !important;
          appearance: none !important;
  outline: 0 !important;
  background-color: #792762 !important;
  border: 0 !important;
  padding: 12px 15px !important;
  color: #ffffff !important;
  border-radius: 6px !important;
  width: 100% !important;
  max-width: 300px !important;
  cursor: pointer !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  -webkit-transition-duration: 0.25s;
          transition-duration: 0.25s;
  margin-top: 5px !important;
}
.form button:hover,
.form input[type="button"]:hover,
.form input[type="submit"]:hover,
.form .loginbutton:hover,
#loginbutton:hover {
  background-color: #8d2e72 !important;
  box-shadow: 0 4px 8px rgba(121, 39, 98, 0.3) !important;
}
.form button:active,
.form input[type="button"]:active,
.form input[type="submit"]:active,
.form .loginbutton:active,
#loginbutton:active {
  background-color: #6a1f55 !important;
}

/* Estilos para mensajes de error en el formulario de login */
.form .error-message {
  color: #dc3545;
  font-size: 14px;
  margin-top: 15px;
  text-align: center;
  line-height: 1.4;
  display: block;
}

.bg-bubbles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.bg-bubbles li {
  position: absolute;
  list-style: none;
  display: block;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.15);
  bottom: -160px;
  -webkit-animation: square 25s infinite;
  animation: square 25s infinite;
  -webkit-transition-timing-function: linear;
  transition-timing-function: linear;
}
.bg-bubbles li:nth-child(1) {
  left: 10%;
}
.bg-bubbles li:nth-child(2) {
  left: 20%;
  width: 80px;
  height: 80px;
  -webkit-animation-delay: 2s;
          animation-delay: 2s;
  -webkit-animation-duration: 17s;
          animation-duration: 17s;
}
.bg-bubbles li:nth-child(3) {
  left: 25%;
  -webkit-animation-delay: 4s;
          animation-delay: 4s;
}
.bg-bubbles li:nth-child(4) {
  left: 40%;
  width: 60px;
  height: 60px;
  -webkit-animation-duration: 22s;
          animation-duration: 22s;
  background-color: rgba(255, 255, 255, 0.25);
}
.bg-bubbles li:nth-child(5) {
  left: 70%;
}
.bg-bubbles li:nth-child(6) {
  left: 80%;
  width: 120px;
  height: 120px;
  -webkit-animation-delay: 3s;
          animation-delay: 3s;
  background-color: rgba(255, 255, 255, 0.2);
}
.bg-bubbles li:nth-child(7) {
  left: 32%;
  width: 160px;
  height: 160px;
  -webkit-animation-delay: 7s;
          animation-delay: 7s;
}
.bg-bubbles li:nth-child(8) {
  left: 55%;
  width: 20px;
  height: 20px;
  -webkit-animation-delay: 15s;
          animation-delay: 15s;
  -webkit-animation-duration: 40s;
          animation-duration: 40s;
}
.bg-bubbles li:nth-child(9) {
  left: 25%;
  width: 10px;
  height: 10px;
  -webkit-animation-delay: 2s;
          animation-delay: 2s;
  -webkit-animation-duration: 40s;
          animation-duration: 40s;
  background-color: rgba(255, 255, 255, 0.3);
}
.bg-bubbles li:nth-child(10) {
  left: 90%;
  width: 160px;
  height: 160px;
  -webkit-animation-delay: 11s;
          animation-delay: 11s;
}
@-webkit-keyframes square {
  0% {
    -webkit-transform: translateY(0);
            transform: translateY(0);
  }
  100% {
    -webkit-transform: translateY(-700px) rotate(600deg);
            transform: translateY(-700px) rotate(600deg);
  }
}
@keyframes square {
  0% {
    -webkit-transform: translateY(0);
            transform: translateY(0);
  }
  100% {
    -webkit-transform: translateY(-700px) rotate(600deg);
            transform: translateY(-700px) rotate(600deg);
  }
}

#logohome {
  background: url(images/logo02.png) no-repeat;
  margin-left: auto;
  margin-right: auto;
  margin-top: 0;
  margin-bottom: 20px;
  background-size: contain;
  background-position: center;
  width: 100%;
  max-width: 350px;
  height: 120px;
  background-size: 350px;
}

#page {
  width: 100%;
  height: 100vh;
  padding-top: 0px;
  position: relative;
  background-color: #ffffff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Responsive Design */
@media only screen and (max-width: 768px) {
  .login-card {
    width: 95%;
    padding: 30px 20px;
    max-width: 400px;
  }
  
  .container h1 {
    font-size: 24px;
    margin-bottom: 20px;
  }
  
  #logohome {
    height: 100px;
    background-size: 280px;
    max-width: 280px;
    margin-bottom: 15px;
  }
  
  .form input,
  .form button {
    font-size: 15px;
    padding: 11px 12px;
  }
}

@media only screen and (max-width: 480px) {
  .login-card {
    width: 95%;
    padding: 25px 15px;
  }
  
  .container h1 {
    font-size: 22px;
    margin-bottom: 18px;
  }
  
  #logohome {
    height: 80px;
    background-size: 240px;
    max-width: 240px;
    margin-bottom: 12px;
  }
  
  .form input,
  .form button {
    font-size: 14px;
    padding: 10px 12px;
  }
}

/* Estilos para página principal Inicio.aspx */
#logo {
  background: url(images/logo02.png) no-repeat;
  margin-left: auto;
  margin-right: auto;
  margin-top: 10px;
  margin-bottom: 0px;
  background-size: 320px;
  background-position: center top;
  height: 100px;
  width: 320px;
  flex-shrink: 0;
  display: block;
}

#tmain {
  width: 85%;
  margin-left: auto;
  margin-right: auto;
  padding: 5px 0 5px 0;
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* En desktop, mantener layout horizontal con tools2 a la derecha */
@media only screen and (min-width: 769px) {
  #tmain {
    flex-direction: row;
    justify-content: space-between;
  }
  
  #tools2 {
    display: flex;
    flex: 0 0 auto;
    gap: 12px;
  }
}

#tools {
  flex: 0 0 auto;
  padding: 8px 0 8px 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

#search-buttons-row {
  display: none;
}

@media only screen and (max-width: 768px) {
  #tools {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
  }
  
  #tools input[type="text"] {
    width: 100%;
    margin-bottom: 0;
  }
  
  /* Mostrar botones móviles */
  #search-buttons-row {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    gap: 4%;
    width: 100%;
    margin-top: 10px;
  }
  
  #search-buttons-row button,
  #search-buttons-row .search-button,
  #search-buttons-row .action-button {
    width: 48% !important;
    margin: 0 !important;
    flex: 1;
    display: inline-block !important;
  }
  
  /* Ocultar botones individuales en móvil */
  #tools #btnSearch {
    display: none !important;
  }
  
  #tools2 {
    display: none !important;
    visibility: hidden !important;
  }
  
  #date-filter-container {
    width: 100%;
    flex-direction: column;
    align-items: flex-start !important;
    margin-left: 0 !important;
    margin-top: 10px;
  }
  
  #date-filter-dates-row {
    margin-top: 5px;
  }
  
  /* Filtro móvil de ordenamiento */
  .mobile-sort-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    background-color: #f8f8f8;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
  }
  
  .mobile-sort-radio-group {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-shrink: 0;
  }
  
  .mobile-sort-radio {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #333;
    margin: 0;
  }
  
  .mobile-sort-radio input[type="radio"] {
    margin: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
  }
  
  .mobile-sort-dropdown {
    flex: 0 0 auto;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #ffffff;
    color: #333;
    width: 110px;
    max-width: 110px;
    cursor: pointer;
  }
  
  .mobile-sort-dropdown:focus {
    outline: none;
    border-color: #8d015a;
    box-shadow: 0 0 0 3px rgba(141, 1, 90, 0.1);
  }
}

/* Desktop - ocultar filtro móvil (excepto para LVL 101 cuando NO hay cards de desktop) */
@media only screen and (min-width: 769px) {
  .mobile-sort-filter {
    display: none !important;
  }
  
  /* PRIMERO: Ocultar filtros cuando hay cards de desktop (LVL 101) - MÁXIMA PRIORIDAD */
  /* Esta regla debe tener mayor especificidad y aparecer DESPUÉS para sobrescribir */
  /* Usar selectores más específicos y aparecer después en el CSS */
  
  /* SEGUNDO: Para LVL 101, mostrar filtro móvil en PC (solo si NO hay cards de desktop) */
  /* Esta regla solo se aplica cuando NO hay hide-sort-filters Y NO hay desktop cards */
  body.lvl101-cards-view:not(.hide-sort-filters) .mobile-sort-filter:not(:has(~ .desktop-cards-container)),
  body.lvl101-cards-view:not(.hide-sort-filters) #mobile-sort-filter:not(:has(~ .desktop-cards-container)) {
    display: flex !important;
    max-width: 600px;
    margin: 15px 0 15px 20px; /* Agregar margen izquierdo */
    align-items: center;
  }
  
  /* TERCERO: Ocultar filtros cuando hay desktop cards presentes - MÁXIMA PRIORIDAD */
  /* Esta regla usa la presencia de has-desktop-cards-view en el contenedor para ocultar */
  /* Cuando mobileCardsContainer tiene la clase has-desktop-cards-view, ocultar los filtros */
  body:has(.mobile-cards-container.has-desktop-cards-view) #mobile-sort-filter,
  body:has(.has-desktop-cards-view) #mobile-sort-filter {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: 0 !important;
    width: 0 !important;
  }
  
  /* Alternativa sin :has() - usar selector de hermano si están en el mismo nivel */
  .mobile-cards-container.has-desktop-cards-view ~ #mobile-sort-filter,
  #divtbl:has(.has-desktop-cards-view) ~ #mobile-sort-filter {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
  }
  
  /* CUARTO: Ocultar filtros cuando hay clase hide-sort-filters (LVL 101) - MÁXIMA PRIORIDAD */
  /* Esta regla aparece DESPUÉS y tiene mayor especificidad para sobrescribir la anterior */
  body.lvl101-cards-view.hide-sort-filters .mobile-sort-filter,
  body.lvl101-cards-view.hide-sort-filters #mobile-sort-filter,
  body.hide-sort-filters .mobile-sort-filter,
  body.hide-sort-filters #mobile-sort-filter,
  body.lvl101-cards-view.hide-sort-filters #mobile-sort-filter.mobile-sort-filter,
  body.hide-sort-filters #mobile-sort-filter.mobile-sort-filter,
  body.lvl101-cards-view.hide-sort-filters div#mobile-sort-filter.mobile-sort-filter,
  body.hide-sort-filters div#mobile-sort-filter.mobile-sort-filter {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: 0 !important;
    width: 0 !important;
  }
  
  /* Ajustar tamaños de filtro para PC (LVL 101) */
  body.lvl101-cards-view .mobile-sort-dropdown {
    width: 150px;
    max-width: 150px;
    padding: 12px 15px;
    font-size: 15px;
    border-radius: 6px; /* Bordes redondeados como en móvil */
  }
  
  body.lvl101-cards-view .mobile-sort-radio-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-right: 20px; /* Espacio entre radio buttons y dropdown */
  }
  
  body.lvl101-cards-view .mobile-sort-radio {
    font-size: 15px;
    color: #333 !important;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
  }
  
  body.lvl101-cards-view .mobile-sort-radio input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
  }
  
  body.lvl101-cards-view .mobile-sort-radio label {
    color: #333 !important;
    font-weight: 400;
    cursor: pointer;
    margin: 0;
    padding: 0;
  }
}

/* Desktop - mantener botones separados */
@media only screen and (min-width: 769px) {
  #tools #btnSearch {
    margin-right: 15px;
    display: inline-block !important;
  }
  
  #search-buttons-row {
    display: none !important;
  }
  
  #tools2 {
    display: flex !important;
  }
}

#tools input[type="text"] {
  color: #8d015a;
  font-size: 16px;
  padding: 10px 14px;
  font-weight: normal;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-right: 8px;
  width: 220px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#tools input[type="text"]:focus {
  border-color: #792762;
  box-shadow: 0 0 0 3px rgba(121, 39, 98, 0.1);
  outline: none;
}

#tools input[type="date"].date-input {
  color: #8d015a;
  font-size: 16px;
  padding: 10px 14px;
  font-weight: normal;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 170px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#tools input[type="date"].date-input:focus {
  border-color: #792762;
  box-shadow: 0 0 0 3px rgba(121, 39, 98, 0.1);
  outline: none;
}


#tools input[type="checkbox"] {
  margin-right: 5px;
  cursor: pointer;
  width: 18px;
  height: 18px;
}

#tools input[type="button"],
#tools2 input[type="button"],
#tools button,
#tools2 button {
  background-color: #8d015a;
  border: none;
  color: #fff;
  font-size: 16px;
  padding: 10px 20px;
  text-transform: none;
  font-weight: 400;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 4px rgba(141, 1, 90, 0.2);
}

#tools input[type="button"]:hover,
#tools2 input[type="button"]:hover,
#tools button:hover,
#tools2 button:hover {
  box-shadow: 0 4px 8px rgba(141, 1, 90, 0.3);
}

#tools button.search-button {
  margin-left: 8px;
}

#tools input[type="button"]:hover,
#tools2 input[type="button"]:hover,
#tools button:hover,
#tools2 button:hover {
  background-color: #ca489e;
  box-shadow: 0 4px 8px rgba(141, 1, 90, 0.3);
}

.action-button,
.search-button {
  background-color: #8d015a;
  border: none;
  color: #fff;
  font-size: 16px;
  padding: 10px 20px;
  text-transform: none;
  font-weight: 400;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 4px rgba(141, 1, 90, 0.2);
}

.action-button:hover,
.search-button:hover {
  background-color: #ca489e;
  box-shadow: 0 4px 8px rgba(141, 1, 90, 0.3);
}

#tools2 {
  flex: 0 0 auto;
  padding: 8px 0 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

#tools2 input[type="button"],
#tools2 button {
  margin-left: 0;
}

#alertinfo {
  width: 95%;
  max-width: 1200px;
  margin: 0 auto 20px auto;
  flex-shrink: 0;
}

.info-card {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-left: 6px solid #792762;
  padding: 0;
  overflow: hidden;
}

.info-card-content {
  padding: 16px 20px;
  font-size: 14px;
  color: #333;
  line-height: 1.6;
  text-align: left;
}

#divtbl {
  width: 85%;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 10px;
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: auto;
}

/* Estilos para GridView */
.gridview-custom {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  border: none;
  background-color: #ffffff;
}

/* Anchos específicos para cada columna - Columna de checkbox visible */
.gridview-custom th:nth-child(1),
.gridview-custom td:nth-child(1) {
  width: 30px !important;
  min-width: 30px !important;
  max-width: 30px !important;
}

.gridview-custom th:nth-child(2),
.gridview-custom td:nth-child(2) {
  width: 100px !important;
  min-width: 100px !important;
  max-width: 100px !important;
}

.gridview-custom th:nth-child(3),
.gridview-custom td:nth-child(3) {
  width: 350px !important;
  min-width: 350px !important;
}

.gridview-custom th:nth-child(4),
.gridview-custom td:nth-child(4) {
  width: 110px !important;
  min-width: 110px !important;
  max-width: 110px !important;
}

.gridview-custom th:nth-child(5),
.gridview-custom td:nth-child(5) {
  width: 200px !important;
  min-width: 200px !important;
}

.gridview-custom th:nth-child(6),
.gridview-custom td:nth-child(6) {
  width: 70px !important;
  min-width: 70px !important;
  max-width: 70px !important;
}

.gridview-custom th:nth-child(7),
.gridview-custom td:nth-child(7) {
  width: 70px !important;
  min-width: 70px !important;
  max-width: 70px !important;
}

.gridview-custom th:nth-child(8),
.gridview-custom td:nth-child(8) {
  width: 70px !important;
  min-width: 70px !important;
  max-width: 70px !important;
}

/* Por defecto: mostrar GridView, ocultar cards (desktop) */
.mobile-cards-container {
  display: none;
}

/* Para LVL 101, mostrar cards en PC y ocultar GridView */
@media only screen and (min-width: 769px) {
  body.lvl101-cards-view .mobile-cards-container {
    display: block !important;
    max-width: 700px !important; /* Ancho máximo para centrar */
    margin: 0 auto !important; /* Centrar horizontalmente */
    width: 100%;
  }
  
  body.lvl101-cards-view .gridview-custom {
    display: none !important;
  }
  
  /* Ocultar header en PC para LVL 101 (usamos estructura de móvil) */
  body.lvl101-cards-view .mobile-cards-container .mobile-card-header {
    display: none !important;
  }
  
  /* Formato de cards estilo móvil adaptado para PC (LVL 101) */
  body.lvl101-cards-view .mobile-card {
    padding: 18px 25px;
    margin-bottom: 12px;
    margin-top: 0;
    max-width: 100%;
    display: block;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
  }
  
  body.lvl101-cards-view .mobile-card-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
    align-items: center;
  }
  
  body.lvl101-cards-view .mobile-card-row:last-child {
    border-bottom: none;
  }
  
  body.lvl101-cards-view .mobile-card-label {
    display: block !important;
    font-weight: 600;
    text-transform: uppercase;
    color: #8d015a;
    font-size: 13px;
    text-align: left;
  }
  
  body.lvl101-cards-view .mobile-card-value {
    font-size: 14px;
    color: #333 !important;
    text-align: left;
    font-weight: 400;
  }
  
  /* Acciones en formato de móvil */
  body.lvl101-cards-view .mobile-card-actions {
    grid-template-columns: 1fr !important;
    padding: 15px 0 !important;
  }
  
  /* Acciones en la última columna */
  body.lvl101-cards-view .mobile-card-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    border-bottom: none !important;
    padding: 0 !important;
    flex: 0 0 auto;
    gap: 0;
  }
  
  body.lvl101-cards-view .mobile-card-actions-container {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    gap: 10px;
  }
  
  body.lvl101-cards-view .mobile-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    text-align: center;
  }
  
  body.lvl101-cards-view .mobile-action-label {
    font-weight: 600;
    text-transform: uppercase;
    color: #8d015a;
    font-size: 12px;
    margin-bottom: 5px;
  }
  
  body.lvl101-cards-view .mobile-action-btn {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
  }
  
  /* Alternar colores de fondo para filas */
  body.lvl101-cards-view .mobile-card-alt {
    background-color: #f5f5f5;
  }
}

/* Ocultar cards de desktop por defecto (solo se mostrarán en desktop cuando se cumplan condiciones) */
.desktop-cards-container {
  display: none;
}

/* Desktop Cards Layout - Solo para LVL 101 con VisitCount <= 2 en desktop/tablet */
@media only screen and (min-width: 1024px) {
  /* Mostrar cards de desktop solo cuando existan (generadas para LVL 101 con <= 2 visitas) */
  .desktop-cards-container {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    gap: 24px;
    flex-wrap: wrap;
  }
  
  /* Para una sola card, mantener centrado sin wrap */
  .desktop-cards-single {
    flex-wrap: nowrap;
  }
  
  /* Layout especial para 1 card con panel PDF a la derecha */
  .desktop-cards-single-with-pdf {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 20px 20px 20px 20px;
    gap: 24px;
    flex-wrap: nowrap;
    box-sizing: border-box;
  }
  
  /* Wrapper para la card cuando hay panel PDF - alineado a la izquierda */
  .desktop-card-wrapper {
    flex: 0 0 auto;
    width: 480px;
    min-width: 450px;
    max-width: 480px;
    margin-left: 0;
  }
  
  /* Panel PDF a la derecha - ocupa todo el ancho restante */
  .desktop-pdf-panel {
    flex: 1 1 auto;
    min-width: 400px;
    background-color: #ffffff;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    height: calc(100vh - 200px);
    min-height: 600px;
    display: flex;
    flex-direction: column;
    margin-right: 20px; /* Alinear con el padding derecho del contenedor y el botón Salir */
    box-sizing: border-box;
  }
  
  /* LVL 101: columna izquierda 540px (logo + Salir centrados, card); PDF a la derecha a altura completa */
  body.lvl101-cards-view #page {
    display: grid;
    grid-template-columns: 540px 1fr;
    grid-template-rows: auto auto auto 1fr;
  }
  
  body.lvl101-cards-view #logo {
    grid-column: 1;
    justify-self: center;
    width: 100%;
    max-width: 540px;
    margin: 6px 0 0 0;
    height: 72px;
    background-position: center top;
    background-size: 240px;
    box-sizing: border-box;
  }
  
  body.lvl101-cards-view #tmain {
    grid-column: 1;
    justify-self: center;
    justify-content: center;
    width: 100%;
    max-width: 540px;
    padding: 4px 0;
    box-sizing: border-box;
  }
  
  body.lvl101-cards-view #alertinfo {
    grid-column: 1;
  }
  
  body.lvl101-cards-view #divtbl {
    grid-column: 1;
    max-width: 540px;
    justify-self: center;
    width: 100%;
  }
  
  /* Contenedor card + PDF: solo la card en flujo; el panel PDF se posiciona fijo a la derecha */
  body.lvl101-cards-view .desktop-cards-single-with-pdf {
    max-width: 540px;
    width: 100%;
  }
  
  /* Card en LVL 101 puede usar todo el ancho de la columna */
  body.lvl101-cards-view .desktop-card-wrapper {
    width: 100%;
    max-width: 540px;
    min-width: 0;
  }
  
  body.lvl101-cards-view .desktop-card {
    width: 100%;
    max-width: 540px;
    min-width: 0;
  }
  
  /* Panel PDF: fijo a la derecha, altura completa de pantalla (solo LVL 101 con 1 card) */
  body.lvl101-cards-view .desktop-pdf-panel {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    width: calc(100% - 540px) !important;
    height: 100vh !important;
    min-height: 400px;
    margin: 0 !important;
    border-radius: 0;
    box-sizing: border-box;
  }
  
  body.lvl101-cards-view .desktop-pdf-iframe {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
  }
  
  /* En PC con LVL 101 no mostrar el panel PDF móvil (solo el visor desktop a la derecha) */
  body.lvl101-cards-view .mobile-pdf-panel {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* Iframe del PDF */
  .desktop-pdf-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
    flex: 1 1 auto;
  }
  
  /* Para 2 o más cards, mostrar en la misma línea centradas sin wrap */
  .desktop-cards-double {
    flex-wrap: nowrap;
  }
  
  /* Card individual */
  .desktop-card {
    background-color: #ffffff;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 32px;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    position: relative;
    flex: 0 0 auto;
    width: 480px;
    min-width: 450px;
    max-width: 480px;
    box-sizing: border-box;
  }
  
  .desktop-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    border-left-color: #8d015a;
  }
  
  /* Título TIPORM */
  .desktop-card-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.4;
  }
  
  /* Fecha con icono */
  .desktop-card-date {
    display: flex;
    align-items: center;
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
  }
  
  .desktop-card-date i {
    font-size: 20px;
  }
  
  /* Divider */
  .desktop-card-divider {
    height: 1px;
    background-color: #e0e0e0;
    margin: 20px 0;
  }
  
  /* Nombre del paciente */
  .desktop-card-name {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    margin-bottom: 16px;
    line-height: 1.5;
  }
  
  /* NUMHIST */
  .desktop-card-numhist {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
  }
  
  /* Botones de acción */
  .desktop-card-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
  }
  
  .desktop-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 120px;
    max-width: 200px;
  }
  
  .desktop-action-btn:focus {
    outline: 2px solid #8d015a;
    outline-offset: 2px;
  }
  
  /* Botón primario (Descargar) */
  .desktop-action-btn-primary {
    background-color: #8d015a;
    color: #ffffff;
  }
  
  .desktop-action-btn-primary:hover {
    background-color: #ca489e;
    box-shadow: 0 2px 8px rgba(141, 1, 90, 0.3);
  }
  
  /* Botón secundario (Visor) */
  .desktop-action-btn-secondary {
    background-color: transparent;
    color: #8d015a;
    border: 2px solid #8d015a;
  }
  
  .desktop-action-btn-secondary:hover {
    background-color: #8d015a;
    color: #ffffff;
  }
  
  /* Botón neutral (Informe) */
  .desktop-action-btn-neutral {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #e0e0e0;
  }
  
  .desktop-action-btn-neutral:hover {
    background-color: #e8e8e8;
    border-color: #ccc;
  }
  
  /* Cuando hay cards de desktop, ocultar grid y cards móviles en desktop */
  .desktop-cards-container {
    display: block;
  }
  
  /* Ocultar grid cuando hay cards de desktop */
  .has-desktop-cards ~ .gridview-custom,
  .mobile-cards-container:has(.has-desktop-cards) ~ .gridview-custom {
    display: none !important;
  }
  
  /* Ocultar cards móviles cuando hay cards de desktop en desktop */
  .mobile-cards-container:has(.has-desktop-cards) .mobile-card,
  .mobile-cards-container:has(.has-desktop-cards) .mobile-card-header {
    display: none !important;
  }
  
  /* Alternativa sin :has() - usando clase en el contenedor padre */
  .mobile-cards-container.has-desktop-cards-view .mobile-card,
  .mobile-cards-container.has-desktop-cards-view .mobile-card-header {
    display: none !important;
  }
  
  .mobile-cards-container.has-desktop-cards-view ~ .gridview-custom {
    display: none !important;
  }
}

  /* En móvil, SIEMPRE ocultar cards de desktop */
  @media only screen and (max-width: 1023px) {
    .desktop-cards-container {
      display: none !important;
    }
    
    /* También ocultar específicamente el layout con PDF de desktop */
    .desktop-cards-single-with-pdf {
      display: none !important;
    }
  
    /* Asegurar que cards móviles se muestren en móvil */
    .mobile-cards-container {
      display: block !important;
    }
    
    /* Panel PDF móvil - debajo de la card móvil */
    .mobile-pdf-panel {
      width: 100%;
      background-color: #ffffff;
      border-radius: 14px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
      padding: 15px;
      margin-top: 20px;
      margin-bottom: 20px;
      height: 600px;
      min-height: 500px;
      max-height: 800px;
      display: flex;
      flex-direction: column;
    }
    
    /* Iframe del PDF móvil */
    .mobile-pdf-iframe {
      width: 100%;
      height: 100%;
      border: none;
      border-radius: 8px;
      flex: 1 1 auto;
    }
  }
  
  /* Ocultar filtros de ordenamiento cuando hay cards de desktop (LVL 101) - Solo en desktop */
  @media only screen and (min-width: 1024px) {
    /* Ocultar cuando hay clase hide-sort-filters en el body (LVL 101) */
    body.hide-sort-filters .mobile-sort-filter,
    body.hide-sort-filters #mobile-sort-filter {
      display: none !important;
      visibility: hidden !important;
      height: 0 !important;
      overflow: hidden !important;
    }
    
    /* Ocultar todos los elementos hijos también */
    body.hide-sort-filters #mobile-sort-filter * {
      display: none !important;
      visibility: hidden !important;
    }
    
    /* También ocultar cuando hay desktop cards presentes (respaldo CSS) */
    .has-desktop-cards-view ~ #mobile-sort-filter,
    .mobile-cards-container.has-desktop-cards-view ~ #mobile-sort-filter,
    .has-desktop-cards ~ #mobile-sort-filter,
    .desktop-cards-container ~ #mobile-sort-filter {
      display: none !important;
      visibility: hidden !important;
      height: 0 !important;
      overflow: hidden !important;
    }
  }
  
  /* Estilos para #divtbl cuando hay cards de desktop (LVL 101 en PC) */
  body.hide-sort-filters #divtbl {
    border: 0px;
    box-shadow: unset;
    max-width: 100% !important;
    width: 100% !important;
  }
  
  /* Ajustar contenedor de cards cuando hay layout con PDF para que ocupe todo el ancho */
  body.hide-sort-filters .mobile-cards-container .desktop-cards-single-with-pdf {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  /* Asegurar que el contenedor mobile-cards-container no limite el ancho cuando hay PDF */
  body.hide-sort-filters .mobile-cards-container.has-desktop-cards-view {
    max-width: 100% !important;
    width: 100% !important;
  }
  
  /* Asegurar que en móvil los filtros siempre se muestren, incluso con la clase hide-sort-filters */
  /* EXCEPTO para LVL 101, donde se ocultan todos los filtros */
  @media only screen and (max-width: 1023px) {
    /* Para LVL 101, ocultar todos los filtros - MÁXIMA ESPECIFICIDAD */
    body.lvl101-cards-view #tools #date-filter-container,
    body.lvl101-cards-view div#date-filter-container,
    body.lvl101-cards-view #date-filter-container,
    body.lvl101-cards-view .mobile-sort-filter,
    body.lvl101-cards-view #mobile-sort-filter,
    body.lvl101-cards-view #txtSearch,
    body.lvl101-cards-view #btnSearch,
    body.lvl101-cards-view #btnSearchMobile,
    body.lvl101-cards-view #search-buttons-row {
      display: none !important;
      visibility: hidden !important;
      height: 0 !important;
      overflow: hidden !important;
      margin: 0 !important;
      padding: 0 !important;
      width: 0 !important;
      max-width: 0 !important;
    }
    
    /* Para otros niveles, mostrar filtros normalmente */
    body:not(.lvl101-cards-view) .mobile-sort-filter,
    body:not(.lvl101-cards-view) #mobile-sort-filter {
      display: flex !important;
      visibility: visible !important;
    }
    
    /* Asegurar que todos los elementos hijos también se muestren (solo si NO es LVL 101) */
    body:not(.lvl101-cards-view).hide-sort-filters #mobile-sort-filter * {
      display: flex !important;
      visibility: visible !important;
    }
    
    body:not(.lvl101-cards-view).hide-sort-filters .mobile-sort-radio-group,
    body:not(.lvl101-cards-view).hide-sort-filters .mobile-sort-dropdown {
      display: flex !important;
      visibility: visible !important;
    }
  }
  
  /* Para LVL 101, ocultar TODOS los filtros en desktop también */
  @media only screen and (min-width: 1024px) {
    body.lvl101-cards-view #txtSearch,
    body.lvl101-cards-view #btnSearch,
    body.lvl101-cards-view #date-filter-container,
    body.lvl101-cards-view #mobile-sort-filter,
    body.lvl101-cards-view .mobile-sort-filter {
      display: none !important;
      visibility: hidden !important;
      height: 0 !important;
      overflow: hidden !important;
      margin: 0 !important;
      padding: 0 !important;
    }
  }

/* GridView debe mantener estructura de tabla en desktop */
.gridview-custom {
  width: 100%;
  border-collapse: collapse;
  margin: 0 auto;
}

.gridview-header {
  background-color: #792762 !important;
  padding: 10px 7px;
  text-align: center;
  font-weight: 400;
  font-size: 14px;
  color: #ffffff;
  text-transform: uppercase;
  border: 4px solid white !important;
  position: sticky;
  top: 0;
  z-index: 10;
}

.gridview-header th {
  background-color: #792762 !important;
  color: #ffffff;
  border: 4px solid white !important;
  padding: 10px 7px;
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.5px;
  position: relative;
}

.gridview-custom thead th {
  border-right: 1px solid #ffffff !important;
}

.gridview-custom th.gridview-header {
  border-right: 1px solid #ffffff !important;
}

table.gridview-custom th {
  border-right: 1px solid #ffffff !important;
}

.gridview-header th:last-child,
.gridview-custom thead th:last-child,
table.gridview-custom th:last-child {
  border-right: none !important;
}

/* Columnas no filtrables (sin enlace) - se aplica automáticamente */
.gridview-header th {
  cursor: default;
}

/* Columnas filtrables (con enlace) */
.gridview-header th a {
  color: #ffffff;
  text-decoration: none;
  display: block;
  padding: 2px 0;
  cursor: pointer;
  transition: opacity 0.2s ease;
  position: relative;
}

.gridview-header th a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Indicador visual de que es filtrable (icono de ordenamiento) - solo si no tiene clase sort-asc o sort-desc */
.gridview-header th a:not(.sort-asc):not(.sort-desc):after {
  content: " ↕";
  font-size: 10px;
  margin-left: 4px;
  opacity: 1;
  color: #ffffff;
}

.gridview-header th a.sort-asc:after {
  content: " ▲";
  font-size: 10px;
  margin-left: 4px;
  opacity: 1;
}

.gridview-header th a.sort-desc:after {
  content: " ▼";
  font-size: 10px;
  margin-left: 4px;
  opacity: 1;
}

.gridview-row {
  background-color: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  color: #333;
}

.gridview-row-alt {
  background-color: #f0f0f0;
  border-bottom: 1px solid #e0e0e0;
  color: #333;
}

.gridview-row:hover,
.gridview-row-alt:hover {
  background-color: #f0e6f5;
  border-left: 3px solid #8d015a;
}

.gridview-custom td {
  padding: 6px 4px;
  text-align: center;
  vertical-align: middle;
  font-weight: 400;
  font-size: 12px;
  color: #333;
  border-right: 1px solid #f0f0f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gridview-custom td.nombre-cell {
  text-align: left;
  padding-left: 8px;
  white-space: normal;
  word-wrap: break-word;
}

.gridview-custom td:last-child {
  border-right: none;
}

.gridview-checkbox-column {
  width: 30px !important;
  text-align: center;
  min-width: 30px !important;
  max-width: 30px !important;
}

.gridview-checkbox-column input[type="checkbox"] {
  cursor: pointer;
  width: 20px;
  height: 20px;
}

.gridview-action-column {
  width: 8%;
}

/* Responsive para página principal - Móvil Vertical */
@media only screen and (max-width: 768px) {
  #tmain {
    width: 95%;
    display: flex;
    flex-direction: column;
  }
  
  /* Botón Salir arriba en móvil */
  #tools2 {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 0;
    margin-bottom: 10px;
  }
  
  #tools2 input[type="button"],
  #tools2 button {
    width: 100%;
    margin-left: 0px !important;
    margin: 0;
  }
  
  #tools {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  
  /* Primera línea: Búsqueda y botón */
  #tools input[type="text"]#txtSearch {
    width: 100% !important;
    margin-right: 0 !important;
    margin-bottom: 0;
  }
  
  #tools button.search-button {
    width: 100%;
    margin-left: 0 !important;
    margin-top: 0;
  }
  
  /* Segunda línea: Solo checkbox y label */
  #date-filter-container {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-left: 0 !important;
    margin-top: 10px;
    flex-wrap: wrap;
  }
  
  #date-filter-container label {
    margin: 0 !important;
  }
  
  /* Tercera línea: Campos de fecha */
  #date-filter-container .date-input {
    display: none;
  }
  
  #date-filter-dates-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
  }
  
  #date-filter-dates-row .date-input {
    flex: 1;
    display: block !important;
  }
  
  #date-filter-dates-row span {
    color: #666;
    white-space: nowrap;
  }
  
  #alertinfo {
    width: 95%;
  }
  
  #divtbl {
    width: 95%;
    overflow-y: auto;
    max-height: none;
  }
  
  /* En móvil: ocultar GridView, mostrar cards */
  .gridview-custom {
    display: none !important;
  }
  
  .mobile-cards-container {
    display: block !important;
    width: 100%;
  }
  
  /* Asegurar que los filtros de ordenamiento se muestren siempre en móvil */
  .mobile-sort-filter,
  #mobile-sort-filter {
    display: flex !important;
  }
  
  body.hide-sort-filters .mobile-sort-filter,
  body.hide-sort-filters #mobile-sort-filter {
    display: flex !important;
  }
  
  /* Ocultar header en móvil - se mostrará solo en PC para LVL 101 */
  .mobile-card-header {
    display: none !important;
  }
  
  /* Cards móviles con colores del grid desktop (púrpura, gris, blanco) */
  .mobile-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 12px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }
  
  .mobile-card-alt {
    background-color: #f5f5f5;
  }
  
  .mobile-card-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    align-items: center;
  }
  
  .mobile-card-row:last-child {
    border-bottom: none;
  }
  
  .mobile-card-label {
    font-weight: 600;
    text-transform: uppercase;
    color: #8d015a;
    font-size: 12px;
    text-align: left;
  }
  
  .mobile-card-value {
    color: #333;
    font-size: 14px;
    text-align: right;
  }
  
  .mobile-card-actions {
    grid-template-columns: 1fr !important;
    padding: 15px 0 !important;
  }
  
  .mobile-card-actions-container {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    gap: 10px;
    width: 100%;
    flex-wrap: wrap;
  }
  
  .mobile-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
  }
  
  .mobile-action-label {
    font-weight: 600;
    color: #8d015a;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
  }
  
  .mobile-action-btn {
    width: 28px;
    height: 28px;
    cursor: pointer;
    transition: opacity 0.2s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .mobile-action-btn:hover {
    opacity: 0.7;
  }
  
  .mobile-action-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}

/* Desktop - mostrar GridView, ocultar cards */
@media only screen and (min-width: 769px) {
  .mobile-cards-container {
    display: none !important;
  }
  
  .gridview-custom {
    display: table !important;
    width: 100% !important;
    border-collapse: collapse !important;
  }
  
  .gridview-custom thead {
    display: table-header-group !important;
  }
  
  .gridview-custom tbody {
    display: table-row-group !important;
  }
  
  .gridview-custom tr {
    display: table-row !important;
  }
  
  .gridview-custom th,
  .gridview-custom td {
    display: table-cell !important;
  }
}

/* Loading Overlay y Progress Bar */
.document-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.document-loading-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.loading-box {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 30px 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  text-align: center;
  min-width: 350px;
  max-width: 500px;
  color: #333;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #792762;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-box span {
  display: block;
  margin-top: 10px;
  font-size: 16px;
  color: #333;
  font-weight: 400;
}

.progress-bar-container {
  width: 100%;
  height: 25px;
  background-color: #f0f0f0;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 10px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(to right, #792762 0%, #ca52a8 100%);
  border-radius: 12px;
  transition: width 0.3s ease;
}

#progress-text {
  color: #333;
  font-weight: 400;
  margin-bottom: 10px;
}

#progress-percent {
  color: #666;
  font-size: 12px;
  margin-top: 5px;
}
