/* dmc-header.css — copia exacta del bloque de producción DMC Viajes (dashboard/panel/transfer).
   Variables por página (declarar DESPUÉS de este bloque): :root { --dh-pad: 24px; --dh-z: 100; --dh-max: none; }
   Requiere en la app: --color-primary (opcional, cae a #1B4F8A), .nav-badge (ver assets/sidebar.md) y el logo en /static/logo-dmc-mark.png (cambiar la ruta abajo si aplica). */
/* ═══ DMC-HEADER · bloque compartido (panel / dashboard / transfer) ═══ */
.dh, .dh-sheet {
  --dh-pri: #1B4F8A; --dh-h: #0F172A; --dh-b: #475569; --dh-m: #64748B;
  --dh-bd: #E2E8F0; --dh-s2: #F1F5F9; --dh-danger: #DC2626;
  --dh-ease: cubic-bezier(.32,.72,0,1);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px; line-height: 1.25; -webkit-font-smoothing: antialiased;
}
.dh, .dh *, .dh-sheet, .dh-sheet * { box-sizing: border-box; }
.dh {
  position: sticky; top: 0; z-index: var(--dh-z, 100); height: 56px;
  background: transparent; border-bottom: 1px solid transparent;
  transition: background-color .2s ease, border-color .2s ease, -webkit-backdrop-filter .2s ease, backdrop-filter .2s ease;
}
.dh.is-scrolled, .dh.is-menu {
  background: rgba(255,255,255,.72);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  border-bottom-color: var(--dh-bd);
}
.dh-in { height: 100%; display: flex; align-items: center; gap: 14px; padding: 0 var(--dh-pad, 24px); max-width: var(--dh-max, none); margin: 0 auto; }
.dh-brand {
  display: flex; align-items: center; gap: 12px; flex-shrink: 0; text-decoration: none; color: var(--dh-h);
  border-radius: 8px; padding: 4px 6px 4px 2px; margin-left: -2px;
}
.dh-mark {
  display: block; width: 74px; height: 20px; flex-shrink: 0; background: var(--color-primary, var(--dh-pri));
  -webkit-mask: url(/static/logo-dmc-mark.png) center / contain no-repeat;
  mask: url(/static/logo-dmc-mark.png) center / contain no-repeat;
}
.dh-div { width: 1px; height: 18px; background: var(--dh-bd); flex-shrink: 0; }
.dh-word { font-size: 14px; font-weight: 600; letter-spacing: -.005em; color: var(--dh-h); white-space: nowrap; }
.dh-nav { display: flex; align-items: center; margin-left: 6px; }
.dh-dd { position: relative; }
.dh-btn, .dh-trigger {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 12px;
  font-family: inherit; font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap; text-decoration: none;
  color: var(--dh-b); background: transparent; border: 1px solid transparent; border-radius: 8px; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.dh-trigger:hover, .dh-trigger.is-open { background: var(--dh-s2); color: var(--dh-h); }
.dh-btn { border-color: var(--dh-bd); background: rgba(255,255,255,.6); }
.dh-btn:hover { background: var(--dh-s2); color: var(--dh-h); }
.dh-btn.dh-ico { position: relative; width: 34px; padding: 0; }
.dh-btn.dh-ico.is-active { background: var(--dh-s2); color: var(--dh-pri); border-color: rgba(27,79,138,.25); }
.dh-btn.dh-out:hover { color: var(--dh-danger); border-color: rgba(220,38,38,.3); background: rgba(220,38,38,.05); }
.dh-btn svg.dh-i { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.dh-btn .nav-badge { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; font-size: 9px; padding: 0 4px; }
.dh :is(.dh-btn, .dh-trigger, .dh-brand, .dh-item):focus-visible,
.dh-sheet :is(.dh-item, .dh-act):focus-visible { outline: 2px solid var(--dh-pri); outline-offset: 2px; }
.dh-chev { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--dh-ease); }
.dh-trigger.is-open .dh-chev { transform: rotate(180deg); }
.dh-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.dh-ts { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 11px; font-weight: 500; color: var(--dh-m); margin-right: 4px; font-variant-numeric: tabular-nums; }
/* Popover de módulos */
.dh-pop {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 2; width: 540px; padding: 8px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  background: #fff; border: 1px solid var(--dh-bd); border-radius: 12px;
  box-shadow: 0 12px 32px -8px rgba(15,23,42,.16), 0 2px 6px rgba(15,23,42,.05);
  opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-4px) scale(.97); transform-origin: top left;
  transition: opacity .15s var(--dh-ease), transform .15s var(--dh-ease), visibility 0s linear .15s;
}
.dh-pop.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition-delay: 0s; }
.dh-item {
  display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; text-decoration: none;
  color: var(--dh-b); background: transparent; border: 0; font-family: inherit; text-align: left; cursor: pointer; width: 100%;
  transition: background-color .15s ease;
}
.dh-item:hover { background: var(--dh-s2); }
.dh-item.is-active { background: rgba(27,79,138,.06); }
.dh-ibox {
  width: 40px; height: 40px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--dh-bd); border-radius: 10px; background: #F8FAFC; color: var(--dh-b);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.dh-item:hover .dh-ibox, .dh-item.is-active .dh-ibox { background: #fff; border-color: rgba(27,79,138,.28); color: var(--dh-pri); }
