/* ==========================================================================
   FEROXFIT - INVENTARIO | STYLESHEET MOBILE-FIRST
   Identidad Oficial: https://www.feroxfit.com.co/
   Paleta: Dark Athletic (Black #0a0a0a, Carbon #141414, Pure White #ffffff)
   Tipografías: Oswald (Títulos atléticos) y Figtree (Cuerpo e inputs)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Oswald:wght@500;600;700&display=swap');

:root {
  /* Paleta Oficial FeroxFit */
  --ff-bg: #0a0a0a;
  /* Fondo principal profundo */
  --ff-surface: #141414;
  /* Superficie de tarjetas */
  --ff-surface-elevated: #1a1a1a;
  /* Superficie modal / hover */
  --ff-surface-subtle: #222222;
  /* Fondo de inputs */
  --ff-border: #262626;
  /* Bordes discretos */
  --ff-border-light: #333333;
  --ff-text: #ffffff;
  /* Texto principal */
  --ff-text-muted: #9e9e9e;
  /* Texto secundario */

  /* Botones y contrastes */
  --ff-btn-primary: #ffffff;
  --ff-btn-primary-text: #0a0a0a;
  --ff-btn-secondary: #1f1f1f;

  /* Indicadores funcionales de inventario */
  --ff-in: #10b981;
  /* Verde entrada */
  --ff-in-bg: rgba(16, 185, 129, 0.12);
  --ff-in-border: rgba(16, 185, 129, 0.35);
  --ff-out: #ef4444;
  /* Rojo salida */
  --ff-out-bg: rgba(239, 68, 68, 0.12);
  --ff-out-border: rgba(239, 68, 68, 0.35);
  --ff-invent-border: rgba(245, 241, 9, 0.35);
  --ff-movimient-border: rgba(0, 189, 252, 0.35);
  --ff-warning: #f59e0b;
  /* Alerta stock bajo */
  --ff-warning-bg: rgba(245, 158, 11, 0.12);
  --ff-warning-border: rgba(245, 158, 11, 0.35);

  --ff-bottom-nav-height: 64px;
  --ff-touch-height: 48px;
  --ff-radius-sm: 8px;
  --ff-radius-md: 12px;
  --ff-radius-lg: 16px;
  --ff-radius-pill: 9999px;

  --ff-shadow-card: 0 4px 20px rgba(0, 0, 0, 0.45);
}

