/* Estilos generales */
body {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    color: #333;
    background-color: #f5f5f5;
    min-height: 100vh;
}

/* Estilos para la página de login */
body:not(.dashboard-page) {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #b3c7e6, #d9e4f5);
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

/* Estilos para el logo */
.logo {
    width: 120px;
    height: auto;
    margin-bottom: 30px;
}

/* Botón de login */
#login-btn {
    background-color: #ffffff;
    color: #4285F4;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 280px;
}

#login-btn img {
    margin-right: 10px;
}

#login-btn:hover {
    background-color: #f1f1f1;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
}

/* Estilos para el footer */
footer {
    position: absolute;
    bottom: 20px;
    text-align: center;
    width: 100%;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* Estilos para dashboard */
.dashboard-page {
    background-color: #f8f9fa;
}

/* Pantallas de bienvenida y contenido */
#welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    text-align: center;
    background-color: #f8f9fa;
    color: #333;
}

#welcome-screen h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

#welcome-screen p {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.hidden {
    display: none !important;
}

/* Contenedor principal del dashboard */
.dashboard-container {
    display: flex;
    height: 100vh;
    width: 1280px;
}

/* Barra lateral */
.sidebar {
    background: #2c3e50;
    color: white;
    width: 20%;
    min-width: 200px;
    padding: 20px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar li {
    margin: 10px 0;
    padding: 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
}

.sidebar li:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.dashboard-btn {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    text-align: left;
    width: 100%;
    padding: 10px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.dashboard-btn:hover, .dashboard-btn.active {
    background: rgba(255, 255, 255, 0.2);
}

/* Botón de cierre de sesión */
#logout-btn {
    background-color: #e74c3c;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-top: auto;
    width: 100%;
}

#logout-btn:hover {
    background-color: #c0392b;
}

/* Contenido principal */
.main-content {
    width: 80%;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    background-color: #f8f9fa;
}

/* Cajas de estadísticas */
.stats-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.stat-box {
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    flex: 1;
}

.stat-box h4 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 16px;
    margin-bottom: 8px;
}

.stat-box p {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    color: #3498db;
}

/* Caja de datos */
.data-box {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    min-height: 300px;
}

/* Tabla de datos */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.data-table th, .data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.data-table th {
    background-color: #f4f6f8;
    font-weight: bold;
    color: #2c3e50;
}

.data-table tr:hover {
    background-color: #f9f9f9;
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        min-height: 0;
    }
    .main-content {
        width: 100%;
    }
    .stats-container {
        flex-direction: column;
    }
}


/* Añadir estos estilos al archivo styles.css o a la sección <style> en el dashboard.html */

/* Estilos para la tabla de datos */
#data-table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 20px;
  }
  
  #data-table th {
    background-color: #f2f2f2;
    font-weight: bold;
    text-align: left;
    padding: 10px;
    border-bottom: 2px solid #ddd;
  }
  
  #data-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
  }
  
  /* Estilos para filas de grupo en SKUs repetidos */
  #data-table tr.group-header {
    background-color: #f5f5f5;
    font-weight: bold;
  }
  
  #data-table tr.group-item td:nth-child(2) {
    padding-left: 20px;
  }
  
  /* Estilos para cuando no hay datos */
  .no-data-message {
    padding: 20px;
    text-align: center;
    color: #666;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
    margin: 20px 0;
  }

  /* Estilos para mensajes de actualización */
#mensaje-actualizacion {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 15px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    font-size: 14px;
    transition: opacity 0.5s;
    opacity: 0;
  }
  
  /* Estilos para botones durante actualización */
  .btn-actualizar.updating {
    background-color: #ccc !important;
    cursor: not-allowed;
  }
  
  /* Animación para indicador de carga */
  .loading-indicator {
    display: flex;
    align-items: center;
  }
  
  .loading-indicator::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 8px;
    border: 2px solid #4CAF50;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
  }
  
  @keyframes spin {
    to { transform: rotate(360deg); }
  }

  .btn-actualizar {
    font-size: 12px;
    padding: 5px 10px;
    margin-top: 5px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
  }
  .btn-actualizar:hover {
    background-color: #e0e0e0;
  }
  .btn-actualizar-todo {
    padding: 8px 15px;
    margin: 15px auto;
    display: block;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
  }
  .btn-actualizar-todo:hover {
    background-color: #45a049;
  }
  .loading-indicator {
    font-size: 12px;
    margin-top: 5px;
    color: #555;
  }
  #tiempo-actualizacion {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
    text-align: center;
  }

  /* Añadir a los estilos existentes */
  .help-text {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-top: 8px;
  }
  
  #table-view h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    min-height: 400px;
    overflow: auto;
    border-bottom: 1px solid #eee;
  }