.dh-itx { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.dh-it { font-size: 13px; font-weight: 600; color: var(--dh-h); }
.dh-item.is-active .dh-it { color: var(--dh-pri); }
.dh-id { font-size: 12px; font-weight: 400; color: var(--dh-m); line-height: 1.35; }
.dh-item .nav-badge { margin-left: auto; }
/* Hamburguesa (solo móvil) */
.dh-burger { display: none; }
/* Hoja móvil */
.dh-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; top: var(--dh-h-mob, 52px); z-index: calc(var(--dh-z, 100) - 1);
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  background: rgba(255,255,255,.92); -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
  opacity: 0; visibility: hidden; transform: scale(.97); transform-origin: top center;
  transition: opacity .2s var(--dh-ease), transform .2s var(--dh-ease), visibility 0s linear .2s;
}
.dh-sheet.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.dh-sheet-in { padding: 16px 16px calc(28px + env(safe-area-inset-bottom)); max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 4px; }
.dh-lbl { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--dh-m); padding: 12px 10px 6px; }
.dh-lbl:first-child { padding-top: 2px; }
.dh-sheet .dh-item { padding: 10px; }
.dh-act {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 0 12px; border-radius: 10px;
  font-family: inherit; font-size: 14px; font-weight: 500; color: var(--dh-b); text-decoration: none; text-align: left;
  background: transparent; border: 0; cursor: pointer; transition: background-color .15s ease;
}
.dh-act:hover, .dh-act:active { background: var(--dh-s2); color: var(--dh-h); }
.dh-act.dh-danger { color: var(--dh-danger); }
.dh-act.dh-danger:hover { background: rgba(220,38,38,.06); }
html.dh-lock { overflow: hidden; }
/* Iconos animados (mismo set y movimientos que el menú lateral del panel) */
.dh .ic, .dh-sheet .ic { width: 18px; height: 18px; flex-shrink: 0; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dh .ic *, .dh-sheet .ic * { transition: transform .28s cubic-bezier(.32,.72,0,1), opacity .2s cubic-bezier(.32,.72,0,1), stroke-dashoffset .35s cubic-bezier(.32,.72,0,1); }
.dh .ic-spin, .dh-sheet .ic-spin, .dh .ic-m1, .dh .ic-m3 { transform-box: fill-box; transform-origin: center; }
.dh .ic-lid, .dh-sheet .ic-lid { transform-origin: 5px 6px; transform-box: view-box; }
.dh .ic-check, .dh-sheet .ic-check { stroke-dasharray: 20; stroke-dashoffset: 20; opacity: 0; }
.dh .ic-chat { transform-origin: 50% 15%; }
.dh .ic-chat.ring { animation: dh-ring .8s cubic-bezier(.32,.72,0,1); }
@keyframes dh-ring { 0% { transform: rotate(0); } 15% { transform: rotate(-14deg); } 30% { transform: rotate(11deg); } 45% { transform: rotate(-7deg); } 60% { transform: rotate(4deg); } 100% { transform: rotate(0); } }
:is(.dh-item, .dh-btn, .dh-act):is(:hover, :active, :focus-visible) .ic-l2 { transform: translateX(1px); }
:is(.dh-item, .dh-btn, .dh-act):is(:hover, :active, :focus-visible) .ic-l3 { transform: translateX(2px); }
:is(.dh-item, .dh-btn, .dh-act):is(:hover, :active, :focus-visible) .ic-bub { transform: translateY(-1px); }
:is(.dh-item, .dh-btn, .dh-act):is(:hover, :active, :focus-visible) .ic-plus { transform: rotate(90deg); }
:is(.dh-item, .dh-btn, .dh-act):is(:hover, :active, :focus-visible) .ic-up-a { transform: translateY(-2px); }
:is(.dh-item, .dh-btn, .dh-act):is(:hover, :active, :focus-visible) .ic-t1 { transform: translateX(2px); }
:is(.dh-item, .dh-btn, .dh-act):is(:hover, :active, :focus-visible) .ic-t2 { transform: translateX(-2px); }
:is(.dh-item, .dh-btn, .dh-act):is(:hover, :active, :focus-visible) .ic-d1 { transform: translate(-1px,-1px); }
:is(.dh-item, .dh-btn, .dh-act):is(:hover, :active, :focus-visible) .ic-d2 { transform: translate(1px,-1px); }
:is(.dh-item, .dh-btn, .dh-act):is(:hover, :active, :focus-visible) .ic-d3 { transform: translate(-1px,1px); }
:is(.dh-item, .dh-btn, .dh-act):is(:hover, :active, :focus-visible) .ic-d4 { transform: translate(1px,1px); }
:is(.dh-item, .dh-btn, .dh-act):is(:hover, :active, :focus-visible) .ic-spin { transform: rotate(90deg); }
:is(.dh-item, .dh-btn, .dh-act):is(:hover, :active, :focus-visible) .ic-lid { transform: rotate(-14deg) translateY(-1px); }
:is(.dh-item, .dh-btn, .dh-act):is(:hover, :active, :focus-visible) .ic-out { transform: translateX(2px); }
.dh-burger.is-open .ic-m1 { transform: translateY(6px) rotate(45deg); }
.dh-burger.is-open .ic-m2 { opacity: 0; }
.dh-burger.is-open .ic-m3 { transform: translateY(-6px) rotate(-45deg); }
.dh .is-syncing .ic-spin, .dh-sheet .is-syncing .ic-spin { animation: dh-spin .9s linear infinite; transition: none; }
.dh .is-success .ic-spin, .dh-sheet .is-success .ic-spin { opacity: 0; transform: scale(.6); }
.dh .is-success .ic-check, .dh-sheet .is-success .ic-check { stroke-dashoffset: 0; opacity: 1; }
@keyframes dh-spin { to { transform: rotate(360deg); } }
@media (max-width: 767px) {
  .dh { height: 52px; }
  .dh-in { padding: 0 var(--dh-pad-mob, 12px); gap: 10px; }
  .dh-nav, .dh-right > :not(.dh-keep) { display: none !important; }
  .dh-burger { display: inline-flex; }
  .dh-mark { width: 67px; height: 18px; }
  .dh-btn, .dh-burger { height: 38px; }
  .dh-btn.dh-ico { width: 38px; }
}
@media (min-width: 768px) { .dh-sheet { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .dh, .dh *, .dh-sheet, .dh-sheet * { animation: none !important; transition: none !important; }
}
