/* ======================================================
   BASE GENERAL: colores, fuente, estructura del body
====================================================== */
body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #fff;
    margin: 0.5rem;
    padding: 0;
    padding-bottom: 75px;
}
.alert-error {
    color: white;
    background-color: #e74c3c;
    padding: 0.7rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: bold;
}

.input-url-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.mensaje-url {
    color: red;
    font-size: 0.9rem;
}
.error-mensaje p {
  color: red;
  font-size: 0.9rem;
  margin-top: 0.3rem;
}

/* ======================================================
   FORMULARIOS DE LOGIN Y REGISTRO
====================================================== */
.form-container {
    max-width: 400px;
    margin: auto;
    padding: 1.5rem;
    border-radius: 20px;
    background-color: #fff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    margin-top: 2rem;
}

h2 {
    color: #1d3c50;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.input-group {
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    background-color: #fff;
}

.input-group img {
    width: 20px;
    margin-right: 0.5rem;
    opacity: 0.6;
}

.input-group input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 1rem;
}

.forgot-password {
    text-align: right;
    margin-bottom: 1rem;
}

.forgot-password a {
    font-size: 0.9rem;
    color: #7a7aff;
    text-decoration: none;
}

.btn-primary {
    width: 100%;
    padding: 0.75rem;
    background-color: #7a7aff;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}


.back-btn {
    display: inline-block;
    background: #7a7aff;
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
    text-decoration: none;
    margin-bottom: 1rem;
}

/* ======================================================
   HOME INICIAL (antes de iniciar sesión)
====================================================== */
.home-container {
    max-width: 400px;
    margin: auto;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

.welcome-title {
    font-size: 2rem;
    color: #1d3c50;
    margin-bottom: 0.5rem;
}

.welcome-text {
    font-size: 1rem;
    color: #555;
    margin-bottom: 2rem;
}

.home-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.full-width {
    width: 100%;
    display: inline-block;
    text-align: center;
}

.btn-secondary {
    padding: 0.75rem;
    background-color: white;
    color: #7a7aff;
    border: 2px solid #7a7aff;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
}

.btn-primary i,
.btn-secondary i {
    margin-right: 0.5rem;
}

/* ======================================================
   DASHBOARD ADMINISTRADOR
====================================================== */
.admin-dashboard {
    padding: 0.75   rem;
    font-family: 'Segoe UI', sans-serif;
}

/* Encabezado del panel */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #7a7aff;
    color: white;
    padding: 0.4rem;
    border-radius: 10px;
}

.header i
{
    color: white;
    text-decoration: none;
}

.user-info{
    padding: 0.75rem;
}
.user-info .name {
    font-weight: bold;
    margin: 0;
}

.user-info .role {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.9;
}

.logout-icon {
    font-size: 1.5rem;
}

/* Título principal */
.dashboard-title {
    text-align: center;
    margin: 1.5rem 0 1rem;
    font-weight: bold;
}

/* Botones de acción */
.main-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    width: 45%;
    border-radius: 15px;
    color: white;
    text-align: center;
    text-decoration: none;
}

.action-card.purple {
    background-color: #7a7aff;
}

.action-card i {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

/* Botones de los usuarios */
.usuario-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.usuario-actions a {
    background-color: #7a7aff;
    color: white;
    padding: 0.7rem;
    border-radius: 50%;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 1rem;
    height: 1rem;
    transition: background-color 0.3s;
}

.usuario-actions a:hover {
    background-color: #5f5fff;
}

.usuario-actions i {
    font-size: 0.75rem;
}


/* Estadísticas */
.stats-section h3 {
    margin: 1rem 0;
}

.stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
    padding: 0.5rem;
    margin-top: 1rem;
}

.stat i {
    font-size: 1.5rem;
    color: #7a7aff;
}

.stat p {
    margin-top: 0.3rem;
    font-size: 0.9rem;
}

/* Ediciones recientes */
.recent-section {
    margin-top: 0.5rem;
}

