<style>
  * { margin: 0; padding: 0; box-sizing: border-box; }

  body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #c4c4c4;
    min-height: 100vh;
  }

  /* LOGIN */
  #loginScreen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    background-color: #0B3040;
  }

  .login-container {
    background-color: #0B3040;
    border-radius: 20px;
    padding: 48px 32px 32px;
    width: 100%;
    max-width: 380px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .logo-placeholder {
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    display: inline-block;
    margin-bottom: 20px;
  }

  .logo-placeholder {
    background-color: #ffffff;
    border-radius: 22px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    margin-bottom: 20px;
    overflow: hidden;
  }

  .logo-placeholder img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    border-radius: 0;
  }
 .nicho-badge { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.75); font-size: 11px; font-weight: 700; letter-spacing: 2px; padding: 4px 14px; border-radius: 20px; margin-bottom: 14px; text-transform: uppercase; }

  .login-container h2 {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
  }

  .login-container h3 {
    color: rgba(255,255,255,0.4);
    font-size: 12px;
    font-weight: 400;
    margin-bottom: 36px;
    min-height: 16px;
  }

  .input-group {
    margin-bottom: 10px;
    width: 100%;
  }

  .input-group input {
    width: 100%;
    padding: 13px 16px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    font-size: 14px;
    color: #fff;
    outline: none;
    box-sizing: border-box;
    transition: border 0.2s;
  }

  .input-group input::placeholder { color: rgba(255,255,255,0.35); }
  .input-group input:focus { border-color: rgba(255,255,255,0.35); }

  #btnLogin {
    width: 100%;
    padding: 14px;
    background-color: #961F53;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    margin-bottom: 32px;
    transition: background 0.2s;
  }

  #btnLogin:hover { background-color: #7a1843; }
  #btnLogin:disabled { background-color: rgba(255,255,255,0.2); cursor: not-allowed; }

  .error-msg {
    color: #ff8fab;
    font-size: 13px;
    margin-top: 8px;
    min-height: 18px;
  }

  .footer-text {
    color: rgba(255,255,255,0.2);
    font-size: 11px;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .footer-text::before,
  .footer-text::after {
    content: '';
    display: block;
    height: 1px;
    width: 40px;
    background: rgba(255,255,255,0.1);
  }

  /* HEADER */
  .header {
    background-color: #961F53;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    height: 54px;
  }

  .header-titulo {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
  }

  .header-negocio {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .header-logo-negocio {
    height: 36px;
    width: auto;
    max-width: 80px;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
    padding: 2px;
  }

  .header-logo-placeholder {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
  }

  .header-negocio-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
  }

  .header-negocio-nombre {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
  }

  .header-powered {
    font-size: 9px;
    color: rgba(255,255,255,0.55);
    font-weight: 500;
    letter-spacing: 0.3px;
  }

  .avatar {
    width: 34px;
    height: 34px;
    background-color: #0B3040;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    color: white;
  }

  /* AVATAR DROPDOWN */
  .avatar-menu {
    position: fixed;
    top: 58px;
    right: 12px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 200;
    min-width: 200px;
    overflow: hidden;
  }

  .avatar-item {
    padding: 14px 18px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background 0.2s;
  }

  .avatar-item:hover { background-color: #f5f5f5; }
  .avatar-item.salir { color: #961F53; font-weight: 600; }

  .contenido {
  margin-top: 88px;
  margin-bottom: 64px;
  min-height: calc(100vh - 118px);
}

  .bienvenida {
    color: #999;
    text-align: center;
    margin-top: 40px;
    font-size: 15px;
    padding: 20px;
  }

  /* BOTTOM NAV */
  .bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 64px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-around;
    border-top: 1px solid #e0e0e0;
    z-index: 100;
  }

  .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    cursor: pointer;
    color: #999;
    font-size: 11px;
    gap: 4px;
    transition: color 0.2s;
  }

  .nav-item span:first-child { font-size: 22px; }
  .nav-item.active { color: #961F53; }
  .nav-item:hover { color: #961F53; }

  /* MENÚ MÁS */
  .mas-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 200;
  }

  .mas-menu {
    position: fixed;
    bottom: 64px;
    right: 0;
    background: white;
    border-radius: 12px 12px 0 0;
    z-index: 300;
    min-width: 220px;
    overflow: hidden;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  }

  .mas-item {
    padding: 16px 24px;
    font-size: 15px;
    color: #333;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
  }

  .mas-item:hover { background-color: #f5f5f5; }
  .mas-item:last-child { border-bottom: none; }

  /* ========== MÓDULO INVENTARIO ========== */

  .mod-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 16px 8px;
    gap: 12px;
  }

  .btn-header-accion {
    background: #961F53;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
  }

  .mod-titulo {
    font-size: 1.45rem;
    font-weight: 700;
    color: #0B3040;
    margin: 0;
    letter-spacing: -0.3px;
  }

  .buscador-wrap { padding: 0 16px 8px; }

  .input-buscar {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #D9D9D9;
    border-radius: 8px;
    font-size: 0.95rem;
    box-sizing: border-box;
    outline: none;
  }

  .input-buscar:focus { border-color: #961F53; }

  .filtros-categoria {
    display: flex;
    gap: 8px;
    padding: 0 16px 12px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .filtros-categoria::-webkit-scrollbar { display: none; }

  .chip-categoria {
    background: #f0f0f0;
    border: 1px solid #D9D9D9;
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 0.8rem;
    white-space: nowrap;
    cursor: pointer;
    color: #0B3040;
    transition: all 0.2s;
  }

  .chip-categoria.activo {
    background: #0B3040;
    color: #fff;
    border-color: #0B3040;
  }

  .alerta-stock {
    margin: 0 16px 12px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: #856404;
    font-weight: 600;
  }

  .lista-productos {
    padding: 0 16px 100px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .cargando-txt {
    text-align: center;
    color: #999;
    margin-top: 40px;
  }

  .tarjeta-producto {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 3px solid #999;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    position: relative;
  }

  .tarjeta-producto.stock-bajo { border-left: 4px solid #ffc107; }
  .tarjeta-producto.inactivo { opacity: 0.5; }

  .prod-fila-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
  }

  .prod-nombre { font-weight: 700; color: #0B3040; font-size: 1.05rem; letter-spacing: -0.2px; }
  .prod-codigo { font-size: 0.75rem; color: #999; }

  .prod-categoria-badge {
    background: #f0f0f0;
    color: #555;
    font-size: 0.72rem;
    padding: 2px 10px;
    border-radius: 12px;
  }

  .prod-fila-mid {
    display: flex;
    gap: 16px;
    margin-bottom: 10px;
    flex-wrap: wrap;
  }

  .prod-dato { display: flex; flex-direction: column; }
  .prod-dato-label { font-size: 0.7rem; color: #999; text-transform: uppercase; }
  .prod-dato-valor { font-size: 0.9rem; font-weight: 600; color: #0B3040; }
  .prod-dato-valor.stock-alerta { color: #e65c00; }
  .prod-dato-valor.precio { color: #961F53; font-size: 1.05rem; font-weight: 700; }

  .prod-acciones {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
  }

  .btn-accion {
    font-size: 0.78rem;
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid #D9D9D9;
    background: #fff;
    cursor: pointer;
    color: #0B3040;
    font-weight: 600;
  }

  .btn-accion:hover { background: #f5f5f5; }
  .btn-accion.peligro { border-color: #961F53; color: #961F53; }
  .btn-accion.verde { border-color: #2e7d32; color: #2e7d32; font-weight: 700; }

  /* ========== MODALES ========== */

  .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
  }

  .modal-caja {
    background: #fff;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    padding-bottom: 24px;
    animation: slideUp 0.25s ease;
  }

  .modal-chico .modal-body { padding: 0 20px; }

  @keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }

  .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 12px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
  }

  .modal-header h3 { margin: 0; font-size: 1rem; color: #0B3040; font-weight: 700; }

  .btn-cerrar-modal {
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 1rem;
    cursor: pointer;
    color: #555;
  }

  .modal-body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .campo-grupo { display: flex; flex-direction: column; gap: 5px; }

  .campo-grupo label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
  }

  .campo-grupo input,
  .campo-grupo select {
    padding: 10px 14px;
    border: 1px solid #D9D9D9;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    color: #0B3040;
  }

  .campo-grupo input:focus,
  .campo-grupo select:focus { border-color: #961F53; }

  .modal-footer {
    display: flex;
    gap: 10px;
    padding: 16px 20px 0;
  }

  .txt-producto-baja { font-weight: 700; color: #0B3040; font-size: 1rem; margin: 0 0 4px; }
  .txt-advertencia { font-size: 0.85rem; color: #666; margin: 0 0 8px; }

  /* BOTONES */
  .btn-primario {
    background: #961F53;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    flex: 1;
  }

  .btn-secundario {
    background: #fff;
    color: #0B3040;
    border: 1px solid #D9D9D9;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    flex: 1;
  }

  .btn-peligro {
    background: #961F53;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    flex: 1;
  }

  .btn-secundario-sm {
    background: #fff;
    color: #0B3040;
    border: 1px solid #D9D9D9;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
  }

  .oculto { display: none !important; }

  /* ========== MÓDULO VENTAS ========== */

  .venta-buscador-wrap {
    padding: 0 16px 8px;
    position: relative;
  }

  .venta-cliente-wrap {
    padding: 0 16px 12px;
    position: relative;
  }

  .venta-dropdown {
    position: absolute;
    left: 16px;
    right: 16px;
    background: #fff;
    border: 1px solid #D9D9D9;
    border-radius: 8px;
    z-index: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 200px;
    overflow-y: auto;
  }

  .venta-dropdown-item {
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #0B3040;
  }

  .venta-dropdown-item:last-child { border-bottom: none; }
  .venta-dropdown-item:hover { background: #f5f5f5; }
  .venta-dropdown-item .prod-precio-drop { font-weight: 700; color: #961F53; font-size: 0.85rem; }
  .venta-dropdown-item .prod-stock-drop { font-size: 0.75rem; color: #999; }

  .venta-seccion-titulo {
    font-size: 0.78rem;
    font-weight: 700;
    color: #961F53;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 16px 8px;
    margin-top: 8px;
  }

  .venta-carrito {
    padding: 0 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 60px;
  }

  .carrito-vacio-estado {
    text-align: center;
    padding: 32px 16px;
  }

  .carrito-vacio-icono {
    font-size: 2rem;
    opacity: 0.4;
    margin-bottom: 8px;
  }

  .carrito-vacio-texto {
    font-size: 0.92rem;
    color: #999;
    font-weight: 600;
    margin: 0;
  }

  .carrito-vacio-subtexto {
    font-size: 0.78rem;
    color: #bbb;
    margin: 4px 0 0;
  }

  .carrito-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 3px solid #961F53;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .carrito-item-nombre { flex: 1; font-size: 0.88rem; font-weight: 600; color: #0B3040; }
  .carrito-item-precio { font-size: 0.82rem; color: #961F53; font-weight: 600; white-space: nowrap; }

  .carrito-cantidad-wrap { display: flex; align-items: center; gap: 6px; }

  .btn-cantidad {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #D9D9D9;
    background: #f5f5f5;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #0B3040;
  }

  .btn-cantidad:hover { background: #e0e0e0; }

  .input-cantidad {
    width: 40px;
    text-align: center;
    border: 1px solid #D9D9D9;
    border-radius: 6px;
    padding: 4px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0B3040;
  }

  .btn-quitar-item {
    background: none;
    border: none;
    color: #961F53;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0 4px;
  }

  .venta-resumen {
    background: #0B3040;
    border-radius: 12px;
    padding: 16px;
    margin: 12px 16px 0;
  }

  .resumen-fila {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
  }

  .descuento-fila { align-items: center; }

  .descuento-input-wrap { display: flex; align-items: center; gap: 4px; color: rgba(255,255,255,0.8); }

  .input-descuento {
    width: 80px;
    text-align: right;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.9rem;
    color: #fff;
    background: rgba(255,255,255,0.1);
    outline: none;
  }

  .input-descuento:focus { border-color: #fff; }

  .total-fila {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 10px;
    margin-top: 8px;
    letter-spacing: -0.5px;
  }

  .tipo-pago-wrap {
    display: flex;
    gap: 8px;
    padding: 14px 0;
  }

  .btn-pago {
    flex: 1;
    padding: 10px 4px;
    border: 1px solid #D9D9D9;
    border-radius: 8px;
    background: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    color: #555;
    transition: all 0.2s;
  }

  .btn-pago.activo { background: #0B3040; color: #fff; border-color: #0B3040; }

  .historial-item {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    cursor: pointer;
  }

  .historial-item:hover { background: #f0f0f0; }

  .historial-fila {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
  }

  .historial-fecha { font-size: 0.78rem; color: #999; }
  .historial-total { font-weight: 700; color: #961F53; font-size: 0.95rem; }
  .historial-cliente { font-size: 0.82rem; color: #555; }

  .historial-pago {
    font-size: 0.75rem;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
    color: #555;
  }

  .badge-anulada {
    font-size: 0.72rem;
    background: #961F53;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
  }

  .detalle-items-tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-bottom: 12px;
  }

  .detalle-items-tabla th {
    text-align: left;
    color: #999;
    font-size: 0.75rem;
    text-transform: uppercase;
    padding: 6px 0;
    border-bottom: 1px solid #e0e0e0;
  }

  .detalle-items-tabla td {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
    color: #0B3040;
  }
/* ========== MÓDULO GASTOS ========== */

.gastos-resumen {
  display: flex;
  gap: 10px;
  padding: 0 16px 12px;
}

.gasto-resumen-card {
  flex: 1;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-left: 3px solid #961F53;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gasto-resumen-label {
  font-size: 0.75rem;
  color: #999;
  text-transform: uppercase;
}

.gasto-resumen-valor {
  font-size: 1.35rem;
  font-weight: 700;
  color: #961F53;
  letter-spacing: -0.3px;
}

.tarjeta-gasto {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-left: 3px solid #999;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  cursor: pointer;
}

.tarjeta-gasto:hover { background: #fafafa; }

.tarjeta-gasto.anulado { opacity: 0.45; }

.gasto-fila-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.gasto-descripcion {
  font-weight: 600;
  color: #0B3040;
  font-size: 0.9rem;
  flex: 1;
  padding-right: 8px;
}

.gasto-monto {
  font-weight: 700;
  color: #961F53;
  font-size: 1.1rem;
  white-space: nowrap;
  letter-spacing: -0.2px;
}

.gasto-fila-bot {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gasto-categoria-badge {
  background: #f0f0f0;
  color: #555;
  font-size: 0.72rem;
  padding: 2px 10px;
  border-radius: 12px;
}

.gasto-fecha {
  font-size: 0.75rem;
  color: #999;
}

.badge-externo {
  font-size: 0.72rem;
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
}

.badge-anulado {
  font-size: 0.72rem;
  background: #961F53;
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
}
/* ========== MÓDULO CLIENTES ========== */

.tarjeta-cliente {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-left: 3px solid #999;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  cursor: pointer;
}

.tarjeta-cliente:hover { background: #fafafa; }
.tarjeta-cliente.inactivo { opacity: 0.45; }

.cliente-fila-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.cliente-nombre {
  font-weight: 700;
  color: #0B3040;
  font-size: 1.05rem;
  letter-spacing: -0.2px;
}

.cliente-telefono {
  font-size: 0.8rem;
  color: #999;
  margin-top: 2px;
}

.cliente-credito {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.cliente-credito-label {
  font-size: 0.7rem;
  color: #999;
  text-transform: uppercase;
}

.cliente-credito-valor {
  font-size: 1.05rem;
  font-weight: 700;
  color: #961F53;
  letter-spacing: -0.2px;
}

.cliente-credito-valor.ok { color: #2e7d32; }

.badge-mora {
  font-size: 0.7rem;
  background: #961F53;
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 4px;
}

.detalle-fila {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 0.88rem;
}

.detalle-fila:last-child { border-bottom: none; }

.detalle-fila-label {
  color: #999;
  font-size: 0.8rem;
}

.detalle-fila-valor {
  font-weight: 600;
  color: #0B3040;
  text-align: right;
  max-width: 60%;
}

.historial-compras {
  margin-top: 12px;
  border-top: 1px solid #e0e0e0;
  padding-top: 12px;
}

.historial-compras-titulo {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0B3040;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.compra-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 0.82rem;
  color: #555;
}

.compra-item:last-child { border-bottom: none; }
/* ========== MÓDULO CRÉDITOS ========== */

.creditos-filtros {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.creditos-filtros::-webkit-scrollbar { display: none; }

.tarjeta-credito {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-left: 3px solid #999;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  cursor: pointer;
}

.tarjeta-credito:hover { background: #fafafa; }
.tarjeta-credito.mora { border-left: 4px solid #961F53; }
.tarjeta-credito.pagado { border-left: 3px solid #2e7d32; opacity: 0.55; }

.credito-fila-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.credito-cliente {
  font-weight: 700;
  color: #0B3040;
  font-size: 1.05rem;
  letter-spacing: -0.2px;
}

.credito-fecha {
  font-size: 0.75rem;
  color: #999;
  margin-top: 2px;
}

.credito-saldo {
  font-weight: 700;
  font-size: 1.2rem;
  color: #961F53;
  letter-spacing: -0.3px;
}

.credito-saldo.pagado { color: #2e7d32; }

.credito-barra-wrap {
  margin-bottom: 8px;
}

.credito-barra-bg {
  background: #f0f0f0;
  border-radius: 10px;
  height: 6px;
  overflow: hidden;
}

.credito-barra-fill {
  background: #961F53;
  height: 100%;
  border-radius: 10px;
  transition: width 0.3s;
}

.credito-barra-fill.pagado { background: #2e7d32; }

.credito-fila-bot {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.credito-pagado-txt {
  font-size: 0.78rem;
  color: #999;
}

.badge-mora-credito {
  font-size: 0.72rem;
  background: #961F53;
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
}

.badge-pagado-credito {
  font-size: 0.72rem;
  background: #2e7d32;
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
}

.abonos-lista {
  margin-top: 12px;
  border-top: 1px solid #e0e0e0;
  padding-top: 12px;
}

.abono-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 0.82rem;
  color: #555;
}

.abono-item:last-child { border-bottom: none; }
/* ========== MÓDULO CIERRE DE CAJA ========== */

.caja-resumen {
  padding: 0 16px 8px;
}

.caja-form {
  padding-bottom: 80px;
}

.caja-seccion {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-left: 3px solid #999;
  border-radius: 12px;
  padding: 14px;
  margin: 0 16px 12px;
}

.caja-seccion-titulo {
  font-size: 0.8rem;
  font-weight: 700;
  color: #961F53;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.caja-fila {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 0.88rem;
  color: #555;
  border-bottom: 1px solid #f5f5f5;
}

.caja-fila:last-child { border-bottom: none; }

.caja-fila.total {
  font-weight: 700;
  color: #0B3040;
  font-size: 1.05rem;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid #e0e0e0;
  border-bottom: none;
  letter-spacing: -0.2px;
}

.caja-fila.ganancia {
  font-size: 1.4rem;
  color: #2e7d32;
  letter-spacing: -0.3px;
}

.caja-input-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #555;
}

.caja-ya-cerrada {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-left: 3px solid #ffc107;
  border-radius: 12px;
  padding: 16px;
  margin: 0 16px;
  text-align: center;
}

.caja-ya-cerrada-titulo {
  font-weight: 700;
  color: #856404;
  font-size: 1rem;
  margin-bottom: 6px;
}

.caja-ya-cerrada-txt {
  font-size: 0.85rem;
  color: #856404;
}

.cierre-item {
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.cierre-fila {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 0.85rem;
  color: #555;
}

.cierre-fecha {
  font-weight: 700;
  color: #0B3040;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.cierre-ganancia {
  font-weight: 700;
  color: #2e7d32;
  font-size: 0.95rem;
}

.diferencia-positiva { color: #2e7d32; }
.diferencia-negativa { color: #961F53; }
/* ========== MÓDULO REPORTES ========== */

.reportes-tabs {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
}

.reporte-tab {
  flex: 1;
  padding: 10px 8px;
  border: 1px solid #D9D9D9;
  border-radius: 8px;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  color: #555;
  transition: all 0.2s;
}

.reporte-tab.activo {
  background: #0B3040;
  color: #fff;
  border-color: #0B3040;
  font-weight: 700;
}

.reporte-fechas {
  display: flex;
  gap: 8px;
  padding: 0 16px 16px;
  align-items: flex-end;
}

.reporte-contenido {
  padding: 0 16px 100px;
}

.reporte-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-left: 3px solid #961F53;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.reporte-card-titulo {
  font-size: 0.78rem;
  font-weight: 700;
  color: #961F53;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.reporte-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.reporte-kpi {
  background: #f9f9f9;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.reporte-kpi-label {
  font-size: 0.72rem;
  color: #999;
  text-transform: uppercase;
}

.reporte-kpi-valor {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0B3040;
  letter-spacing: -0.3px;
}

.reporte-kpi-valor.vino { color: #961F53; }
.reporte-kpi-valor.verde { color: #2e7d32; }

.reporte-lista-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 0.85rem;
}

.reporte-lista-item:last-child { border-bottom: none; }

.reporte-lista-nombre {
  color: #0B3040;
  font-weight: 600;
  flex: 1;
}

.reporte-lista-valor {
  color: #961F53;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  margin-left: 8px;
}

.reporte-barra-wrap {
  margin-top: 4px;
}

.reporte-barra-bg {
  background: #f0f0f0;
  border-radius: 10px;
  height: 5px;
  overflow: hidden;
  margin-top: 4px;
}

.reporte-barra-fill {
  background: #961F53;
  height: 100%;
  border-radius: 10px;
}

.reporte-barra-fill.azul { background: #0B3040; }
.reporte-barra-fill.verde { background: #2e7d32; }

.reporte-usuario-item {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 0.85rem;
}

.reporte-usuario-item:last-child { border-bottom: none; }

.reporte-usuario-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.medal { font-size: 1rem; margin-right: 4px; }

.reporte-sin-datos {
  text-align: center;
  color: #999;
  padding: 30px 0;
  font-size: 0.9rem;
}
/* ========== DASHBOARD ========== */

.dash-mes-label {
  font-size: 0.78rem;
  color: #999;
  font-weight: 600;
}

/* ÍNDICE DE SALUD */
.dash-salud-card {
  margin: 0 16px 12px;
  background: #0B3040;
  border-radius: 14px;
  padding: 16px;
  color: #fff;
}

.dash-salud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.dash-salud-titulo {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.85;
}

.dash-salud-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.15);
}

.dash-salud-badge.verde  { background: #2e7d32; }
.dash-salud-badge.amarillo { background: #f57f17; }
.dash-salud-badge.rojo   { background: #961F53; }

.dash-salud-barra-bg {
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 10px;
}

.dash-salud-barra-fill {
  height: 100%;
  border-radius: 10px;
  background: #4caf50;
  transition: width 0.8s ease;
}

.dash-salud-barra-fill.amarillo { background: #ffc107; }
.dash-salud-barra-fill.rojo     { background: #961F53; }

.dash-salud-score-wrap {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.dash-salud-score {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
}

.dash-salud-label {
  font-size: 0.82rem;
  opacity: 0.8;
}

/* KPI GRID */
.dash-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px 12px;
}

.dash-kpi-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-left: 3px solid #999;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dash-kpi-card.destacado {
  border-left-color: #961F53;
}

.dash-kpi-card.positivo {
  border-left-color: #2e7d32;
}

.dash-kpi-label {
  font-size: 0.72rem;
  color: #999;
  text-transform: uppercase;
  font-weight: 600;
}

.dash-kpi-valor {
  font-size: 1.3rem;
  font-weight: 700;
  color: #0B3040;
  letter-spacing: -0.3px;
}

.dash-kpi-valor.vino  { color: #961F53; }
.dash-kpi-valor.verde { color: #2e7d32; }
.dash-kpi-valor.naranja { color: #e65c00; }

/* SECCIONES */
.dash-equilibrio-card,
.dash-alertas-card,
.dash-comparativo-card,
.dash-parametros-card,
.dash-externo-card {
  margin: 0 16px 12px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px;
}

.dash-seccion-titulo {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0B3040;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* EQUILIBRIO */
.dash-equilibrio-fila {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.88rem;
  border-bottom: 1px solid #f5f5f5;
  color: #555;
}

.dash-equilibrio-fila:last-child { border-bottom: none; }
.dash-equilibrio-fila.destacado {
  font-weight: 700;
  color: #0B3040;
  font-size: 0.95rem;
}

/* ALERTAS */
.dash-alerta-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 0.85rem;
}

.dash-alerta-item:last-child { border-bottom: none; }

.dash-alerta-icon { font-size: 1.1rem; flex-shrink: 0; }

.dash-alerta-texto {
  color: #333;
  line-height: 1.4;
}

.dash-alerta-nivel {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.dash-alerta-nivel.critico  { background: #fde8ef; color: #961F53; }
.dash-alerta-nivel.importante { background: #fff3cd; color: #856404; }
.dash-alerta-nivel.info     { background: #e8f5e9; color: #2e7d32; }

/* COMPARATIVO */
.dash-comp-mes {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f5f5f5;
}

.dash-comp-mes:last-child { border-bottom: none; margin-bottom: 0; }

.dash-comp-mes-nombre {
  font-weight: 700;
  color: #0B3040;
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.dash-comp-fila {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #555;
  margin-bottom: 2px;
}

.dash-comp-barra-bg {
  background: #f0f0f0;
  border-radius: 10px;
  height: 5px;
  overflow: hidden;
  margin-top: 4px;
}

.dash-comp-barra-fill {
  height: 100%;
  border-radius: 10px;
  background: #961F53;
}

/* PARÁMETROS */
.dash-param-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
  gap: 8px;
}

.dash-param-item:last-child { border-bottom: none; }

.dash-param-nombre {
  font-size: 0.82rem;
  color: #555;
  flex: 1;
}

.dash-param-semaforo {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dash-param-semaforo.verde   { background: #2e7d32; }
.dash-param-semaforo.amarillo { background: #ffc107; }
.dash-param-semaforo.rojo    { background: #961F53; }
.dash-param-semaforo.gris    { background: #ccc; }

.dash-param-valor {
  font-size: 0.8rem;
  font-weight: 600;
  color: #0B3040;
  white-space: nowrap;
}

/* EXTERNO */
.dash-externo-fila {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 4px 0;
  color: #555;
}
/* ========== MÓDULO CONFIGURACIÓN ========== */

.config-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px;
  margin: 0 16px 12px;
}

.config-card-titulo {
  font-size: 0.78rem;
  font-weight: 700;
  color: #961F53;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.config-logo-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.config-logo-preview {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: contain;
  border: 1px solid #e0e0e0;
  background: #f5f5f5;
}

.config-logo-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: #0B3040;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.config-seccion-botones {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 16px 16px;
}
/* ========== MÓDULO USUARIOS ========== */

.tarjeta-usuario {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-left: 3px solid #999;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  cursor: pointer;
}

.tarjeta-usuario:hover { background: #fafafa; }
.tarjeta-usuario.inactivo { opacity: 0.45; }

.usuario-fila-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.usuario-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #0B3040;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.usuario-avatar.admin { background: #961F53; }

.usuario-info {
  flex: 1;
  padding-left: 12px;
}

.usuario-nombre {
  font-weight: 700;
  color: #0B3040;
  font-size: 1.05rem;
  letter-spacing: -0.2px;
}

.usuario-login {
  font-size: 0.78rem;
  color: #999;
  margin-top: 2px;
}

.badge-rol {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 10px;
}

.badge-rol.admin {
  background: #fde8ef;
  color: #961F53;
}

.badge-rol.cajero {
  background: #e8f0fe;
  color: #0B3040;
}

.badge-inactivo {
  font-size: 0.72rem;
  background: #f0f0f0;
  color: #999;
  padding: 3px 10px;
  border-radius: 10px;
}

.usuario-ultimo-acceso {
  font-size: 0.75rem;
  color: #999;
  margin-top: 6px;
}
/* ========== MÓDULO AUDITORÍA ========== */

.audit-filtros {
  margin-bottom: 4px;
}

.tarjeta-auditoria {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-left: 3px solid #e0e0e0;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.audit-fila-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}

.audit-accion {
  font-weight: 700;
  color: #0B3040;
  font-size: 0.95rem;
}

.audit-fecha {
  font-size: 0.75rem;
  color: #999;
  white-space: nowrap;
  margin-left: 8px;
}

.audit-detalle {
  font-size: 0.82rem;
  color: #555;
  margin-bottom: 6px;
  line-height: 1.4;
}

.audit-fila-bot {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.audit-usuario {
  font-size: 0.75rem;
  color: #999;
}

.badge-modulo {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

.badge-modulo.VENTAS      { background: #e8f5e9; color: #2e7d32; }
.badge-modulo.GASTOS      { background: #fff3cd; color: #856404; }
.badge-modulo.INVENTARIO  { background: #e8f0fe; color: #0B3040; }
.badge-modulo.CLIENTES    { background: #f3e8fd; color: #6a0dad; }
.badge-modulo.CREDITOS    { background: #fde8ef; color: #961F53; }
.badge-modulo.CIERRE      { background: #e0f7fa; color: #006064; }
.badge-modulo.CONFIG      { background: #f5f5f5; color: #555; }
.badge-modulo.USUARIOS    { background: #fce4ec; color: #880e4f; }
.nav-demo-badge {
  position: absolute;
  bottom: 68px;
  right: 12px;
  background: #1a3a5c;
  color: #90caf9;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 1px;
  z-index: 101;
}
.lic-banner {
  width: 100%;
  padding: 7px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  position: fixed;
  top: 54px;
  z-index: 99;
}
.lic-banner-demo {
  background: #1a3a5c;
  color: #90caf9;
}
.lic-banner-amarillo {
  background: #fff8e1;
  color: #856404;
  border-bottom: 1px solid #ffe082;
}
.lic-banner-rojo {
  background: #fdecea;
  color: #961F53;
  border-bottom: 1px solid #f5c6cb;
}
/* ========== MANUAL DE USO ========== */

.manual-rol-badge {
  margin: 0 16px 16px;
  background: #0B3040;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  display: inline-block;
}

.manual-contenido {
  padding: 0 16px 100px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.manual-seccion {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-left: 3px solid #961F53;
  border-radius: 12px;
  overflow: hidden;
}

.manual-seccion-titulo {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0B3040;
  padding: 14px 16px;
  background: #f9f9f9;
  border-bottom: 1px solid #e0e0e0;
  cursor: pointer;
}

.manual-seccion-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.manual-paso {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: #333;
  line-height: 1.5;
  margin: 0;
}

.manual-num {
  background: #961F53;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.manual-tip {
  font-size: 0.82rem;
  color: #856404;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 8px;
  padding: 8px 12px;
  margin: 0;
}
/* ========== MÓDULO MATERIAS PRIMAS ========== */

.badge-tipo-mp {
  font-size: 0.72rem;
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
  padding: 2px 8px;
  border-radius: 10px;
}

.badge-tipo-pt {
  font-size: 0.72rem;
  background: #e8f0fe;
  color: #0B3040;
  border: 1px solid #0B3040;
  padding: 2px 8px;
  border-radius: 10px;
}

/* ========== MÓDULO RECETAS ========== */

.tarjeta-receta {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-left: 3px solid #961F53;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  cursor: pointer;
}

.tarjeta-receta:hover { background: #fafafa; }
.tarjeta-receta.inactiva { opacity: 0.45; }

.receta-fila-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.receta-nombre {
  font-weight: 700;
  color: #0B3040;
  font-size: 1.05rem;
  letter-spacing: -0.2px;
}

.receta-producto {
  font-size: 0.78rem;
  color: #999;
  margin-top: 2px;
}

.receta-rendimiento {
  font-weight: 700;
  color: #961F53;
  font-size: 0.95rem;
  white-space: nowrap;
}

.receta-ingredientes-lista {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f0f0f0;
}

.receta-ingrediente-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #555;
}

.receta-ingrediente-cant {
  font-weight: 600;
  color: #0B3040;
  white-space: nowrap;
  margin-left: 8px;
}

/* ========== MÓDULO PRODUCCIÓN ========== */

.tarjeta-produccion {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-left: 3px solid #2e7d32;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  cursor: pointer;
}

.tarjeta-produccion:hover { background: #fafafa; }
.tarjeta-produccion.anulada { opacity: 0.45; }

.produccion-fila-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.produccion-nombre {
  font-weight: 700;
  color: #0B3040;
  font-size: 1.05rem;
  letter-spacing: -0.2px;
}

.produccion-fecha {
  font-size: 0.75rem;
  color: #999;
}

.produccion-cantidad {
  font-weight: 700;
  color: #2e7d32;
  font-size: 1.1rem;
  white-space: nowrap;
}

.produccion-costo {
  font-size: 0.82rem;
  color: #961F53;
  font-weight: 600;
}

.badge-produccion {
  font-size: 0.72rem;
  background: #e8f5e9;
  color: #2e7d32;
  padding: 2px 8px;
  border-radius: 10px;
}

.badge-produccion.anulada {
  background: #fde8ef;
  color: #961F53;
}

.badge-modulo.MATERIAS   { background: #fff3cd; color: #856404; }
.badge-modulo.RECETAS    { background: #fde8ef; color: #961F53; }
.badge-modulo.PRODUCCION { background: #e8f5e9; color: #2e7d32; }

/* ========== VISTA ESCRITORIO (PC) ========== */
@media (min-width: 900px) {
  .contenido {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }
}
</style>