* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: #121212;
  color: #f0f0f0;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

header {
  background: #000000;
  color: #ffffff;
  padding: 1rem;
  margin-bottom: 2rem;
  border-radius: 5px;
  border-bottom: 3px solid #ff0000;
}

h1,
h2,
h3 {
  color: #ffffff;
}

.form-section,
.table-section {
  background: #1e1e1e;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  border-left: 3px solid #ff0000;
}

.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #ffffff;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #333;
  background-color: #2d2d2d;
  color: #ffffff;
  border-radius: 4px;
  font-size: 16px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #ff0000;
  box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

/* Estilos para el campo de teléfono con prefijo */
.phone-input-container {
  display: flex;
  align-items: center;
}

.phone-prefix {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #333;
  border: 1px solid #444;
  border-right: none;
  border-radius: 4px 0 0 4px;
  padding: 0 10px;
  height: 38px;
  font-weight: bold;
  color: #fff;
}

.phone-with-prefix {
  border-radius: 0 4px 4px 0;
  width: 100%;
}

/* ESTILOS PARA LA NUEVA BARRA DE BÚSQUEDA */
.service-search-container {
  margin: 15px 0 20px 0;
  padding: 0 5px;
}

.service-search-input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #333;
  background-color: #2d2d2d;
  color: #fff;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.service-search-input:focus {
  border-color: #ff0000;
  outline: none;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
  background-color: #333;
}

.service-search-input::placeholder {
  color: #888;
  font-style: italic;
}

/* ESTILOS PARA LA BARRA DE BÚSQUEDA PRINCIPAL */
.main-search-container {
  position: relative;
  margin: 20px 0 25px 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.main-search-input {
  width: 100%;
  padding: 15px 50px 15px 20px;
  border: 2px solid #333;
  background-color: #2d2d2d;
  color: #fff;
  border-radius: 25px;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.main-search-input:focus {
  border-color: #ff0000;
  outline: none;
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
  background-color: #333;
}

.main-search-input::placeholder {
  color: #888;
  font-style: italic;
}

.clear-search-btn {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: #ff0000;
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.clear-search-btn:hover {
  background: #cc0000;
  transform: translateY(-50%) scale(1.1);
}

/* ESTILOS PARA LA SECCIÓN DE RESULTADOS DE BÚSQUEDA */
.search-results-section {
  background-color: #1e1e1e;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border-left: 4px solid #ff0000;
}

.search-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #333;
}

.search-results-header h3 {
  margin: 0;
  color: #fff;
  font-size: 20px;
}

.search-results-count {
  background-color: #ff0000;
  color: #ffffff;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 14px;
  font-weight: bold;
}

.search-results-container {
  overflow-x: auto;
}

#search-results-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

#search-results-table th,
#search-results-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #333;
}

#search-results-table th {
  background-color: #000000;
  color: white;
  border-bottom: 2px solid #ff0000;
  font-weight: bold;
}

#search-results-table tr:hover {
  background-color: #2a2a2a;
}

#search-results-table tr.expirada {
  background-color: rgba(255, 0, 0, 0.2);
}

#search-results-table tr.expirada:hover {
  background-color: rgba(255, 0, 0, 0.3);
}

/* Badge para el servicio en los resultados */
.service-badge {
  background-color: #333;
  color: #ff0000;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
  border: 1px solid #ff0000;
}

/* Responsive para la búsqueda principal */
@media (max-width: 768px) {
  .main-search-container {
    margin: 15px 10px 20px 10px;
  }

  .main-search-input {
    padding: 12px 45px 12px 15px;
    font-size: 14px;
  }

  .search-results-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .search-results-header h3 {
    font-size: 18px;
  }

  #search-results-table {
    font-size: 14px;
  }

  #search-results-table th,
  #search-results-table td {
    padding: 8px;
  }
}

@media (max-width: 576px) {
  .main-search-input {
    padding: 10px 40px 10px 12px;
    font-size: 14px;
  }

  .clear-search-btn {
    width: 22px;
    height: 22px;
    font-size: 12px;
    right: 12px;
  }

  .search-results-section {
    padding: 15px;
    margin: 10px;
  }
}

