/* Cotizaciones PRO. Un ritmo de filas, tokens del shell y detalle compartido. */
.qh-canvas { container-type: inline-size; }
/* Sólo al abrir una cotización, el detalle alcanza el borde derecho.
 * El borde izquierdo y el máximo del contenido conservan el marco de Pro. */
#asApp[data-pro-page="historial"]:has(.qh-workspace.has-detail) > .qh-canvas { grid-column: 3 / -1; }
.qh-workspace { --qh-group-surface:var(--pro-group-surface); --qh-lane-width:250px; --qh-control-height: 36px; --qh-control-font: 13px; --qh-control-padding: 7px 12px; flex-shrink: 0; display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100%; width: 100%; }
.qh-workspace.has-detail { grid-template-columns: minmax(0, 1fr) 460px; column-gap: var(--pro-page-gutter,32px); align-items: start; }
.qh-main { display: flex; flex-direction: column; align-self: stretch; min-width: 0; width: 100%; max-width: 1440px; margin-inline: auto; padding: 28px 32px; }
.qh-page-head { min-height:48px; flex-wrap:wrap; gap:16px 24px; }
.qh-page-actions, .qh-toolbar, .qh-summary, .qh-actions, .qh-detail-nav, .qh-more, .qh-section-heading, .qh-chips { display: flex; align-items: center; gap: 12px; }
.qh-page-actions { margin-left:auto; min-width:0; max-width:100%; }
#asApp[data-pro-page="historial"] .qh-main { padding-top:var(--pro-page-start-space); }
.qh-experience { display:flex; align-items:center; justify-content:center; gap:12px; max-width:100%; }
.qh-mode { flex-shrink:0; }
.qh-experience > .qh-usage { min-width:0; }
.qh-mode.qh-secondary { margin: 0; font-size:12px; font-weight:400; color:var(--mut); }
.qh-order { display: inline-flex; align-items: center; gap: 2px; }
.qh-board-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.qh-toolbar { position:relative; flex:1 1 252px; min-width:0; width:252px; }
.qh-workspace .qh-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--qh-control-height); padding: var(--qh-control-padding); border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--card); color: var(--ink); font: inherit; font-size: var(--qh-control-font); font-weight: 500; cursor: pointer; flex-shrink: 0; box-shadow: none; }
.qh-workspace .qh-button[aria-label] { width: var(--qh-control-height); padding: 7px; border-radius: 50%; }
.qh-workspace .qh-button:hover { background: var(--bg); }
.qh-workspace button:disabled { opacity: .5; cursor: default; }
.qh-workspace .qh-button[data-primary] { background: var(--brand); border-color: var(--brand); color: var(--card); }
.qh-workspace .qh-button[data-primary]:hover { background: var(--brand); }
.qh-board-tools .qh-button { min-height: 32px; padding: 5px 10px; border: 0; background: transparent; color: var(--mut); font-size: 13px; }
.qh-board-tools .qh-button:hover { background: transparent; color: var(--brand); }
.qh-board-tools .qh-button[aria-expanded="false"] { background: transparent; color: var(--brand); }
.qh-workspace .qh-button[data-action="compact"] { min-width: 156px; }
.qh-workspace .qh-button[data-action="bulk-start"] { border-color: transparent; background: transparent; padding-inline: 4px; }
.qh-workspace .qh-button[data-action="bulk-start"]:hover { background: transparent; color: var(--brand); text-decoration: none; }
.qh-board-tools [data-action="compact"]:not([hidden]) + .qh-order::before { content: ""; height: 16px; border-inline-start: 1px solid var(--line); margin-inline-end: 10px; }
.qh-workspace svg { width: 16px; height: 16px; flex-shrink: 0; }
.qh-search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding-inline: 12px; flex: 0 1 calc(var(--qh-lane-width) + 2px); max-width: 100%; min-width: 12rem; }
/* Búsqueda y creación pertenecen a la cabecera; el campo conserva su ancho compacto. */
.qh-page-actions .qh-search { flex:1 1 252px; min-width:0; }
.qh-workspace input, .qh-workspace textarea { appearance: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: var(--qh-control-font); padding: var(--qh-control-padding); min-height: var(--qh-control-height); max-width: 100%; box-shadow: none; }
.qh-workspace textarea { font-size: 14px; line-height: 1.5; }
.qh-workspace .ac-trigger { min-height: var(--qh-control-height); padding: var(--qh-control-padding); font-size: var(--qh-control-font); }
.qh-workspace .ac-calendar { width: var(--qh-control-height); height: var(--qh-control-height); }
.qh-workspace input::placeholder, .qh-workspace textarea::placeholder { color: var(--mut); }
.qh-workspace input[type="search"]::-webkit-search-cancel-button { appearance: none; }
.qh-search input { min-height: calc(var(--qh-control-height) - 2px); border: 0; background: transparent; width: 100%; min-width: 0; padding-inline: 0; }
/* El indicador de foco pertenece a asesor-focus.js: sólo navegación de teclado. */
.qh-control { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--mut); }
.qh-filter-anchor { position: relative; display: inline-flex; }
.qh-filters { --qh-control-height: 32px; --qh-control-padding: 5px 10px; position: absolute; z-index: 8; top: calc(100% + 8px); padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; display: grid; gap: 12px; overflow-y: auto; width: 320px; max-width: calc(100vw - 32px); left: 0; }
.qh-filters .qh-control { gap: 4px; }
.qh-filter-label { font-size: 12px; color: var(--ink); font-weight: 500; }
.qh-filter-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; }
.qh-filter-actions .qh-button { min-height: 32px; padding: 5px 10px; font-size: 12px; font-weight: 500; }
.qh-filter-actions [data-quiet] { border-color: transparent; background: transparent; color: var(--mut); }
.qh-filters .ac-date { width: 100%; gap: 8px; }
.qh-filters .ac-date input { flex: 1; min-width: 0; }
.qh-filters .ac-select, .qh-filters .ac-trigger { width: 100%; }
.qh-workspace [hidden] { display: none; }
.qh-summary-start { display:flex; align-items:center; gap:24px; flex-wrap:wrap; min-width:0; }
.qh-dataset-controls { display:inline-flex; align-items:center; gap:12px; }
.qh-summary { justify-content: space-between; flex-wrap: wrap; min-height:44px; margin-block:24px; color: var(--mut); font-size: 13px; }
.qh-chips:empty, .qh-status:empty, .qh-more:empty { display: none; }
.qh-chips { margin-bottom: 12px; flex-wrap: wrap; }
.qh-chips .qh-button { min-height: 32px; padding-block: 4px; font-size: 12px; }
.qh-status { color: var(--mut); margin: 8px 0; overflow-wrap: anywhere; }
.qh-status.is-error, .qh-error { color: var(--err); }
.qh-warning { color: var(--warn); }
.qh-table-wrap { border: 1px solid var(--line); border-radius: 16px; overflow: auto; overscroll-behavior:contain; background: var(--card); }
.qh-table-wrap:focus-visible { outline:2px solid var(--brand); outline-offset:-2px; }
.qh-table { --qh-column-weight:6.9; width:100%; min-width:1140px; border-collapse:collapse; table-layout:fixed; }
.qh-table--quotes { --qh-column-weight:4.3; min-width:780px; }
.qh-table th { height:48px; background:var(--qh-group-surface); padding:14px 20px; font-weight:500; color:var(--mut); text-align:left; font-size:12px; line-height:18px; }
.qh-table .qh-col-client { width:calc(100% * 1.6 / var(--qh-column-weight)); }
.qh-table .qh-col-proposal { width:calc(100% / var(--qh-column-weight)); }
.qh-table .qh-col-date { width:calc(100% * .9 / var(--qh-column-weight)); }
.qh-table .qh-col-channel { width:calc(100% * .8 / var(--qh-column-weight)); }
.qh-table .qh-col-state { width:calc(100% * 1.2 / var(--qh-column-weight)); }
.qh-table .qh-col-next { width:calc(100% * 1.4 / var(--qh-column-weight)); }
.qh-table--quotes tbody tr { cursor: pointer; }
.qh-table td { height:76px; padding:12px 20px; border-top:1px solid var(--line); vertical-align:middle; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.qh-table :is(.qh-list-plans,.qh-list-date,.qh-list-channel,.qh-list-price-missing) { color:var(--mut); font-size:12px; font-weight:400; line-height:18px; }
.qh-list-plans,.qh-list-price-missing { display:block; }
.qh-list-price-missing { margin-top:3px; }
.qh-list-proposal .qh-quote-range { margin-top:3px; text-align:left; color:var(--mut); font-size:12px; line-height:18px; }
.qh-table tr:not(.is-selected):hover td { background: var(--pro-row-hover); }
.qh-table .is-selected td { background: var(--brand-50); }
.qh-client, .qh-state, .qh-next-step { max-width: 100%; text-align: left; background: transparent; border: 0; padding: 6px 0; color: var(--ink); font: inherit; cursor: pointer; overflow-wrap: anywhere; }
.qh-client { display: block; font-weight: 600; }
.qh-client:hover, .qh-next-step:hover { color: var(--brand); }
.qh-state { display: inline-flex; align-items: center; gap: 6px; border-radius: var(--r-pill); padding: 6px 10px; color: var(--mut); background: var(--bg); font-size: 12px; line-height: 1.5; }
.qh-state:hover { color: var(--brand); background: var(--brand-50); }
.qh-state svg { width: 14px; height: 14px; }
.qh-next-step { font-size: 13px; }
.qh-secondary { display: block; color: var(--mut); font-size: 12px; line-height: 1.5; margin-top: 4px; overflow-wrap: anywhere; }
.qh-badge { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; color: var(--mut); background: var(--bg); line-height: 1.4; }
.qh-badge--danger { color: var(--err); }
.qh-badge--warning { color: var(--warn); }
.qh-badge--success { color: var(--win-d); }
.qh-more { justify-content: center; flex-wrap: wrap; margin-top: 20px; color: var(--mut); }
.qh-empty { padding: 56px 24px; text-align: center; border: 1px solid var(--line); background: var(--card); border-radius: 16px; }
.qh-empty > svg { width: 28px; height: 28px; color: var(--mut); }
.qh-empty h2 { font-size: 18px; margin-bottom: 8px; }
.qh-empty p { color: var(--mut); margin-bottom: 20px; }
.qh-detail { position: sticky; top: 0; height: calc(100dvh - var(--topbar-h)); display: flex; flex-direction: column; min-width: 0; border-left: 1px solid var(--line); background: var(--card); }
.qh-detail-head { flex: 0 0 auto; padding: 16px; border-bottom: 1px solid var(--line); }
.qh-detail-identity, .qh-detail-context { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.qh-detail-identity { align-items: start; }
.qh-detail-identity h2 { flex: 1; min-width: 0; }
.qh-detail-contact { margin: 4px 0 12px; color: var(--mut); font-size: 12px; overflow-wrap: anywhere; }
.qh-detail-context { flex-wrap: wrap; gap: 8px; }
.qh-position { font-size: 12px; color: var(--mut); white-space: nowrap; }
.qh-detail-head h2 { font-size: 18px; line-height: 1.4; font-weight: 650; overflow-wrap: anywhere; margin: 0 0 6px; }
.qh-detail-nav { gap: 2px; margin-left: auto; }
.qh-detail-nav .qh-button { border-color: transparent; width: 32px; min-height: 36px; padding: 5px; }
.qh-detail-body { overflow-y: auto; padding: 16px; flex: 1; min-height: 0; background: var(--bg); }
.qh-section { padding: 14px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.qh-section:last-child { margin-bottom: 0; }
.qh-disclosure { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 36px; padding: 4px 0; background: transparent; color: var(--ink); border: 0; font: inherit; font-size: 13px; font-weight: 650; text-align: left; cursor: pointer; }
.qh-disclosure[aria-expanded="true"] svg { transform: rotate(180deg); }
.qh-section h3 { font-size: 13px; font-weight: 650; margin: 0 0 10px; }
.qh-section p { margin-block: 10px; }
.qh-section-heading { justify-content: space-between; margin-bottom: 10px; }
.qh-section-heading h3 { margin: 0; }
.qh-next-title { font-size: 16px; font-weight: 600; line-height: 1.4; }
.qh-note-preview { color: var(--mut); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.qh-section textarea { display: block; resize: vertical; width: 100%; }
.qh-actions { flex-wrap: wrap; gap: 8px; }
.qh-actions .qh-button, .qh-section-heading .qh-button { min-height: 36px; font-size: 13px; padding: 7px 14px; }
.qh-inline, .qh-notice { margin-top: 12px; padding: 16px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
#qhGuard { margin: 0 0 16px; }
.qh-inline .qh-button, .qh-notice .qh-button { margin-top: 10px; margin-right: 6px; }
.qh-plans { list-style: none; padding: 0; margin: 0; }
.qh-plans li { display: flex; gap: 16px; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.qh-plans li div { min-width: 0; overflow-wrap: anywhere; }
.qh-plans li strong { font-size: 13px; font-weight: 600; }
.qh-plan-logo { flex: 0 0 64px; width: 64px; height: 24px; object-fit: contain; align-self: center; }
.qh-plan-text { flex: 1; }
.qh-section-heading .qh-button[data-action="edit-note"] { min-height: 30px; padding: 4px 10px; font-size: 12px; }
.qh-section-heading .qh-button[data-action="edit-note"] svg { width: 14px; height: 14px; }
.qh-plans li b { white-space: nowrap; font-size: 13px; }
.qh-timeline { list-style: none; padding: 0; }
.qh-timeline li { display: flex; flex-direction: column; border-left: 2px solid var(--line); margin: 12px 0; padding-left: 12px; font-size: 12px; }
.qh-timeline time { color: var(--mut); margin-top: 4px; }
.qh-sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@container (max-width: 1150px) {
  .qh-main { padding: 24px 20px; }
}
@container (max-width: 860px) {
  .qh-workspace.has-detail { grid-template-columns: minmax(0, 1fr); column-gap: 0; }
  .has-detail .qh-main { display: none; }
  .qh-detail { border-left: 0; }
}
@container (max-width: 580px) {
  .qh-main { padding: 20px 12px; }
  .qh-search { flex-basis: 100%; max-width: none; }
  .qh-page-actions { width:100%; flex-wrap:wrap; }
  .qh-toolbar { width:100%; flex-basis:100%; }
  .qh-detail-head, .qh-detail-body { padding-inline: 16px; }
}

/* Vistas del mismo seguimiento. El tablero sólo agrupa; no cambia el orden. */
.qh-usage, .qh-views, .qh-attention { display: inline-flex; padding: 2px; border: 1px solid transparent; border-radius: var(--r-pill); background: var(--pro-segment-surface); }
.qh-usage button, .qh-views button, .qh-attention button, .qh-board-stages button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 30px; padding: 4px 10px; background: transparent; color: var(--mut); border: 0; border-radius: var(--r-pill); font: inherit; font-size: 13px; font-weight:500; cursor: pointer; }
#asApp .qh-workspace .qh-attention[hidden] { display:none; }
.qh-usage [aria-pressed="true"], .qh-views [aria-pressed="true"], .qh-attention [aria-pressed="true"], .qh-board-stages [aria-pressed="true"] { color: var(--ink); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.qh-usage button { min-width:0; min-height:26px; padding:3px 8px; border:1px solid transparent; font-size:12px; line-height:18px; }
:is(.qh-usage,.qh-views,.qh-attention,.qh-board-stages) button:not([aria-pressed="true"]):hover { color:var(--ink); background:var(--qv-neutral-hover,#e5e7eb); }
.qh-meta { display: inline-flex; flex-wrap: wrap; align-items: baseline; row-gap: 4px; }
.qh-meta-part + .qh-meta-part { border-inline-start: 1px solid var(--line); margin-inline-start: 9px; padding-inline-start: 9px; }
/* El tablero aprovecha la ventana y crece si su contenido supera el espacio disponible. */
.qh-results, #qhRows { display: flex; flex-direction: column; flex: 0 0 auto; min-width: 0; }
.qh-results { position: relative; }
.qh-workspace[data-board-columns] :is(.qh-results,#qhRows,.qh-board) { flex-grow:1; }
.qh-drag-status { position: absolute; z-index: 9; bottom: calc(100% + 8px); inset-inline: 0; width: fit-content; max-width: 100%; margin: 0 auto; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--card); color: var(--ink); font-size: 13px; pointer-events: none; }
.qh-board { display: grid; flex: 0 0 auto; grid-auto-flow: column; grid-auto-columns: max(var(--qh-lane-width), calc((100% - 48px) / 5)); justify-content:start; gap: 12px; overflow-x: auto; align-items: stretch; padding: 0 2px 12px; }
.qh-lane { min-width: 0; min-height:var(--pro-board-lane-min-height,360px); border-radius: 12px; padding: 12px; background: var(--qh-group-surface); }
.qh-lane > header { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; margin-bottom: 12px; }
.qh-lane-heading { display: flex; align-items: center; gap: 6px; min-width: 0; }
.qh-help-trigger { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 28px; height: 28px; padding: 4px; border: 0; border-radius: 50%; background: transparent; color: var(--mut); cursor: pointer; }
.qh-help-trigger:hover, .qh-help-trigger[aria-expanded="true"] { background: var(--card); color: var(--brand); }
.qh-lane h3 { font-size: 13px; font-weight: 600; }
.qh-lane > header span { color: var(--mut); font-size: 12px; }
.qh-lane.is-drop-target { outline: 2px solid var(--brand); outline-offset: -2px; background: var(--brand-50); }
.qh-board-card { cursor: pointer; padding: 12px; margin: 0 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.qh-board-card:last-child { margin-bottom: 0; }
.qh-board-card[draggable="true"] { cursor: grab; }
.qh-board-card.is-selected { border-color: var(--brand); }
.qh-board-card .qh-client { font-size: 14px; }
.qh-card-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px; }
.qh-card-head .qh-client { min-width: 0; align-self: center; overflow-wrap: anywhere; cursor: pointer; }
.qh-card-client-content { display: flex; align-items: center; min-width: 0; }
.qh-card-client-name { display: block; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 20px; }
.qh-board-card .qh-client[draggable="true"] { display: grid; grid-template-columns: 16px minmax(0, 1fr); align-items: start; gap: 6px; -webkit-user-drag: element; -webkit-user-select: none; user-select: none; }
.qh-board-card[draggable="true"]:active, .qh-card-grip:active { cursor: grabbing; }
.qh-card-grip { display: inline-flex; align-items: center; height: 20px; color: var(--mut); cursor: grab; }
.qh-client:hover .qh-card-grip { color: var(--brand); }
.qh-card-head .qh-state { margin: 0; align-self: center; justify-content: center; text-align: center; min-width: 72px; min-height: 26px; padding: 2px 10px; gap: 4px; font-size: 11px; white-space: nowrap; }
.qh-card-head .qh-state svg { width: 12px; height: 12px; }
.qh-card-quote { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; column-gap: 12px; row-gap: 4px; margin-top: 8px; color: var(--mut); font-size: 12px; line-height: 18px; }
.qh-quote-range { min-width: 0; margin: 0; text-align: right; font-weight: 400; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.qh-quote-range strong { color: var(--ink); font-size: 14px; font-weight: 600; line-height: 18px; }
.qh-card-plan-count { white-space: nowrap; }
.qh-card-sent { margin: 4px 0 0; color: var(--mut); font-size: 12px; line-height: 18px; }
.qh-card-followup { margin-top: 8px; padding-top: 4px; border-top: 1px solid var(--line); }
.qh-card-action { --qh-action-tone: var(--mut); display: grid; grid-template-columns: 20px minmax(0, 1fr) 14px; align-items: center; gap: 8px; width: 100%; min-height: 28px; padding: 4px 0; border: 0; border-radius: 0; background: transparent; color: var(--ink); font: inherit; font-size: 12px; line-height: 18px; text-align: left; cursor: pointer; }
.qh-card-action--danger { --qh-action-tone: var(--err); }
.qh-card-action--today { --qh-action-tone: var(--warn); }
.qh-card-action--setup { --qh-action-tone: var(--brand); }
.qh-action-icon { display: flex; color: var(--mut); }
.qh-card-action--delivery .qh-action-icon { color: var(--err); }
.qh-action-copy { display: flex; align-items: baseline; gap: 8px; min-width: 0; overflow: hidden; white-space: nowrap; }
.qh-action-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; }
.qh-action-timing { flex-shrink: 0; color: var(--qh-action-tone); font-size: 12px; white-space: nowrap; }
.qh-action-chevron { display: flex; color: var(--mut); }
.qh-action-chevron svg { width: 14px; height: 14px; }
.qh-card-action:hover .qh-action-label { color: var(--brand); }
.qh-board.is-compact .qh-board-card { padding: 10px 12px; }
.qh-board.is-compact .qh-card-sent { margin-top: 6px; }
.qh-board.is-compact .qh-card-followup { margin-top: 6px; padding-top: 4px; }
.qh-lane-empty { padding:24px 12px; color:var(--mut); text-align:center; font-size:12px; line-height:18px; }
.qh-board-stages { display: none; }
.qh-inline > .qh-control { margin-top: 12px; }
.qh-inline > h3 { margin-bottom: 12px; }
@container (max-width: 580px) {
  .qh-usage button { padding-inline: 8px; }
  .qh-toolbar-end { width: 100%; flex-wrap: wrap; }
  .qh-board-tools [data-action="compact"] + .qh-order::before { display: none; }
  .qh-board { display: flex; flex-direction: column; overflow: visible; }
  .qh-lane { display: none; }
  .qh-lane.is-mobile-stage { display: block; flex: 1; }
  .qh-board-stages { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
  .qh-board-card .qh-client[draggable="true"] { display: block; }
  .qh-card-grip { display: none; }
}

.qh-attention [aria-pressed="true"] .qh-attention-count { background: var(--qv-neutral-surface, #f3f4f6); }

.qh-note-marker { display: inline-flex; vertical-align: middle; margin-inline-start: 6px; color: var(--mut); }
.qh-note-marker svg { width: 14px; height: 14px; }

@media (pointer: coarse) {
  .qh-board-card .qh-client[draggable="true"] { display: block; }
  .qh-card-grip { display: none; }
  .qh-experience .qh-usage button { min-height:44px; }
  .qh-workspace :is(.qh-button, .ac-trigger, .ac-calendar, input, .qh-state, .qh-card-action, .qh-usage button, .qh-views button, .qh-attention button, .qh-board-stages button) { min-height: 44px; }
  .qh-toolbar-end .qh-button[data-action="new"] { min-height: 50px; }
  .qh-workspace .qh-button[aria-label], .qh-workspace .ac-calendar { width: 44px; }
  .qh-workspace :is(input, textarea) { font-size: 16px; }
}

/* Detalle: opciones legibles y una sola tarea de edición a la vez. */
.qh-option-list { display: flex; flex-direction: column; gap: 2px; }
.qh-option-list:empty { display: none; }
.qh-detail .qh-option-list .qh-button { justify-content: flex-start; border: 0; border-radius: 0; background: transparent; padding: 4px 0; gap: 10px; font-weight: 400; }
.qh-option-list .qh-button:hover { background: transparent; color: var(--brand); }
.qh-option-list .qh-button svg { color: var(--mut); }
.qh-detail .qh-options .qh-options-notice { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--mut); font-size: 12px; line-height: 1.5; }
.qh-options-notice svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.qh-priority:has(#qhInline:not([hidden])) > :is(h3, .qh-dated-heading, .qh-next-title, .qh-task-summary, .qh-secondary, .qh-actions) { display: none; }
.qh-priority #qhInline { padding: 0; border: 0; border-radius: 0; margin: 0; background: transparent; }
.qh-priority .qh-control .ac-select, .qh-priority .qh-control .ac-trigger { width: 100%; }
.qh-options .qh-inline { border: 0; padding-inline: 0; background: transparent; }

/* Selección múltiple: una identidad por gestión, común a Lista y Tablero. */
.qh-bulk { display:flex; align-items:center; flex-wrap:wrap; gap:12px 20px; padding:16px; margin-bottom:16px; border:1px solid var(--line); border-radius:16px; background:var(--card); font-size:13px; }
.qh-bulk[hidden] { display:none; }
.qh-bulk small { flex-basis:100%; font-size:12px; color:var(--mut); }
.qh-pick { width:18px; height:18px; flex-shrink:0; accent-color:var(--brand); cursor:pointer; vertical-align:middle; margin:0 12px 0 0; }
.qh-card-head .qh-pick { margin:0; }
.qh-lane > header:has([data-bulk-lane]) { display:grid; grid-template-columns:minmax(0,1fr) auto; }
@media(max-width:700px){ .qh-bulk button { min-height:44px; } .qh-pick { width:24px; height:24px; } }

.qh-card-head:has(.qh-pick) { grid-template-columns:18px minmax(0,1fr); align-items:center; }
.qh-card-head:has(.qh-pick) .qh-state { display:none; }
.qh-board-card:has(.qh-pick:checked) { border-color:var(--brand); }
@media(max-width:700px){ .qh-card-head:has(.qh-pick) { grid-template-columns:24px minmax(0,1fr); } }
.qh-workspace input.qh-pick { appearance:auto; -webkit-appearance:checkbox; width:18px; height:18px; min-height:0; padding:0; border-radius:4px; accent-color:var(--brand); }
.qh-bulk .qh-button, .qh-lane [data-bulk-lane] { font-size:13px; font-weight:500; }
.qh-workspace .qh-lane [data-bulk-lane] { grid-column:1 / -1; justify-self:start; justify-content:flex-start; max-width:100%; padding:8px 12px; background:transparent; border:0; border-radius:8px; color:var(--brand); }
.qh-workspace .qh-lane [data-bulk-lane]:hover { background:var(--card); }
@media(max-width:700px){ .qh-workspace input.qh-pick { width:24px; height:24px; } }

/* Detalle: jerarquía de Inicio y opciones a demanda, sin velo modal. */
.qh-detail { --ink: #1f2937; --mut: #64748b; --bg: #f7f8fa; --card: #fff; --line: #e3e9f0; --brand: #0d99ff; --brand-d: var(--brand); --qh-action-height: 30px; font-size: 13px; }
.qh-detail-head { padding-block: 12px; }
.qh-detail-head h2 { font-size: 16px; font-weight: 600; }
.qh-detail-contact { margin-bottom: 8px; }
.qh-detail .qh-section { padding: 14px; margin-bottom: 12px; }
.qh-detail .qh-section h3 { font-size: 14px; font-weight: 600; line-height: 1.4; margin-bottom: 12px; }
.qh-detail .qh-dated-heading { align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 12px; }
.qh-detail .qh-dated-heading h3 { margin: 0; min-width: 0; max-width: 100%; }
.qh-section-date { flex: 0 0 auto; max-width: 100%; color: var(--mut); font-size: 12px; font-weight: 400; line-height: 1.5; }
.qh-section-date.is-overdue { color: var(--err); }
.qh-detail .qh-section p { margin-block: 8px; }
.qh-detail .qh-button, .qh-detail .ac-trigger { font-weight: 500; }
.qh-detail .qh-state { min-height: var(--qh-action-height); }
.qh-detail .qh-button[data-neutral], .qh-detail .qh-state { background: var(--qv-neutral-surface, #f3f4f6); border-color: transparent; color: #52637b; }
.qh-detail .qh-button[data-neutral]:hover, .qh-detail .qh-state:hover { background: var(--qv-neutral-hover, #e5e7eb); color: #52637b; }
.qh-detail-body .qh-button { min-height: var(--qh-action-height); padding: 4px 10px; font-size: 12px; line-height: 1.4; }
.qh-detail .qh-disclosure { font-size: 12px; font-weight: 600; }
.qh-detail .qh-section .qh-activity-heading { margin: 0; }
.qh-detail [data-action="activity"] { min-height: var(--qh-action-height); font-size: 14px; line-height: 1.4; }
.qh-detail .qh-control, .qh-detail input, .qh-detail textarea { font-size: 13px; line-height: 1.5; }
.qh-detail .qh-control { margin-block: 12px; }
.qh-detail .qh-note-preview { font-size: 13px; line-height: 1.5; color: var(--ink); }
.qh-detail .qh-notes .qh-section-heading { margin-bottom: 0; min-height: var(--qh-action-height); }
.qh-detail .qh-notes .qh-section-heading h3 { margin: 0; }
.qh-detail .qh-notes .qh-section-heading .qh-button { min-height: var(--qh-action-height); padding: 4px 0; border: 0; border-radius: 0; background: transparent; font-size: 12px; }
.qh-detail .qh-notes .qh-section-heading .qh-button:hover { color: var(--brand); }
.qh-detail .qh-notes .qh-section-heading .qh-button svg { width: 16px; height: 16px; }
.qh-notes .qh-note-preview { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.qh-notes .qh-note-preview.is-expanded { display: block; overflow: visible; }
.qh-detail .qh-notes [data-action="note-toggle"] { min-height: var(--qh-action-height); padding-block: 5px; font-weight: 500; }
.qh-notes [data-action="note-toggle"][aria-expanded="true"] svg { transform: rotate(180deg); }
.qh-notes:has(#qhNoteEditor:not([hidden])) [data-action="edit-note"] { display: none; }
.qh-notes #qhNoteEditor { margin-top: 12px; }
.qh-notes--empty .qh-note-preview { margin: 0; }
.qh-quote-delivery { display: grid; gap: 4px; margin-bottom: 8px; }
.qh-detail .qh-quote-delivery p { margin: 0; }
.qh-detail .qh-quote-section > .qh-disclosure { min-height: var(--qh-action-height); padding-block: 4px; font-weight: 500; }
.qh-detail .qh-quote-actions { margin-top: 8px; padding-top: 12px; border-top: 1px solid #e9edf2; }
.qh-quote-actions:has(+ #qhResend:not([hidden])) [data-action="resend"] { display: none; }
.qh-detail .qh-next-title { font-size: 13px; font-weight: 400; }
.qh-task-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 8px; margin-bottom: 8px; }
.qh-task-label { color: var(--mut); font-size: 12px; font-weight: 400; line-height: 1.5; }
.qh-detail .qh-task-summary .qh-next-title { margin: 0; font-weight: 500; }
.qh-detail .qh-task-secondary { margin-top: 12px; padding-top: 8px; border-top: 1px solid #e9edf2; column-gap: 16px; }
.qh-detail .qh-button[data-quiet] { border-color: transparent; color: var(--mut); background: transparent; padding-inline: 0; }
.qh-detail .qh-button[data-quiet]:hover { color: var(--brand); }
.qh-optional { border-top: 1px solid var(--line); padding-block: 12px; }
.qh-detail .qh-optional .qh-disclosure { color: var(--brand); font-size: 12px; font-weight: 500; }

/* Seguimiento: campos breves, alineados y contenidos dentro del panel. */
.qh-followup-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-block: 20px; }
.qh-detail .qh-followup-fields .qh-control { min-width: 0; margin: 0; }
.qh-detail .qh-field--compact { width: 280px; max-width: 100%; }
.qh-followup-fields .ac-trigger { box-sizing: border-box; min-width: 0; }
.qh-detail .qh-field--date { width: 224px; max-width: 100%; }
.qh-field-help { font-size: 12px; line-height: 18px; color: var(--mut); }
.qh-field--date .ac-date { width: 100%; }
.qh-field--date .ac-date input { width: 0; flex: 1; min-width: 0; }
.qh-detail .qh-editor-actions { margin-top: 12px; }
.qh-detail #qhNoteState:empty { display: none; }
.qh-inline .qh-editor-actions .qh-button { margin: 0; }

.qh-detail .qh-check { display: flex; align-items: flex-start; gap: 8px; margin-block: 16px; font-size: 13px; line-height: 20px; color: var(--ink); }
.qh-detail .qh-check input { appearance: none; -webkit-appearance: none; position: relative; border: 1px solid var(--mut); border-radius: 4px; width: 16px; height: 16px; min-height: 0; padding: 0; margin: 2px 0; flex-shrink: 0; }
.qh-detail .qh-status { font-size: 12px; line-height: 1.5; }
.qh-detail .qh-status .qh-button { margin-left: 8px; }
@media (max-width: 860px) {
  .qh-detail { --qh-control-height: 44px; }
  .qh-detail input, .qh-detail textarea { font-size: 16px; }
}
.qh-detail [hidden] { display: none; }
@media (max-width: 860px), (pointer: coarse) {
  .qh-detail { --qh-action-height: 44px; }
  .qh-detail .qh-disclosure { min-height: 44px; }
}

.qh-detail .qh-check input:checked { background: var(--brand); border-color: var(--brand); }
.qh-detail .qh-check input:checked::after { content: ''; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* Controles secundarios: una misma tinta; los segmentados seleccionan en neutro. */
.qh-toolbar .qh-button:not([data-primary]), .qh-summary .qh-button,
.qh-views button:not([aria-pressed="true"]), .qh-attention button:not([aria-pressed="true"]) { color:#52637b; }
.qh-board-tools .qh-button[aria-expanded="false"] { color:var(--brand); }
.qh-whatsapp-icon { width:16px; height:16px; flex:none; color:#25d366; }
.qh-meta-part:has(.qh-whatsapp-icon) { display:inline-flex; align-items:center; gap:6px; }
/* Canales y tareas de las listas: dibujos discretos, sin cápsula ni color de marca. */
.qh-table .qh-meta:has(.qh-meta-part--icon) { align-items:center; }
.qh-table .qh-meta-part--icon { display:inline-flex; align-items:center; gap:6px; }
.qh-table .qh-meta-part--icon > svg { width:16px; height:16px; flex:none; stroke-width:2; color:var(--mut); }
.qh-workspace .qh-button[data-whatsapp]:not([data-neutral]):hover { background:#effaf3; }

@media(max-width:520px) {
  .qh-experience .qh-mode { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
}

/* Misma carga que Simulador, integrada en el área de resultados. */
.qh-loading { min-height:220px; padding:56px 24px; }
