/* TASK-042 — shell y componentes canónicos del Visual Reset. */

html {
  min-height: 100%;
  background: var(--hp-bg);
}

body.hp-app {
  min-height: 100vh;
  margin: 0;
  background: var(--hp-bg);
  color: var(--hp-text);
  font-size: .875rem;
  line-height: 1.45;
}

.hp-app :where(h1, h2, h3, h4, h5, h6) {
  color: var(--hp-text);
  font-weight: 650;
  letter-spacing: -.015em;
}

.hp-app h1 { font-size: clamp(1.3rem, 1.8vw, 1.65rem); line-height: 1.2; }
.hp-app h2 { font-size: 1.1rem; line-height: 1.25; }
.hp-app h3 { font-size: .92rem; line-height: 1.3; }
.hp-app :where(p, li, dd, td, th, label, input, select, textarea, button) { font-size: .875rem; }
.hp-app :where(code, pre, kbd, samp) { font-family: var(--pico-font-family-monospace); }

.hp-skip-link {
  position: fixed;
  z-index: 1000;
  top: var(--hp-space-2);
  left: var(--hp-space-2);
  transform: translateY(-150%);
  padding: var(--hp-space-2) var(--hp-space-3);
  border-radius: var(--hp-radius-md);
  background: var(--hp-text);
  color: var(--hp-surface);
}

.hp-skip-link:focus { transform: translateY(0); }
.hp-icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.hp-nav-icon { width: 1.15rem; height: 1.15rem; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.hp-sidebar {
  position: fixed;
  z-index: 50;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: var(--hp-sidebar-width);
  padding: var(--hp-space-5) var(--hp-space-4);
  border-right: 1px solid var(--hp-border);
  background: var(--hp-surface);
  overflow-y: auto;
  overscroll-behavior: contain;
  transition: transform .16s ease;
}
.hp-sidebar > * { flex-shrink: 0; }

.hp-sidebar-toggle {
  position: absolute;
  top: var(--hp-space-3);
  right: var(--hp-space-2);
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-md);
  background: var(--hp-surface);
  color: var(--hp-text-muted);
  cursor: pointer;
}
.hp-sidebar-toggle:hover { background: var(--hp-surface-muted); color: var(--hp-text); }
.hp-sidebar-toggle .hp-nav-icon { width: 1rem; height: 1rem; }

.hp-sidebar-reopen {
  display: none;
  position: fixed;
  z-index: 51;
  top: var(--hp-space-3);
  left: var(--hp-space-3);
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-md);
  background: var(--hp-surface);
  color: var(--hp-text-muted);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  cursor: pointer;
}
.hp-sidebar-reopen:hover { background: var(--hp-surface-muted); color: var(--hp-text); }

body.hp-sidebar-collapsed .hp-sidebar { transform: translateX(-100%); }
body.hp-sidebar-collapsed .hp-sidebar-reopen { display: inline-flex; }
body.hp-sidebar-collapsed .hp-workspace { margin-left: 0; width: 100%; }

.hp-brand,
.hp-mobile-brand {
  display: flex;
  align-items: center;
  gap: var(--hp-space-3);
  color: var(--hp-text);
  text-decoration: none;
}

.hp-brand { margin: 0 var(--hp-space-2) var(--hp-space-6); }
.hp-brand:hover, .hp-mobile-brand:hover { text-decoration: none; }
.hp-brand > span:last-child { display: grid; line-height: 1.05; }
.hp-brand strong { font-size: 1.2rem; letter-spacing: -.025em; }
.hp-brand small { margin-top: .22rem; color: var(--hp-text-muted); font-size: .64rem; letter-spacing: .015em; }
.hp-brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  flex: 0 0 auto;
  border-radius: var(--hp-radius-md);
  background: var(--hp-primary);
  color: var(--hp-on-primary);
  font-size: 1.05rem;
  font-weight: 750;
  line-height: 1;
}

.hp-hunter-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--hp-space-2);
  min-height: 2.35rem;
  margin: 0 0 var(--hp-space-5);
  padding: var(--hp-space-2) var(--hp-space-3);
  border: 1px solid var(--hp-primary);
  border-radius: var(--hp-radius-md);
  background: var(--hp-primary);
  color: var(--hp-on-primary);
  font-weight: 650;
  text-decoration: none;
}

.hp-hunter-cta:hover { border-color: var(--hp-primary-hover); background: var(--hp-primary-hover); color: var(--hp-on-primary); text-decoration: none; }

.hp-primary-nav {
  display: grid;
  gap: var(--hp-space-1);
  margin: 0;
}

.hp-primary-nav a,
.hp-sidebar-footer > a,
.hp-logout,
.hp-sidebar-add > summary,
.hp-advanced-nav > summary {
  display: flex;
  align-items: center;
  gap: var(--hp-space-3);
  min-height: 2.6rem;
  margin: 0;
  padding: var(--hp-space-2) var(--hp-space-3);
  border: 0;
  border-radius: var(--hp-radius-md);
  background: transparent;
  color: var(--hp-text-muted);
  font-size: .82rem;
  font-weight: 560;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: none;
}

.hp-primary-nav a:hover,
.hp-sidebar-footer > a:hover,
.hp-logout:hover,
.hp-sidebar-add > summary:hover,
.hp-advanced-nav > summary:hover {
  background: var(--hp-surface-muted);
  color: var(--hp-text);
  text-decoration: none;
}

.hp-primary-nav a.nav-active,
.hp-primary-nav a[aria-current="page"] {
  background: var(--hp-primary-soft);
  color: var(--hp-primary);
  font-weight: 700;
}

.hp-sidebar-add,
.hp-advanced-nav {
  margin: var(--hp-space-3) 0 0;
  border-top: 1px solid var(--hp-border);
  padding-top: var(--hp-space-3);
}

.hp-sidebar-add > summary,
.hp-advanced-nav > summary { list-style: none; cursor: pointer; }
.hp-sidebar-add > summary::-webkit-details-marker,
.hp-advanced-nav > summary::-webkit-details-marker,
.hp-mobile-menu > summary::-webkit-details-marker { display: none; }
.hp-sidebar-add > summary::after,
.hp-advanced-nav > summary::after { display: none; }

.hp-advanced-nav > div {
  display: grid;
  gap: .1rem;
  margin: var(--hp-space-1) 0 0 2.6rem;
}

.hp-advanced-nav > div a {
  padding: .34rem .45rem;
  border-radius: var(--hp-radius-sm);
  color: var(--hp-text-muted);
  font-size: .76rem;
  text-decoration: none;
}

.hp-advanced-nav > div a:hover { background: var(--hp-surface-muted); color: var(--hp-primary); }

.hp-sidebar-footer {
  display: grid;
  gap: var(--hp-space-1);
  margin-top: auto;
  padding-top: var(--hp-space-4);
  border-top: 1px solid var(--hp-border);
}

.hp-sidebar-footer .logout-form { margin: 0; }
.hp-logout { width: 100%; justify-content: flex-start; }
.hp-sidebar-footer .mode-demo { margin: 0 var(--hp-space-3) var(--hp-space-2); width: fit-content; }
.hp-version-tag {
  display: flex;
  align-items: center;
  gap: var(--hp-space-2);
  margin: var(--hp-space-2) var(--hp-space-3) 0;
  padding: .35rem .55rem;
  border-radius: var(--hp-radius-md);
  background: var(--hp-primary-soft);
  color: var(--hp-primary);
  font-size: .75rem;
  font-weight: 700;
  font-family: var(--pico-font-family-monospace);
  letter-spacing: .02em;
  text-decoration: none;
  transition: background .12s ease, color .12s ease;
}
.hp-version-tag:hover {
  background: var(--hp-primary);
  color: var(--hp-on-primary);
}
.hp-version-tag:hover .hp-version-dot { background: var(--hp-on-primary); }
.hp-version-dot {
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: var(--hp-success);
  flex-shrink: 0;
  transition: background .12s ease;
}

.hp-workspace {
  width: calc(100% - var(--hp-sidebar-width));
  max-width: none;
  min-height: 100vh;
  margin: 0 0 0 var(--hp-sidebar-width);
  padding: var(--hp-space-5) clamp(1.25rem, 2.5vw, 2.75rem) 3rem;
  transition: margin-left .16s ease, width .16s ease;
}

.hp-workspace > :first-child { margin-top: 0; }
.hp-mobile-header { display: none; }

.hp-app :where(button, [role="button"], input[type="submit"]) {
  min-height: 2.2rem;
  padding-inline: .85rem;
  border-radius: var(--hp-radius-md);
  font-weight: 650;
  box-shadow: none;
}

.hp-app :where(input, select, textarea) {
  min-height: 2.2rem;
  border-color: var(--hp-border-strong);
  border-radius: var(--hp-radius-md);
  background-color: var(--hp-surface);
  box-shadow: none;
}

.hp-app textarea { min-height: 4.5rem; }

.hp-app :where(input, select, textarea):focus {
  border-color: var(--hp-primary);
  box-shadow: 0 0 0 .18rem var(--hp-focus-shadow);
}

.hp-app :focus-visible { outline: 3px solid var(--hp-focus-ring); outline-offset: 2px; }

.hp-app article,
.hp-app section {
  border-color: var(--hp-border);
  box-shadow: none;
}

.hp-app article { background: var(--hp-surface); }

.quick-add-popover {
  position: fixed;
  z-index: 100;
  inset: 50% auto auto 50%;
  width: min(34rem, calc(100vw - 2rem));
  max-height: calc(100vh - 4rem);
  margin: 0;
  padding: var(--hp-space-4);
  overflow: auto;
  transform: translate(-50%, -50%);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-lg);
  background: var(--hp-surface);
  box-shadow: var(--hp-shadow-overlay);
}

.quick-add-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--hp-space-3);
  margin-bottom: var(--hp-space-2);
}

.quick-add-close {
  display: inline-grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  min-height: 1.85rem;
  padding: 0;
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-md);
  background: var(--hp-surface-muted);
  color: var(--hp-text-muted);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.quick-add-close:hover {
  background: var(--hp-danger-soft);
  color: var(--hp-danger-text);
  border-color: var(--hp-danger-border);
}

.quick-add-shell:not([open]) .quick-add-popover { display: none; }
.quick-add-popover details { border-color: var(--hp-border); }
.quick-add-popover h2 { color: var(--hp-text); margin: 0; font-size: 1.15rem; }