/* Reset y Base */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--ff-bg);
  color: var(--ff-text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Títulos con tipografía Oswald atlética */
h1,
h2,
h3,
h4,
.brand-title,
.stat-value,
.action-card-title {
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Sobreescrituras de contraste Dark Theme */
.text-dark {
  color: #ffffff !important;
}

.bg-light {
  background-color: #1a1a1a !important;
  color: #ffffff !important;
  border-color: var(--ff-border) !important;
}

.bg-white {
  background-color: var(--ff-surface) !important;
  color: #ffffff !important;
}

.badge.bg-light {
  background-color: #1c1c1c !important;
  color: #e0e0e0 !important;
  border: 1px solid var(--ff-border) !important;
}

/* Contenedor Móvil Central */
.app-container {
  min-height: 100vh;
  padding-bottom: calc(var(--ff-bottom-nav-height) + 24px);
  max-width: 520px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* Header Móvil con Logo */
.app-header {
  padding: 16px 0 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo-img {
  height: 38px;
  width: 38px;
  object-fit: contain;
  filter: invert(1);
  display: inline-block;
  vertical-align: middle;
}

.brand-badge {
  font-family: 'Oswald', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  background-color: #ffffff;
  color: #0a0a0a;
  padding: 3px 10px;
  border-radius: var(--ff-radius-pill);
  text-transform: uppercase;
  display: inline-block;
}

.brand-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
}

/* Botones Táctiles >= 48px */
.btn {
  min-height: var(--ff-touch-height);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--ff-radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
  letter-spacing: 0.02em;
}

.btn:active {
  transform: scale(0.98);
}

/* Botón Blanco Principal */
.btn-primary-ff,
.btn-dark {
  background-color: #ffffff;
  border-color: #ffffff;
  color: #0a0a0a;
}

.btn-primary-ff:hover,
.btn-dark:hover,
.btn-primary-ff:focus,
.btn-dark:focus {
  background-color: #e5e5e5;
  border-color: #e5e5e5;
  color: #0a0a0a;
}

.btn-outline-ff {
  background-color: var(--ff-surface);
  border: 1.5px solid var(--ff-border);
  color: #ffffff;
}

.btn-outline-ff:hover,
.btn-outline-ff:active {
  background-color: var(--ff-surface-elevated);
  border-color: var(--ff-border-light);
  color: #ffffff;
}

.btn-outline-secondary {
  border-color: var(--ff-border);
  color: var(--ff-text-muted);
}

/* Formularios e Inputs en Dark Theme */
.form-control,
.form-select {
  min-height: var(--ff-touch-height);
  font-size: 16px;
  /* Evita auto-zoom en iOS */
  border-radius: var(--ff-radius-md);
  border: 1.5px solid var(--ff-border);
  padding: 10px 14px;
  background-color: var(--ff-surface-subtle);
  color: #ffffff;
  box-shadow: none;
}

.form-control:focus,
.form-select:focus {
  background-color: var(--ff-surface-subtle);
  border-color: #ffffff;
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
}

.form-select option {
  background-color: #1a1a1a;
  color: #ffffff;
}

.form-control::placeholder {
  color: #666666;
}

.input-group-text {
  background-color: var(--ff-surface-subtle);
  border-color: var(--ff-border);
  color: var(--ff-text-muted);
}

/* Tarjetas Móviles Oscuras */
.ff-card,
.card {
  background-color: var(--ff-surface) !important;
  border-radius: var(--ff-radius-lg);
  border: 1px solid var(--ff-border) !important;
  box-shadow: var(--ff-shadow-card);
  padding: 16px;
  margin-bottom: 14px;
  color: var(--ff-text);
}

/* Botones Grandes de Acción (Inicio) */
.action-card-btn {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 18px 20px;
  border-radius: var(--ff-radius-lg);
  text-decoration: none;
  margin-bottom: 12px;
  transition: all 0.2s ease;
  min-height: 84px;
}

.action-card-btn:active {
  transform: scale(0.985);
}

/* Entrada: Verde deportivo oscuro */
.action-card-in {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
  border: 1.5px solid var(--ff-in-border);
  color: #ffffff;
}

.action-card-in:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(16, 185, 129, 0.08) 100%);
  color: #ffffff;
}

/* Salida: Rojo atlético oscuro */
.action-card-out {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
  border: 1.5px solid var(--ff-out-border);
  color: #ffffff;
}

.action-card-out:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.22) 0%, rgba(239, 68, 68, 0.08) 100%);
  color: #ffffff;
}

.action-card-invent {
  background: linear-gradient(135deg, rgba(239, 213, 68, 0.15) 0%, rgba(239, 219, 68, 0.05) 100%);
  border: 1.5px solid var(--ff-invent-border);
  color: #ffffff;
}

.action-card-invent:hover {
  background: linear-gradient(135deg, rgba(239, 213, 68, 0.22) 0%, rgba(239, 219, 68, 0.08) 100%);
  color: #ffffff;
}

.action-card-movimiento {
  background: linear-gradient(135deg, rgba(68, 193, 239, 0.15) 0%, rgba(68, 239, 156, 0.05) 100%);
  border: 1.5px solid var(--ff-movimient-border);
  color: #ffffff;
}

.action-card-movimiento:hover {
  background: linear-gradient(135deg, rgba(68, 193, 239, 0.18) 0%, rgba(68, 239, 156, 0.08) 100%);
  color: #ffffff;
}

.action-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-right: 14px;
  flex-shrink: 0;
  background-color: #1a1a1a;
  border: 1px solid var(--ff-border);
}

.action-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 3px;
}

.action-card-desc {
  font-size: 0.825rem;
  color: var(--ff-text-muted);
}

/* Accesos rápidos secundarios */
.quick-link-card {
  background: var(--ff-surface);
  border: 1.5px solid var(--ff-border);
  border-radius: var(--ff-radius-md);
  padding: 14px;
  text-decoration: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.15s ease;
}

.quick-link-card:hover,
.quick-link-card:active {
  background-color: var(--ff-surface-elevated);
  border-color: var(--ff-border-light);
  color: #ffffff;
  transform: scale(0.985);
}

/* Resumen Dashboard Compacto */
.stat-pill {
  background: var(--ff-surface);
  border: 1px solid var(--ff-border);
  border-radius: var(--ff-radius-md);
  padding: 14px 10px;
  text-align: center;
}

.stat-value {
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--ff-text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-top: 5px;
}

/* Stepper táctil [+] / [-] */
.stepper-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}