.btn-submit {
  background-color: #ff0000;
  color: #ffffff;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  width: 100%;
  transition: background-color 0.3s;
}

.btn-submit:hover {
  background-color: #cc0000;
}

.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

th,
td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #333;
}

th {
  background-color: #000000;
  color: white;
  border-bottom: 2px solid #ff0000;
}

tr:hover {
  background-color: #2a2a2a;
}

tr.expirada {
  background-color: rgba(255, 0, 0, 0.2);
}

tr.expirada:hover {
  background-color: rgba(255, 0, 0, 0.3);
}

.edit-btn,
.delete-btn,
.renew-btn {
  padding: 3px 6px;
  margin: 0 5px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: white;
  font-weight: bold;
}

.edit-btn {
  background-color: #ff0000;
  color: #ffffff;
}

.delete-btn {
  background-color: #f44336;
}

.renew-btn {
  background-color: #ff0000;
  color: #ffffff;
}

.edit-btn:hover {
  background-color: #cc0000;
}

.delete-btn:hover {
  background-color: #d32f2f;
}

.renew-btn:hover {
  background-color: #cc0000;
}

.mensaje {
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 4px;
  display: none;
}

.mensaje.exito {
  background-color: rgba(76, 175, 80, 0.2);
  color: #4caf50;
  border: 1px solid #4caf50;
  display: block;
}

.mensaje.error {
  background-color: rgba(255, 0, 0, 0.2);
  color: #f44336;
  border: 1px solid #f44336;
  display: block;
}

.search-container {
  margin-bottom: 20px;
}

#search-input {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #333;
  background-color: #2d2d2d;
  color: #fff;
  border-radius: 4px;
}

#search-input:focus {
  border-color: #ff0000;
  outline: none;
  box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

@media (max-width: 768px) {
  .container {
    width: 95%;
    padding: 10px;
  }

  th,
  td {
    padding: 8px;
    font-size: 14px;
  }

  .edit-btn,
  .delete-btn,
  .renew-btn {
    padding: 4px 8px;
    font-size: 12px;
  }

  .service-search-input {
    padding: 10px 12px;
    font-size: 14px;
  }
}

.btn-logout {
  background-color: #ff0000;
  color: #ffffff;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  transition: background-color 0.3s;
}

.btn-logout:hover {
  background-color: #cc0000;
}

.form-control {
  margin-bottom: 10px;
}

.is-invalid {
  border-color: #f44336;
}

.invalid-feedback {
  color: #f44336;
  font-size: 14px;
  margin-top: 5px;
}

form p {
  margin-top: 15px;
  text-align: center;
}

form p a {
  color: #ff0000;
  text-decoration: none;
}

form p a:hover {
  text-decoration: underline;
  color: #cc0000;
}

/* Estilos para usuarios */
.user-info {
  background-color: rgba(255, 0, 0, 0.1);
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 20px;
  border-left: 3px solid #ff0000;
}

.user-info p {
  margin: 0;
  font-weight: bold;
}

/* Estilo para la paginación */
.pagination {
  display: flex;
  justify-content: center;
  list-style: none;
  margin-top: 20px;
}

.pagination li {
  margin: 0 5px;
}

.pagination a {
  padding: 8px 12px;
  border: 1px solid #333;
  color: #fff;
  background-color: #1e1e1e;
  text-decoration: none;
  border-radius: 4px;
}

.pagination a.active {
  background-color: #ff0000;
  color: #ffffff;
  border-color: #ff0000;
}

.pagination a:hover:not(.active) {
  background-color: #2a2a2a;
}

/* Estilos para el contador de suscripciones */
.subscription-count {
  background-color: #000000;
  color: white;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 20px;
  text-align: center;
  border-bottom: 2px solid #ff0000;
}

.subscription-count span {
  font-weight: bold;
  font-size: 1.2em;
  color: #ff0000;
}

/* Estilos para la gestión de servicios */
.select-container {
  display: flex;
  align-items: center;
}

.select-container select {
  flex-grow: 1;
  margin-right: 10px;
}

.btn-add-service {
  background-color: #ff0000;
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-weight: bold;
}

