/* Helios — sistema de diseño. Claro, tinta azul noche y remates en el azul de las Pléyades (Mérope,
   colores medidos en la foto de NASA, ESA, AURA/Caltech y Palomar). Las variables --h-sun* son el color
   de Helios, hoy azul; el ámbar --h-warn* queda sólo para advertencias. */
:root {
  --h-paper: #f6f8fb;
  --h-surface: #ffffff;
  --h-sunk: #eef2f7;
  --h-sunk-2: #e4eaf2;
  --h-ink: #0b1220;
  --h-ink-2: #343b48;
  --h-muted: #5d6573;
  --h-faint: #97a0ae;
  --h-line: #e2e7ee;
  --h-line-2: #cbd3de;
  --h-sun: #5eadde;
  --h-sun-2: #3c73b6;
  --h-sun-3: #2d5083;
  --h-sun-soft: #e6f2fb;
  --h-sun-line: #a9d3f0;
  --h-sun-wash: #f2f8fd;
  --h-sun-grad: linear-gradient(135deg, #b4ddf2 0%, #5eadde 48%, #3c73b6 100%);
  --h-warn: #f5a524;
  --h-warn-3: #8a5a00;
  --h-warn-soft: #fff4cc;
  --h-warn-line: #f6dc84;
  --h-crit: #b42318;
  --h-radius: 16px;
  --h-radius-sm: 10px;
  --h-rail: 112px;
  --h-rail-pad: 36px;
  --h-dock-gap: 40px;
  --h-font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --h-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --h-ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

html, body, #root { height: 100%; }
body {
  margin: 0;
  background: var(--h-paper);
  color: var(--h-ink);
  font-family: var(--h-font);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--h-sun-soft); color: var(--h-ink); }
.tnum, .h-num { font-variant-numeric: tabular-nums; }

/* Tipografía */
.h-display { font-size: 34px; line-height: 1.12; font-weight: 500; letter-spacing: -.022em; }
.h-title { font-size: 26px; line-height: 1.2; font-weight: 500; letter-spacing: -.018em; }
.h-subtitle { font-size: 17px; line-height: 1.35; font-weight: 500; letter-spacing: -.01em; }
.h-caps {
  font-size: 10.5px; line-height: 1.3; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--h-muted);
}
.h-small { font-size: 12.5px; color: var(--h-muted); }
.h-kpi { font-size: 28px; line-height: 1.1; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.h-kpi small { font-size: 13px; font-weight: 500; color: var(--h-muted); margin-left: 4px; letter-spacing: 0; }

/* Estructura */
.h-shell { min-height: 100%; display: flex; }
.h-main { flex: 1; min-width: 0; margin-left: var(--h-rail); min-height: 100vh; }
.h-page { max-width: 1320px; margin: 0 auto; padding: 32px 40px 128px; }
/* Cabecera de las pantallas de trabajo: la empresa y el país a la izquierda y, en Ventas, Blueprint y Obra, la barra
   del flujo (los ocho pasos, del recibo a la entrega; los de la pantalla van en tinta). */
.h-shell-top { display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding: 14px 24px 0; }
.h-flowbar { min-width: 0; max-width: 100%; }
.h-flowbar ol { display: flex; align-items: center; gap: 2px; margin: 0; padding: 3px; list-style: none; border-radius: 999px; background: var(--h-sunk); overflow-x: auto; scrollbar-width: none; }
.h-flowbar ol::-webkit-scrollbar { display: none; }
.h-flowbar li { flex-shrink: 0; }
.h-flowbar a, .h-flowbar li > span { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 4px; border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--h-muted); white-space: nowrap; transition: color .15s var(--h-ease), background .15s var(--h-ease); }
.h-flowbar i { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--h-surface); font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--h-muted); font-variant-numeric: tabular-nums; }
.h-flowbar a:hover { color: var(--h-ink); }
.h-flowbar a:focus-visible { outline: 2px solid var(--h-ink); outline-offset: 1px; }
.h-flowbar li.is-on a, .h-flowbar li.is-on > span { background: var(--h-surface); color: var(--h-ink); box-shadow: 0 1px 2px rgb(11 18 32 / .08); }
/* Número en el color de la superficie: dentro de Blueprint el azul sobre tinta no alcanzaba contraste. */
.h-flowbar li.is-on i { background: var(--h-ink); color: var(--h-surface); }
.h-flowbar li.is-locked > span { cursor: default; }
.h-flowbar li.is-locked i { background: transparent; box-shadow: inset 0 0 0 1px var(--h-line-2); }
.h-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.h-page-head .h-caps { margin-bottom: 6px; }

/* Riel izquierdo: sólo íconos, sin panel */
.h-rail {
  position: fixed; inset: 0 auto 0 0; width: var(--h-rail); z-index: 40;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 0 18px var(--h-rail-pad); background: transparent; border-right: 0; pointer-events: none;
}
.h-rail > * { pointer-events: auto; }
.h-rail-brand { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 10px; border-radius: 18px; }
.h-rail-brand img { width: 52px; height: 52px; transition: transform .5s var(--h-ease), filter .3s var(--h-ease); }
.h-rail-brand:hover img { transform: scale(1.05); }
.h-rail-item {
  position: relative; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px;
  color: var(--h-muted); transition: color .18s var(--h-ease), background .18s var(--h-ease), transform .18s var(--h-ease);
}
.h-rail-item:hover { color: var(--h-ink); background: rgb(11 18 32 / .05); }
.h-rail-item:active { transform: scale(.96); }
.h-rail-item.is-active { color: var(--h-ink); background: var(--h-sun-soft); box-shadow: inset 0 0 0 1px var(--h-sun-line); }
.h-rail-item svg { width: 26px; height: 26px; stroke-width: 1.6; }
.h-rail-mark { width: 31px; height: 31px; }
.h-rail-item[data-tip]::after {
  content: attr(data-tip); position: absolute; left: calc(100% + 10px); top: 50%; transform: translate(-4px, -50%);
  padding: 5px 10px; border-radius: 8px; background: var(--h-ink); color: #fff; white-space: nowrap;
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  opacity: 0; pointer-events: none; transition: opacity .15s var(--h-ease), transform .15s var(--h-ease);
}
.h-rail-item[data-tip]:hover::after, .h-rail-item[data-tip]:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
.h-rail-spacer { flex: 1; }
.h-rail-home { display: none; }
.h-rail-user {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 0; padding: 0; cursor: pointer;
  background: var(--h-ink); color: var(--h-sun); font-size: 12px; font-weight: 600; letter-spacing: .02em;
}
.h-rail-user:focus-visible { outline: 2px solid var(--h-sun-2); outline-offset: 2px; }