.btn-stepper {
  width: 52px;
  height: 52px;
  border-radius: var(--ff-radius-md);
  font-size: 1.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--ff-border);
  background-color: var(--ff-surface);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-stepper:active {
  background-color: var(--ff-surface-elevated);
}

.stepper-input {
  max-width: 100px;
  height: 52px;
  text-align: center;
  font-family: 'Oswald', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  border-radius: var(--ff-radius-md);
  background-color: var(--ff-surface-subtle);
  color: #ffffff;
  border: 1.5px solid var(--ff-border);
}

/* Barra de Navegación Inferior Fija (Mobile First) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--ff-bottom-nav-height);
  background-color: #0f0f0f;
  border-top: 1px solid var(--ff-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1030;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.6);
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #737373;
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 600;
  flex: 1;
  height: 100%;
  transition: color 0.15s ease;
}

.bottom-nav-item i {
  font-size: 1.3rem;
  margin-bottom: 2px;
}

.bottom-nav-item.active {
  color: #ffffff;
}

.bottom-nav-center-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #ffffff;
  color: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border: 3px solid #0f0f0f;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2);
  margin-top: -20px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.bottom-nav-center-btn:active {
  transform: scale(0.92);
}

/* Badges y Etiquetas de Estado */
.badge-stock-bajo {
  background-color: var(--ff-warning-bg);
  color: #fbbf24;
  border: 1px solid var(--ff-warning-border);
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--ff-radius-pill);
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-in {
  background-color: var(--ff-in-bg);
  color: #34d399;
  border: 1px solid var(--ff-in-border);
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--ff-radius-pill);
  font-size: 0.75rem;
}

.badge-out {
  background-color: var(--ff-out-bg);
  color: #f87171;
  border: 1px solid var(--ff-out-border);
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--ff-radius-pill);
  font-size: 0.75rem;
}

/* Filtros rápidos (Pills) */
.filter-pills-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 10px 0;
  scrollbar-width: none;
}

.filter-pills-bar::-webkit-scrollbar {
  display: none;
}

.btn-filter-pill {
  min-height: 36px;
  padding: 6px 14px;
  border-radius: var(--ff-radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1.5px solid var(--ff-border);
  background: var(--ff-surface);
  color: var(--ff-text-muted);
  white-space: nowrap;
}

.btn-filter-pill.active {
  background: #ffffff;
  color: #0a0a0a;
  border-color: #ffffff;
}

/* Modales en Dark Theme */
.modal-content {
  background-color: var(--ff-surface) !important;
  border: 1px solid var(--ff-border) !important;
  color: #ffffff;
}

.btn-close {
  filter: invert(1);
}

.list-group-item {
  background-color: var(--ff-surface) !important;
  border-color: var(--ff-border) !important;
  color: #ffffff !important;
}

/* =========================================================
   TABLAS - DARK THEME
   ========================================================= */

.table {
    color: #ffffff !important;
    --bs-table-color: #ffffff;
    --bs-table-bg: transparent;
    --bs-table-hover-color: #ffffff;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.04);
    --bs-table-border-color: var(--ff-border);
}

/* Encabezados */
.table thead,
.table thead th {
    background-color: #181818 !important;
    color: #ffffff !important;
}

/* Cuerpo */
.table tbody,
.table tbody tr,
.table tbody td {
    background-color: transparent !important;
    color: #ffffff !important;
}

/* Nombre del usuario */
.table tbody td strong {
    color: #ffffff !important;
}

/* Texto secundario dentro de la tabla */
.table tbody td small {
    color: var(--ff-text-muted) !important;
}

/* Hover */
.table-hover > tbody > tr:hover > * {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.04) !important;
}

/* Toast Container */
.toast-container-custom {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1090;
  width: 90%;
  max-width: 400px;
  pointer-events: none;
}