.eyebrow {
  margin-bottom: var(--hp-space-2);
  color: var(--hp-primary);
  font-size: .68rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.page-intro,
.home-hero,
.hunter-hero { margin-top: 0; }

.page-intro h1,
.home-hero h1,
.hunter-hero h1 { margin: 0 0 var(--hp-space-2); }

.page-intro > p:last-child,
.home-hero > div > p:last-child,
.hunter-hero > div > p:last-child { color: var(--hp-text-muted); }

.badge {
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .015em;
}

.badge-real, .badge-hecho { border-color: var(--hp-success-border); background: var(--hp-success-soft); color: var(--hp-success); }
.badge-demo, .badge-normal { border-color: var(--hp-border); background: var(--hp-surface-muted); color: var(--hp-text-muted); }
.badge-estrategica, .badge-alta, .badge-inferencia { border-color: var(--hp-warning-border); background: var(--hp-warning-soft); color: var(--hp-warning); }
.badge-estado, .badge-recomendacion { border-color: var(--hp-primary-border); background: var(--hp-primary-soft); color: var(--hp-primary); }
.badge-demo { border-style: dashed; }

.empty-state {
  border-color: var(--hp-border-strong);
  border-radius: var(--hp-radius-lg);
  background: var(--hp-surface);
  text-align: center;
}

.demo-warning,
.data-warning,
.capability-note { border-color: var(--hp-warning-border); background: var(--hp-warning-soft); color: var(--hp-warning-text); }
.success-message { border-color: var(--hp-success-border); background: var(--hp-success-soft); color: var(--hp-success); }
.error-card { border-color: var(--hp-danger-border); background: var(--hp-danger-soft); color: var(--hp-danger-text); }

.list-pagination a[role="button"] { border-color: var(--hp-border-strong); }

/* Listas de trabajo e inspector contextual. */
.hp-list-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--hp-space-5);
}

.hp-record-count {
  padding: .3rem .6rem;
  border: 1px solid var(--hp-border);
  border-radius: 999px;
  background: var(--hp-surface);
  color: var(--hp-text-muted);
  font-size: .72rem;
  white-space: nowrap;
}

.hp-filter-bar {
  padding: var(--hp-space-3);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-lg);
  background: var(--hp-surface);
}
/* Barra de filtros compacta estilo toolbar */
.hp-compact-intro {
  margin: 0.4rem 0 0.5rem;
}
.hp-intro-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.hp-intro-title-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hp-intro-title-group h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 750;
}
.hp-record-count-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--hp-primary-soft);
  color: var(--hp-primary);
  font-size: 0.72rem;
  font-weight: 750;
}
.hp-intro-sub {
  margin: 0;
  color: var(--hp-text-muted);
  font-size: 0.78rem;
}

.flow-stages {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.1rem 0 0.45rem;
  margin-bottom: 0.4rem;
  overflow-x: auto;
}
.flow-stages a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--hp-border);
  background: var(--hp-surface);
  font-size: 0.74rem;
  color: var(--hp-text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.flow-stages a strong {
  font-size: 0.75rem;
  font-weight: 750;
  color: var(--hp-text);
}
.flow-stages a.active {
  background: var(--hp-primary-soft);
  border-color: var(--hp-primary);
  color: var(--hp-primary);
}
.flow-stages a.active strong {
  color: var(--hp-primary);
}
.flow-stages-vencer {
  border-color: #f59e0b !important;
  background: #fffbeb !important;
  color: #b45309 !important;
}
.flow-stages-vencer.active {
  background: #fef3c7 !important;
  border-color: #d97706 !important;
  color: #92400e !important;
}

.hp-filter-bar-grid {
  display: grid;
  grid-template-columns: minmax(180px, 2fr) repeat(4, minmax(110px, 1fr)) auto;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.6rem;
  padding: 0.45rem 0.6rem;
  background: var(--hp-surface);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-md);
}
.hp-filter-bar-grid > div,
.hp-filter-bar-grid :where(input, select, button, a[role="button"]) {
  margin: 0 !important;
  width: 100%;
}
.hp-filter-bar-grid :where(input, select) {
  height: 2.1rem !important;
  min-height: 2.1rem !important;
  padding: 0 0.55rem !important;
  font-size: 0.78rem !important;
  background: var(--hp-bg) !important;
  border: 1px solid var(--hp-border) !important;
  border-radius: var(--hp-radius-sm) !important;
}
.hp-filter-buttons {
  display: flex !important;
  gap: 0.3rem !important;
  width: auto !important;
}
.hp-filter-buttons :where(button, a[role="button"]) {
  height: 2.1rem !important;
  min-height: 2.1rem !important;
  padding: 0 0.75rem !important;
  font-size: 0.76rem !important;
  line-height: 2.1rem !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: var(--hp-radius-sm) !important;
}
.hp-advanced-filters-inline {
  position: relative;
  margin: 0;
}
.hp-advanced-filters-inline summary {
  padding: 0.2rem 0.5rem;
  font-size: 0.74rem;
  color: var(--hp-primary);
  cursor: pointer;
  white-space: nowrap;
}
.hp-advanced-filters-popover {
  position: absolute;
  top: 2.2rem;
  right: 0;
  z-index: 50;
  display: grid;
  gap: 0.45rem;
  min-width: 220px;
  padding: 0.65rem;
  background: var(--hp-surface);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-md);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.hp-table-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.2rem 0.35rem 0.4rem;
  font-size: 0.74rem;
  color: var(--hp-text-muted);
}
.hp-mini-pagination {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.hp-page-btn {
  height: 1.6rem !important;
  min-height: 1.6rem !important;
  padding: 0 0.45rem !important;
  font-size: 0.7rem !important;
  line-height: 1.6rem !important;
  margin: 0 !important;
}
.hp-page-status {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--hp-text);
  padding: 0 0.2rem;
}

.hp-opportunity-layout {
  display: block;
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-md);
  overflow: clip;
  background: var(--hp-surface);
}

.hp-table-shell { min-width: 0; overflow-x: auto; }
.hp-data-table { width: 100%; margin: 0; border-collapse: collapse; background: var(--hp-surface); }
.hp-data-table thead { background: var(--hp-surface-muted); }
.hp-data-table th {
  height: var(--hp-row-dense);
  padding: 0.35rem 0.55rem;
  border-bottom: 1px solid var(--hp-border);
  color: var(--hp-text-muted);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.hp-data-table td {
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--hp-border);
  vertical-align: middle;
  font-size: 0.8rem;
}

.hp-data-table tbody tr:last-child td { border-bottom: 0; }
.hp-data-table tbody tr:hover td, .hp-data-table tbody tr.is-selected td { background: var(--hp-primary-soft); }
.hp-data-table a { text-decoration: none; }
.hp-data-table td > small { display: block; margin-top: 0.08rem; color: var(--hp-text-muted); font-size: 0.65rem; }
.hp-row-sequence { width: 2.8rem; text-align: center; }
.hp-row-number { color: var(--hp-text-muted); font-size: 0.68rem; font-weight: 750; }
.hp-opportunity-name { display: block; color: var(--hp-text); font-weight: 650; font-size: 0.82rem; line-height: 1.25; }
.hp-opportunity-name:hover { color: var(--hp-primary); }
.hp-row-meta { display: flex; align-items: center; gap: 0.25rem; margin-top: 0.15rem; color: var(--hp-text-muted); font-size: 0.65rem; }
.hp-status-dot { width: 0.38rem; height: 0.38rem; border-radius: 50%; background: var(--hp-info); flex-shrink: 0; }
.flow-vencida .hp-status-dot, .flow-descartada .hp-status-dot, .flow-perdida .hp-status-dot { background: var(--hp-neutral); }
.flow-trabajando .hp-status-dot, .flow-propuesta .hp-status-dot, .flow-ganada .hp-status-dot { background: var(--hp-success); }
.hp-critical-date { color: var(--hp-warning); font-weight: 700; }
.hp-stale-date { color: var(--hp-text-muted); font-weight: 700; }
.hp-row-action { width: 3rem; text-align: right; }
.hp-btn-quick-view {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.6rem !important;
  min-height: 1.6rem !important;
  padding: 0 0.55rem !important;
  font-size: 0.7rem !important;
  font-weight: 700;
  margin: 0 !important;
  border-radius: var(--hp-radius-sm);
  cursor: pointer;
}
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; white-space: nowrap; }

/* INSPECTOR SLIDE-OVER DRAWER (NO SCROLL JUMP) */
.hp-inspector-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(2px);
  z-index: 9990;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.hp-inspector-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.hp-inspector {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 480px;
  max-width: 92vw;
  height: 100vh;
  padding: 1.2rem 1.3rem;
  overflow-y: auto;
  border-left: 1px solid var(--hp-border);
  background: #ffffff !important;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.22);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transform: translateX(0);
  animation: hpSlideIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.hp-inspector.is-closing {
  transform: translateX(100%) !important;
}

@keyframes hpSlideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.hp-inspector-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--hp-space-3); }
.hp-inspector-header h2 { margin: 0.15rem 0 0.1rem; font-size: 1.05rem; line-height: 1.25; }
.hp-inspector-close { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; flex: 0 0 auto; border-radius: var(--hp-radius-sm); color: var(--hp-text-muted); font-size: 1.4rem; text-decoration: none; background: none; border: none; cursor: pointer; padding: 0; line-height: 1; }
.hp-inspector-close:hover { background: var(--hp-surface-muted); color: var(--hp-text); }
.hp-kicker { color: var(--hp-primary); font-size: 0.62rem; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; }
.hp-btn-full-record { display: block; margin: 0.4rem 0 0.6rem; padding: 0.35rem 0.6rem; font-size: 0.78rem; text-align: center; border-radius: var(--hp-radius-sm); }
.hp-inspector > section, .hp-evidence-disclosure { margin: 0; padding: 0.5rem 0; border: 0; border-top: 1px solid var(--hp-border); background: transparent; }
.hp-inspector > section h3 { margin: 0 0 0.25rem; font-size: 0.72rem; letter-spacing: 0.035em; text-transform: uppercase; }
.hp-inspector > section p { margin: 0; color: var(--hp-text-muted); font-size: 0.78rem; }
.hp-inspector-critical { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem; margin: 0.4rem 0 0.6rem; }
.hp-inspector-critical > div { display: grid; align-content: start; min-height: 4.2rem; padding: 0.4rem 0.5rem; border: 1px solid var(--hp-border); border-radius: var(--hp-radius-sm); background: var(--hp-bg); }
.hp-inspector-critical span, .hp-inspector-status > span { color: var(--hp-text-muted); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.hp-inspector-critical strong { margin-top: 0.15rem; font-size: 0.85rem; }
.hp-inspector-critical small { color: var(--hp-text-muted); font-size: 0.62rem; }
.hp-inspector-status { display: flex; align-items: center; gap: 0.35rem; }
.hp-compact-dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.35rem; margin: 0; }
.hp-compact-dl > div { display: grid; gap: 0.1rem; }
.hp-compact-dl dt { color: var(--hp-text-muted); font-size: 0.64rem; }
.hp-compact-dl dd { margin: 0; font-weight: 650; font-size: 0.78rem; }
.hp-inspector .hp-next-move { margin: 0.35rem 0; padding: 0.55rem; border: 1px solid var(--hp-primary-border); border-radius: var(--hp-radius-md); background: var(--hp-primary-wash); }
.hp-next-move h3 { margin: 0.2rem 0 !important; font-size: 0.88rem !important; letter-spacing: 0 !important; text-transform: none !important; }
.hp-next-move p { font-size: 0.76rem !important; }
.hp-next-move [role="button"] { width: 100%; margin: 0.4rem 0 0; padding: 0.3rem 0.5rem; font-size: 0.75rem; }
.hp-evidence-disclosure summary { cursor: pointer; font-weight: 700; font-size: 0.72rem; }