/* Acceso directo a Helios en los tableros: avatar abajo a la derecha, despegado de los bordes por --h-dock-gap, y ventana flotante */
.hd-launch {
  position: fixed; z-index: 45; right: var(--h-dock-gap); bottom: var(--h-dock-gap); width: 84px; height: 84px;
  display: grid; place-items: center; padding: 0; border: 1px solid var(--h-line); border-radius: 50%;
  background: var(--h-surface); cursor: pointer; box-shadow: 0 16px 34px -18px rgb(11 18 32 / .45);
  transition: transform .2s var(--h-ease), box-shadow .2s var(--h-ease), border-color .2s var(--h-ease);
}
.hd-launch:hover { transform: translateY(-2px); border-color: var(--h-line-2); box-shadow: 0 20px 40px -18px rgb(11 18 32 / .5); }
.hd-launch.is-open { border-color: var(--h-ink); }
.hd-launch:focus-visible { outline: 2px solid var(--h-ink); outline-offset: 3px; }
.hd-panel {
  position: fixed; z-index: 46; right: var(--h-dock-gap); bottom: calc(var(--h-dock-gap) + 100px);
  width: min(460px, calc(100vw - var(--h-rail) - 2 * var(--h-dock-gap))); height: min(700px, calc(100vh - var(--h-dock-gap) - 124px));
  background: var(--h-paper); border: 1px solid var(--h-line); border-radius: 22px; overflow: hidden;
  box-shadow: 0 30px 80px -24px rgb(11 18 32 / .38);
  opacity: 0; transform: translateY(14px) scale(.98); transform-origin: 100% 100%; visibility: hidden;
  transition: opacity .22s var(--h-ease), transform .22s var(--h-ease), visibility 0s linear .22s;
}
.hd-panel.is-open { opacity: 1; transform: none; visibility: visible; transition: opacity .22s var(--h-ease), transform .22s var(--h-ease), visibility 0s; }

/* Botones */
.h-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px;
  border-radius: 999px; border: 1px solid transparent; font: inherit; font-size: 13.5px; font-weight: 500;
  cursor: pointer; white-space: nowrap; transition: background .16s var(--h-ease), color .16s var(--h-ease), border-color .16s var(--h-ease), transform .16s var(--h-ease);
}
.h-btn:active { transform: translateY(1px); }
.h-btn:disabled { opacity: .45; cursor: default; }
.h-btn svg { width: 16px; height: 16px; stroke-width: 1.8; }
.h-btn-ink { background: var(--h-ink); color: #fff; }
.h-btn-ink:hover { background: #1c2638; }
.h-btn-sun { background: var(--h-sun); color: var(--h-ink); }
.h-btn-sun:hover { background: #4fa2d6; }
.h-btn-line { background: transparent; color: var(--h-ink); border-color: var(--h-line-2); }
.h-btn-line:hover { border-color: var(--h-ink); }
.h-btn-ghost { background: transparent; color: var(--h-ink-2); }
.h-btn-ghost:hover { background: var(--h-sunk); color: var(--h-ink); }
.h-btn-sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.h-btn-icon { width: 38px; padding: 0; }
.h-btn-sm.h-btn-icon { width: 30px; }

/* Superficies */
.h-card { background: var(--h-surface); border: 1px solid var(--h-line); border-radius: var(--h-radius); }
/* Aviso de gracia: el pago de la renovación no ha entrado y el equipo sigue trabajando unos días (ámbar = advertencia). */
.h-grace { margin: 12px 24px 0; padding: 10px 14px; border: 1px solid var(--h-warn-line); border-radius: var(--h-radius-sm); background: var(--h-warn-soft); color: var(--h-warn-3); font-size: 13px; line-height: 1.45; }
.h-grace a { font-weight: 600; text-decoration: underline; }
.h-card-pad { padding: 22px 24px; }
.h-sunk { background: var(--h-sunk); border-radius: var(--h-radius-sm); }
.h-divider { height: 1px; background: var(--h-line); border: 0; margin: 0; }

/* Pestañas */
.h-tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--h-sunk); }
.h-tab {
  height: 32px; padding: 0 16px; border-radius: 999px; border: 0; background: transparent; font: inherit;
  font-size: 13px; font-weight: 500; color: var(--h-muted); cursor: pointer; transition: all .16s var(--h-ease);
}
.h-tab:hover { color: var(--h-ink); }
.h-tab.is-active { background: var(--h-surface); color: var(--h-ink); box-shadow: 0 1px 2px rgb(11 18 32 / .08); }

/* Formularios */
.h-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.h-field > span { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--h-muted); }
.h-input, .h-select, .h-textarea {
  width: 100%; min-width: 0; height: 38px; padding: 0 12px; border-radius: var(--h-radius-sm);
  border: 1px solid var(--h-line-2); background: var(--h-surface); color: var(--h-ink); font: inherit; font-size: 14px;
  transition: border-color .16s var(--h-ease), box-shadow .16s var(--h-ease);
}
.h-textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.h-input:focus, .h-select:focus, .h-textarea:focus { outline: none; border-color: var(--h-ink); box-shadow: 0 0 0 3px rgb(94 173 222 / .35); }
.h-search {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; min-width: 260px;
  border-radius: 999px; background: var(--h-surface); border: 1px solid var(--h-line-2);
}
.h-search input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 13.5px; flex: 1; min-width: 0; }
.h-search svg { width: 16px; height: 16px; color: var(--h-muted); }

