/*
pantalla principal 
*/

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8edf8 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

/* Contenedor principal */
.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* Tarjeta principal */
.card {
  background: white;
  border-radius: 2rem;
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

/* Encabezado */
.header {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  padding: 2rem;
  text-align: center;
  color: white;
}

.header h1 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.header p {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Contenido */
.content {
  padding: 2rem;
}

/* Menú de opciones (tarjetas) */
.menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.menu-item {
  background: #f8fafc;
  border-radius: 1.5rem;
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  box-shadow: 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.menu-item:hover {
  transform: translateY(-4px);
  border-color: #2563eb;
  box-shadow: 0 12px 24px -8px rgba(37, 99, 235, 0.2);
  background: white;
}

.menu-item:active {
  transform: translateY(0);
}

.icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: inline-block;
}

.menu-item h3 {
  font-size: 1.4rem;
  color: #1e293b;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.menu-item p {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.4;
}

/* Botón secundario */
.btn-secondary {
  background: transparent;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 0.6rem 1.2rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #f1f5f9;
  border-color: #2563eb;
  color: #2563eb;
}

/* Tabla de inventario */
.tabla-container {
  overflow-x: auto;
  margin-top: 1.5rem;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background: white;
}

.inventario-tabla {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.inventario-tabla th {
  background: #f1f5f9;
  color: #1e293b;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #e2e8f0;
  position: sticky;
  top: 0;
}

.inventario-tabla td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

.inventario-tabla tr:hover {
  background: #f8fafc;
}

.stock-badge {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  padding: 0.2rem 0.6rem;
  border-radius: 2rem;
  font-weight: 600;
  font-size: 0.8rem;
}

.stock-bajo {
  background: #fee2e2;
  color: #991b1b;
}

/* Barra de búsqueda */
.busqueda {
  margin-bottom: 1.5rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  align-items: center;
}

.busqueda input {
  flex: 1;
  min-width: 200px;
  padding: 0.7rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 2rem;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s;
}

.busqueda input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.busqueda select {
  padding: 0.7rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 2rem;
  background: white;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Footer */
.footer {
  margin-top: 2rem;
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.usuario-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #64748b;
}

/* Botones de acción */
.btn-volver {
  background: #f1f5f9;
  border: none;
  color: #475569;
  padding: 0.6rem 1.2rem;
  border-radius: 2rem;
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s;
}

.btn-volver:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* Responsive */
@media (max-width: 640px) {
  .content {
    padding: 1rem;
  }
  
  .header h1 {
    font-size: 1.4rem;
  }
  
  .menu-item {
    padding: 1.5rem 1rem;
  }
  
  .inventario-tabla th,
  .inventario-tabla td {
    padding: 0.5rem 0.8rem;
    font-size: 0.75rem;
  }
  
  .footer {
    flex-direction: column;
    align-items: center;
  }
}

/* Animación de carga */
.loading {
  text-align: center;
  padding: 2rem;
  color: #64748b;
}

/* Scroll suave */
html {
  scroll-behavior: smooth;
}