/* Inicio: prioridades compactas y próxima acción protagonista. */
.hp-home-hero-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.4rem 0 0.6rem;
}
.hp-home-title {
  margin: 0 0 0.15rem;
  font-size: 1.25rem;
  font-weight: 750;
}
.hp-home-subtitle {
  margin: 0;
  color: var(--hp-text-muted);
  font-size: 0.78rem;
}
.hp-home-badge {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  background: var(--hp-primary-soft);
  border: 1px solid var(--hp-primary-border);
  border-radius: var(--hp-radius-md);
}
.hp-home-badge strong {
  font-size: 1.15rem;
  color: var(--hp-primary);
}
.hp-home-badge span {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--hp-primary);
  text-transform: uppercase;
}

.hp-brief-list-dense {
  display: grid;
  gap: 0.55rem;
}
.decision-card {
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--hp-border);
  border-left-width: 0.25rem;
  border-radius: var(--hp-radius-md);
  background: var(--hp-surface);
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.decision-card.is-read { opacity: 0.65; background: var(--hp-surface-muted); }
.decision-card:hover { border-color: var(--hp-border-strong); }
.decision-header h2 { font-size: 0.95rem; line-height: 1.25; margin: 0.1rem 0; }
.decision-signals span { background: var(--hp-surface-muted); color: var(--hp-text-muted); padding: 0.1rem 0.45rem; font-size: 0.66rem; }
.decision-heading-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem; }
.decision-order {
  display: inline-grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: var(--hp-primary);
  color: var(--hp-on-primary);
  font-size: 0.66rem;
  font-weight: 750;
}
.decision-type { color: var(--hp-text); font-size: 0.66rem; font-weight: 750; }
.decision-horizon { padding: 0.1rem 0.4rem; font-size: 0.62rem; border-radius: 999px; background: var(--hp-surface-muted); }
.decision-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 0.3rem 0;
  padding: 0.3rem 0;
  border-top: 1px solid var(--hp-border);
  border-bottom: 1px solid var(--hp-border);
}
.decision-summary-grid section { margin: 0; padding: 0; border: 0; background: transparent; }
.decision-summary-grid span { display: block; margin-bottom: 0.1rem; color: var(--hp-text-muted); font-size: 0.6rem; font-weight: 750; letter-spacing: 0.05em; text-transform: uppercase; }
.decision-summary-grid p { margin: 0; font-size: 0.78rem; line-height: 1.3; }
.decision-context { margin: 0.2rem 0; padding: 0; border: 0; background: transparent; }
.decision-context > summary { cursor: pointer; color: var(--hp-primary); font-size: 0.7rem; font-weight: 700; }
.decision-context dl { display: grid; grid-template-columns: minmax(14rem, 2fr) repeat(2, minmax(7rem, 0.6fr)); gap: var(--hp-space-3); margin: 0.25rem 0 0; padding: 0.35rem; border: 1px solid var(--hp-border); border-radius: var(--hp-radius-sm); background: var(--hp-surface-muted); }
.decision-context dl > div { min-width: 0; }
.decision-context dt { color: var(--hp-text-muted); font-size: 0.62rem; font-weight: 750; text-transform: uppercase; }
.decision-context dd { margin: 0.15rem 0 0; font-size: 0.74rem; }
.next-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.55rem;
  border-radius: var(--hp-radius-sm);
  background: var(--hp-primary-soft);
  margin-top: 0.35rem;
}
.next-action-label > span { color: var(--hp-primary); font-size: 0.58rem; font-weight: 800; display: block; }
.next-action-label > strong { font-size: 0.8rem; color: var(--hp-text); }
.decision-actions { display: flex; align-items: center; gap: 0.3rem; }
.decision-actions :where(button, a[role="button"]) {
  height: 1.8rem !important;
  min-height: 1.8rem !important;
  padding: 0 0.55rem !important;
  font-size: 0.72rem !important;
  line-height: 1.8rem !important;
  margin: 0 !important;
  display: inline-flex;
  align-items: center;
}
.decision-actions > form:first-child { order: initial; }
.decision-actions .outline { border-color: var(--hp-border-strong); }