.toast-custom {
  pointer-events: auto;
  border-radius: var(--ff-radius-md);
  padding: 14px 16px;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  margin-bottom: 8px;
  animation: slideDown 0.25s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Desktop Sidebar (>= 992px) */
.desktop-sidebar {
  display: none;
}

@media (min-width: 992px) {
  .bottom-nav {
    display: none !important;
  }

  .desktop-sidebar {
    display: flex;
    flex-direction: column;
    width: 270px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #0d0d0d;
    border-right: 1px solid var(--ff-border);
    color: #ffffff;
    padding: 24px 16px;
    z-index: 1020;
    overflow-y: auto;
  }

  .desktop-sidebar-brand {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--ff-border);
    margin-bottom: 20px;
  }

  .desktop-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
  }

  .sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--ff-radius-md);
    color: var(--ff-text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.15s ease;
  }

  .sidebar-link:hover {
    color: #ffffff;
    background-color: var(--ff-surface);
  }

  .sidebar-link.active {
    background-color: #ffffff;
    color: #0a0a0a;
    font-weight: 700;
  }

  .sidebar-section-title {
    font-family: 'Oswald', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: #555555;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 18px 14px 6px 14px;
  }

  .app-container {
    max-width: 1100px;
    margin-left: 290px;
    margin-right: auto;
    padding-left: 32px;
    padding-right: 32px;
    padding-bottom: 40px;
  }
}

/* Ocultar marca del encabezado cuando el menú está abierto */
body.mobile-menu-open .mobile-brand-header {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.mobile-brand-header {
  transition: opacity 0.2s ease, visibility 0.2s ease;
}


.calendario-feroxfit {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1050;
    width: 100%;
    max-width: 360px;
    border: 1px solid #e9ecef;
}

.calendario-dias-semana,
.calendario-dias {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
    text-align: center;
}

.calendario-dias-semana {
    margin-bottom: 8px;
    color: #6c757d;
    font-size: 0.8rem;
    font-weight: 600;
}

.calendario-dias button {
    aspect-ratio: 1;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #212529;
}

.calendario-dias button:hover {
    background: #e9ecef;
}

.calendario-dias button.seleccionado {
    background: #212529;
    color: #fff;
}

.calendario-dias button:disabled {
    color: #adb5bd;
    cursor: not-allowed;
}

/* =====================================================
   CAMPANA DE NOTIFICACIONES
===================================================== */

.btn-campana {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 20, 20, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f5b301;
    font-size: 1.25rem;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn-campana i {
    filter: drop-shadow(0 0 6px rgba(245, 179, 1, 0.45));
}

.btn-campana:hover {
    transform: translateY(-2px);
    border-color: rgba(245, 179, 1, 0.5);
    box-shadow: 0 6px 18px rgba(245, 179, 1, 0.25);
}

/* Cuando el menú está abierto (Bootstrap le agrega .show) */
.btn-campana.show {
    border-color: #f5b301;
}

/* Contorno al navegar con teclado */
.btn-campana:focus-visible {
    outline: 2px solid #f5b301;
    outline-offset: 2px;
}

/* Contador rojo */
.contador-campana {
    font-size: 0.65rem;
    min-width: 20px;
    border: 2px solid #0b0b0b;
}

/* La campana "suena" cuando hay alertas sin leer */
.btn-campana.tiene-alertas i {
    animation: campana-sonar 3s ease-in-out infinite;
    transform-origin: top center;
}

@keyframes campana-sonar {
    0%, 70%, 100% { transform: rotate(0); }
    74% { transform: rotate(16deg); }
    78% { transform: rotate(-14deg); }
    82% { transform: rotate(10deg); }
    86% { transform: rotate(-6deg); }
    90% { transform: rotate(3deg); }
}

/* Respeta a quien desactivó las animaciones en su dispositivo */
@media (prefers-reduced-motion: reduce) {
    .btn-campana.tiene-alertas i {
        animation: none;
    }
}

/* =====================================================
   TOP BAR FIJA (campana + salir)
===================================================== */

:root {
  --ff-topbar-height: 60px;
  --ff-sidebar-width: 270px;
}

.app-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--ff-topbar-height) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ff-border);
  z-index: 1030;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-brand .brand-logo-img {
  height: 30px;
  width: 30px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* Botón salir (móvil) */
.btn-topbar-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ff-surface);
  border: 1px solid var(--ff-border);
  color: var(--ff-out);
  font-size: 1.2rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-topbar-icon:active {
  background: var(--ff-out-bg);
  border-color: var(--ff-out-border);
}

/* La campana ya no flota: se le quita la sombra y el blur */
.app-topbar .btn-campana {
  background: var(--ff-surface);
  border-color: var(--ff-border);
  box-shadow: none;
  backdrop-filter: none;
}

.app-topbar .btn-campana:hover {
  transform: none;
}

/* El contenido arranca debajo de la barra */
main {
  padding-top: calc(var(--ff-topbar-height) + env(safe-area-inset-top));
}

/* Los toasts propios bajan para no tapar la barra */
.toast-container-custom {
  top: calc(var(--ff-topbar-height) + env(safe-area-inset-top) + 12px);
}