.btn-add-service:hover {
  background-color: #cc0000;
}

.services-section {
  margin-top: 20px;
}

.services-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.services-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.service-item {
  display: flex;
  align-items: center;
  background-color: #2a2a2a;
  padding: 8px 12px;
  border-radius: 4px;
  border-left: 2px solid #ff0000;
}

.service-name {
  margin-right: 10px;
  color: #fff;
}

.service-delete {
  background-color: transparent;
  color: #f44336;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 0 5px;
}

.service-delete:hover {
  color: #d32f2f;
}

.add-service-form {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.add-service-form input {
  flex-grow: 1;
  padding: 8px;
  border: 1px solid #333;
  background-color: #2d2d2d;
  color: #fff;
  border-radius: 4px;
}

.add-service-form input:focus {
  border-color: #ff0000;
  outline: none;
}

.add-service-form button {
  width: auto;
}

/* Modal para confirmar eliminación */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
  background-color: #1e1e1e;
  margin: 15% auto;
  padding: 20px;
  border-radius: 5px;
  width: 80%;
  max-width: 500px;
  border-left: 3px solid #ff0000;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: #ff0000;
}

.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.btn-delete {
  background-color: #f44336;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.btn-cancel {
  background-color: #555;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.btn-delete:hover {
  background-color: #d32f2f;
}

.btn-cancel:hover {
  background-color: #444;
}

/* Estilos para el enlace de WhatsApp */
.whatsapp-link {
  display: flex;
  align-items: center;
  color: #25d366;
  text-decoration: none;
  font-weight: bold;
}

.whatsapp-link:hover {
  text-decoration: underline;
}

.whatsapp-icon {
  margin-left: 5px;
  display: inline-block;
  width: 20px;
  height: 20px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="%2325D366" d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"></path></svg>');
  background-repeat: no-repeat;
  vertical-align: middle;
}

/* Estilos para el header mejorado */
header {
  background: #000000;
  color: #ffffff;
  padding: 1rem;
  margin-bottom: 2rem;
  border-radius: 5px;
  border-bottom: 3px solid #ff0000;
}

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

.logo-container {
  flex: 0 0 auto;
  margin-right: 15px;
  display: flex;
  align-items: center;
}

.header-logo {
  max-height: 100px;
  width: auto;
  border-radius: 5px;
  display: block;
}

.header-title {
  flex: 1 1 auto;
  text-align: center;
}

.header-title h1 {
  color: #ffffff;
  position: relative;
  display: inline-block;
}

.header-title h1:after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #ff0000;
}

.user-welcome {
  flex: 0 0 auto;
  text-align: right;
  margin-left: 15px;
}

/* Estilos del footer */
footer {
  flex-shrink: 0;
  background-color: #000000;
  text-align: center;
  padding: 20px 0;
  width: 100%;
  margin-top: auto;
  border-top: 3px solid #ff0000;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 0 20px;
}

.footer-info {
  flex: 1;
}

footer p {
  margin: 0;
  color: #fff;
}

footer a {
  color: #ff0000;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
  color: #cc0000;
}

.footer-line {
  height: 2px;
  background-color: #ff0000;
  width: 50%;
  margin: 15px auto 0;
  opacity: 0.5;
}

/* Estilos para el botón de agregar usuario y la sección de tabla */
.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-container {
  margin-bottom: 0;
}

.btn-add-user {
  background-color: #ff0000;
  color: #ffffff;
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  display: flex;
  align-items: center;
}

.btn-add-user::before {
  content: "+";
  margin-right: 5px;
  font-size: 18px;
  font-weight: bold;
}

.btn-add-user:hover {
  background-color: #cc0000;
}

/* Estilos para el modal del formulario de suscripción */
.subscription-form-modal {
  width: 90%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 25px;
  margin-top: 5%;
  background-color: #1e1e1e;
  border-left: 3px solid #ff0000;
}

/* Estilos para el modal de servicios */
.services-form-modal {
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 25px;
  margin-top: 5%;
  background-color: #1e1e1e;
  border-left: 3px solid #ff0000;
}