/* Ficha completa de oportunidad. */
.hp-detail-workspace { max-width: 90rem; }
.hp-breadcrumb { display: flex; align-items: center; gap: var(--hp-space-2); margin: 0 0 var(--hp-space-5); color: var(--hp-text-muted); }
.hp-breadcrumb a { text-decoration: none; }
.hp-record-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--hp-space-6); margin-bottom: var(--hp-space-4); }
.hp-record-header h1 { max-width: 55rem; margin: 0 0 var(--hp-space-3); }
.hp-record-badges { display: flex; align-items: center; flex-wrap: wrap; gap: var(--hp-space-2); }
.hp-detail-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(18rem, .7fr); gap: var(--hp-space-4); margin: var(--hp-space-4) 0; }
.hp-detail-card, .hp-detail-section, .hp-critical-summary { margin: 0; padding: var(--hp-space-4); border: 1px solid var(--hp-border); border-radius: var(--hp-radius-lg); background: var(--hp-surface); }
.hp-detail-card h2, .hp-detail-section h2 { margin: .22rem 0 var(--hp-space-3); }
.hp-section-label { color: var(--hp-text-muted); font-size: .64rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.hp-detail-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: var(--hp-space-3); margin: var(--hp-space-4) 0 0; }
.hp-detail-facts > div { display: grid; gap: .15rem; }
.hp-detail-facts dt { color: var(--hp-text-muted); font-size: .68rem; }
.hp-detail-facts dd { margin: 0; font-weight: 620; }
.hp-critical-summary { display: grid; gap: var(--hp-space-3); align-content: stretch; }
.hp-critical-summary > div { display: grid; align-content: center; padding: var(--hp-space-4); border-radius: var(--hp-radius-md); background: var(--hp-bg); }
.hp-critical-summary span { color: var(--hp-text-muted); font-size: .68rem; font-weight: 700; }
.hp-critical-summary strong { margin-top: .25rem; font-size: 1.05rem; }
.hp-critical-summary .hp-critical-deadline { border: 1px solid var(--hp-warning-border); background: var(--hp-warning-soft); }
.hp-critical-deadline strong { color: var(--hp-warning-text); }
.hp-detail-section { margin: var(--hp-space-4) 0; }
.hp-detail-section > header { margin-bottom: var(--hp-space-4); }
.hp-tender-timeline { display: grid; grid-template-columns: repeat(5, minmax(8rem, 1fr)); gap: 0; margin: var(--hp-space-5) 0; padding: 0; list-style: none; }
.hp-tender-timeline li { position: relative; display: grid; align-content: start; gap: .35rem; min-height: 5.7rem; padding: 1.7rem var(--hp-space-3) var(--hp-space-3) 0; border-top: 2px solid var(--hp-border-strong); }
.hp-tender-timeline li::before { content: ""; position: absolute; top: -.42rem; left: 0; width: .72rem; height: .72rem; border: 2px solid var(--hp-border-strong); border-radius: 50%; background: var(--hp-surface); }
.hp-tender-timeline li span { color: var(--hp-text-muted); font-size: .67rem; font-weight: 700; }
.hp-tender-timeline li time { font-size: .78rem; font-weight: 650; }
.hp-tender-timeline li em { color: var(--hp-text-muted); font-size: .72rem; font-style: normal; }
.hp-tender-timeline li.is-complete { border-color: var(--hp-success); }
.hp-tender-timeline li.is-complete::before { border-color: var(--hp-success); background: var(--hp-success); }
.hp-tender-timeline li.is-attention { border-color: var(--hp-warning); }
.hp-tender-timeline li.is-attention::before { border-color: var(--hp-warning); }
.hp-tender-timeline li.is-critical { margin-top: -.65rem; padding: 1.75rem var(--hp-space-3) var(--hp-space-3); border: 2px solid var(--hp-warning); border-radius: var(--hp-radius-md); background: var(--hp-warning-soft); }
.hp-tender-timeline li.is-critical::before { top: -.46rem; left: var(--hp-space-3); border-color: var(--hp-warning); background: var(--hp-warning); }
.hp-tender-timeline li.is-critical span, .hp-tender-timeline li.is-critical time { color: var(--hp-warning-text); font-weight: 750; }
.hp-detection-note { margin: 0; color: var(--hp-text-muted); font-size: .72rem; }
.submission-method { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: var(--hp-space-2); padding: var(--hp-space-4); border-radius: var(--hp-radius-md); background: var(--hp-surface-muted); }
.submission-method > strong { grid-column: 1 / -1; }
.submission-method small { color: var(--hp-text-muted); }
.hp-commercial-grid { grid-template-columns: 1fr 1fr; }
.hp-clean-list { margin: var(--hp-space-3) 0 0; padding-left: 1.15rem; }
.hp-clean-list li { margin: .35rem 0; }
.hp-score-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--hp-space-2); }
.hp-score-grid .indicador { display: grid; padding: var(--hp-space-3); border-radius: var(--hp-radius-md); background: var(--hp-surface-muted); }
.hp-score-grid .indicador small { color: var(--hp-text-muted); }
.hp-research-list { display: grid; gap: var(--hp-space-3); }
.research-inline-card { margin: 0; padding: var(--hp-space-4); border: 1px solid var(--hp-border); border-radius: var(--hp-radius-md); }
.research-inline-card > div:first-child { display: flex; align-items: center; flex-wrap: wrap; gap: var(--hp-space-2); }
.research-inline-card h3 { margin: var(--hp-space-3) 0 .2rem; }
.inline-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--hp-space-3); margin-top: var(--hp-space-3); }
.inline-actions form, .inline-actions button { width: auto; margin: 0; }
.hp-inline-research { display: grid; grid-template-columns: minmax(12rem, 1fr) minmax(14rem, 1.4fr) auto; gap: var(--hp-space-3); align-items: end; margin: var(--hp-space-4) 0 0; padding-top: var(--hp-space-4); border-top: 1px solid var(--hp-border); }
.hp-inline-research :where(label, select, textarea, button) { margin: 0; }
.hp-source-summary { display: flex; align-items: center; justify-content: space-between; gap: var(--hp-space-4); padding: var(--hp-space-4); border-radius: var(--hp-radius-md); background: var(--hp-surface-muted); }
.hp-source-summary > div:first-child { display: grid; gap: .15rem; }
.hp-source-summary span { color: var(--hp-text-muted); font-size: .68rem; }
.hp-evidence-list { display: grid; gap: 0; margin: var(--hp-space-4) 0 0; padding: 0; border: 1px solid var(--hp-border); border-radius: var(--hp-radius-md); list-style: none; overflow: hidden; }
.hp-evidence-list li { display: flex; align-items: center; justify-content: space-between; gap: var(--hp-space-4); padding: var(--hp-space-3) var(--hp-space-4); border-bottom: 1px solid var(--hp-border); }
.hp-evidence-list li:last-child { border-bottom: 0; }
.hp-evidence-list p { margin: .18rem 0 0; color: var(--hp-text-muted); font-size: .76rem; }
.hp-evidence-list .hp-document-list { width: 100%; margin-top: var(--hp-space-3); }
.hp-document-list { display: grid; gap: var(--hp-space-2); margin: 0; }
.hp-document-card { padding: var(--hp-space-3) var(--hp-space-4); border: 1px solid var(--hp-border); border-radius: var(--hp-radius-md); background: var(--hp-surface); }
.hp-document-card .hp-document-meta { display: flex; align-items: center; flex-wrap: wrap; gap: var(--hp-space-2); margin-bottom: var(--hp-space-1); color: var(--hp-text-muted); font-size: .68rem; }
.hp-document-card .hp-document-type { font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.hp-document-card .hp-document-format { text-transform: uppercase; }
.hp-document-card time { font-variant-numeric: tabular-nums; }
.hp-document-title { margin: 0; font-size: .9rem; line-height: 1.35; }
.hp-document-title .sin-dato { font-style: normal; }
.hp-technical-disclosure { margin: var(--hp-space-4) 0; padding: var(--hp-space-4); border: 1px solid var(--hp-border); border-radius: var(--hp-radius-lg); background: var(--hp-surface); }
.hp-technical-disclosure > summary { cursor: pointer; font-weight: 700; }
.hp-technical-content { display: grid; gap: var(--hp-space-4); margin-top: var(--hp-space-4); }
.hp-technical-content > section { margin: 0; padding: var(--hp-space-4) 0 0; border: 0; border-top: 1px solid var(--hp-border); }
.hp-technical-content h2 { font-size: 1rem; }

/* Cuentas y Cuenta 360. */
.account-summary { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--hp-space-2); }
.account-summary div { min-width: 7rem; padding: var(--hp-space-3); border: 1px solid var(--hp-border); border-radius: var(--hp-radius-md); background: var(--hp-surface); }
.account-summary strong { font-size: 1.1rem; }
.account-summary span { color: var(--hp-text-muted); }
.hp-account-toolbar { grid-template-columns: minmax(18rem, 1fr) auto auto; padding: var(--hp-space-3); border: 1px solid var(--hp-border); border-radius: var(--hp-radius-lg); background: var(--hp-surface); }
.hp-account-toolbar :where(form, label, input, [role="button"]) { margin: 0; }
/* Identidad de quien esta usando Hunter (TASK-112). */
.hp-identidad { display: flex; align-items: center; gap: var(--hp-space-2); padding: var(--hp-space-2); border-radius: var(--hp-radius-md); text-decoration: none; }
.hp-identidad-avatar { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; flex: 0 0 auto; border-radius: 50%; background: var(--hp-surface-strong, #e2e8f0); font-weight: 700; font-size: .8rem; }
.hp-identidad-datos { display: grid; min-width: 0; line-height: 1.2; }
.hp-identidad-datos strong { font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-identidad-datos small { color: var(--hp-text-muted); font-size: .7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Gestor de usuarios (TASK-111). */
.hp-alta-ok { border-left: .3rem solid #16a34a; }
.hp-alta-ok code { font-size: 1.05rem; }
.hp-form-usuario { margin-bottom: var(--hp-space-4); }
.hp-form-usuario button { width: auto; }
.hp-alta-usuario { margin: var(--hp-space-4) 0; padding: var(--hp-space-3); border: 1px solid var(--hp-border); border-radius: var(--hp-radius-lg); background: var(--hp-surface); }
.hp-alta-usuario > summary { cursor: pointer; font-weight: 700; }
.hp-acciones-estado { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: var(--hp-space-4); }
.hp-acciones-estado > article { margin: 0; }
.hp-acciones-estado h3 { margin-top: 0; }
.hp-acciones-estado button { width: auto; }
.hp-zona-peligro { border-left: .3rem solid #dc2626; }
.hp-boton-peligro { background: #dc2626; border-color: #dc2626; color: #fff; }

/* Indice de la ficha de cuenta: para no tener que scrollear a ciegas. */
.hp-account-index { display: flex; flex-wrap: wrap; align-items: center; gap: var(--hp-space-3); margin: var(--hp-space-4) 0; padding: var(--hp-space-3); border: 1px solid var(--hp-border); border-radius: var(--hp-radius-lg); background: var(--hp-surface); font-size: .85rem; }
.hp-account-index > span { color: var(--hp-text-muted); font-weight: 700; text-transform: uppercase; font-size: .7rem; letter-spacing: .04em; }
.hp-como-validar { margin: var(--hp-space-3) 0; }
.hp-como-validar > summary { cursor: pointer; font-weight: 700; }
.hp-como-validar ol { margin: var(--hp-space-2) 0 0 1.1rem; }
.hp-search-form { display: flex; gap: var(--hp-space-2); align-items: stretch; }
.hp-search-form .hp-search-field { flex: 1 1 auto; }
.hp-search-form button { width: auto; flex: 0 0 auto; white-space: nowrap; }
.hp-account-table-shell { border: 1px solid var(--hp-border); border-radius: var(--hp-radius-lg); background: var(--hp-surface); overflow-x: auto; }
.hp-account-table td:nth-child(4) { min-width: 15rem; }
.hp-account-table .account-card { margin: 0; padding: 0; border: 0; border-radius: 0; }
/* TASK-244: toda la fila lleva a la ficha de la empresa. */
.hp-account-table .hp-fila-empresa { position: relative; cursor: pointer; }
.hp-account-table .hp-fila-empresa:hover { background: var(--hp-surface-muted); }
.hp-account-table .hp-fila-link::after { content: ""; position: absolute; inset: 0; }
.hp-account-table .hp-fila-empresa .badge { margin-left: 0.35rem; vertical-align: middle; }
.hp-account-table td small { display: block; color: var(--hp-text-muted); }
.hp-badge-sancion { border-color: var(--hp-danger-border); background: var(--hp-danger-soft); color: var(--hp-danger-text); }
.account-hero { margin: 0 0 var(--hp-space-4); }
.account-hero h1 { font-size: clamp(1.8rem, 3vw, 2.35rem); }
.hp-account-kpis { display: flex; gap: var(--hp-space-4); margin: var(--hp-space-4) 0; padding: var(--hp-space-3) 0; border-top: 1px solid var(--hp-border); border-bottom: 1px solid var(--hp-border); }
.hp-account-kpis > div { display: grid; min-width: 0; padding: 0 var(--hp-space-5) 0 0; border: 0; border-right: 1px solid var(--hp-border); border-radius: 0; }
.hp-account-kpis > div:last-child { border-right: 0; }
.hp-account-kpis strong { font-size: 1.15rem; }
.hp-account-kpis span { color: var(--hp-text-muted); font-size: .68rem; }
.hp-account-next-move { margin: var(--hp-space-5) 0; padding: var(--hp-space-5); border: 2px solid var(--hp-primary); border-left-width: 2px; border-radius: var(--hp-radius-lg); background: var(--hp-primary-wash); }
.hp-account-next-move h2 { font-size: 1.35rem; }
.hp-next-move-actions { display: flex; align-items: center; gap: var(--hp-space-2); }
.hp-account-360-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--hp-space-4); margin: var(--hp-space-5) 0; }
.hp-account-column { margin: 0; padding: var(--hp-space-5); border: 1px solid var(--hp-border); border-radius: var(--hp-radius-lg); background: var(--hp-surface); }
.hp-account-column header { margin-bottom: var(--hp-space-4); padding-bottom: var(--hp-space-3); border-bottom: 1px solid var(--hp-border); }
.hp-account-column h2 { margin: .2rem 0 0; font-size: 1.12rem; }
.hp-account-column h3 { margin: var(--hp-space-4) 0 var(--hp-space-2); font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; }
.hp-account-column-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: var(--hp-space-2); margin: 0; }
.hp-account-column-metrics > div { padding: var(--hp-space-3); border-radius: var(--hp-radius-md); background: var(--hp-surface-muted); }
.hp-account-column-metrics dt, .hp-intelligence-facts dt { color: var(--hp-text-muted); font-size: .66rem; }
.hp-account-column-metrics dd { margin: .15rem 0 0; font-size: 1.15rem; font-weight: 700; }
.hp-no-route { padding: var(--hp-space-4); border: 1px solid var(--hp-warning-border); border-radius: var(--hp-radius-md); background: var(--hp-warning-soft); }
.hp-no-route > strong { color: var(--hp-warning-text); font-size: 1rem; }
.hp-no-route > p { margin: .25rem 0 var(--hp-space-3); color: var(--hp-warning-text); }
.hp-no-route dl { display: grid; gap: var(--hp-space-2); margin: 0; }
.hp-no-route dl > div { display: flex; justify-content: space-between; gap: var(--hp-space-3); padding-top: var(--hp-space-2); border-top: 1px solid var(--hp-warning-border); }
.hp-no-route dt { font-weight: 650; }
.hp-no-route dd { margin: 0; color: var(--hp-warning-text); }
.hp-inline-actions { display: flex; flex-wrap: wrap; gap: var(--hp-space-3); margin: var(--hp-space-3) 0; font-size: .76rem; }
.hp-access-column .access-route { display: grid; justify-items: start; gap: var(--hp-space-1); padding: var(--hp-space-3); border-radius: var(--hp-radius-md); background: var(--hp-surface-muted); }
.hp-intelligence-facts { display: grid; gap: 0; margin: 0; }
.hp-intelligence-facts > div { padding: var(--hp-space-3) 0; border-bottom: 1px solid var(--hp-border); }
.hp-intelligence-facts dd { margin: .18rem 0 0; font-weight: 620; }

/* Hunter como superficie de delegación. */
.hp-hunter-capabilities { margin: var(--hp-space-5) 0; }
.hp-capability-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--hp-space-3); }
.hp-capability-grid a { display: grid; align-content: start; gap: .25rem; min-height: 6.2rem; padding: var(--hp-space-4); border: 1px solid var(--hp-border); border-radius: var(--hp-radius-md); background: var(--hp-surface); color: var(--hp-text); text-decoration: none; }
.hp-capability-grid a:hover { border-color: var(--hp-primary); background: var(--hp-primary-soft); }
.hp-capability-grid strong { font-size: .83rem; }
.hp-capability-grid span { color: var(--hp-text-muted); font-size: .72rem; }
.research-overview, .hunter-priorities, .hunter-question { margin-top: var(--hp-space-8); }
.hunter-question { max-width: none; padding: var(--hp-space-5); border: 1px solid var(--hp-border); border-radius: var(--hp-radius-lg); background: var(--hp-surface); }

/* Resultado de Research: resumen primero, evidencia bajo demanda. */
.mission-status-heading { display: flex; justify-content: space-between; gap: var(--hp-space-4); margin-bottom: var(--hp-space-2); }
.research-summary { margin: var(--hp-space-5) 0; padding: var(--hp-space-6); border: 1px solid var(--hp-border); border-radius: var(--hp-radius-lg); background: var(--hp-surface); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--hp-space-4); }
.section-heading :where(h2, p) { margin-top: 0; }
.confidence-chip { padding: .35rem .6rem; border-radius: 999px; background: var(--hp-primary-soft); color: var(--hp-primary); font-size: .7rem; font-weight: 700; }
.research-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--hp-space-3); margin: var(--hp-space-5) 0; }
.research-counts article { display: grid; gap: .1rem; margin: 0; padding: var(--hp-space-4); border: 1px solid var(--hp-border); border-radius: var(--hp-radius-md); box-shadow: none; }
.research-counts strong { font-size: 1.55rem; }
.research-counts span { font-weight: 700; }
.research-counts small { color: var(--hp-text-muted); }
.research-key-findings { margin: var(--hp-space-6) 0; }
.research-key-findings ol { display: grid; gap: 0; margin: 0; padding: 0; border-top: 1px solid var(--hp-border); list-style: none; }
.research-key-findings li { display: grid; grid-template-columns: 6rem 1fr; gap: var(--hp-space-3); align-items: start; padding: var(--hp-space-3) 0; border-bottom: 1px solid var(--hp-border); }
.research-key-findings p { margin: 0; }
.intelligence-report { margin: var(--hp-space-5) 0; padding: var(--hp-space-5); border-left: .2rem solid var(--hp-primary); background: var(--hp-surface-muted); box-shadow: none; }
.recommended-move { display: grid; gap: var(--hp-space-2); margin: var(--hp-space-6) 0 0; padding: var(--hp-space-5); border: 2px solid var(--hp-primary); border-radius: var(--hp-radius-lg); background: var(--hp-primary-wash); box-shadow: none; }
.recommended-move > span { color: var(--hp-primary); font-size: .67rem; font-weight: 750; letter-spacing: .06em; }
.recommended-move > strong { font-size: 1.15rem; }
.research-evidence { margin: var(--hp-space-5) 0; border: 1px solid var(--hp-border); border-radius: var(--hp-radius-lg); background: var(--hp-surface); }
.research-evidence > summary { display: flex; justify-content: space-between; gap: var(--hp-space-4); padding: var(--hp-space-5); cursor: pointer; font-weight: 700; }
.research-evidence > summary span { color: var(--hp-text-muted); font-size: .7rem; font-weight: 500; }
.research-evidence-body { display: grid; gap: var(--hp-space-5); padding: 0 var(--hp-space-5) var(--hp-space-5); border-top: 1px solid var(--hp-border); }
.research-evidence-body > section { margin: 0; padding: var(--hp-space-5) 0 0; border: 0; }

