@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@500;600;700&family=Source+Sans+3:wght@400;500;600&display=swap');

:root {
  --wms-color-primario: #1a1a1a;
  --wms-font-heading: 'Lexend', system-ui, sans-serif;
  --wms-font-body: 'Source Sans 3', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--wms-font-body); margin: 0; }
h1, h2, h3, h4, h5, h6 { font-family: var(--wms-font-heading); }

/* Touch targets: operarios usan esto desde el celular en bodega */
.btn, .form-control, .form-select { min-height: 44px; }
.btn { touch-action: manipulation; }

.wms-layout { display: flex; min-height: 100vh; }

#sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--wms-color-primario);
  color: #eee;
  flex-direction: column;
}
#sidebar .brand { padding: 16px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid rgba(255, 255, 255, .15); }
#sidebar .brand img { height: 32px; }
#sidebar .version { padding: 8px 16px; font-size: .7rem; color: #888; }

#sidebar nav, #menu-movil nav { padding: 8px 0; }
#sidebar nav a, #menu-movil nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: #ccc;
  text-decoration: none;
  font-size: .95rem;
  min-height: 44px;
}
#sidebar nav a:hover, #menu-movil nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }

#contenido { flex: 1; min-width: 0; padding: 24px; background: #f4f4f4; }
@media (max-width: 991.98px) {
  #contenido { padding: 16px; }
}

#topbar {
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--wms-color-primario);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1030;
}
#topbar img { height: 28px; }
#topbar .btn-menu {
  background: transparent;
  border: none;
  color: #fff;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#menu-movil .offcanvas-header { background: var(--wms-color-primario); color: #fff; }
#menu-movil .offcanvas-body { padding: 0; }

/* Tablas: en pantalla chica cada fila se apila como tarjeta (label arriba,
   valor abajo) en vez de forzar scroll horizontal */
@media (max-width: 767.98px) {
  .table-responsive-stack thead { display: none; }
  .table-responsive-stack, .table-responsive-stack tbody, .table-responsive-stack tr, .table-responsive-stack td {
    display: block;
    width: 100%;
  }
  .table-responsive-stack tr {
    margin-bottom: .75rem;
    border: 1px solid #dee2e6;
    border-radius: .5rem;
    padding: .5rem .75rem;
    background: #fff;
  }
  .table-responsive-stack td {
    border: none !important;
    padding: .35rem 0;
    text-align: left;
  }
  .table-responsive-stack td::before {
    content: attr(data-label);
    display: block;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #6c757d;
  }
  .table-responsive-stack td:empty { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