/* Ajustar estilos de servicios para modal */
.services-container {
  margin-top: 15px;
}

.services-list {
  background-color: #2a2a2a;
  border-radius: 4px;
  padding: 15px;
  min-height: 100px;
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 15px;
}

.services-list:empty::before {
  content: "No hay servicios agregados";
  display: block;
  color: #888;
  text-align: center;
  padding: 20px 0;
}

/* Estilos para mostrar/ocultar correos adicionales */
.email-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.email-list-item {
  margin-bottom: 3px;
}

.hidden-email {
  display: none;
}

.toggle-emails-btn {
  color: #ff0000;
  background: none;
  border: none;
  padding: 5px 0;
  cursor: pointer;
  font-size: 14px;
  text-decoration: underline;
}

.toggle-emails-btn:hover {
  color: #cc0000;
}

.emails-container {
  display: flex;
  flex-direction: column;
}

/* Responsive */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    text-align: center;
  }

  .logo-container,
  .header-title,
  .user-welcome {
    margin: 5px 0;
    text-align: center;
  }

  .header-logo {
    margin: 0 auto 10px;
  }

  .footer-content {
    flex-direction: column;
    gap: 15px;
  }

  .footer-info,
  .footer-links {
    text-align: center;
    width: 100%;
  }

  .footer-links {
    justify-content: center;
  }

  .table-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .table-actions {
    width: 100%;
    flex-direction: column;
    margin-top: 10px;
  }

  .search-container,
  .btn-add-user {
    width: 100%;
  }

  .subscription-form-modal {
    width: 95%;
    padding: 15px;
  }
}

/* Estilos para el login */
.login-container {
  max-width: 500px;
  margin: 0 auto;
}

/* Estilos adicionales para el formulario de login */
.form-section {
  border-top: 3px solid #ff0000;
  border-left: none;
}

/* Clase para botones de acción principales */
.btn-primary {
  background-color: #ff0000;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #cc0000;
}

/* Clase para los títulos de secciones */
.section-title {
  position: relative;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.section-title:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: #ff0000;
}

/* Estilos para la interfaz de tablet */
.tablet-interface-section {
  margin-bottom: 30px;
}

.tablet-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}

.tablet-frame {
  background-color: #333;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  position: relative;
  border: 10px solid #000;
  max-width: 1000px;
  margin: 0 auto;
}

.tablet-screen {
  background: linear-gradient(135deg, #0a0a0a 0%, #2a2a2a 100%);
  border-radius: 5px;
  padding: 20px;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-gap: 20px;
  padding: 15px;
}

.app-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
  text-align: center;
}

.app-icon:hover {
  transform: scale(1.1);
}

.app-icon img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  margin-bottom: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.app-icon:hover img {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(255, 0, 0, 0.4);
  border-color: rgba(255, 0, 0, 0.6);
}

.app-icon:active img {
  transform: scale(0.95);
}

.app-icon span {
  color: white;
  font-size: 14px;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.tablet-home-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #555;
  border: 2px solid #777;
  margin: 10px auto 0;
  cursor: pointer;
}

.view-toggle {
  text-align: center;
  margin: 20px 0;
}

#toggle-view-btn {
  background-color: #ff0000;
  color: #ffffff;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
}

#toggle-view-btn:hover {
  background-color: #cc0000;
}

/* Estilos responsivos */
@media (max-width: 992px) {
  .app-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .app-icon img {
    width: 70px;
    height: 70px;
  }
}

@media (max-width: 768px) {
  .app-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .tablet-frame {
    max-width: 90%;
  }
}

@media (max-width: 576px) {
  .app-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 15px;
  }

  .app-icon img {
    width: 60px;
    height: 60px;
  }

  .tablet-screen {
    min-height: 400px;
  }
}

/* Agregar servicio flotante modificado para los iconos */
#add-service-to-grid-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: #ff0000;
  color: #ffffff;
  border: none;
  border-radius: 50%;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 999;
  transition: all 0.3s ease;
}

#add-service-to-grid-btn:hover {
  background-color: #cc0000;
  transform: scale(1.1);
}

/* Animación para los iconos al hacer clic */
.app-icon:active {
  transform: scale(0.9);
}