/* Acceso: ruta útil o estado vacío explícito. */
.access-gap-checklist { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--hp-space-3); margin: var(--hp-space-5) 0; padding: 0; list-style: none; }
.access-gap-checklist li { display: grid; gap: .25rem; padding: var(--hp-space-4); border: 1px solid var(--hp-border); border-radius: var(--hp-radius-md); background: var(--hp-surface); }
.access-gap-checklist span { color: var(--hp-text-muted); font-size: .72rem; }
.access-empty-actions { display: flex; flex-wrap: wrap; gap: var(--hp-space-3); margin-top: var(--hp-space-4); }
.access-empty-actions :where(form, button, [role="button"]) { width: auto; margin: 0; }

/* Personas y fuentes como registros operativos compactos. */
.hp-search-bar { display: grid; grid-template-columns: 1fr auto; gap: var(--hp-space-2); margin: var(--hp-space-4) 0; padding: var(--hp-space-3); border: 1px solid var(--hp-border); border-radius: var(--hp-radius-lg); background: var(--hp-surface); }
.hp-search-bar :where(input, button) { width: auto; margin: 0; }
.hp-list-actions { display: flex; flex-wrap: wrap; gap: var(--hp-space-2); }
.hp-person-table-shell, .hp-source-table-shell { border: 1px solid var(--hp-border); border-radius: var(--hp-radius-lg); background: var(--hp-surface); overflow-x: auto; }
.hp-person-table, .hp-source-table { margin: 0; font-size: .76rem; }
.hp-person-table th, .hp-source-table th { color: var(--hp-text-muted); font-size: .64rem; letter-spacing: .04em; text-transform: uppercase; }
.hp-person-table td, .hp-source-table td { height: var(--hp-row-height); vertical-align: middle; }
.hp-primary-cell { color: var(--hp-text); font-weight: 700; }
.hp-source-toolbar { display: flex; align-items: end; justify-content: space-between; gap: var(--hp-space-4); margin: var(--hp-space-4) 0; }
.hp-source-toolbar form { display: flex; align-items: end; gap: var(--hp-space-2); margin: 0; }
.hp-source-toolbar :where(label, select, [role="button"]) { width: auto; margin: 0; }
.hp-source-family { margin: var(--hp-space-6) 0; padding: 0; border: 0; background: transparent; }
.hp-source-family > header { display: flex; align-items: baseline; justify-content: space-between; gap: var(--hp-space-3); margin-bottom: var(--hp-space-3); }
.hp-source-family > header h2 { margin: 0; font-size: 1rem; }
.hp-source-family > header span { color: var(--hp-text-muted); font-size: .7rem; }

/* Formularios de Personas: densidad operativa y datos secundarios bajo demanda. */
.hp-form-workspace { padding-block: var(--hp-space-4); }
.hp-person-form-shell, .hp-form-shell { width: min(100%, 44rem); margin: 0 auto; }
.hp-form-hero { margin: 0 0 var(--hp-space-4); }
.hp-form-hero nav { margin-bottom: var(--hp-space-3); }
.hp-form-hero .eyebrow { margin: 0 0 var(--hp-space-1); }
.hp-form-hero h1 { margin: 0; font-size: 1.4rem; }
.hp-form-hero > p:last-child { max-width: 42rem; margin: var(--hp-space-1) 0 0; color: var(--hp-text-muted); font-size: .8rem; }
.hp-person-form { display: grid; gap: var(--hp-space-2); margin: 0; }
.hp-form-card {
  margin: 0;
  padding: var(--hp-space-3) var(--hp-space-4);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-lg);
  background: var(--hp-surface);
  box-shadow: var(--hp-shadow-sm);
}
.hp-form-card > header { display: flex; align-items: center; justify-content: space-between; gap: var(--hp-space-3); margin: 0 0 var(--hp-space-2); padding: 0 0 var(--hp-space-2); border-bottom: 1px solid var(--hp-border); }
.hp-form-card > header > div { display: flex; align-items: center; gap: var(--hp-space-2); }
.hp-form-card > header > div > span { display: grid; place-items: center; width: 1.2rem; height: 1.2rem; border-radius: 999px; background: var(--hp-primary-soft); color: var(--hp-primary); font-size: .6rem; font-weight: 750; }
.hp-form-card h2 { margin: 0; font-size: .88rem; }
.hp-form-card > header p { margin: 0; color: var(--hp-text-muted); font-size: .68rem; }
.hp-form-grid { display: grid; gap: var(--hp-space-2); align-items: start; }
.hp-form-grid + .hp-form-grid { margin-top: var(--hp-space-2); }
.hp-form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hp-form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hp-person-form label, .hp-form-disclosure label { display: grid; gap: .15rem; margin: 0; color: var(--hp-text); font-size: .72rem; font-weight: 650; }
.hp-person-form :where(input, select, textarea), .hp-form-disclosure :where(input, select, textarea) { width: 100%; margin: 0; border-color: var(--hp-border-strong); background: var(--hp-surface); font-size: .8rem; }
.hp-person-form :where(input, select) { min-height: 2rem; padding: .25rem .5rem; }
.hp-person-form textarea { min-height: 3.5rem; resize: vertical; }
.hp-person-form label small, .hp-form-disclosure label small { margin-top: 0; color: var(--hp-text-muted); font-size: .65rem; font-weight: 450; }
.hp-form-disclosure { margin: 0; border: 1px solid var(--hp-border); border-radius: var(--hp-radius-lg); background: var(--hp-surface); overflow: hidden; }
.hp-form-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--hp-space-4); padding: var(--hp-space-3) var(--hp-space-4); list-style-position: inside; cursor: pointer; }
.hp-form-disclosure > summary > span:first-child { display: inline-grid; gap: .1rem; margin-left: var(--hp-space-1); }
.hp-form-disclosure > summary strong { font-size: .8rem; }
.hp-form-disclosure > summary small { color: var(--hp-text-muted); font-size: .67rem; font-weight: 450; }
.hp-form-disclosure > summary > span:last-child { padding: .18rem .4rem; border-radius: 999px; background: var(--hp-surface-muted); color: var(--hp-text-muted); font-size: .6rem; font-weight: 650; }
.hp-form-disclosure[open] > summary { border-bottom: 1px solid var(--hp-border); background: var(--hp-primary-wash); }
.hp-form-disclosure-body { display: grid; gap: var(--hp-space-2); padding: var(--hp-space-4); }
.hp-form-actions { position: sticky; z-index: 5; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: var(--hp-space-4); margin-top: var(--hp-space-1); padding: var(--hp-space-2) var(--hp-space-3); border: 1px solid var(--hp-border); border-radius: var(--hp-radius-lg); background: var(--hp-surface-translucent); box-shadow: var(--hp-shadow-overlay); backdrop-filter: blur(10px); }
.hp-form-actions > div { display: flex; align-items: center; gap: var(--hp-space-2); }
.hp-form-actions :where(button, [role="button"]) { width: auto; margin: 0; padding: .45rem .85rem; }
.hp-danger-link { color: var(--hp-danger-text); font-size: .75rem; font-weight: 700; text-decoration: none; }
.hp-danger-link:hover { color: var(--hp-danger); text-decoration: underline; }
.hp-danger-zone { margin: var(--hp-space-6) 0 0; border: 1px solid var(--hp-danger-border); border-radius: var(--hp-radius-lg); background: var(--hp-danger-soft); }
.hp-danger-zone > summary { padding: var(--hp-space-4) var(--hp-space-5); cursor: pointer; color: var(--hp-danger-text); font-weight: 700; }
.hp-danger-zone > div { padding: 0 var(--hp-space-5) var(--hp-space-5); border-top: 1px solid var(--hp-danger-border); }
.hp-danger-zone h2 { margin: var(--hp-space-4) 0 var(--hp-space-2); color: var(--hp-danger-text); font-size: 1rem; }
.hp-danger-zone p { max-width: 48rem; color: var(--hp-danger-text); }
.hp-danger-zone form, .hp-danger-button { width: auto; margin: 0; }
.hp-danger-button { border-color: var(--hp-danger); background: var(--hp-danger); color: #fff; }
.hp-danger-button:hover { border-color: var(--hp-danger-text); background: var(--hp-danger-text); }
.hp-info-notice, .hp-success-notice { margin: 0 0 var(--hp-space-4); padding: var(--hp-space-3) var(--hp-space-4); border: 1px solid var(--hp-primary-border); border-radius: var(--hp-radius-md); background: var(--hp-primary-soft); color: var(--hp-text); box-shadow: none; }
.hp-success-notice { border-color: var(--hp-success-border); background: var(--hp-success-soft); color: var(--hp-success); }

/* Agregado global: primero se elige el tipo. */
.quick-add-popover details[name="quick-add-type"] { margin: var(--hp-space-2) 0; border: 1px solid var(--hp-border); border-radius: var(--hp-radius-md); background: var(--hp-surface); }
.quick-add-popover details[name="quick-add-type"] > summary { padding: var(--hp-space-3); cursor: pointer; font-weight: 700; }
.quick-add-popover details[name="quick-add-type"][open] > summary { border-bottom: 1px solid var(--hp-border); background: var(--hp-primary-soft); color: var(--hp-primary); }
.quick-add-popover details[name="quick-add-type"] > form { padding: var(--hp-space-4); }

@media (prefers-reduced-motion: no-preference) {
  .hp-primary-nav a,
  .hp-hunter-cta,
  .hp-app button,
  .hp-app [role="button"] { transition: background-color .16s ease, border-color .16s ease, color .16s ease; }
}

/* Login público alineado con la marca y el sistema visual de TASK-042. */
body.hp-login {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 15% 12%, var(--hp-primary-soft), transparent 30rem),
    var(--hp-bg);
  color: var(--hp-text);
}

