/**
 * MostolesHifi - Estilos del Dashboard
 * Optimizado para escritorio y pantallas anchas
 */

/* Reset y Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: #f5f7fa;
  color: #333;
  line-height: 1.6;
}

/* Layout Principal */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
}

.sidebar-header {
  padding: 25px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.sidebar-subtitle {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-top: 5px;
}

.sidebar-nav {
  flex: 1;
  padding: 20px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 14px 25px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: all 0.3s;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.nav-item.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-left-color: #4a90d9;
}

.nav-item i {
  width: 20px;
  margin-right: 12px;
  font-size: 16px;
}

.sidebar-footer {
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.nav-item.logout {
  color: rgba(255,255,255,0.5);
}

.nav-item.logout:hover {
  color: #e74c3c;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 30px;
  min-height: 100vh;
}

.page-header {
  margin-bottom: 30px;
}

.page-title {
  font-size: 28px;
  color: #1a1a2e;
  font-weight: 600;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stats-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
}

.stat-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.stat-card.compact {
  padding: 15px;
}

.stat-label {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a2e;
}

.stat-card.compact .stat-value {
  font-size: 22px;
}

.stat-value.money {
  color: #27ae60;
}

.stat-value.money::after {
  content: ' €';
  font-size: 18px;
}

.stat-card.compact .stat-value.money::after {
  font-size: 14px;
}

.stat-sublabel {
  font-size: 11px;
  color: #999;
  margin-top: 5px;
}

/* Cards y Paneles */
.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  margin-bottom: 25px;
}

.card-header {
  padding: 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0;
}

.card-body {
  padding: 20px;
}

/* Tablas */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

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

.data-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #555;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.data-table td {
  font-size: 14px;
}

/* DataTables Override */
.dataTables_wrapper {
  padding: 20px;
}

.dataTables_filter input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  margin-left: 10px;
}

.dataTables_length select {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

table.dataTable thead th {
  background: #f8f9fa;
  border-bottom: 2px solid #ddd;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-success {
  background: #d4edda;
  color: #155724;
}

.badge-warning {
  background: #fff3cd;
  color: #856404;
}

.badge-danger {
  background: #f8d7da;
  color: #721c24;
}

.badge-info {
  background: #d1ecf1;
  color: #0c5460;
}

.badge-secondary {
  background: #e2e3e5;
  color: #383d41;
}

/* Botones */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}

.btn-primary {
  background: #4a90d9;
  color: #fff;
}

.btn-primary:hover {
  background: #357abd;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-icon {
  padding: 8px 12px;
}

/* Links */
a.link-primary {
  color: #4a90d9;
  text-decoration: none;
}

a.link-primary:hover {
  text-decoration: underline;
}

/* Formularios */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
}

.form-control {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
  transition: border-color 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: #4a90d9;
}

/* Filtros */
.filters-bar {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group label {
  font-size: 13px;
  color: #666;
}

.filter-group select,
.filter-group input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
}

/* Info List */
.info-list {
  list-style: none;
}

.info-list li {
  display: flex;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.info-list li:last-child {
  border-bottom: none;
}

.info-label {
  width: 200px;
  font-weight: 500;
  color: #555;
}

.info-value {
  flex: 1;
  color: #333;
}

/* Warehouse Navigation */
.warehouse-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.warehouse-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 14px;
}

.warehouse-breadcrumb a {
  color: #4a90d9;
  text-decoration: none;
}

.warehouse-breadcrumb span {
  color: #999;
}

.location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.location-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
}

.location-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.location-icon {
  font-size: 32px;
  color: #4a90d9;
  margin-bottom: 10px;
}

.location-name {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
}

.location-count {
  font-size: 13px;
  color: #666;
  margin-top: 5px;
}

/* Products in location */
.product-stock-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: #fff;
  border-radius: 8px;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.product-stock-info {
  flex: 1;
}

.product-stock-name {
  font-weight: 500;
  color: #1a1a2e;
}

.product-stock-ref {
  font-size: 13px;
  color: #666;
}

.product-stock-qty {
  font-size: 24px;
  font-weight: 700;
  color: #4a90d9;
}

/* Responsive */
@media (max-width: 1400px) {
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 70px;
  }

  .sidebar-logo,
  .sidebar-subtitle,
  .nav-item span {
    display: none;
  }

  .sidebar-header {
    padding: 15px;
    text-align: center;
  }

  .nav-item {
    justify-content: center;
    padding: 15px;
  }

  .nav-item i {
    margin-right: 0;
    font-size: 20px;
  }

  .main-content {
    margin-left: 70px;
    padding: 20px;
  }
}