.recent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recent-item {
    position: relative;
    display: flex;
    justify-content: space-between;
    background-color: #f5f5f5;
    padding: 0.8rem;
    margin-top: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 10px;
}
.tiempo-actualizado {
    position: absolute;
    top: 0.5rem;
    right: 0.8rem;
    font-size: 0.7rem;
    color: #777;
}
.updated-at {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 0.7rem;
    color: #999;
    font-style: italic;
}
/* ======================================================
   NAVEGACIÓN INFERIOR (común en todos los paneles)
====================================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    font-size: 0.8rem;
}

.bottom-nav a {
    color: #999;
    text-decoration: none;
    text-align: center;
}

.bottom-nav a.active {
    color: #7a7aff;
}


.product-info{
    overflow: hidden; 
    text-overflow: ellipsis; 
    width: 50%;
}
/* Tarjeta de producto */
.product-card {
    background-color: #f7f6ff;
    border-radius: 12px;
    padding: 0.75rem;
    margin-bottom: 1rem;

    display: flex;
    justify-content: space-between;
    align-items: center; /* Alinea verticalmente los íconos con el texto */
}

.product-title-card{
    font-weight: bold;
    font-size: 1rem;
    font-family:Arial, Helvetica, sans-serif;
}
/* Contenedor de texto */
.product-title,
.product-subtitle {
    margin: 0;
    overflow: hidden; 
    text-overflow: ellipsis;
}

.product-title {
    font-weight: bold;
    font-size: 1.4rem;
    font-family: 'Poppins', 'Segoe UI', Roboto, Arial, sans-serif; /* fuentes limpias y modernas */
    text-align: center;
    margin-bottom: 1rem;
}

.product-subtitle {
    font-size: 0.85rem;
    color: #888;
    margin-top: 0.2rem;
    width: 100%; /* Asegura que ocupe todo el ancho disponible */
    overflow: hidden; 
    text-overflow: ellipsis;
}

.product-link-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.product-link {
  color: #0066cc;
  text-decoration: none;
  word-break: break-all;
}

.product-link:hover {
  text-decoration: underline;
}

.copy-icon {
  cursor: pointer;
  color: #666;
  transition: color 0.2s;
}

.copy-icon:hover {
  color: #7a7aff;
}


/* Contenedor de íconos */
.action-icons {
    display: flex;
    gap: 0.5rem;
}

/* Estilo de cada ícono */
.action-icons a {
    background-color: #7a7aff;
    color: white;
    padding: 0.7rem;
    border-radius: 50%;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 1rem;
    height: 1rem;
    transition: background-color 0.3s;
}

/* Hover */
.action-icons a:hover {
    background-color: #c9c7ff;
}

.action-icons i {
    font-size: 0.75rem;
}


.create-button-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    padding: 0.5rem;
}

.create-button-container .btn-primary {
    width: 100%;
    max-width: 400px;
    text-decoration: none
}
/* imagenes de editar producto */
.preview-media {
  width: 100%;
  max-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ddd;
  border-radius: 8px;
  overflow: hidden;
}

.preview-media img,
.preview-media video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.media-upload, .preview-area {
  width: 100%;
  height: 180px;
  background-color: #e0e0e0;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  border: 1px dashed #aaa;
  border-radius: 8px;
}


/* Contenedor general de leads */
.leads-container {
    max-width: 500px;
    margin: auto;
    padding: 1rem 0.5rem;
}

/* Filtros */
.filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.filters select {
  flex: 1;
  padding: 0.4rem;
  border-radius: 5px;
  border: 1px solid #ccc;
  font-size: 0.6rem;
  min-width: 100px;
  white-space: nowrap; /* evita que el texto se divida en varias líneas */
  overflow: hidden; /* oculta el texto que no cabe */
text-overflow: ellipsis; /* muestra puntos suspensivos (...) si el texto es demasiado largo */
}

@media (max-width: 480px) {
  .filters select {
    flex: 1 1 100%; /* cada select ocupa toda la línea */
    font-size: 0.7rem;
  }
}
@media screen and (max-width: 600px) {
    .filters {
        max-width: 320px;
    }
    .filters select {
        font-size: 0.6rem;
        padding: 0.3rem;
        width: 100%;
    }
}