.hp-login-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: var(--hp-space-6);
}

.hp-login-card {
  width: min(100%, 27rem);
  margin: 0;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-lg);
  background: var(--hp-surface);
  box-shadow: var(--hp-shadow-overlay);
}

.hp-login-brand {
  display: flex;
  align-items: center;
  gap: var(--hp-space-3);
  margin-bottom: var(--hp-space-8);
  padding: 0;
  border: 0;
  background: transparent;
}

.hp-login-brand > span:last-child { display: grid; line-height: 1.05; }
.hp-login-brand strong { color: var(--hp-text); font-size: 1.2rem; letter-spacing: -.025em; }
.hp-login-brand small { margin-top: .22rem; color: var(--hp-text-muted); font-size: .64rem; }
.hp-login-heading { margin-bottom: var(--hp-space-5); }
.hp-login-heading h1 { margin: .25rem 0 var(--hp-space-2); color: var(--hp-text); font-size: 1.65rem; }
.hp-login-heading p:last-child { margin: 0; color: var(--hp-text-muted); font-size: .85rem; }
.hp-login-card form { margin: 0; }
.hp-login-card label { color: var(--hp-text); font-size: .82rem; font-weight: 650; }
.hp-login-card input { margin-top: var(--hp-space-2); background: var(--hp-surface); }
.hp-login-card button { width: 100%; margin: var(--hp-space-2) 0 0; }
.hp-login-error {
  padding: var(--hp-space-3);
  border: 1px solid var(--hp-danger-border);
  border-radius: var(--hp-radius-md);
  background: var(--hp-danger-soft);
  color: var(--hp-danger-text);
}

.hp-badge-sector {
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.35rem;
  border-radius: var(--hp-radius-sm, 4px);
  background: var(--hp-primary-soft, rgba(99, 102, 241, 0.12));
  color: var(--hp-primary, #4f46e5);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.1;
}

/* ═══════════════════════════════════════════════════════════════════
   OPORTUNIDADES — topbar compacto, filtros 1 línea, drawer inspector
   ═══════════════════════════════════════════════════════════════════ */

/* Topbar ultra compacto */
.hp-opp-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .45rem;
}
.hp-opp-topbar h1 {
  font-size: 1.3rem !important;
  margin: 0 !important;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.hp-opp-topbar .eyebrow {
  margin: 0 0 .05rem;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--hp-text-muted);
}

/* Filtros: fila única, compacta */
.hp-opp-filters {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: .35rem !important;
  margin: 0 0 .5rem !important;
  padding: .35rem .5rem !important;
  background: var(--hp-surface);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-md);
  overflow-x: auto;
}
.hp-opp-filters :where(input[type=search], select) {
  height: 2rem !important;
  min-height: 2rem !important;
  max-height: 2rem !important;
  padding: 0 .5rem !important;
  margin: 0 !important;
  font-size: .76rem !important;
  border-radius: var(--hp-radius-sm) !important;
  background: var(--hp-bg) !important;
  border: 1px solid var(--hp-border) !important;
  flex-shrink: 0;
}
.hp-opp-filters input[type=search] { flex: 0 0 200px; }
.hp-opp-filters select { flex: 0 0 auto; min-width: 90px; max-width: 130px; }
.hp-opp-filters button,
.hp-opp-filters a[role=button] {
  width: auto !important;
  flex-shrink: 0 !important;
  height: 2rem !important;
  min-height: 2rem !important;
  padding: 0 .7rem !important;
  margin: 0 !important;
  font-size: .76rem !important;
  line-height: 2rem !important;
  display: inline-flex !important;
  align-items: center !important;
  border-radius: var(--hp-radius-sm) !important;
  white-space: nowrap !important;
}


.home-hero.hp-home-hero-compact { padding: 0.5rem 1rem !important; min-height: 0 !important; border-bottom: 1px solid var(--hp-border); background: var(--hp-surface); }


/* TASK-124: ordenar y filtrar las tablas de la ficha de cuenta.
   Aditardo: "no se puede ordenar por entidad ni por lo que sea". */
.hp-table-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--hp-space-3);
  margin-bottom: var(--hp-space-2);
}
.hp-table-tools input[type="search"] { margin: 0; min-width: 18rem; max-width: 100%; }
.hp-table-tools .hp-row-meta { margin: 0; }

.hp-th-ordenable { cursor: pointer; user-select: none; white-space: nowrap; }
.hp-th-ordenable:hover { color: var(--hp-primary); }
.hp-th-ordenable::after { content: " ⇅"; opacity: .35; font-size: .85em; }
.hp-th-ordenable[data-orden="asc"]::after { content: " ↑"; opacity: 1; }
.hp-th-ordenable[data-orden="desc"]::after { content: " ↓"; opacity: 1; }

.hp-account-index-sub { font-size: .9em; opacity: .8; }
.hp-account-index-sub a { margin: 0 .15rem; }

/* Columna "#": numera lo que se está viendo, se renumera al ordenar o
   filtrar. Angosta y apagada -- es una referencia para hablar de una
   fila ("la 7"), no un dato del negocio. */