/* Tablas */
.h-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.h-table th {
  text-align: left; font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--h-muted); padding: 10px 14px; border-bottom: 1px solid var(--h-line); white-space: nowrap;
}
.h-table td { padding: 13px 14px; border-bottom: 1px solid var(--h-line); vertical-align: middle; }
.h-table tbody tr { transition: background .14s var(--h-ease); }
.h-table tbody tr.is-link { cursor: pointer; }
.h-table tbody tr.is-link:hover { background: var(--h-sun-wash); }
.h-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.h-table-wrap { overflow-x: auto; }

/* Etiquetas */
.h-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .04em; white-space: nowrap; border: 1px solid var(--h-line-2);
  color: var(--h-ink-2); background: var(--h-surface);
}
.h-pill.is-sun { background: var(--h-sun-soft); border-color: var(--h-sun-line); color: var(--h-sun-3); }
.h-pill.is-amber { background: var(--h-sun); border-color: var(--h-sun); color: var(--h-ink); }
.h-pill.is-ink { background: var(--h-ink); border-color: var(--h-ink); color: var(--h-sun); }
.h-pill.is-mute { background: var(--h-sunk); border-color: var(--h-sunk); color: var(--h-muted); }
.h-pill.is-crit { background: #fdecea; border-color: #f5c2bd; color: var(--h-crit); }
.h-pill.is-warn { background: var(--h-warn-soft); border-color: var(--h-warn-line); color: var(--h-warn-3); }
.h-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; background: var(--h-faint); }
.h-dot.is-ok { background: transparent; box-shadow: inset 0 0 0 2px var(--h-ink); }
.h-dot.is-sun { background: var(--h-sun-2); }
.h-dot.is-warn { background: var(--h-warn); }
.h-dot.is-crit { background: var(--h-crit); }

/* Barras */
.h-bar { position: relative; height: 6px; border-radius: 6px; background: var(--h-sunk-2); overflow: hidden; }
.h-bar > i { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: var(--h-ink); transition: width .7s var(--h-ease); }
.h-bar.is-sun > i { background: var(--h-sun-grad); }
.h-bar .h-bar-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--h-sun-2); }
/* Pista de pasos de un proyecto en el flujo (del recibo a la entrega): terminados en tinta y el paso en curso en azul.
   La pintan el inicio y la ficha de cada sitio (StepTrack de src/components/home/indicators.jsx). */
.hm-track { display: flex; gap: 3px; height: 8px; }
.hm-track span { flex: 1; border-radius: 3px; background: var(--h-sunk-2); }
.hm-track span.is-done { background: var(--h-ink); }
.hm-track span.is-now { background: var(--h-sun-2); }

/* Modal */
.h-overlay { position: fixed; inset: 0; z-index: 60; background: rgb(246 248 251 / .72); backdrop-filter: blur(6px); animation: h-fade .18s var(--h-ease); }
.h-modal {
  position: fixed; z-index: 61; left: 50%; top: 4vh; transform: translateX(-50%); width: min(1180px, calc(100vw - 32px));
  max-height: 92vh; display: flex; flex-direction: column; background: var(--h-surface); border: 1px solid var(--h-line);
  border-radius: 22px; box-shadow: 0 30px 80px -20px rgb(11 18 32 / .25); animation: h-rise .24s var(--h-ease);
}
.h-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 28px 16px; border-bottom: 1px solid var(--h-line); }
.h-modal-body { overflow: auto; padding: 22px 28px 28px; }
.h-modal-body, .h-table-wrap { scrollbar-width: thin; scrollbar-color: var(--h-line-2) transparent; }
.h-modal-sm { width: min(560px, calc(100vw - 32px)); top: 10vh; }

/* Vacíos y estados */
.h-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 56px 24px; text-align: center; color: var(--h-muted); }
.h-empty b { color: var(--h-ink); font-weight: 500; font-size: 15px; }
.h-skel { background: linear-gradient(90deg, var(--h-sunk) 0%, var(--h-sunk-2) 50%, var(--h-sunk) 100%); background-size: 200% 100%; animation: h-shimmer 1.2s linear infinite; border-radius: 8px; }

/* Rejillas */
.h-grid { display: grid; gap: 16px; }
.h-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; border-top: 1px solid var(--h-line); border-bottom: 1px solid var(--h-line); }
.h-kpi-cell { padding: 18px 20px; border-right: 1px solid var(--h-line); }
.h-kpi-cell:last-child { border-right: 0; }
.h-kpi-cell .h-caps { margin-bottom: 8px; }

/* Revelado al entrar en vista: el estado final es el de omisión */
.h-reveal.is-shown { animation: h-rise .5s var(--h-ease) both; }

@keyframes h-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes h-rise { from { opacity: 0; transform: translate(var(--h-tx, 0), 10px); } to { opacity: 1; transform: translate(var(--h-tx, 0), 0); } }
@keyframes h-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.h-modal { --h-tx: -50%; }