/* Efecto de brillo para los iconos */
@keyframes glow {
  0% {
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
  }
  100% {
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
  }
}

.app-icon img:hover {
  animation: glow 2s infinite;
}

/* Estilos para el modal de selección de icono */
.icon-selection-modal {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
}

.icon-selection-content {
  background-color: #1e1e1e;
  margin: 10% auto;
  padding: 20px;
  border-radius: 5px;
  width: 80%;
  max-width: 600px;
  border-left: 3px solid #ff0000;
  max-height: 70vh;
  overflow-y: auto;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 15px;
  margin-top: 15px;
}

.icon-option {
  text-align: center;
  cursor: pointer;
  padding: 10px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.icon-option:hover {
  background-color: #333;
}

.icon-option img {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  margin-bottom: 5px;
}

.icon-option span {
  display: block;
  font-size: 14px;
  color: #fff;
}

/* Dashboard principal */
.main-dashboard {
  margin-bottom: 30px;
  max-width: 1000px;
  margin: 0 auto;
}

.dashboard-header {
  text-align: center;
  margin-bottom: 20px;
  border-bottom: 2px solid #ff0000;
  padding-bottom: 10px;
}

.dashboard-header h2 {
  font-size: 24px;
  color: #fff;
  margin: 0;
}

/* Optimización del tamaño del tablero según el Excel */
.tablet-container.optimized {
  max-width: 800px;
  margin: 0 auto;
}

.tablet-frame {
  background-color: #2d2d2d;
  border-radius: 20px;
  padding: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  position: relative;
  border: 12px solid #222;
  margin: 0 auto;
}

.tablet-screen {
  background: linear-gradient(135deg, #0a0a0a 0%, #2a2a2a 100%);
  border-radius: 5px;
  padding: 15px;
  min-height: 450px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-grid.optimized {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-gap: 15px;
  padding: 15px;
}

.app-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  padding: 10px;
  border-radius: 10px;
}

.app-icon:hover {
  transform: scale(1.1);
  background-color: rgba(255, 0, 0, 0.1);
}

.app-icon:active {
  transform: scale(0.95);
}

.app-icon img {
  width: 70px;
  height: 70px;
  border-radius: 15px;
  margin-bottom: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  object-fit: cover;
}

.app-icon span {
  color: white;
  font-size: 14px;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  display: block;
  text-align: center;
  width: 100%;
}

.tablet-home-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #444;
  border: 2px solid #555;
  margin: 10px auto 0;
  cursor: pointer;
  transition: background-color 0.3s;
}

.tablet-home-button:hover {
  background-color: #555;
}

/* Botones de acción del dashboard */
.dashboard-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.dashboard-actions button {
  background-color: #ff0000;
  color: #ffffff;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
}

.dashboard-actions button:hover {
  background-color: #cc0000;
}

/* Sección de suscripciones de servicio específico */
.service-subscriptions {
  max-width: 1200px;
  margin: 0 auto;
  background-color: #1e1e1e;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.service-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 2px solid #ff0000;
  padding-bottom: 10px;
}

.service-header h2 {
  margin: 0;
  color: #fff;
  font-size: 22px;
}

.back-button,
.add-subscription-button {
  background-color: #ff0000;
  color: #ffffff;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
}

.back-button:hover,
.add-subscription-button:hover {
  background-color: #cc0000;
}

/* Tabla de suscripciones de servicio */
#service-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

#service-table th,
#service-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #333;
}

#service-table th {
  background-color: #000000;
  color: white;
  border-bottom: 2px solid #ff0000;
}

#service-table tr:hover {
  background-color: #2a2a2a;
}

#service-table tr.expirada {
  background-color: rgba(255, 0, 0, 0.2);
}

#service-table tr.expirada:hover {
  background-color: rgba(255, 0, 0, 0.3);
}

/* Mensaje cuando no hay suscripciones */
.no-data-message {
  text-align: center;
  padding: 40px 20px;
  font-size: 18px;
  color: #888;
  background-color: #1a1a1a;
  border-radius: 5px;
  margin-top: 20px;
}