/* Total de leads */
.total-leads {
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* Tarjetas de leads */
.lead-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background-color: #f5f5f5;
    border-left: 5px solid #7a7aff;
    padding: 0.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-decoration: none;
}
.lead-card-link {
    text-decoration: none;       /* quita la línea subrayada */
    color: inherit;              /* hereda el color del padre, evita el azul */            /* permite que el <a> abarque todo el div */
}
.lead-card:hover {
    background-color: #dfdede;   /* opcional: color al pasar el mouse */
}
.lead-info {
    max-width: 70%;
    font-size: 0.7rem;
}

.lead-meta {
    text-align: right;
    font-size: 0.75rem;
    color: #666;
}

.nuevo-label {
    display: inline-block;
    background-color: #7a7aff;
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-weight: bold;
}

.lead-fecha {
    display: block;
    margin-top: 0.5rem;
}

/* Botón de exportar */
.exportar {
    text-align: center;
    margin-top: 1.5rem;
}

.btn-exportar {
    background-color: #7a7aff;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
}


/* Contenedor principal de usuarios */
.usuarios-container {
    max-width: 500px;
    margin: auto;
    padding: 0.2rem;
}

/* Título de sección */
.section-title {
    text-align: center;
    font-size: 1.5rem;
    color: #1d3c50;
    margin-bottom: 1.5rem;
}

/* Tarjeta individual */
.usuario-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f5f5ff; /* fondo suave */
    border-radius: 15px;
    padding: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

/* Información del usuario */
.usuario-info {
    font-size: 0.7rem;
    max-width: 60%;
    color: #333;
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.usuario-info .strong_nombres {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}
.strong_email{
    font-size: 0.8rem;
}

/* ==== Crear Producto ==== */
/* Sección de creación de producto */
.main-content {
    padding: 0.6rem;
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra hijos horizontalmente */
}
.main-content > * {
    width: 100%; /* o max-width si quieres limitarlo */
}

.input {
    width: 90%;
    margin-bottom: 1rem;
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 10px;
}

.url-input {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 1rem;
    font-size: 12px;
}

.url-input input {
    flex: 1;
    border: none;
    border-bottom: 1px solid #ccc;
    padding: 0.2rem;
    font-size: 12px;
    max-width: 135px;
}

.bloques-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top:1rem;
    max-width: 900px;
    width: 100%;
}

.bloque {
    border: 1px dashed #ccc;
    background: #f5f5f5;
    padding: 0.2rem;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.media-upload {
    width: 90%;
    background-color: #e0e0e0;
    padding: 1rem;
    border-radius: 1px;
    text-align: center;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}
@media (min-width: 768px) {
    .media-upload {
        width: 90%;
    }
    .bloques-container {
    width: 20%;
    justify-content: center;
    }
    .contenedor-principal-bloques{
        display: flex;
        justify-content: center;
        align-items: center;
    }
}


.media-upload img,
.media-upload video {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    position: absolute;
}

.custom-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}



.boton-disabled {
    margin-top: 1rem;
    width: 100%;
    background-color: #dcdcdc;
    border: none;
    padding: 0.7rem;
    font-weight: bold;
    cursor: not-allowed;
}


.eliminar-bloque {
    position: absolute;
    top: 2px;
    right: 0px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
}

.add-bloque-container {
    text-align: center;
    margin: 1rem 0;
}

.add-bloque {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.select-usuarios {
    margin-top: 1.5rem;
    background: #f5f7ff;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
}

.checkbox-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #333;
}

.checkbox-option input[type="checkbox"] {
    transform: scale(1.2);
    accent-color: #7a7aff; /* tu color celeste/morado */
}


.dominio{
    font-size: 12px;
}


/* Formulario usuario */
/* Mejora del formulario de usuario */
.form-group {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.form-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.form-row .form-group {
  flex: 1;
}

.form-group label {
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
  color: #333;
}

.form-group input {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 0.9rem;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
}

.btn-cancelar {
  background: none;
  border: none;
  color: #8183F0;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.6rem 1rem;
  text-decoration: none;
}

.text-muted {
  color: #999;
  margin-top: 1rem;
}

.select-custom {
  width: 100%;
  padding: 0.6rem 1rem;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 1rem;
  color: #333;
  background-color: #fff;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg width='14' height='10' viewBox='0 0 14 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 3l6 6 6-6' stroke='%237a7aff' stroke-width='2' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
}