@media (max-width: 900px) {
  :root { --h-rail: 0px; --h-rail-pad: 0px; --h-dock-gap: 20px; }
  .h-page { padding: 22px 16px calc(96px + env(safe-area-inset-bottom)); }
  .h-shell-top { padding: 12px 16px 0; }
  .h-flowbar { width: 100%; }
  .h-page-head { flex-direction: column; align-items: flex-start; }
  /* Barra inferior: 64 px más la zona de seguridad del iPhone (la página usa viewport-fit=cover; con la
     altura fija de antes, ese margen se comía el alto de los íconos). */
  .h-rail {
    inset: auto 0 0 0; width: 100%; height: calc(64px + env(safe-area-inset-bottom)); flex-direction: row; justify-content: space-around; gap: 0;
    padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    background: var(--h-surface); border-top: 1px solid var(--h-line); pointer-events: auto;
  }
  .h-rail-brand, .h-rail-spacer { display: none; }
  .h-rail .h-rail-user { width: 40px; height: 40px; margin-top: 0; flex: 0 0 auto; align-self: center; }
  .h-rail-home { display: grid; }
  /* Los íconos se reparten el ancho (hasta 48 px cada uno): siete de 48 más el círculo del usuario no
     caben en 375 px, y antes el círculo se salía por la derecha. */
  .h-rail-item { width: auto; min-width: 0; max-width: 48px; height: 48px; flex: 1 1 0; }
  .h-rail-item[data-tip]::after { display: none; }
  .hd-launch { right: var(--h-dock-gap); bottom: calc(64px + var(--h-dock-gap) + env(safe-area-inset-bottom)); width: 72px; height: 72px; }
  .hd-panel {
    left: 0; right: 0; bottom: 0; top: 0; width: 100vw; height: 100dvh; border-radius: 0; border: 0; z-index: 70;
  }
  .h-search { min-width: 0; width: 100%; }
  /* Pestañas largas se recorren de lado en lugar de ensanchar la página (y empujar el avatar fuera). */
  .h-tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .h-tabs::-webkit-scrollbar { display: none; }
  .h-tab { flex-shrink: 0; }
  .h-display { font-size: 27px; }
  .h-title { font-size: 22px; }
  .h-modal { top: 0; width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; }
  .h-modal-head, .h-modal-body { padding-left: 16px; padding-right: 16px; }
  .h-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-kpi-cell { min-width: 0; padding: 16px 14px; border-right: 0; border-bottom: 1px solid var(--h-line); }
  .h-kpi-cell:nth-child(odd):not(:last-child) { border-right: 1px solid var(--h-line); }
  .h-kpi { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* Estatus editable en la columna de Clientes */
.h-stage { position: relative; cursor: pointer; padding-right: 9px; font-family: inherit; transition: box-shadow .16s var(--h-ease); }
.h-stage:hover { box-shadow: 0 0 0 3px rgb(94 173 222 / .3); }
.h-stage:focus-visible, .h-stage[data-state="open"] { outline: none; box-shadow: 0 0 0 3px rgb(94 173 222 / .45); }
.h-stage .hs-chev { width: 11px; height: 11px; opacity: .7; }
.h-stage.is-busy { opacity: .55; }

/* Probabilidad de cierre ajustable en el listado de Clientes: la barra es el botón; el punto marca la ajustada a mano. */
.hq-trigger {
  display: flex; align-items: center; gap: 8px; width: calc(100% + 16px); margin: -6px -8px; padding: 6px 8px; border: 0; border-radius: 9px;
  background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; transition: background .14s var(--h-ease), box-shadow .14s var(--h-ease);
}
.hq-trigger:hover { background: var(--h-surface); box-shadow: 0 0 0 1px var(--h-sun-line); }
.hq-trigger:focus-visible, .hq-trigger[data-state="open"] { outline: none; background: var(--h-surface); box-shadow: 0 0 0 3px rgb(94 173 222 / .45); }
.hq-trigger.is-static { cursor: default; }
.hq-trigger.is-static:hover { background: transparent; box-shadow: none; }
.hq-pct { width: 36px; text-align: right; font-size: 12.5px; }
.hq-dot { width: 5px; height: 5px; margin-left: -4px; border-radius: 50%; flex-shrink: 0; background: transparent; }
.hq-dot.is-on { background: var(--h-sun-2); }
.hf-pop.hq-pop { width: 284px; }
.hq-name { padding: 0 4px 10px; font-size: 14px; font-weight: 500; }
.hq-row { display: flex; align-items: center; gap: 12px; padding: 0 4px; }
.hq-range { flex: 1; min-width: 0; accent-color: var(--h-ink); }
.hq-num {
  display: flex; align-items: center; gap: 2px; height: 34px; padding: 0 10px 0 8px; border-radius: 9px; border: 1px solid var(--h-line-2);
  background: var(--h-surface); font-size: 14px; font-weight: 500; color: var(--h-ink-2);
}
.hq-num:focus-within { border-color: var(--h-ink); box-shadow: 0 0 0 3px rgb(94 173 222 / .28); }
.hq-num input { width: 34px; border: 0; outline: 0; background: transparent; font: inherit; color: var(--h-ink); text-align: right; -moz-appearance: textfield; }
.hq-num input::-webkit-outer-spin-button, .hq-num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.hq-hint { padding: 8px 4px 2px; }
/* En el celular, 16 px evita que iOS acerque la pantalla al escribir el número. */
@media (max-width: 900px) { .hq-num { font-size: 16px; } .hq-num input { width: 38px; } }

/* Menús de opción múltiple: misma letra, tamaño y color que la página (no el menú gris del sistema). La flecha
   queda a 14 px del borde, con 12 px de aire desde el texto, y el menú abre con el fondo y el borde de la barra. */
.hs-trigger { display: inline-flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; cursor: pointer; font-family: var(--h-font); }
.hs-trigger.h-select { padding: 0 14px 0 12px; }
.hs-trigger .hs-value { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-trigger.hs-pill { gap: 7px; }
.hs-pill .hs-value { flex: 0 1 auto; }
.hs-trigger .hs-chev { width: 14px; height: 14px; flex-shrink: 0; color: currentColor; opacity: .55; transition: transform .2s var(--h-ease), opacity .2s var(--h-ease); }
.hs-trigger:hover .hs-chev { opacity: .9; }
.hs-trigger[data-state="open"] .hs-chev { transform: rotate(180deg); opacity: .9; }
.hs-trigger[data-state="open"].h-select { border-color: var(--h-ink); box-shadow: 0 0 0 3px rgb(94 173 222 / .35); }
.hs-trigger[data-empty] .hs-value { color: var(--h-faint); }
.hs-trigger:disabled { opacity: .5; cursor: default; }
.hs-content {
  z-index: 90; min-width: max(var(--radix-select-trigger-width), 180px); max-width: min(440px, calc(100vw - 24px));
  max-height: min(360px, var(--radix-select-content-available-height)); overflow: hidden;
  background: var(--h-surface); border: 1px solid var(--h-line-2); border-radius: 14px;
  box-shadow: 0 22px 48px -20px rgb(11 18 32 / .32), 0 2px 6px rgb(11 18 32 / .06);
  font-family: var(--h-font); color: var(--h-ink); transform-origin: var(--radix-select-content-transform-origin);
  animation: hs-in .16s var(--h-ease);
}
.hs-viewport { padding: 6px; scrollbar-width: thin; scrollbar-color: var(--h-line-2) transparent; }
.hs-item {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 6px 12px 6px 32px;
  border-radius: 9px; font-size: 13.5px; line-height: 1.3; color: var(--h-ink-2); cursor: pointer; outline: none; user-select: none;
  transition: background .12s var(--h-ease), color .12s var(--h-ease);
}
.hs-item[data-highlighted] { background: var(--h-sun-soft); color: var(--h-ink); }
.hs-item[data-state="checked"] { color: var(--h-ink); font-weight: 600; }
.hs-item[data-disabled] { color: var(--h-faint); cursor: default; }
.hs-check { position: absolute; left: 10px; display: grid; place-items: center; width: 14px; height: 14px; color: var(--h-sun-3); }
.hs-meta { margin-left: auto; padding-left: 18px; font-size: 12px; font-weight: 500; color: var(--h-muted); font-variant-numeric: tabular-nums; }
.hs-item[data-highlighted] .hs-meta { color: var(--h-sun-3); }
.hs-scroll { display: flex; align-items: center; justify-content: center; height: 22px; color: var(--h-muted); cursor: default; }
.hs-sep { height: 1px; margin: 5px 8px; background: var(--h-line); }
.hs-group-label { padding: 8px 12px 4px; font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--h-muted); }
.hs-stage-menu { min-width: 236px; }
@keyframes hs-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
/* Un <select> nativo que quede: la misma flecha a 14 px del borde y opciones con el color del campo. */
select.h-input, select.h-select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background: var(--h-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6573' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 14px 14px;
}
select.h-input option, select.h-select option { background: var(--h-surface); color: var(--h-ink); }

/* Empresa: país fijo por origen y quitar una membresía. */
.em-country {
  display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: var(--h-radius-sm);
  border: 1px solid var(--h-line); background: var(--h-sunk); font-size: 14px; color: var(--h-ink-2); white-space: nowrap;
}
.em-del svg { width: 14px; height: 14px; }
.em-del:hover:not(:disabled) { background: #fdecea; color: var(--h-crit); }

/* Líneas gráficas */
.hb-themes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.hb-themes.is-compact { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.hb-theme {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px; border-radius: 14px; text-align: left;
  border: 1px solid var(--h-line-2); background: var(--h-surface); font: inherit; cursor: pointer; transition: border-color .16s var(--h-ease), box-shadow .16s var(--h-ease);
}
.hb-theme:hover { border-color: var(--h-ink-2); }
.hb-theme.is-active { border-color: var(--h-ink); box-shadow: 0 0 0 3px rgb(94 173 222 / .35); }
.hb-swatch { display: flex; width: 100%; height: 26px; border-radius: 8px; overflow: hidden; border: 1px solid rgb(11 18 32 / .08); }
.hb-swatch i { flex: 1; }
.hb-theme-name { display: inline-flex; align-items: baseline; gap: 7px; font-size: 13px; font-weight: 600; }
.hb-aa { font-size: 18px; line-height: 1; letter-spacing: -.01em; }
.hb-themes.is-compact .hb-theme-name { flex-direction: column; align-items: flex-start; gap: 3px; }
.hb-themes.is-compact .hb-aa { font-size: 17px; }
.hb-theme-desc { font-size: 11.5px; color: var(--h-muted); margin-top: -4px; }
.hb-logo { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hb-logo-box {
  display: grid; place-items: center; width: 180px; height: 72px; padding: 10px; border-radius: 12px; border: 1px dashed var(--h-line-2); background: var(--h-paper);
}
.hb-logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.hb-preview { width: 100%; height: 420px; border: 1px solid var(--h-line); border-radius: 14px; background: #fff; }
.hb-options { display: flex; flex-direction: column; gap: 8px; }
.hb-option { display: flex; align-items: center; gap: 10px; font-size: 13.5px; cursor: pointer; }
.hb-option input { accent-color: var(--h-ink); }

/* Interruptor de encendido */
.h-switch { position: relative; display: inline-flex; align-items: center; width: 46px; height: 26px; flex-shrink: 0; border-radius: 999px; border: 0; padding: 0; cursor: pointer; background: var(--h-sunk-2); transition: background .18s var(--h-ease); }
.h-switch::after { content: ""; position: absolute; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(11 18 32 / .25); transition: transform .2s var(--h-ease); }
.h-switch[aria-checked="true"] { background: var(--h-ink); }
.h-switch[aria-checked="true"]::after { transform: translateX(20px); background: var(--h-sun); }
.h-switch:disabled { opacity: .5; cursor: default; }
.h-switch:focus-visible { outline: 2px solid var(--h-ink); outline-offset: 3px; }

/* Chips de selección */
.h-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.h-chip {
  height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--h-line-2); background: var(--h-surface); font: inherit; font-size: 12.5px;
  color: var(--h-ink-2); cursor: pointer; transition: all .14s var(--h-ease);
}
.h-chip:hover { border-color: var(--h-ink); }
.h-chip.is-on { background: var(--h-ink); border-color: var(--h-ink); color: #fff; }
.h-chip:disabled { opacity: .45; cursor: default; }
.h-chip:disabled:hover { border-color: var(--h-line-2); }

@media (max-width: 900px) {
  .hb-themes, .hb-themes.is-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hb-preview { height: 320px; }
}

/* Rutinas */
.hr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 14px; }
.hr-card { display: flex; flex-direction: column; gap: 14px; padding: 20px 22px; transition: border-color .18s var(--h-ease), box-shadow .18s var(--h-ease); }
.hr-card.is-on { border-color: var(--h-ink); box-shadow: 0 14px 34px -26px rgb(11 18 32 / .5); }
.hr-head { display: flex; align-items: flex-start; gap: 14px; }
.hr-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: var(--h-sunk); color: var(--h-ink-2); }
.hr-card.is-on .hr-icon { background: var(--h-sun-soft); color: var(--h-ink); }
.hr-icon svg { width: 20px; height: 20px; stroke-width: 1.6; }
.hr-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin: 0; padding: 12px 0; border-top: 1px solid var(--h-line); border-bottom: 1px solid var(--h-line); }
.hr-meta dt { font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--h-muted); }
.hr-meta dd { margin: 3px 0 0; font-size: 13.5px; }
.hr-summary { margin: 8px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--h-ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hr-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.hr-history { margin: 0; padding: 12px 0 0; list-style: none; border-top: 1px solid var(--h-line); display: grid; gap: 8px; }
.hr-history li { display: grid; grid-template-columns: 150px 1fr; gap: 10px; font-size: 12.5px; color: var(--h-ink-2); }
.hr-history li span:first-child { color: var(--h-muted); }
@media (max-width: 900px) {
  .hr-history li { grid-template-columns: 1fr; gap: 2px; }
}

/* En Obra › Proveedores */
.hp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.hp-cart { position: sticky; top: 24px; padding: 20px; }
.hp-lines { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; max-height: 300px; overflow: auto; }
.hp-lines li { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.hp-total { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 0; padding-top: 12px; border-top: 1px solid var(--h-line); }
.hp-total b { font-size: 20px; font-weight: 500; letter-spacing: -.01em; }
.hp-note { margin: 10px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--h-sun-soft); font-size: 12.5px; color: var(--h-sun-3); }
.hp-qty { display: inline-flex; align-items: center; height: 30px; border: 1px solid var(--h-ink); border-radius: 999px; overflow: hidden; }
.hp-qty button { width: 28px; height: 100%; display: grid; place-items: center; border: 0; background: transparent; cursor: pointer; color: var(--h-ink); }
.hp-qty button:hover { background: var(--h-sunk); }
.hp-qty input { width: 44px; height: 100%; border: 0; outline: 0; text-align: center; font: inherit; font-size: 13px; background: transparent; }
.h-table tbody tr.is-picked { background: var(--h-sun-wash); }
.hp-banner { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--h-line); background: var(--h-surface); font-size: 13px; color: var(--h-ink-2); }
.hp-banner svg { flex-shrink: 0; margin-top: 2px; }
.hp-banner.is-warn { background: var(--h-warn-soft); border-color: var(--h-warn-line); color: var(--h-warn-3); }
@media (max-width: 1100px) {
  .hp-layout { grid-template-columns: minmax(0, 1fr); }
  .hp-cart { position: static; }
}

/* Diseño: dónde está el mapa del sembrado y cómo reubicarlo */
.dz-geo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; padding: 6px 6px 6px 12px; border-radius: 14px; background: var(--h-surface); border: 1px solid var(--h-line); }
.dz-geo-where { display: inline-flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 300px; font-size: 12.5px; color: var(--h-muted); }
.dz-geo-where svg { flex-shrink: 0; color: var(--h-sun-2); }
.dz-geo-where b { font-weight: 600; color: var(--h-ink); white-space: nowrap; }
.dz-geo-where span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-geo-search { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 3px 0 12px; border-radius: 999px; border: 1px solid var(--h-line-2); background: var(--h-paper); flex: 0 1 300px; min-width: 200px; color: var(--h-muted); transition: border-color .16s var(--h-ease); }
.dz-geo-search input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 12.5px; flex: 1; min-width: 0; color: var(--h-ink); }
.dz-geo-search:focus-within { border-color: var(--h-ink); }
.dz-geo-go { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: var(--h-ink); color: var(--h-sun); cursor: pointer; flex-shrink: 0; }
.dz-geo-go:disabled { opacity: .45; cursor: default; }