.hp-data-table td[data-numero-fila] {
  width: 2.5rem;
  text-align: right;
  color: var(--hp-text-muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.7rem;
}
.hp-data-table th[data-no-ordenable] { width: 2.5rem; text-align: right; }

/* TASK-129: aviso arriba de /fuentes cuando hay candidatas esperando. */
.hp-callout {
  margin: 0 0 var(--hp-space-4);
  padding: var(--hp-space-3) var(--hp-space-4);
  border: 1px solid var(--hp-border);
  border-left: .25rem solid var(--hp-primary);
  border-radius: var(--hp-radius-md);
  background: var(--hp-primary-soft);
}
.hp-callout a { margin-left: var(--hp-space-2); font-weight: 600; }


/* TASK-206: tabla de llamados que encajan, legible de un vistazo. */
.veredicto-ayuda { margin: 0; }
.veredicto-ayuda > summary { cursor: pointer; list-style: none; }
.veredicto-ayuda > summary::-webkit-details-marker { display: none; }
.veredicto-ayuda[open] > p {
  margin: 0.35rem 0 0;
  padding: 0.5rem 0.6rem;
  font-size: 0.85rem;
  line-height: 1.35;
  border-left: 3px solid var(--pico-primary, #1d6fb8);
  background: var(--pico-card-background-color, rgba(0, 0, 0, 0.03));
  max-width: 18rem;
}
.hp-table th.col-derivar,
.hp-table td.col-derivar { width: 1%; white-space: nowrap; }

/* TASK-213: al lado de "Hunter" en el menú, mientras está trabajando. */
.hp-hunter-trabajando {
  margin-left: 0.4rem;
  padding: 1px 8px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--hp-success-border);
  background: var(--hp-success-soft);
  color: var(--hp-success);
  animation: hpLatido 2s ease-in-out infinite;
}
@keyframes hpLatido { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { .hp-hunter-trabajando { animation: none; } }

/* TASK-217: el aviso de cupo de Ollama (y los demás "warn", que no tenían estilo). */
.hp-callout-warn {
  border-left-color: var(--hp-warning-border);
  background: var(--hp-warning-soft);
  color: var(--hp-text);
}

/* TASK-226: las tablas de la ficha de cuenta, con nombre primero, fechas
   clave, entidad y monto; filtros por fecha y agrupado por entidad.
   Aditardo (2026-09-19): "todo ordenado y bien presentable". */
p.hp-row-meta { display: block; line-height: 1.45; }
.hp-table-tools .hp-filtro-texto input[type="search"] { margin: 0; min-width: 16rem; }
.hp-filtro-fecha { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--hp-space-2); font-size: 0.75rem; color: var(--hp-text-muted); }
.hp-filtro-fecha label, .hp-agrupar, .hp-filtro-campo { display: inline-flex; align-items: center; gap: 0.35rem; margin: 0; font-size: 0.75rem; color: var(--hp-text-muted); }
.hp-filtro-fecha input[type="date"] { margin: 0; width: auto; padding: 0.2rem 0.4rem; height: auto; font-size: 0.75rem; }
.hp-filtro-campo select { margin: 0; width: auto; padding: 0.2rem 1.6rem 0.2rem 0.4rem; height: auto; font-size: 0.75rem; }
.hp-agrupar input[type="checkbox"] { margin: 0; }
/* TASK-231: el interruptor heredaba el alto mínimo de los campos (2.2rem) y quedaba una mancha
   azul en vez de una píldora; en celular, además, se achicaba de ancho. */
.hp-agrupar input[type="checkbox"][role="switch"] { flex: 0 0 auto; width: 2.25em; height: 1.25em; min-height: 0; }
.hp-data-table tr.hp-grupo td {
  background: var(--hp-surface-muted);
  border-top: 2px solid var(--hp-border);
  font-size: 0.72rem;
  color: var(--hp-text-muted);
}
.hp-data-table tr.hp-grupo td strong { color: var(--hp-text); font-size: 0.78rem; }
.hp-tabla-llamados td { vertical-align: top; }
.hp-tabla-llamados .hp-llamado-nombre { display: block; color: var(--hp-text); font-weight: 700; font-size: 0.86rem; line-height: 1.3; }
.hp-tabla-llamados .hp-llamado-nombre:hover { color: var(--hp-primary); }
.hp-tabla-llamados .hp-llamado-ids { display: block; margin-top: 0.1rem; color: var(--hp-text-muted); font-size: 0.68rem; }
.hp-tabla-llamados .hp-llamado-links { display: block; margin-top: 0.2rem; font-size: 0.72rem; }
.hp-tabla-llamados .hp-fechas { display: grid; grid-template-columns: auto auto; gap: 0 0.35rem; margin: 0; font-size: 0.64rem; white-space: nowrap; }
.hp-tabla-llamados .hp-fechas dt { color: var(--hp-text-muted); font-weight: 500; }
.hp-tabla-llamados .hp-fechas dd { margin: 0; }
.hp-tabla-llamados .hp-fechas .es-presentacion { color: var(--hp-text); font-weight: 700; }
/* Revisión de TASK-226: la visita técnica obligatoria, que si se pierde descalifica. */
.hp-tabla-llamados .hp-fechas .es-visita { color: var(--hp-warning-text); font-weight: 600; }
.hp-tabla-llamados td.hp-col-monto { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; font-size: 0.74rem; }
.hp-tabla-llamados td { padding-left: 0.45rem; padding-right: 0.45rem; }
.hp-tabla-llamados td:first-child { min-width: 16rem; }
.hp-tabla-llamados td.hp-col-veredicto { min-width: 10rem; max-width: 16rem; }
.hp-tabla-llamados .hp-porque-corto {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-top: 0.2rem; color: var(--hp-text-muted); font-size: 0.68rem; line-height: 1.35;
}
.hp-tabla-llamados .veredicto-ayuda[open] > p, .hp-tabla-llamados .veredicto-ayuda[open] > ul { max-width: 22rem; font-size: 0.74rem; }
.hp-tabla-llamados .veredicto-ayuda[open] > ul { margin: 0.2rem 0 0.4rem; padding-left: 1.1rem; }
.hp-data-table th.col-derivar, .hp-data-table td.col-derivar { width: 1%; white-space: nowrap; }
/* Anchos fijos: la tabla entra en la página y el texto se acomoda adentro. */
/* Medido a 1035 px de contenido: el monto más largo ("PYG 12.400.000.000")
   pide 154 px y las cuatro fechas 207. Debajo de 980 px la tabla se desplaza
   de costado en vez de apretarse. */
.hp-tabla-llamados { table-layout: fixed; min-width: 980px; }
.hp-tabla-llamados th.hp-w-n { width: 3%; }
.hp-tabla-llamados th.hp-w-llamado { width: 24%; }
.hp-tabla-llamados th.hp-w-entidad { width: 11%; }
.hp-tabla-llamados th.hp-w-monto { width: 15%; }
.hp-tabla-llamados th.hp-w-fechas { width: 19%; }
.hp-tabla-llamados th.hp-w-veredicto { width: 17%; }
.hp-tabla-llamados th.hp-w-derivar { width: 10%; }
.hp-tabla-llamados th.hp-w-estado { width: 14%; }
.hp-tabla-llamados th.hp-w-accion { width: 13%; }
.hp-tabla-llamados td { overflow-wrap: break-word; }
.hp-tabla-llamados td.hp-col-monto { white-space: nowrap; }
.hp-tabla-llamados .hp-fechas dt, .hp-tabla-llamados .hp-fechas dd { white-space: nowrap; overflow-wrap: normal; }
.hp-tabla-llamados td.col-derivar { white-space: normal; }


/* TASK-227: nivel de postulación (Alto / Medio / Bajo / Difícil) y el panel
   que lo justifica. Aditardo (2026-09-19): "abrir y justificar... al ver
   quiero saber por qué le decís que es alto, medio, bajo o difícil". */
.hp-nivel {
  display: inline-block;
  padding: 0.05rem 0.55rem;
  border: 1px solid;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}
.hp-nivel-alto { color: var(--hp-success); background: var(--hp-success-soft); border-color: var(--hp-success-border); }
.hp-nivel-medio { color: var(--hp-warning-text); background: var(--hp-warning-soft); border-color: var(--hp-warning-border); }
.hp-nivel-bajo { color: var(--hp-text-muted); background: var(--hp-surface-muted); border-color: var(--hp-border-strong); }
/* TASK-316: en qué quedó un llamado que no pasó por el análisis (misma insignia que Alto/Medio/Bajo). */
.hp-nivel-sin_analizar { color: var(--hp-text-muted); background: transparent; border-color: var(--hp-border-strong); border-style: dashed; }
.hp-nivel-no_encaja { color: var(--hp-text-muted); background: var(--hp-surface-muted); border-color: var(--hp-border-strong); }
.hp-nivel-no_interesa { color: var(--hp-danger-text); background: var(--hp-danger-soft); border-color: var(--hp-danger-border); }
.hp-nivel-dificil { color: var(--hp-danger-text); background: var(--hp-danger-soft); border-color: var(--hp-danger-border); }
.hp-nivel-fuera { color: var(--hp-text-muted); background: transparent; border-color: var(--hp-border); }
.hp-nivel-boton {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.25rem;
  width: auto; margin: 0; padding: 0; border: 0; background: none; box-shadow: none;
  color: var(--hp-text); text-align: left; cursor: pointer; font-size: inherit;
}
.hp-nivel-boton:hover .hp-nivel, .hp-nivel-boton:focus-visible .hp-nivel { box-shadow: 0 0 0 2px var(--hp-focus-ring); }
.hp-nivel-significa { font-size: 0.66rem; font-weight: 500; color: var(--hp-text-muted); line-height: 1.3; }
.hp-nivel-panel {
  width: min(42rem, calc(100vw - 2rem));
  max-height: min(82vh, 46rem);
  overflow: auto;
  padding: 1rem 1.2rem;
  border: 1px solid var(--hp-border-strong);
  border-radius: var(--hp-radius-lg);
  background: var(--hp-surface);
  color: var(--hp-text);
  box-shadow: var(--hp-shadow-overlay);
  font-size: 0.8rem;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
}
.hp-nivel-panel::backdrop { background: rgba(27, 28, 29, .28); }
.hp-nivel-panel p { margin: 0 0 0.5rem; }
.hp-nivel-panel-cabeza { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 0.7rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--hp-border); }
.hp-nivel-panel-cabeza button { width: auto; margin: 0; padding: 0.2rem 0.7rem; font-size: 0.75rem; }
.hp-faltas { margin: 0.1rem 0 0.6rem; padding-left: 1.1rem; }
.hp-faltas li { margin-bottom: 0.3rem; }
.hp-tipo-falta {
  display: inline-block; margin-right: 0.3rem; padding: 0 0.4rem;
  border-radius: var(--hp-radius-sm);
  background: var(--hp-warning-soft); color: var(--hp-warning-text);
  font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em;
}
.hp-faltas-papeles li { color: var(--hp-text-muted); }
.hp-nota-falta { display: block; color: var(--hp-success); font-style: normal; font-size: 0.72rem; }
.hp-nivel-regla { margin-top: 0.6rem; padding-top: 0.5rem; border-top: 1px solid var(--hp-border); color: var(--hp-text-muted); font-size: 0.7rem; }
.hp-confirmar-requisito { display: inline; margin: 0; }
.hp-confirmar-requisito button { display: inline-block; width: auto; margin: 0.2rem 0 0 0.2rem; padding: 0.05rem 0.5rem; font-size: 0.68rem; }
.hp-requisitos-empresa .hp-requisito-cumplido { white-space: nowrap; }
.hp-requisitos-empresa .hp-confirmar-requisito button { margin-top: 0; }

/* TASK-228: derivar, con lo que pasa antes de apretar. */
.hp-derivar-panel form { margin: 0; }
.hp-derivar-campos { display: grid; gap: 0.4rem; margin-bottom: 0.6rem; }
.hp-derivar-campos label { margin: 0; font-size: 0.78rem; }
.hp-derivar-campos select, .hp-derivar-campos input { margin: 0.15rem 0 0; }
.hp-derivar-panel button[type="submit"] { width: auto; margin: 0.4rem 0 0; }
.hp-que-pasa { margin: 0.2rem 0 0.4rem; padding-left: 1.2rem; font-size: 0.78rem; line-height: 1.45; }
.hp-que-pasa li { margin-bottom: 0.25rem; }
.hp-que-pasa-detalle { margin: 0.5rem 0; }
.hp-que-pasa-detalle > summary { cursor: pointer; font-size: 0.85rem; }
button.derivar-compacto { width: auto; margin: 0; padding: 0.2rem 0.55rem; font-size: 0.75rem; white-space: nowrap; }

/* TASK-229: Alertas, una fila por llamado con lo que hace falta para decidir. */
.hp-tabla-alertas th.hp-w-llamado { width: 30%; }
.hp-tabla-alertas th.hp-w-entidad { width: 13%; }
.hp-tabla-alertas th.hp-w-monto { width: 13%; }
.hp-tabla-alertas th.hp-w-cierre { width: 10%; }
.hp-tabla-alertas th.hp-w-para { width: 17%; }
.hp-tabla-alertas th.hp-w-accion { width: 17%; }
.hp-tipo-alerta {
  display: inline-block; margin-right: 0.15rem; padding: 0 0.35rem;
  border: 1px solid var(--hp-primary-border); border-radius: var(--hp-radius-sm);
  background: var(--hp-primary-soft); color: var(--hp-primary);
  font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em;
}
.hp-alerta-cotizaron { display: block; margin-top: 0.25rem; color: var(--hp-text-muted); font-size: 0.68rem; line-height: 1.35; }
/* TASK-235: aviso de detecciones (checklist OCDE) sin ver, en la fila de Alertas. */
.hp-alerta-deteccion { display: block; margin-top: 0.2rem; font-size: 0.68rem; }
.hp-alerta-deteccion a { color: var(--hp-danger-text); }
.hp-alerta-dias { display: block; font-size: 0.68rem; color: var(--hp-text-muted); }
.hp-alerta-dias.hp-urgencia-hoy { color: var(--hp-danger-text); font-weight: 700; }
.hp-alerta-dias.hp-urgencia-semana { color: var(--hp-warning-text); font-weight: 600; }
.hp-alerta-para { margin: 0; padding: 0; list-style: none; font-size: 0.74rem; }
.hp-alerta-para li { margin: 0 0 0.2rem; list-style: none; }
.hp-alerta-acciones { white-space: normal; }
.hp-alerta-acciones .alerta-accion { display: inline; margin: 0; }
.hp-alerta-acciones button { width: auto; margin: 0 0.15rem 0.2rem 0; padding: 0.1rem 0.45rem; font-size: 0.68rem; }
.hp-salud-sistema { margin-top: 1.5rem; padding: 0.6rem 0.8rem; border: 1px dashed var(--hp-border-strong); border-radius: var(--hp-radius-md); }
.hp-salud-sistema > summary { cursor: pointer; font-size: 0.85rem; color: var(--hp-text-muted); }
.hp-salud-sistema li { margin-bottom: 0.4rem; font-size: 0.8rem; }
.hp-salud-sistema .alerta-accion button { width: auto; margin: 0 0 0 0.3rem; padding: 0.05rem 0.45rem; font-size: 0.68rem; }
.hp-alerta-logica { margin: 0.2rem 0 0; font-size: 0.7rem; }
.hp-alerta-logica > summary { cursor: pointer; color: var(--hp-text-muted); }