/* Desktop: la barra arranca después del sidebar */
@media (min-width: 992px) {
  .desktop-sidebar {
    width: var(--ff-sidebar-width);
  }

  .app-topbar {
    left: var(--ff-sidebar-width);
    padding-left: 32px;
    padding-right: 32px;
  }
}

/* =====================================================
   BOTONES DE ACCIÓN: ENTRADA / SALIDA
===================================================== */

.btn-accion-in {
  background: var(--ff-in-bg);
  border: 1.5px solid var(--ff-in-border);
  color: #34d399;
}

.btn-accion-in:hover,
.btn-accion-in:focus {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--ff-in);
  color: #34d399;
}

.btn-accion-out {
  background: var(--ff-out-bg);
  border: 1.5px solid var(--ff-out-border);
  color: #f87171;
}

.btn-accion-out:hover,
.btn-accion-out:focus {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--ff-out);
  color: #f87171;
}

/* "Sin stock": deshabilitado y apagado */
.btn-accion-out:disabled {
  background: var(--ff-surface);
  border-color: var(--ff-border);
  color: #555555;
  opacity: 1;
}

/* En la tabla desktop los botones no necesitan 48px (es mouse, no dedo) */
.table .btn-group-sm > .btn {
  min-height: 34px;
  padding: 4px 10px;
  font-size: 0.85rem;
}

/* Que el scroll a una sección no quede debajo de la top bar */
.ff-card {
  scroll-margin-top: calc(var(--ff-topbar-height) + env(safe-area-inset-top) + 12px);
}

/* =====================================================
   LISTA MÓVIL DENTRO DE CARD (Proveedores, Usuarios…)
===================================================== */

.lista-mobile-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--ff-border);
}

.lista-mobile-item:last-child {
  border-bottom: 0;
}

.min-w-0 {
  min-width: 0; /* deja que text-truncate funcione dentro de flex */
}

/* =====================================================
   PANEL "MÁS" (bottom sheet móvil)
===================================================== */

.offcanvas-ff {
  background: var(--ff-surface-elevated);
  color: var(--ff-text);
  border-top: 1px solid var(--ff-border) !important;
  border-radius: var(--ff-radius-lg) var(--ff-radius-lg) 0 0;
  height: auto !important;
  max-height: 80vh;
  padding-bottom: env(safe-area-inset-bottom);
}

.panel-mas-titulo {
  font-family: 'Oswald', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: #555555;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 14px 4px 6px;
}

.panel-mas-link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 0 14px;
  border-radius: var(--ff-radius-md);
  color: var(--ff-text);
  text-decoration: none;
  font-weight: 600;
}

.panel-mas-link i {
  font-size: 1.2rem;
  color: var(--ff-text-muted);
}

.panel-mas-link:active,
.panel-mas-link.active {
  background: var(--ff-surface-subtle);
  color: var(--ff-text);
}

.panel-mas-salir,
.panel-mas-salir i {
  color: #f87171;
}

/* =====================================================
   CONTRASTE DE TEXTOS SECUNDARIOS (tema oscuro)
   Bootstrap trae estos grises pensados para fondo blanco.
===================================================== */

:root {
  --ff-text-muted: #a8a8a8;
  --bs-secondary-color: #a8a8a8;
  --bs-tertiary-color: #8a8a8a;
}

.text-muted,
.text-secondary,
.text-body-secondary {
  color: #a8a8a8 !important;
}

/* Labels de formularios y filtros */
label,
.form-label {
  color: #d4d4d4;
}

/* Placeholders de buscadores e inputs */
.form-control::placeholder {
  color: #8a8a8a;
}

/* Texto secundario dentro de tablas */
.table tbody td small,
.table .small {
  color: #a8a8a8 !important;
}

/* =====================================================
   OBSERVACIONES EN MOVIMIENTOS
===================================================== */

/* Celular: cajita gris al final de la card */
.mov-nota {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: var(--ff-radius-sm);
  background: var(--ff-surface-subtle);
  color: #c4c4c4;
  font-size: 0.8rem;
  line-height: 1.45;
  word-break: break-word;
}

.mov-nota i {
  color: var(--ff-text-muted);
  margin-top: 2px;
}

/* Escritorio: una línea cortada bajo la referencia */
.mov-celda-ref {
  max-width: 260px;
}

.mov-nota-linea {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.78rem;
  color: #a8a8a8;
  cursor: help;
}

.mov-nota-linea span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}