/* Diseño: versiones con su botón de borrar y botón Eliminar de la barra */
.dz-item { position: relative; display: flex; align-items: stretch; min-width: 0; border-radius: 12px; border: 1px solid var(--h-line); background: var(--h-surface); transition: border-color .16s var(--h-ease), background .16s var(--h-ease); }
.dz-item:hover { border-color: var(--h-line-2); }
.dz-item.is-active { border-color: var(--h-ink); background: var(--h-sun-soft); }
.dz-item-open { flex: 1; min-width: 0; padding: 10px 6px 10px 12px; border: 0; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 12px 0 0 12px; }
.dz-item-del { display: grid; place-items: center; width: 34px; flex-shrink: 0; border: 0; background: transparent; color: var(--h-faint); cursor: pointer; border-radius: 0 12px 12px 0; opacity: 0; transition: opacity .16s var(--h-ease), color .16s var(--h-ease), background .16s var(--h-ease); }
.dz-item:hover .dz-item-del, .dz-item.is-active .dz-item-del, .dz-item-del:focus-visible { opacity: 1; }
.dz-item-del:hover { color: var(--h-crit); background: rgb(180 35 24 / .06); }
.dz-del:not(:disabled):hover { border-color: var(--h-crit); color: var(--h-crit); }
@media (hover: none) { .dz-item-del { opacity: 1; } }

