/* Antes iba incrustado en templates/_ubi_multipick.html. */
  .mp { position: relative; }
  .mp-trigger { width: 100%; min-height: 42px; border-radius: .75rem; border: 1px solid #e2e8f0; background: #fff; padding: .35rem .5rem .35rem .55rem;
                cursor: pointer; display: flex; align-items: center; gap: .35rem; transition: border-color .15s, box-shadow .15s; text-align: left; font-family: inherit; }
  .mp-trigger:hover { border-color: #cbd5e1; }
  .mp.open .mp-trigger, .mp-trigger:focus-visible { border-color: #37a9fb; box-shadow: 0 0 0 3px rgba(55,169,251,.14); outline: none; }
  .mp.disabled .mp-trigger { opacity: .55; cursor: not-allowed; }
  .mp-chips { display: flex; flex-wrap: nowrap; gap: .3rem; overflow: hidden; min-width: 0; flex: 0 1 auto; align-items: center; }
  .mp-chip { display: inline-flex; align-items: center; gap: 4px; background: #0072cb; color: #fff; border-radius: 9999px; padding: 3px 4px 3px 10px;
             font-size: .75rem; font-weight: 600; max-width: 170px; flex-shrink: 0; animation: mpIn .18s cubic-bezier(.16,1,.3,1); }
  .mp-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mp-chip button { border: 0; background: rgba(255,255,255,.18); color: #fff; width: 16px; height: 16px; border-radius: 999px; display: inline-flex;
                    align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; padding: 0; transition: background .12s; }
  .mp-chip button:hover { background: rgba(255,255,255,.34); }
  .mp-chip.cargando { background: #94a3b8; }
  .mp-more { flex-shrink: 0; border-radius: 9999px; padding: 3px 9px; font-size: .75rem; font-weight: 800; color: #0059a4; background: #e0efff; }
  .mp-more[hidden] { display: none; }
  .mp-ph { color: #64748b; font-size: .875rem; padding: .2rem .3rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mp-chev { width: 1rem; height: 1rem; color: #94a3b8; flex-shrink: 0; transition: transform .15s; margin-left: auto; }
  .mp.open .mp-chev { transform: rotate(180deg); }
  @keyframes mpIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
  .mp-dd { position: absolute; left: 0; right: 0; top: 100%; margin-top: .3rem; background: #fff; border: 1px solid #e2e8f0; border-radius: .85rem;
           box-shadow: 0 12px 32px rgba(15,23,42,.18); z-index: 220; overflow: hidden; transform-origin: top center; animation: mpIn .18s cubic-bezier(.16,1,.3,1); }
  .mp-dd[hidden] { display: none; }
  .mp-search { padding: .5rem; border-bottom: 1px solid #f1f5f9; }
  .mp-search input { width: 100%; border: 1px solid #e2e8f0; border-radius: .6rem; padding: .45rem .7rem; font-size: .875rem; outline: none; font-family: inherit;
                     background: #fff; color: #334155; transition: border-color .15s, box-shadow .15s; }
  .mp-search input:focus { border-color: #37a9fb; box-shadow: 0 0 0 3px rgba(55,169,251,.14); }
  .mp-actions { display: flex; align-items: center; gap: .25rem; padding: .35rem .5rem; border-bottom: 1px solid #f1f5f9; font-size: .75rem; }
  .mp-actions button { border: 0; background: none; font: inherit; font-weight: 700; color: #0072cb; padding: .2rem .4rem; border-radius: .4rem; cursor: pointer; white-space: nowrap; }
  .mp-actions button:hover { background: #f0f7ff; }
  .mp-actions button:disabled { color: #94a3b8; cursor: default; background: none; }
  .mp-actions .mp-count { margin-left: auto; color: #64748b; font-weight: 600; white-space: nowrap; }
  html.dark .mp-actions .mp-count { color:#8590a1; }
  .mp-list { max-height: 248px; overflow-y: auto; overscroll-behavior: contain; padding: .25rem; }
  .mp-group { padding: .5rem .55rem .25rem; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #64748b; }
  html.dark .mp-group { color:#8590a1; }
  .mp-opt { display: flex; align-items: center; gap: .55rem; padding: .4rem .55rem; border-radius: .5rem; font-size: .85rem; color: #334155; cursor: pointer;
            user-select: none; transition: background .1s; }
  .mp-opt:hover, .mp-opt.active { background: #f0f7ff; color: #0059a4; }
  .mp-opt .mp-box { width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid #cbd5e1; background: #fff; flex-shrink: 0; display: flex;
                    align-items: center; justify-content: center; transition: background .12s, border-color .12s; }
  .mp-opt.on .mp-box { background: #0072cb; border-color: #0072cb; }
  .mp-opt.on .mp-box::after { content: ""; width: 10px; height: 10px; background: #fff;
    -webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center/contain no-repeat;
            mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center/contain no-repeat; }
  .mp-opt .mp-lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mp-opt .mp-sub { color: #64748b; font-size: .75rem; white-space: nowrap; }
  html.dark .mp-opt .mp-sub { color:#8590a1; }
  .mp-empty { padding: .9rem; text-align: center; font-size: .78rem; color: #64748b; }
  html.dark .mp-empty { color:#8590a1; }
  html.dark .mp-trigger { background: #131925; border-color: #313a4a; }
  html.dark .mp-trigger:hover { border-color: #3d4860; }
  html.dark .mp-ph { color: #8590a1; }   /* placeholder ≥ 4,5:1 (antes #5f6b7d, 3,3:1) */
  html.dark .mp-chev { color: #5f6b7d; }
  html.dark .mp-chip { background: #1d5fa0; color: #c4cbd6; }
  html.dark .mp-chip.cargando { background: #3a4354; }
  html.dark .mp-more { background: #1c2941; color: #7cc5fd; }
  html.dark .mp-dd { background: #171d29; border-color: #2c3340; box-shadow: 0 10px 30px -14px rgba(0,0,0,.75); }
  html.dark .mp-search, html.dark .mp-actions { border-color: #232a37; }
  html.dark .mp-search input { background: #131925; border-color: #313a4a; color: #c4cbd6; }
  html.dark .mp-actions button { color: #7cc5fd; }
  html.dark .mp-actions button:hover { background: #1c2941; }
  html.dark .mp-opt { color: #cbd5e1; }
  html.dark .mp-opt:hover, html.dark .mp-opt.active { background: #1c2941; color: #7cc5fd; }
  html.dark .mp-opt .mp-box { background: #131925; border-color: #3a4354; }
  html.dark .mp-opt.on .mp-box { background: #37a9fb; border-color: #37a9fb; }
  html.dark .mp-opt.on .mp-box::after { background: #0f141c; }