/* Campo de contraseña en el formulario */
#password {
  width: 100%;
  padding: 10px;
  background-color: #2d2d2d;
  border: 1px solid #444;
  border-radius: 4px;
  color: #fff;
  font-size: 16px;
}

#password:focus {
  border-color: #ff0000;
  outline: none;
  box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

/* Campo para URL de icono en el formulario de servicios */
#service-icon-url {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  background-color: #2d2d2d;
  border: 1px solid #444;
  border-radius: 4px;
  color: #fff;
  font-size: 16px;
}

#service-icon-url:focus {
  border-color: #ff0000;
  outline: none;
  box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

/* Adaptación responsiva */
@media (max-width: 992px) {
  .app-grid.optimized {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .app-grid.optimized {
    grid-template-columns: repeat(3, 1fr);
  }

  .service-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .dashboard-actions {
    flex-direction: column;
  }
}

@media (max-width: 576px) {
  .app-grid.optimized {
    grid-template-columns: repeat(2, 1fr);
  }

  .app-icon img {
    width: 60px;
    height: 60px;
  }

  #service-table {
    font-size: 14px;
  }

  #service-table th,
  #service-table td {
    padding: 8px;
  }

  .back-button,
  .add-subscription-button {
    width: 100%;
    margin-bottom: 5px;
  }
}

/* Estilos para el botón de editar servicio */
.service-edit {
  background-color: transparent;
  color: #ff0000;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 0 5px;
  margin-right: 5px;
  transition: transform 0.2s ease;
}

.service-edit:hover {
  transform: scale(1.2);
  color: #cc0000;
}

/* Estilos mejorados para los items de servicio */
.service-item {
  display: flex;
  align-items: center;
  background-color: #2a2a2a;
  padding: 8px 12px;
  border-radius: 4px;
  border-left: 2px solid #ff0000;
  margin-bottom: 8px;
}

.service-name {
  margin-right: auto;
  color: #fff;
  font-weight: 500;
}

/* Estilos para el formulario de edición de servicio */
.edit-service-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.edit-service-form .form-group {
  margin-bottom: 0;
}

.edit-service-form label {
  margin-bottom: 8px;
  font-weight: bold;
  color: #fff;
}

.edit-service-form input {
  width: 100%;
  padding: 10px;
  background-color: #2d2d2d;
  border: 1px solid #444;
  border-radius: 4px;
  color: #fff;
  font-size: 16px;
}

.edit-service-form input:focus {
  border-color: #ff0000;
  outline: none;
  box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

.edit-service-form .input-help {
  font-size: 12px;
  color: #aaa;
  margin-top: 4px;
  margin-bottom: 0;
}

.form-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 10px;
}

.btn-cancel {
  background-color: #444;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
}

.btn-cancel:hover {
  background-color: #555;
}

/* Estilos para el modal de renovación */
.renew-info {
  background-color: #2a2a2a;
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 15px;
  border-left: 3px solid #ff0000;
}

.renew-info p {
  margin: 5px 0;
  color: #fff;
}

.renew-info strong {
  color: #ff0000;
}

#renew-days {
  width: 100%;
  padding: 10px;
  background-color: #2d2d2d;
  border: 1px solid #444;
  border-radius: 4px;
  color: #fff;
  font-size: 16px;
  text-align: center;
}

#renew-days:focus {
  border-color: #ff0000;
  outline: none;
  box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

/* Estilos para agrupación de suscripciones */
.subscription-group {
  border: 2px solid #333;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.subscription-group .group-header {
  background-color: #2a2a2a;
  padding: 10px 15px;
  border-bottom: 1px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.subscription-group .group-header h4 {
  margin: 0;
  color: #ff0000;
  font-size: 16px;
}

.subscription-group .group-count {
  background-color: #ff0000;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: bold;
}

.subscription-group table {
  margin: 0;
}

.subscription-group tr:first-child td {
  border-top: none;
}

/* Campana de notificación */
.notification-bell {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

.bell-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #ff0000;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.bell-icon:hover {
  transform: scale(1.1);
  background-color: #cc0000;
}

.bell-icon svg {
  color: #ffffff;
}