/* Obra › Cronograma en días naturales: se crea y se mueve arrastrando sobre el calendario */
.hg { --hg-name: 240px; --hg-day-line: rgb(11 18 32 / .055); --hg-weekend: rgb(11 18 32 / .035); }
.hg-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.hg-tools .h-small { max-width: 640px; }
.hg-frame { overflow-x: auto; border: 1px solid var(--h-line); border-radius: 16px; background: var(--h-surface); scrollbar-width: thin; scrollbar-color: var(--h-line-2) transparent; }
.hg-grid { display: grid; position: relative; }
.hg-sticky { position: sticky; left: 0; z-index: 3; background: var(--h-surface); }
.hg-corner {
  display: flex; align-items: flex-end; height: 52px; padding: 0 14px 8px; border-bottom: 1px solid var(--h-line); border-right: 1px solid var(--h-line);
  font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--h-muted);
}
.hg-head { position: relative; height: 52px; border-bottom: 1px solid var(--h-line); user-select: none; }
.hg-months span {
  position: absolute; top: 0; height: 26px; display: flex; align-items: center; white-space: nowrap;
  border-left: 1px solid var(--h-line); font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--h-muted);
}
/* El nombre del mes se queda a la vista mientras su mes ocupe la pantalla. */
.hg-months em { position: sticky; left: calc(var(--hg-name) + 8px); margin-left: 8px; font-style: normal; }
.hg-days span { position: absolute; top: 26px; height: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; color: var(--h-ink-2); }
.hg-days b { font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hg-days i { margin-top: 2px; font-size: 8.5px; font-style: normal; color: var(--h-faint); }
.hg-days .is-weekend { background: var(--hg-weekend); color: var(--h-muted); }
.hg-days .is-today b { display: grid; place-items: center; width: 20px; height: 20px; margin-top: -2px; border-radius: 50%; background: var(--h-ink); color: var(--h-sun); }
.hg-days .is-today i { display: none; }
.hg-name {
  display: flex; align-items: center; gap: 8px; min-width: 0; height: 44px; padding: 0 12px 0 14px; border: 0; border-bottom: 1px solid var(--h-line); border-right: 1px solid var(--h-line);
  font: inherit; font-size: 13px; color: var(--h-ink); text-align: left; cursor: pointer; transition: background .14s var(--h-ease);
}
.hg-name:hover { background: var(--h-sun-wash); }
.hg-pct { margin-left: auto; padding-left: 4px; font-size: 11.5px; color: var(--h-muted); }
.hg-new { cursor: text; color: var(--h-muted); }
.hg-new:hover { background: var(--h-surface); }
.hg-new input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 13px; color: var(--h-ink); }
.hg-new input::placeholder { color: var(--h-muted); }
.hg-row { position: relative; height: 44px; border-bottom: 1px solid var(--h-line); background-repeat: repeat; cursor: crosshair; touch-action: pan-y; user-select: none; }
.hg-row-new { background-color: var(--h-paper); }
.hg-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--h-sun-2); opacity: .85; pointer-events: none; z-index: 1; }
.hg-empty { position: absolute; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--h-faint); white-space: nowrap; pointer-events: none; }
.hg-bar {
  position: absolute; top: 11px; height: 22px; display: flex; align-items: center; justify-content: flex-end; overflow: hidden; z-index: 2;
  border-radius: 7px; background: #dceefa; box-shadow: inset 0 0 0 1px #8fc6ec; cursor: grab; transition: box-shadow .14s var(--h-ease);
}
.hg-bar:hover { box-shadow: inset 0 0 0 1.5px var(--h-sun-2); }
.hg-bar:active { cursor: grabbing; }
.hg-bar:focus-visible { outline: 2px solid var(--h-ink); outline-offset: 2px; }
.hg-bar.is-ghost { background: rgb(94 173 222 / .5); box-shadow: inset 0 0 0 1.5px var(--h-sun-2); }
.hg-bar.is-late { box-shadow: inset 0 0 0 1px #f5c2bd; }
.hg-fill { position: absolute; inset: 0 auto 0 0; background: var(--h-ink); }
.hg-bar.is-late .hg-fill { background: var(--h-crit); }
.hg-len { position: relative; z-index: 1; margin-right: 9px; padding: 1px 5px; border-radius: 5px; background: rgb(255 255 255 / .82); font-size: 10.5px; font-weight: 600; color: var(--h-ink-2); font-variant-numeric: tabular-nums; pointer-events: none; }
.hg-grip { position: absolute; top: 0; bottom: 0; width: 9px; z-index: 2; cursor: ew-resize; }
.hg-grip.is-start { left: 0; }
.hg-grip.is-end { right: 0; }
.hg-bar:hover .hg-grip::after { content: ""; position: absolute; top: 5px; bottom: 5px; left: 3.5px; width: 2px; border-radius: 2px; background: rgb(11 18 32 / .35); }
.hg-key { display: inline-block; width: 22px; height: 10px; border-radius: 4px; }
.hg-key.is-plan { background: #dceefa; box-shadow: inset 0 0 0 1px #8fc6ec; }
.hg-key.is-real { background: var(--h-ink); }
.hg-key.is-weekend { background: rgb(11 18 32 / .08); }
.hg-del { color: var(--h-crit); }
.hg-del:hover { background: #fdecea; color: var(--h-crit); }
@media (max-width: 900px) {
  .hg { --hg-name: 150px; }
  .hg-pct { display: none; }
}

/* Ventas › Contactos */
.hk-note { margin-top: -2px; padding: 8px 11px; border-radius: 10px; background: var(--h-sunk); font-size: 12.5px; line-height: 1.45; color: var(--h-ink-2); }
.hk-note.is-team { background: var(--h-sun-soft); color: var(--h-sun-3); }

/* Ventas › Clientes: títulos de columna que filtran y ordenan */
.hf-table th { padding-top: 6px; padding-bottom: 6px; }
.hf-head {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; margin: 0 -8px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent;
  font: inherit; font-size: inherit; font-weight: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; white-space: nowrap;
  transition: background .14s var(--h-ease), color .14s var(--h-ease);
}
.hf-head:hover, .hf-head[data-state="open"] { background: var(--h-sunk); color: var(--h-ink); }
.hf-head:focus-visible { outline: 2px solid var(--h-ink); outline-offset: 1px; }
.hf-head .hf-icon { width: 12px; height: 12px; opacity: .45; transition: opacity .14s var(--h-ease); }
.hf-head:hover .hf-icon, .hf-head[data-state="open"] .hf-icon { opacity: .9; }
.hf-head .hf-sort { width: 12px; height: 12px; color: var(--h-sun-3); }
.hf-head.is-active, .hf-head.is-sorted { color: var(--h-ink); }
.hf-head.is-active { background: var(--h-sun-soft); box-shadow: inset 0 0 0 1px var(--h-sun-line); }
.hf-head.is-active .hf-icon { opacity: 1; color: var(--h-sun-3); }
th.num .hf-head { flex-direction: row; }
.hf-pop {
  z-index: 90; width: 268px; max-width: calc(100vw - 24px); padding: 10px; border-radius: 14px; border: 1px solid var(--h-line); background: var(--h-surface);
  box-shadow: 0 22px 48px -20px rgb(11 18 32 / .32), 0 2px 6px rgb(11 18 32 / .06); font-family: var(--h-font); color: var(--h-ink); animation: hs-in .16s var(--h-ease);
  text-transform: none; letter-spacing: normal; font-weight: 400;
}
.hf-title { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 8px 4px; font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--h-muted); }
.hf-x { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 7px; background: transparent; color: var(--h-muted); cursor: pointer; }
.hf-x:hover { background: var(--h-sunk); color: var(--h-ink); }
.hf-sorts { display: grid; grid-template-columns: 1fr; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--h-line); }
.hf-sortbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; border-radius: 9px; border: 1px solid var(--h-line-2); background: var(--h-surface);
  font: inherit; font-size: 12.5px; color: var(--h-ink-2); cursor: pointer; transition: all .14s var(--h-ease);
}
.hf-sortbtn:hover { border-color: var(--h-ink); color: var(--h-ink); }
.hf-sortbtn.is-on { background: var(--h-ink); border-color: var(--h-ink); color: #fff; }
.hf-body { padding: 10px 0 4px; }
.hf-search { display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px; margin-bottom: 6px; border-radius: 9px; border: 1px solid var(--h-line-2); background: var(--h-paper); color: var(--h-muted); }
.hf-search:focus-within { border-color: var(--h-ink); }
.hf-search.is-big { height: 36px; margin-bottom: 0; background: var(--h-surface); }
.hf-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 13px; color: var(--h-ink); }
.hf-list { max-height: 236px; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--h-line-2) transparent; }
.hf-opt { display: flex; align-items: center; gap: 9px; min-height: 30px; padding: 4px 8px; border-radius: 8px; font-size: 13px; color: var(--h-ink-2); cursor: pointer; user-select: none; }
.hf-opt:hover { background: var(--h-sun-soft); color: var(--h-ink); }
.hf-opt input { accent-color: var(--h-ink); width: 14px; height: 14px; flex-shrink: 0; }
.hf-opt em { margin-left: auto; padding-left: 10px; font-style: normal; font-size: 12px; color: var(--h-muted); }
.hf-opt.is-all { font-weight: 600; color: var(--h-ink); border-bottom: 1px solid var(--h-line); border-radius: 8px 8px 0 0; margin-bottom: 2px; }
.hf-range .h-field > span { font-size: 10px; }
.hf-input { height: 34px; }
.hf-foot { display: flex; justify-content: space-between; gap: 8px; padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--h-line); }
.hf-active { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -6px 0 12px; }
.hf-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 360px; height: 28px; padding: 0 10px 0 12px; border-radius: 999px; border: 1px solid var(--h-sun-line);
  background: var(--h-sun-soft); color: var(--h-sun-3); font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; transition: border-color .14s var(--h-ease);
}
.hf-chip:hover { border-color: var(--h-sun-2); color: var(--h-ink); }
.hf-none { padding: 28px 14px !important; text-align: center; color: var(--h-muted); }

/* Marca de la plataforma (M43). El endoso usa la firma de mayúsculas de Newman en Manrope; #626A75 es el
   secundario de M43 sobre papel (4.9:1). */
.m43-endorsement { font-family: 'Manrope', var(--h-font); font-size: 10.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #626A75; }