/* TASK-230: análisis de precios referenciales, con veredicto. */
.hp-veredicto-precios { margin: 0.4rem 0 0.9rem; }
.hp-veredicto-conclusion { margin: 0 0 0.5rem; padding: 0.6rem 0.8rem; border-left: 3px solid var(--hp-primary); background: var(--hp-primary-wash); line-height: 1.45; }
.hp-que-miro { margin: 0.4rem 0 0; font-size: 0.82rem; }
.hp-que-miro > summary { cursor: pointer; color: var(--hp-text-muted); }
.hp-ficha-dncp { font-size: 0.78rem; min-width: 12rem; }
.hp-sancion { color: var(--hp-danger-text); }

/* TASK-232: detecciones (checklist OCDE), por severidad. */
.hp-deteccion { padding: 0.4rem 0.6rem; border-left: 3px solid var(--hp-border-strong); border-radius: 0 var(--hp-radius-sm, 4px) var(--hp-radius-sm, 4px) 0; margin-bottom: 0.4rem; font-size: 0.85rem; }
.hp-deteccion-grave { border-left-color: var(--hp-danger-text); background: var(--hp-danger-wash, rgba(200, 40, 40, 0.06)); }
.hp-deteccion-media { border-left-color: var(--hp-warning-text); background: var(--hp-warning-wash, rgba(200, 140, 0, 0.06)); }
.hp-deteccion-leve { border-left-color: var(--hp-border-strong); }
.hp-deteccion-acciones { display: block; margin-top: 0.15rem; }

/* TASK-239: cada lote de un llamado, con su propio análisis. */
.hp-lote { margin: 0 0 var(--hp-space-4); border: 1px solid var(--hp-border); border-radius: var(--hp-radius-md); background: var(--hp-surface); }
.hp-lote > summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--hp-space-2); padding: var(--hp-space-3) var(--hp-space-4); list-style: none; }
.hp-lote > summary::-webkit-details-marker { display: none; }
.hp-lote[open] > summary { background: var(--hp-surface-muted); border-bottom: 1px solid var(--hp-border); border-radius: var(--hp-radius-md) var(--hp-radius-md) 0 0; }
.hp-lote-presupuesto { margin-left: auto; color: var(--hp-text-muted); font-size: 0.85rem; }
.hp-lote-cuerpo { padding: var(--hp-space-3) var(--hp-space-4) var(--hp-space-2); }
.hp-lote-cuerpo h4 { margin: var(--hp-space-3) 0 var(--hp-space-2); font-size: 0.9rem; }
.hp-lote-cuerpo h4:first-child { margin-top: 0; }
.hp-lote-productos { margin: 0 0 var(--hp-space-3); }
.hp-lotes-resumen td:first-child, .hp-lotes-resumen th:first-child { white-space: nowrap; }
.hp-conviene-si { color: var(--hp-success); font-weight: 600; }
.hp-conviene-tal_vez { color: var(--hp-warning-text); font-weight: 600; }
.hp-conviene-no, .hp-conviene-sin { color: var(--hp-text-muted); }

/* TASK-234: evidencia exportable -- pensada para imprimir/guardar como PDF. */
.hp-evidencia-lista { padding-left: 1.2rem; }
.hp-evidencia-acciones { margin-bottom: 1rem; }
@media print {
  .hp-sidebar, .hp-sidebar-reopen, .hp-mobile-header, .no-print { display: none !important; }
  .hp-workspace { margin-left: 0 !important; width: 100% !important; }
}

/* TASK-245: títulos de columna que ordenan. */
.hp-th-orden { display: inline-flex; align-items: center; gap: 0.3rem; color: inherit; text-decoration: none; white-space: nowrap; }
.hp-th-orden:hover { color: var(--hp-primary); }
.hp-th-orden.is-active { color: var(--hp-primary); }
.hp-th-flecha { font-size: 0.7em; opacity: 0.45; }
.hp-th-orden.is-active .hp-th-flecha { opacity: 1; }

/* TASK-252/253: el ID oficial del llamado con su botón "copiar". */
.hp-id-oficial { display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap; }
.hp-id-oficial code { font-size: 0.85em; padding: 0 0.25rem; }
button.hp-copiar {
  width: auto; margin: 0; padding: 0 0.4rem; font-size: 0.72rem; line-height: 1.5;
  border: 1px solid var(--pico-muted-border-color); border-radius: 4px;
  background: transparent; color: var(--pico-muted-color); cursor: pointer;
}
button.hp-copiar:hover { color: var(--pico-primary); border-color: var(--pico-primary); }
.hp-por-que-no-aparece { margin: 0 0 0.75rem; }
.hp-por-que-no-aparece li[data-motivo] { margin: 0.15rem 0; }

/* TASK-272: casillas y "principal" de la ficha de usuario. El estilo general de
   los inputs (alto de 42px) las dejaba como barritas de 4px sin marca visible. */
.hp-empresas-usuario input[type="checkbox"],
.hp-empresas-usuario input[type="radio"] {
  appearance: auto;
  -webkit-appearance: auto;
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  padding: 0;
  margin: 0;
  border: revert;
  background: revert;
  accent-color: var(--pico-primary, #0f5fa8);
}

/* TASK-275: "Qué busca" -- tres tarjetas por color, etiquetas con su × adentro. */
.hp-que-busca-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  margin: 0.75rem 0 1rem;
}
.hp-que-busca-lista {
  margin: 0;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid #e3e7ef;
  border-top: 4px solid var(--hp-lista-color, #6b7280);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.hp-que-busca-positivas { --hp-lista-color: #15803d; --hp-chip-bg: #ecfdf3; --hp-chip-borde: #bbf7d0; }
.hp-que-busca-intermedias { --hp-lista-color: #64748b; --hp-chip-bg: #f1f5f9; --hp-chip-borde: #e2e8f0; }
.hp-que-busca-negativas { --hp-lista-color: #b91c1c; --hp-chip-bg: #fef2f2; --hp-chip-borde: #fecaca; }
.hp-que-busca-lista h3 {
  margin: 0;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hp-que-busca-cuenta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--hp-lista-color);
  background: var(--hp-chip-bg);
  border-radius: 999px;
  padding: 0.05rem 0.55rem;
}
.hp-que-busca-ayuda { margin: 0; font-size: 0.85rem; color: #5b6475; }
.hp-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; min-height: 1.75rem; }
.hp-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.15rem 0.2rem 0.15rem 0.65rem;
  border-radius: 999px;
  font-size: 0.875rem;
  line-height: 1.4;
  background: var(--hp-chip-bg);
  border: 1px solid var(--hp-chip-borde);
  white-space: nowrap;
}
.hp-chip form { display: inline; margin: 0; }
.hp-chip button {
  all: unset;
  cursor: pointer;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  text-align: center;
  line-height: 1.25rem;
  font-size: 1rem;
  color: #6b7280;
}
.hp-chip button:hover, .hp-chip button:focus-visible { background: rgba(0, 0, 0, 0.08); color: #111827; }
.hp-que-busca-agregar { display: flex; gap: 0.4rem; margin: auto 0 0; }
.hp-que-busca-agregar input { margin: 0; height: 2.25rem; padding: 0.25rem 0.6rem; font-size: 0.9rem; }
.hp-que-busca-agregar button { margin: 0; width: auto; height: 2.25rem; padding: 0 0.8rem; font-size: 0.9rem; }

/* TASK-277: casillas y opciones de radio en TODA la app. El estilo de los campos
   de texto (`.hp-app :where(input)`: alto, padding; `.hp-form-disclosure :where(input)`:
   ancho 100%) también las agarraba y quedaban como cajas vacías gigantes: parecía
   que no se podía marcar más de una. Los interruptores (`role="switch"`) no se tocan. */
.hp-app input[type="checkbox"]:not([role="switch"]),
.hp-app input[type="radio"] {
  appearance: auto;
  -webkit-appearance: auto;
  width: 1.1rem;
  min-width: 1.1rem;
  height: 1.1rem;
  min-height: 0;
  padding: 0;
  margin: 0 0.45rem 0 0;
  flex: none;
  vertical-align: middle;
  border: revert;
  background: revert;
  box-shadow: none;
  accent-color: #0f5fa8;
}

/* Una grilla de opciones que se marcan varias a la vez (rubros objetivo, exclusiones). */
.hp-opciones {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.5rem;
  margin: 0.5rem 0 1rem;
  padding: 0;
  border: 0;
}
.hp-opciones legend { font-weight: 600; margin-bottom: 0.35rem; }
.hp-opciones label {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0.5rem 0.7rem;
  border: 1px solid #e3e7ef;
  border-radius: 0.6rem;
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.3;
}
.hp-opciones label:hover { border-color: #9fb4d6; }
.hp-opciones label:has(input:checked) { border-color: #0f5fa8; background: #eef5fc; font-weight: 600; }
.hp-opciones-excluir label:has(input:checked) { border-color: #b91c1c; background: #fef2f2; }

/* TASK-278: grilla "qué compras le sirven". */
.hp-familias-segmento { border: 1px solid #e3e7ef; border-radius: 0.75rem; padding: 0.25rem 1rem; margin: 0 0 0.75rem; background: #fff; }
.hp-familias-segmento > summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.6rem 0; cursor: pointer; }
.hp-familias-resumen { font-size: 0.85rem; color: #5b6475; white-space: nowrap; }
.hp-familias-acciones { display: flex; gap: 0.5rem; margin: 0.25rem 0 0.5rem; }
.hp-familias-acciones button { width: auto; margin: 0; padding: 0.3rem 0.8rem; font-size: 0.85rem; }
.hp-familias-grilla label { justify-content: flex-start; gap: 0.1rem; }
.hp-familia-nombre { flex: 1; }
.hp-familia-cuenta { font-size: 0.78rem; font-weight: 400; color: #5b6475; white-space: nowrap; margin-left: 0.5rem; }
.hp-familias-grilla label:not(:has(input:checked)) { color: #7a8394; background: #f8f9fb; }

/* TASK-285: una de tus empresas entre las que cotizaron. */
mark.hp-tu-empresa {
  padding: 0 .35rem;
  border: 1px solid var(--hp-success-border);
  border-radius: var(--hp-radius-md);
  background: var(--hp-success-soft);
  color: var(--hp-success);
  font-size: .75rem;
  font-weight: 600;
}

/* TASK-286: "Avisame cuando lo vuelvan a licitar", un botón con pinta de enlace dentro de la tabla. */
form.hp-vigilar { display: inline; margin: 0; }
.hp-link-boton {
  display: inline;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--hp-primary);
  font-size: .8rem;
  text-decoration: underline;
  cursor: pointer;
}

/* TASK-316: las señales para crecer, en grilla dentro de la ficha: dos columnas, cada cuadro con su propio scroll. */
.hp-expandirte-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--hp-space-4); align-items: start; }
.hp-expandirte-grid > section { border: 1px solid var(--hp-border); border-radius: var(--hp-radius, 8px); padding: var(--hp-space-3) var(--hp-space-4); max-height: 30rem; overflow: auto; }
.hp-expandirte-grid > section h2 { font-size: 1.05rem; margin-top: 0; }
@media (max-width: 900px) { .hp-expandirte-grid { grid-template-columns: 1fr; } }
