/* ==========================================================================
   MÓDULO PSICOSOCIAL — tema CLARO, alineado con theme.css (Estrategia Humana)
   Regla de oro: fondos claros, texto oscuro, ningún bloque negro grande.
   El color vive en los acentos (lima, naranja) y en los semáforos de riesgo.
   ========================================================================== */

.eh-psico-container {
    --p-ink: var(--eh-ink, #171C18);
    --p-accent: var(--eh-accent, #D8FF62);
    --p-accent-d: #C4F03F;
    --p-soft: var(--eh-soft, #F2F0E8);
    --p-paper: #FFFFFF;
    --p-orange: var(--eh-orange, #FF7657);
    --p-muted: #4F574F;
    --p-line: rgba(23, 28, 24, .18);
    --p-line-soft: rgba(23, 28, 24, .10);
    --p-blue: #2F6F9F;
    --p-ok-bg: #E3F4D8;    --p-ok-tx: #1E4620;
    --p-bad-bg: #FFE1D8;   --p-bad-tx: #7A2412;
    --p-warn-bg: #FFF1BF;  --p-warn-tx: #5A4300;

    max-width: 1240px;
    margin: 0 auto;
    padding: 24px 20px 90px;
    color: var(--p-ink);
    background: transparent;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.55;
}
.eh-psico-container *,
.eh-psico-container *::before,
.eh-psico-container *::after { box-sizing: border-box; }

.eh-psico-container h1, .eh-psico-container h2, .eh-psico-container h3, .eh-psico-container h4 {
    color: var(--p-ink);
    margin: 0;
    line-height: 1.2;
}
.eh-psico-container p { color: var(--p-ink); }
.eh-psico-container .eh-muted, .eh-muted { color: var(--p-muted); }
.eh-psico-container a { color: var(--p-ink); }

/* --------------------------------------------------------------------------
   Encabezado del panel + navegación
   -------------------------------------------------------------------------- */
.eh-psico-header-panel {
    display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap;
    gap: 16px; margin-bottom: 22px; padding-bottom: 20px;
    border-bottom: 1px solid var(--p-line);
}
.eh-psico-badge {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--p-ink);
}
.eh-psico-badge::before { content: ""; width: 26px; height: 3px; background: var(--p-orange); border-radius: 2px; }
.eh-psico-title { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: 34px; margin-top: 6px; }
.eh-psico-user-info { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 700; }
.eh-psico-btn-logout {
    display: inline-flex; align-items: center; min-height: 38px; padding: 0 18px; border-radius: 999px;
    border: 1.5px solid var(--p-ink); background: var(--p-paper); color: var(--p-ink) !important;
    font-size: 13px; font-weight: 800; text-decoration: none !important;
}
.eh-psico-btn-logout:hover { background: var(--p-soft); }

.eh-psico-nav { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 14px; margin-bottom: 4px; scrollbar-width: thin; }
.eh-psico-nav-item {
    flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 42px; padding: 0 20px;
    border-radius: 999px; border: 1.5px solid var(--p-line); background: var(--p-paper);
    color: var(--p-ink) !important; font-size: 14px; font-weight: 700; text-decoration: none !important;
    transition: background .15s, border-color .15s;
}
.eh-psico-nav-item:hover { background: var(--p-soft); border-color: var(--p-ink); }
.eh-psico-nav-item.is-active { background: var(--p-accent); border-color: var(--p-ink); color: var(--p-ink) !important; }

.eh-psico-content-card {
    background: var(--p-paper); border: 1px solid var(--p-line); border-radius: 22px;
    padding: 30px; margin-top: 8px; box-shadow: 0 1px 0 rgba(23,28,24,.04);
}
.eh-psico-content-card h2 { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: 30px; }
.eh-psico-content-card h2 + p { color: var(--p-muted); font-size: 14px; margin: 6px 0 0; }
.eh-lead { color: var(--p-muted) !important; font-size: 14px; margin: 6px 0 0; }
.eh-page-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.eh-section-title { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: 22px; margin: 0 0 12px; }

/* --------------------------------------------------------------------------
   Tarjetas y rejillas
   -------------------------------------------------------------------------- */
.eh-psico-container .eh-card {
    background: var(--p-paper); border: 1px solid var(--p-line); border-radius: 18px; padding: 22px;
}
.eh-card--soft { background: var(--p-soft) !important; border-color: var(--p-line-soft) !important; }
.eh-card--flush { padding: 0 !important; overflow: auto; }
.eh-card__head { padding: 16px 22px; border-bottom: 1px solid var(--p-line-soft); background: var(--p-soft); }
.eh-card__head h3 { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: 20px; }
.eh-card__body { padding: 18px 22px; }
.eh-mb { margin-bottom: 24px; }
.eh-mb-s { margin-bottom: 14px; }

.eh-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.eh-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.eh-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.eh-grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.eh-grid-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
@media (max-width: 860px) {
    .eh-grid-2, .eh-grid-3, .eh-grid-4 { grid-template-columns: 1fr; }
    .eh-psico-content-card { padding: 18px; }
}

/* --------------------------------------------------------------------------
   Formularios
   -------------------------------------------------------------------------- */
.eh-form-group, .eh-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.eh-field { margin-bottom: 0; }
.eh-psico-container .eh-form-group label,
.eh-psico-container .eh-field label {
    font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--p-ink);
}
.eh-psico-container input[type="text"], .eh-psico-container input[type="email"],
.eh-psico-container input[type="password"], .eh-psico-container input[type="number"],
.eh-psico-container input[type="date"], .eh-psico-container select, .eh-psico-container textarea {
    width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--p-line); border-radius: 12px;
    background: #fff; color: var(--p-ink); font: inherit; font-size: 15px;
}
.eh-psico-container textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.eh-psico-container input:focus, .eh-psico-container select:focus, .eh-psico-container textarea:focus {
    outline: 3px solid rgba(216, 255, 98, .9); border-color: var(--p-ink);
}
.eh-psico-container ::placeholder { color: #7a817a; }
.eh-psico-container input[type="file"] {
    width: 100%; padding: 12px; border: 2px dashed var(--p-line); border-radius: 12px; background: var(--p-soft); font-size: 14px;
}
.eh-psico-container input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--p-ink); }
.eh-hint { font-size: 12px; color: var(--p-muted); line-height: 1.6; }
.eh-details { border: 1px solid var(--p-line-soft); border-radius: 12px; background: var(--p-soft); padding: 10px 14px; }
.eh-details summary { cursor: pointer; font-weight: 800; font-size: 13px; }
.eh-details[open] summary { margin-bottom: 12px; }

.eh-form-links { display: flex; justify-content: space-between; margin-top: 18px; font-size: 13px; }
.eh-form-links a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   Botones (píldora, como el tema)
   -------------------------------------------------------------------------- */
.eh-psico-container .eh-button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px;
    border-radius: 999px; border: 1.5px solid var(--p-ink); background: var(--p-paper); color: var(--p-ink) !important;
    font: inherit; font-size: 14px; font-weight: 800; text-decoration: none !important; cursor: pointer;
    transition: transform .12s, background .12s;
}
.eh-psico-container .eh-button:hover { background: var(--p-soft); transform: translateY(-1px); }
.eh-psico-container .eh-button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.eh-psico-container .eh-button--primary { background: var(--p-accent); }
.eh-psico-container .eh-button--primary:hover { background: var(--p-accent-d); }
.eh-psico-container .eh-button--ghost { background: transparent; }
.eh-psico-container .eh-button--sm { min-height: 34px; padding: 0 14px; font-size: 12px; }
.eh-psico-container .eh-button--danger { border-color: #B3321A; color: #8E2411 !important; background: #fff; }
.eh-psico-container .eh-button--danger:hover { background: var(--p-bad-bg); }
.eh-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* --------------------------------------------------------------------------
   Tablas (encabezado CLARO)
   -------------------------------------------------------------------------- */
.eh-psico-container .eh-table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
.eh-psico-container .eh-table thead th {
    background: var(--p-soft); color: var(--p-ink); text-align: left; padding: 13px 14px; font-size: 12px; font-weight: 800;
    letter-spacing: .05em; text-transform: uppercase; border-bottom: 2px solid var(--p-ink); white-space: nowrap;
}
.eh-psico-container .eh-table td { padding: 12px 14px; border-bottom: 1px solid var(--p-line-soft); vertical-align: middle; color: var(--p-ink); }
.eh-psico-container .eh-table tbody tr:hover td { background: #FAFFE8; }
.eh-psico-container .eh-table tbody tr:last-child td { border-bottom: 0; }
.eh-table--compact td, .eh-table--compact th { padding: 9px 10px !important; font-size: 13px !important; }
.eh-center { text-align: center !important; }
.eh-nowrap { white-space: nowrap; }
.eh-th-group { background: #E8E5D8 !important; text-align: center !important; }

/* --------------------------------------------------------------------------
   Niveles de riesgo (texto con contraste ≥ 4,5:1)
   -------------------------------------------------------------------------- */
.eh-risk { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; line-height: 1.4; }
.eh-risk--sin      { background: #2E7D32; color: #fff; }
.eh-risk--bajo     { background: #AED581; color: #1c2b10; }
.eh-risk--medio    { background: #FFD54F; color: #3a2d00; }
.eh-risk--alto     { background: #FB8C00; color: #201400; }
.eh-risk--muy-alto { background: #C62828; color: #fff; }
.eh-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--p-soft); border: 1px solid var(--p-line); }
.eh-pill--ok { background: var(--p-ok-bg); color: var(--p-ok-tx); border-color: transparent; }
.eh-pill--bad { background: var(--p-bad-bg); color: var(--p-bad-tx); border-color: transparent; }
.eh-pill--warn { background: var(--p-warn-bg); color: var(--p-warn-tx); border-color: transparent; }

.eh-aviso { padding: 14px 18px; border-radius: 14px; margin-bottom: 18px; font-size: 14px; font-weight: 600; border: 1px solid transparent; }
.eh-aviso--ok { background: var(--p-ok-bg); color: var(--p-ok-tx); border-color: #BFE2A8; }
.eh-aviso--error { background: var(--p-bad-bg); color: var(--p-bad-tx); border-color: #F5B8A6; }
.eh-aviso--info { background: #E4EFF8; color: #173F5C; border-color: #B7D3E8; }
.eh-aviso--warn { background: var(--p-warn-bg); color: var(--p-warn-tx); border-color: #EBD58A; }

/* --------------------------------------------------------------------------
   Login / registro
   -------------------------------------------------------------------------- */
.eh-psico-login-wrapper { display: flex; justify-content: center; padding: 40px 0; }
.eh-psico-login-card {
    width: 100%; max-width: 460px; background: var(--p-paper); border: 1px solid var(--p-line); border-radius: 24px;
    padding: 36px 32px; position: relative; overflow: hidden;
}
.eh-psico-login-card::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 6px; background: var(--p-accent); }
.eh-psico-login-card h2 { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: 30px; margin-bottom: 6px; }
.eh-psico-login-card p { color: var(--p-muted); font-size: 14px; margin: 0 0 22px; }

/* --------------------------------------------------------------------------
   Barra de contexto (empresa + vigencia) — CLARA
   -------------------------------------------------------------------------- */
.eh-ctx {
    display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; padding: 14px 18px; margin: 4px 0 14px;
    background: var(--p-soft); border: 1.5px solid var(--p-ink); border-radius: 16px; color: var(--p-ink);
}
.eh-ctx label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--p-ink); }
.eh-psico-container .eh-ctx select { min-height: 40px; min-width: 200px; background: #fff; color: var(--p-ink); border: 1.5px solid var(--p-ink); border-radius: 999px; padding: 0 14px; font-weight: 700; }
.eh-ctx__hint { margin-left: auto; font-size: 12px; color: var(--p-muted); }

.eh-next {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 20px; margin-bottom: 22px; background: var(--p-accent); border: 1.5px solid var(--p-ink); border-radius: 16px; font-weight: 700; color: var(--p-ink);
}
.eh-next a { color: var(--p-ink) !important; background: #fff; border: 1.5px solid var(--p-ink); padding: 8px 18px; border-radius: 999px; font-weight: 800; text-decoration: none !important; font-size: 13px; }
.eh-next a:hover { background: var(--p-soft); }

/* --------------------------------------------------------------------------
   Menú PHVA (todas las tarjetas claras)
   -------------------------------------------------------------------------- */
.eh-phva-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.eh-phva-card {
    display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 20px; background: var(--p-paper);
    border: 1.5px solid var(--p-line); border-top-width: 8px; color: var(--p-ink) !important; text-decoration: none !important;
    transition: transform .15s, box-shadow .15s;
}
.eh-phva-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(23,28,24,.10); }
.eh-phva-card--planear   { border-top-color: var(--p-blue); }
.eh-phva-card--hacer     { border-top-color: #C4F03F; }
.eh-phva-card--verificar { border-top-color: #FFB703; }
.eh-phva-card--actuar    { border-top-color: var(--p-orange); }
.eh-phva-card__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.eh-phva-card__step { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--p-muted); }
.eh-phva-card__status { font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--p-soft); border: 1px solid var(--p-line); color: var(--p-ink); }
.eh-phva-card h3 { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: 28px; }
.eh-phva-card__metric { font-weight: 800; font-size: 14px; }
.eh-phva-card p { font-size: 13px; color: var(--p-muted); margin: 0; }
.eh-phva-card__go { margin-top: auto; font-weight: 800; font-size: 13px; }
.eh-bar { height: 10px; background: var(--p-soft); border: 1px solid var(--p-line); border-radius: 999px; overflow: hidden; }
.eh-bar > span { display: block; height: 100%; background: #6FA82A; border-radius: 999px; }

.eh-estado { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.eh-estado--pendiente { background: var(--p-soft); border: 1px solid var(--p-line); }
.eh-estado--en-curso { background: var(--p-warn-bg); color: var(--p-warn-tx); }
.eh-estado--completado { background: var(--p-ok-bg); color: var(--p-ok-tx); }

/* --------------------------------------------------------------------------
   Pestañas
   -------------------------------------------------------------------------- */
.eh-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; border-bottom: 2px solid var(--p-line-soft); padding-bottom: 0; }
.eh-tab {
    padding: 10px 18px; border-radius: 12px 12px 0 0; font-size: 13px; font-weight: 800; text-decoration: none !important;
    color: var(--p-ink) !important; background: var(--p-soft); border: 1.5px solid transparent; border-bottom: 0; margin-bottom: -2px;
}
.eh-tab:hover { border-color: var(--p-line); }
.eh-tab.is-active { background: var(--p-accent); border-color: var(--p-ink); }

/* --------------------------------------------------------------------------
   KPI, gráficos, barras apiladas, mapa de calor
   -------------------------------------------------------------------------- */
.eh-kpi { background: var(--p-paper); border: 1.5px solid var(--p-line); border-left: 8px solid var(--p-blue); border-radius: 16px; padding: 16px 18px; }
.eh-kpi--ok   { border-left-color: #2E7D32; }
.eh-kpi--warn { border-left-color: #FFB703; }
.eh-kpi--bad  { border-left-color: #C62828; }
.eh-kpi__valor { font-family: 'DM Serif Display', Georgia, serif; font-size: 38px; line-height: 1.05; color: var(--p-ink); }
.eh-kpi__etq { font-size: 13px; font-weight: 800; margin-top: 4px; }
.eh-kpi__sub { font-size: 12px; color: var(--p-muted); margin-top: 2px; }

.eh-chart { position: relative; width: 100%; }
.eh-chart canvas { max-width: 100%; }
.eh-chart-card { background: var(--p-paper); border: 1.5px solid var(--p-line); border-radius: 18px; padding: 18px; break-inside: avoid; }
.eh-chart-card h4 { font-size: 15px; font-weight: 800; text-align: center; margin-bottom: 10px; }
.eh-chart-card .eh-hint { text-align: center; margin-top: 8px; }

.eh-stack { display: flex; width: 100%; height: 30px; border-radius: 8px; overflow: hidden; border: 1px solid var(--p-line); background: #fff; }
.eh-stack__seg { display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; min-width: 2px; }
.eh-stack--vacia { align-items: center; justify-content: center; color: var(--p-muted); font-size: 12px; }
.eh-leyenda { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; font-weight: 700; margin: 10px 0; }
.eh-leyenda__item { display: inline-flex; align-items: center; gap: 6px; }
.eh-leyenda__dot { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1px solid rgba(23,28,24,.25); }

.eh-heat-0 { background: #E8F5E0; color: #1E4620; }
.eh-heat-1 { background: #FFF3C4; color: #4a3800; }
.eh-heat-2 { background: #FFD08A; color: #4a2800; }
.eh-heat-3 { background: #FF9A66; color: #3a1500; }
.eh-heat-4 { background: #D93A2B; color: #fff; }
.eh-heat-na { background: #F1F1EE; color: #7a817a; }
.eh-heatmap td.eh-heat { text-align: center; font-weight: 800; border-left: 2px solid #fff; border-bottom: 2px solid #fff !important; }
.eh-heatmap tr.is-pequeno td:first-child { font-style: italic; }
.eh-heatmap .eh-flag { font-size: 11px; font-weight: 800; color: #7A2412; background: var(--p-bad-bg); padding: 1px 8px; border-radius: 999px; margin-left: 6px; font-style: normal; }

.eh-var { font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.eh-var--peor { background: var(--p-bad-bg); color: var(--p-bad-tx); }
.eh-var--mejor { background: var(--p-ok-bg); color: var(--p-ok-tx); }
.eh-var--igual { background: var(--p-soft); }

.eh-rank { display: grid; grid-template-columns: 150px 1fr 54px; gap: 10px; align-items: center; padding: 7px 0; font-size: 13px; font-weight: 700; }
.eh-rank__bar { position: relative; height: 16px; background: var(--p-soft); border-radius: 999px; border: 1px solid var(--p-line-soft); overflow: hidden; }
.eh-rank__bar span { display: block; height: 100%; border-radius: 999px; }
.eh-rank__mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--p-ink); }
.eh-rank__pct { text-align: right; font-weight: 800; }
@media (max-width: 600px) { .eh-rank { grid-template-columns: 100px 1fr 44px; } }

.eh-interp { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.eh-interp > div { background: var(--p-soft); border-radius: 14px; padding: 12px 14px; font-size: 13px; }
.eh-interp .eh-risk { margin-bottom: 6px; }

/* --------------------------------------------------------------------------
   Ventana modal (sin estilos en línea)
   -------------------------------------------------------------------------- */
.eh-modal { display: none; position: fixed; inset: 0; z-index: 99999; background: rgba(23,28,24,.55); overflow-y: auto; padding: 4vh 16px; }
.eh-modal.is-open { display: block; }
.eh-modal__box { position: relative; max-width: 820px; margin: 0 auto; background: #fff; color: var(--p-ink); border-radius: 22px; padding: 30px; border: 1.5px solid var(--p-ink); }
.eh-modal__close { position: absolute; right: 16px; top: 14px; width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--p-ink); background: #fff; color: var(--p-ink); font-size: 20px; font-weight: 800; cursor: pointer; line-height: 1; }
.eh-modal__close:hover { background: var(--p-soft); }
.eh-modal h4.eh-sub { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--p-ink); border-bottom: 2px solid var(--p-accent); padding-bottom: 6px; margin: 18px 0 12px; }

/* --------------------------------------------------------------------------
   INFORME FINAL (vista previa = lo que se imprime)
   -------------------------------------------------------------------------- */
.eh-report { background: #fff; color: #111; font-size: 14.5px; line-height: 1.65; }
.eh-report h2 { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: 26px; padding-bottom: 8px; margin: 0 0 14px; border-bottom: 3px solid var(--p-accent); }
.eh-report h3 { font-size: 16px; font-weight: 800; margin: 20px 0 8px; }
.eh-report p { margin: 0 0 10px; color: #111; }
.eh-report ul { margin: 0 0 12px 22px; padding: 0; } .eh-report li { margin-bottom: 4px; }
.eh-report__sec { padding: 24px 0; border-bottom: 1px solid var(--p-line-soft); }
.eh-report__sec:last-child { border-bottom: 0; }
.eh-report__cover { text-align: center; padding: 60px 20px; border: 2px solid var(--p-ink); border-radius: 24px; background: var(--p-soft); margin-bottom: 20px; }
.eh-report__cover .kicker { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.eh-report__cover h1 { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: 40px; margin: 14px 0 6px; line-height: 1.15; }
.eh-report__cover .empresa { font-size: 24px; font-weight: 800; margin-top: 26px; }
.eh-report__cover .meta { font-size: 14px; color: var(--p-muted); margin-top: 6px; }
.eh-report__firma { margin-top: 50px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px; }
.eh-report__firma div { border-top: 1.5px solid #111; padding-top: 8px; font-size: 13px; }
.eh-toc { columns: 2; font-size: 14px; } .eh-toc li { margin-bottom: 3px; }
.eh-edit-sec { margin-bottom: 22px; }
.eh-edit-sec label { font-weight: 800; font-size: 14px; display: block; margin-bottom: 6px; text-transform: none; letter-spacing: 0; }
.eh-edit-sec .eh-hint { margin-bottom: 6px; }

/* --------------------------------------------------------------------------
   Pie del módulo (claro)
   -------------------------------------------------------------------------- */
.eh-psico-footer { padding: 26px 0 22px; background: var(--eh-soft, #F2F0E8); color: var(--eh-ink, #171C18); border-top: 1px solid rgba(23,28,24,.18); font-size: 13px; }
.eh-psico-footer .in { max-width: 1240px; margin: 0 auto; padding: 0 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; align-items: center; }
.eh-psico-footer .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #C4F03F; border: 1px solid #171C18; margin-right: 8px; }

/* --------------------------------------------------------------------------
   IMPRESIÓN / PDF: solo se imprime el área marcada .eh-print-area
   -------------------------------------------------------------------------- */
@media print {
    @page { size: A4; margin: 14mm 12mm; }
    body * { visibility: hidden !important; }
    .eh-print-area, .eh-print-area * { visibility: visible !important; }
    .eh-print-area { position: absolute !important; left: 0; top: 0; width: 100% !important; margin: 0 !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; }
    .eh-noprint, .eh-noprint * { display: none !important; }
    .eh-report { font-size: 11.5pt; }
    .eh-report__sec { page-break-inside: auto; break-inside: auto; }
    .eh-pagebreak { page-break-before: always; break-before: page; }
    .eh-chart-card, .eh-kpi, .eh-table tr, .eh-report h2, .eh-report h3 { break-inside: avoid; page-break-inside: avoid; }
    .eh-report__cover { min-height: 230mm; display: flex; flex-direction: column; justify-content: center; }
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
    .eh-psico-container .eh-table thead th { background: #E8E5D8 !important; }
}

/* ==========================================================================
   CUESTIONARIOS (aplicación ítem por ítem), avance y resultado individual
   ========================================================================== */
.eh-chip { display:inline-block; min-width:30px; padding:2px 8px; border-radius:99px; border:1px solid var(--p-line); background:#fff; color:var(--p-muted); font-size:12px; font-weight:600; }
.eh-chip--ok { background:var(--p-ok-bg); color:var(--p-ok-tx); border-color:transparent; }
.eh-chip--part { background:var(--p-warn-bg); color:var(--p-warn-tx); border-color:transparent; }

.eh-cuest__head { margin-bottom:14px; }
.eh-cuest__head h2 { margin:0 0 4px; }
.eh-steps { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 18px; }
.eh-step { display:flex; align-items:center; gap:8px; padding:8px 14px; border:1px solid var(--p-line); border-radius:99px; background:#fff; color:var(--p-ink) !important; text-decoration:none !important; font-size:13px; font-weight:600; }
.eh-step__mark { display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px; border-radius:50%; background:var(--p-soft); font-size:12px; }
.eh-step.is-active { background:var(--p-accent); border-color:var(--p-ink); }
.eh-step.is-done .eh-step__mark { background:var(--p-ok-bg); color:var(--p-ok-tx); }

.eh-cuest__form { display:flex; flex-direction:column; gap:16px; }
.eh-cuest__sec { background:#fff; border:1px solid var(--p-line); border-radius:14px; padding:16px; }
.eh-cuest__sec[hidden] { display:none !important; }
.eh-cuest__intro { font-weight:600; padding:10px 14px; margin-bottom:12px; background:var(--p-soft); border-radius:10px; font-size:14px; line-height:1.5; }
.eh-cuest__tip { font-size:13px; color:var(--p-muted); background:#E4EFF8; border-radius:10px; padding:10px 14px; }
.eh-cuest__tip kbd { background:#fff; border:1px solid var(--p-line); border-bottom-width:2px; border-radius:5px; padding:0 6px; font-size:12px; }
.eh-cuest__actions { display:flex; flex-wrap:wrap; gap:10px; position:sticky; bottom:0; background:rgba(255,255,255,.92); padding:12px 0; border-top:1px solid var(--p-line-soft); }
.eh-filtro { border-left:5px solid var(--p-accent-d) !important; }

.eh-scale-head { display:flex; justify-content:flex-end; gap:6px; font-size:11px; color:var(--p-muted); margin-bottom:6px; }
.eh-q { display:grid; grid-template-columns: minmax(0,1fr) auto; gap:10px 18px; align-items:center; padding:10px 8px; border-bottom:1px solid var(--p-line-soft); border-radius:8px; }
.eh-q:last-child { border-bottom:0; }
.eh-q.is-answered { background:#F8FBEF; }
.eh-q:focus, .eh-q.is-current { outline:2px solid var(--p-ink); outline-offset:-2px; }
.eh-q__text { font-size:14.5px; line-height:1.45; }
.eh-q__n { display:inline-block; min-width:30px; margin-right:6px; font-weight:700; color:var(--p-muted); }
.eh-q__opts { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.eh-opt { cursor:pointer; }
.eh-opt input { position:absolute; opacity:0; pointer-events:none; }
.eh-opt span { display:flex; flex-direction:column; align-items:center; justify-content:center; min-width:74px; padding:6px 6px; border:1px solid var(--p-line); border-radius:10px; background:#fff; text-align:center; transition:background .12s; }
.eh-opt b { font-size:14px; }
.eh-opt i { font-style:normal; font-size:10.5px; color:var(--p-muted); line-height:1.15; }
.eh-opt:hover span { background:var(--p-soft); }
.eh-opt input:checked + span { background:var(--p-accent); border-color:var(--p-ink); box-shadow:inset 0 0 0 1px var(--p-ink); }
.eh-opt input:focus-visible + span { outline:2px solid var(--p-blue); }
@media (max-width:760px) {
    .eh-q { grid-template-columns:1fr; }
    .eh-q__opts { justify-content:flex-start; }
    .eh-opt span { min-width:60px; }
    .eh-scale-head { display:none; }
}

.eh-avance { position:sticky; top:84px; z-index:5; background:#fff; border:1px solid var(--p-line); border-radius:12px; padding:10px 14px; }
.eh-avance__txt { font-size:13px; font-weight:600; margin-bottom:6px; }
.eh-avance__bar { height:8px; background:var(--p-soft); border-radius:99px; overflow:hidden; }
.eh-avance__bar span { display:block; height:100%; background:var(--p-ink); transition:width .2s; }

.eh-radios { display:flex; flex-wrap:wrap; gap:6px 18px; }
.eh-radios--col { flex-direction:column; }
.eh-radio { display:flex; gap:8px; align-items:flex-start; cursor:pointer; font-size:14px; }
.eh-consent { padding:14px; background:var(--p-soft); border-radius:12px; font-size:13px; line-height:1.5; }

.eh-bar { display:inline-block; width:100%; min-width:90px; height:10px; background:var(--p-soft); border-radius:99px; overflow:hidden; vertical-align:middle; }
.eh-bar__fill { display:block; height:100%; border-radius:99px; }
.eh-row-dominio td { background:var(--p-soft); font-weight:700; }
.eh-row-total td { background:var(--p-accent); font-weight:700; }
.eh-indent { padding-left:26px !important; }
.eh-kpi { padding:14px 16px !important; }
.eh-kpi__n { display:block; font-size:30px; line-height:1.1; }
.eh-publico { max-width:900px; margin:0 auto; padding:16px; }
@media print { .eh-cuest__actions, .eh-avance, .eh-steps, .eh-cuest__tip { display:none !important; } }

/* ==========================================================================
   v1.4 — USABILIDAD: ancho completo, bloques y textos más grandes, carga por bloques
   ========================================================================== */
.eh-psico-container {
    max-width: none !important;
    width: 100vw; box-sizing: border-box;
    margin-left: calc(50% - 50vw) !important; margin-right: 0 !important;
    padding: 28px max(clamp(16px, 3.2vw, 64px), calc((100vw - 1800px) / 2)) 100px !important;
    font-size: 17px !important;
    line-height: 1.6;
}
.eh-psico-container.eh-publico { width: auto; margin: 0 auto !important; max-width: 1000px !important; padding: 20px 16px 80px !important; }
html, body { overflow-x: clip; }

.eh-psico-title { font-size: 40px !important; }
.eh-psico-nav { gap: 10px !important; }
.eh-psico-nav-item { font-size: 16px !important; padding: 13px 24px !important; }
.eh-psico-user-info { font-size: 16px !important; }
.eh-psico-content-card { padding: clamp(20px, 2.4vw, 40px) !important; border-radius: 22px !important; min-height: 60vh; }
.eh-psico-content-card h2 { font-size: 36px !important; }
.eh-section-title { font-size: 26px !important; margin-bottom: 16px !important; }
.eh-card__head h3 { font-size: 23px !important; }
.eh-lead { font-size: 16px !important; }
.eh-hint { font-size: 14px !important; }
.eh-card { padding: 26px 28px !important; }
.eh-card--flush { padding: 0 !important; }
.eh-card__head { padding: 20px 26px !important; }
.eh-mb { margin-bottom: 30px !important; }
.eh-grid-kpi { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important; gap: 20px !important; }
.eh-grid-2 { gap: 26px !important; }
.eh-grid-3 { gap: 22px !important; }
.eh-kpi__n { font-size: 44px !important; }
.eh-kpi__valor { font-size: 46px !important; }
.eh-kpi__etq { font-size: 15px !important; }

.eh-psico-container .eh-button { min-height: 48px; padding: 0 26px; font-size: 16px !important; }
.eh-psico-container .eh-button--sm { min-height: 40px; padding: 0 16px; font-size: 14px !important; }
.eh-psico-container input[type=text], .eh-psico-container input[type=number], .eh-psico-container input[type=email],
.eh-psico-container input[type=password], .eh-psico-container input[type=date], .eh-psico-container select, .eh-psico-container textarea {
    min-height: 50px; font-size: 16px !important; padding: 10px 14px;
}
.eh-field label, .eh-ctx label { font-size: 13px !important; }
.eh-ctx { padding: 16px 22px !important; }
.eh-ctx select { min-width: 260px; }
.eh-tab { font-size: 15px !important; padding: 13px 22px !important; }
.eh-psico-container .eh-table { font-size: 16px !important; }
.eh-table th { font-size: 13px !important; padding: 16px 18px !important; }
.eh-psico-container .eh-table td { padding: 15px 18px; }
.eh-table--compact td, .eh-table--compact th { padding: 12px 14px !important; font-size: 15px !important; }
.eh-risk, .eh-pill, .eh-estado { font-size: 14px !important; padding: 5px 14px !important; }
.eh-chip { font-size: 14px; min-width: 40px; padding: 4px 12px; }
.eh-aviso { font-size: 16px !important; padding: 18px 22px !important; }
.eh-chart-card h4 { font-size: 17px !important; }
.eh-leyenda { font-size: 14px !important; }
.eh-stack { min-height: 30px; }
.eh-stack__seg { font-size: 13px !important; }

/* cuestionarios en grande */
.eh-cuest__sec { padding: 22px 26px; }
.eh-cuest__intro { font-size: 17px; padding: 14px 18px; }
.eh-q { padding: 16px 12px; gap: 14px 28px; }
.eh-q__text { font-size: 18px; line-height: 1.5; }
.eh-q__n { min-width: 40px; font-size: 16px; }
.eh-opt span { min-width: 104px; padding: 12px 8px; border-radius: 12px; }
.eh-opt b { font-size: 18px; }
.eh-opt i { font-size: 12.5px; }
.eh-step { font-size: 16px; padding: 11px 20px; }
.eh-step__mark { width: 28px; height: 28px; font-size: 14px; }
.eh-avance { padding: 14px 20px; }
.eh-avance__txt { font-size: 15px; }
.eh-avance__bar { height: 10px; }
.eh-radio { font-size: 16px; }
.eh-consent { font-size: 15px; padding: 20px; }
.eh-cuest__tip { font-size: 15px; padding: 14px 18px; }
@media (max-width: 760px) { .eh-opt span { min-width: 64px; } .eh-psico-container { font-size: 16px !important; } }

/* carga de bloques */
.eh-loadbar { position: fixed; top: 0; left: 0; height: 4px; width: 0; background: var(--eh-orange, #FF7657); z-index: 99999; opacity: 0; pointer-events: none; }
.eh-loadbar.is-on { opacity: 1; width: 75%; transition: width 6s cubic-bezier(.1,.7,.2,1); }
.eh-loadbar.is-done { opacity: 0; width: 100%; transition: width .2s, opacity .5s .2s; }
#eh-app { transition: opacity .15s; }
#eh-app.is-loading { opacity: .45; pointer-events: none; }
.eh-cuest__form .eh-grid-2, .eh-cuest__form .eh-grid-3 { row-gap: 24px !important; }
.eh-cuest__form .eh-field { gap: 8px; }
.eh-cuest__form .eh-card { margin-bottom: 4px; }

/* ==========================================================================
   MÓVIL (≤ 760 px): menú deslizable, bloques compactos, listas en tarjetas,
   cuestionario pensado para el pulgar
   ========================================================================== */
@media (max-width: 760px) {
    .eh-psico-container { padding: 14px 12px 90px !important; font-size: 16px !important; }
    .eh-psico-header-panel { margin-bottom: 10px; padding-bottom: 10px; gap: 8px; }
    .eh-psico-title { font-size: 28px !important; margin-top: 2px; }
    .eh-psico-badge { font-size: 11px; }

    /* menú: una sola fila que se desliza y se queda arriba */
    .eh-psico-nav { flex-wrap: nowrap !important; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
        gap: 8px !important; margin: 0 -12px 12px; padding: 8px 12px; position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--p-line-soft); }
    .eh-psico-nav::-webkit-scrollbar { display: none; }
    .eh-psico-nav-item { flex: 0 0 auto; font-size: 15px !important; padding: 10px 18px !important; }

    .eh-psico-content-card { padding: 16px 14px !important; border-radius: 16px !important; min-height: 0; }
    .eh-psico-content-card h2 { font-size: 26px !important; }
    .eh-section-title { font-size: 21px !important; }
    .eh-page-head { flex-direction: column; align-items: stretch !important; gap: 10px; }
    .eh-page-head .eh-actions { display: flex; flex-wrap: wrap; gap: 8px; }
    .eh-page-head .eh-actions .eh-button { flex: 1 1 auto; justify-content: center; }
    .eh-card { padding: 18px 16px !important; }
    .eh-card__head { padding: 14px 16px !important; }
    .eh-grid-2, .eh-grid-3 { grid-template-columns: 1fr !important; gap: 16px !important; }
    .eh-grid-kpi { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
    .eh-grid-kpi .eh-card { padding: 14px 12px !important; }
    .eh-kpi__n, .eh-kpi__valor { font-size: 32px !important; }
    .eh-psico-container .eh-button { width: auto; min-height: 48px; }
    .eh-ctx { flex-direction: column; align-items: stretch; padding: 12px !important; }
    .eh-ctx select { min-width: 0; width: 100%; }
    .eh-ctx__hint { display: none; }
    .eh-tabs { flex-wrap: nowrap !important; overflow-x: auto; margin: 0 -14px; padding: 0 14px; scrollbar-width: none; }
    .eh-tab { flex: 0 0 auto; font-size: 14px !important; padding: 11px 16px !important; }
    .eh-hint { font-size: 13.5px !important; }
    .eh-chart-card { padding: 14px 8px !important; min-width: 0; }
    .eh-chart, .eh-chart canvas { max-width: 100% !important; }

    /* tablas anchas: se deslizan de lado dentro de su tarjeta */
    .eh-card--flush, .eh-print-area .eh-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .eh-psico-container .eh-table { font-size: 14px !important; }

    /* lista de trabajadores en tarjetas */
    .eh-table--cards, .eh-table--cards tbody, .eh-table--cards tr, .eh-table--cards td { display: block; width: 100%; }
    .eh-table--cards thead { display: none; }
    .eh-table--cards tr { padding: 14px 12px; border-bottom: 8px solid var(--p-soft); }
    .eh-table--cards td { display: flex !important; justify-content: space-between; align-items: center; gap: 12px; border: 0 !important; padding: 6px 4px !important; text-align: right; }
    .eh-table--cards td::before { content: attr(data-label); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--p-muted); text-align: left; }
    .eh-table--cards td.eh-acciones { display: flex !important; flex-wrap: wrap; justify-content: flex-start; gap: 8px; padding-top: 12px !important; white-space: normal; }
    .eh-table--cards td.eh-acciones::before { display: none; }
    .eh-table--cards td.eh-acciones .eh-button { flex: 1 1 auto; justify-content: center; min-width: 52px; }

    /* cuestionarios para el pulgar */
    .eh-steps { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px 14px; padding: 2px 14px; scrollbar-width: none; }
    .eh-step { flex: 0 0 auto; font-size: 14px; padding: 9px 14px; }
    .eh-cuest__sec { padding: 14px 10px; border-radius: 12px; }
    .eh-cuest__intro { font-size: 15px; padding: 12px; }
    .eh-q { grid-template-columns: 1fr; gap: 10px; padding: 14px 4px; }
    .eh-q__text { font-size: 17px; }
    .eh-q__n { display: block; min-width: 0; margin: 0 0 2px; font-size: 13px; }
    .eh-q__opts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; justify-content: stretch; }
    .eh-opt span { min-width: 0; width: 100%; min-height: 64px; padding: 8px 2px; }
    .eh-opt b { font-size: 20px; }
    .eh-opt i { font-size: 10px; letter-spacing: -.01em; }
    .eh-scale-head, .eh-cuest__tip { display: none; }
    .eh-avance { top: 62px; padding: 10px 14px; }
    .eh-cuest__actions { margin: 0 -14px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); bottom: 0; z-index: 25; }
    .eh-cuest__actions .eh-button { flex: 1 1 auto; justify-content: center; padding: 0 14px; }
    .eh-radios { gap: 10px 18px; }
    .eh-radio { padding: 6px 0; font-size: 17px; }
    .eh-radio input { width: 22px; height: 22px; }
    .eh-consent { font-size: 14px; }
    .eh-publico .eh-cuest__actions { margin: 0 -16px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }

    /* resultado individual */
    .eh-table--resultado th:nth-child(2), .eh-table--resultado td:nth-child(2),
    .eh-table--resultado th:nth-child(3), .eh-table--resultado td:nth-child(3) { display: none; }
    .eh-table--resultado:not(.eh-table--extra) th:nth-child(5), .eh-table--resultado:not(.eh-table--extra) td:nth-child(5) { display: none; }
    .eh-bar { min-width: 60px; }
}
@media (max-width: 760px) { input, select, textarea { font-size: 16px !important; } } /* evita el zoom automático en iOS */
@media (max-width: 760px) {
    .eh-cuest__actions { flex-wrap: nowrap; gap: 8px; }
    .eh-cuest__actions .eh-button { font-size: 15px !important; min-height: 46px; white-space: nowrap; flex: 1 1 0; padding: 0 8px; }
    .eh-cuest__actions .eh-button--primary { flex: 2 1 0; }
}
@media (max-width: 760px) {
    .eh-table--cards td.eh-acciones .eh-button--danger { flex: 0 0 56px; min-width: 56px; }
    .eh-table--resultado td, .eh-table--resultado th { padding: 10px 8px !important; }
}
@media (max-width: 760px) {
    .eh-table--resultado { table-layout: auto; }
    .eh-table--resultado th { white-space: normal !important; font-size: 11px !important; letter-spacing: 0 !important; padding: 10px 6px !important; }
    .eh-table--resultado td { padding: 10px 6px !important; font-size: 14px !important; }
    .eh-table--resultado .eh-risk { font-size: 12px !important; padding: 4px 9px !important; }
}

/* ==========================================================================
   v1.5 — NUEVA ESTRUCTURA: menú lateral con íconos + barra superior (migas y contexto)
   Escritorio: menú a la izquierda.  Celular: barra inferior de pestañas.
   ========================================================================== */
.eh-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start; }
.eh-main { min-width: 0; }

.eh-side {
    position: sticky; top: 104px; display: flex; flex-direction: column; gap: 16px;
    background: #fff; border: 1px solid var(--p-line); border-radius: 22px; padding: 18px 14px 14px;
    max-height: calc(100vh - 124px); overflow-y: auto;
}
.eh-side__brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 12px; border-bottom: 1px solid var(--p-line-soft); }
.eh-side__logo { flex: 0 0 38px; height: 38px; border-radius: 12px; background: var(--p-accent); border: 1.5px solid var(--p-ink); position: relative; }
.eh-side__logo::after { content: ''; position: absolute; right: 7px; bottom: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--p-orange); }
.eh-side__brand strong { display: block; font-size: 14.5px; line-height: 1.25; }
.eh-side__brand small { color: var(--p-muted); font-size: 12px; }

.eh-psico-container .eh-psico-nav { display: flex !important; flex-direction: column; flex-wrap: nowrap !important; gap: 3px !important; overflow: visible; position: static; margin: 0; padding: 0; background: none; border: 0; }
.eh-nav-group { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--p-muted); padding: 12px 12px 4px; }
.eh-nav-group:first-child { padding-top: 2px; }
.eh-psico-container .eh-psico-nav-item {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px !important; border: 0 !important; border-radius: 14px !important;
    background: transparent !important; color: var(--p-ink) !important; font-size: 16px !important; font-weight: 700; text-decoration: none !important;
}
.eh-psico-nav-item svg { width: 22px; height: 22px; flex: 0 0 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.eh-psico-container .eh-psico-nav-item:hover { background: var(--p-soft) !important; }
.eh-psico-container .eh-psico-nav-item.is-active { background: var(--p-accent) !important; box-shadow: inset 0 0 0 1.5px var(--p-ink); }
.eh-psico-container .eh-psico-nav-item:focus-visible { outline: 2px solid var(--p-blue); outline-offset: 2px; }

.eh-side__user { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 8px 2px; border-top: 1px solid var(--p-line-soft); font-size: 14px; font-weight: 700; }
.eh-side__user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eh-psico-container .eh-psico-btn-logout { font-size: 13px; font-weight: 800; padding: 7px 14px; border: 1.5px solid var(--p-ink); border-radius: 99px; text-decoration: none !important; color: var(--p-ink) !important; background: #fff; }
.eh-psico-container .eh-psico-btn-logout:hover { background: var(--p-soft); }

.eh-topbar { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 24px; margin: 0 0 20px; min-height: 52px; }
.eh-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: 16px; color: var(--p-muted); flex: 1 1 280px; min-width: 0; }
.eh-crumbs a { color: var(--p-muted) !important; text-decoration: none; font-weight: 600; }
.eh-crumbs a:hover { color: var(--p-ink) !important; text-decoration: underline; }
.eh-crumbs strong { color: var(--p-ink); font-size: 18px; }
.eh-crumbs__sep { opacity: .5; }
.eh-topbar__salir { display: none; }

.eh-topbar .eh-ctx { display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin: 0 !important; padding: 8px 12px !important; background: #fff !important; border: 1px solid var(--p-line) !important; border-radius: 16px !important; }
.eh-topbar .eh-ctx label { flex-direction: row; align-items: center; gap: 8px; font-size: 12px !important; }
.eh-topbar .eh-ctx select { min-height: 42px; min-width: 200px; border-radius: 12px; font-weight: 700; }
.eh-topbar .eh-ctx select[name=anio] { min-width: 110px; }

/* contenido plano: las tarjetas de adentro dan la estructura */
.eh-psico-container .eh-psico-content-card { background: transparent !important; border: 0 !important; padding: 0 !important; box-shadow: none !important; min-height: 50vh; }
.eh-psico-content-card h2 { font-size: 36px !important; }

/* pestañas internas: una sola fila, subrayado */
.eh-tabs { display: flex; flex-wrap: nowrap !important; overflow-x: auto; gap: 4px; border-bottom: 1.5px solid var(--p-line); margin-bottom: 22px; scrollbar-width: thin; }
.eh-tab { flex: 0 0 auto; background: transparent !important; border: 0 !important; border-bottom: 3px solid transparent !important; border-radius: 0 !important; margin-bottom: -1.5px; padding: 12px 16px !important; font-size: 15px !important; white-space: nowrap; }
.eh-tab:hover { background: var(--p-soft) !important; }
.eh-tab.is-active { border-bottom-color: var(--p-ink) !important; background: var(--p-accent) !important; border-radius: 10px 10px 0 0 !important; }

.eh-grid-kpi { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important; }

@media (max-width: 1100px) { .eh-shell { grid-template-columns: 210px minmax(0, 1fr); gap: 20px; } .eh-psico-nav-item { padding: 11px 12px !important; font-size: 15px !important; } }

/* ---- Celular y tableta vertical: barra inferior ---- */
@media (max-width: 900px) {
    .eh-shell { display: block; }
    .eh-psico-container { padding-bottom: 96px !important; }
    .eh-side { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 9000; max-height: none; overflow: visible; flex-direction: row; gap: 0;
        border: 0; border-top: 1px solid var(--p-line); border-radius: 18px 18px 0 0; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 24px rgba(23,28,24,.10); }
    .eh-side__brand, .eh-side__user, .eh-nav-group { display: none; }
    .eh-psico-container .eh-psico-nav { flex-direction: row; width: 100%; gap: 2px !important; }
    .eh-psico-container .eh-psico-nav-item { flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: 3px; padding: 8px 2px !important; border-radius: 12px !important; font-size: 10.5px !important; font-weight: 700; text-align: center; line-height: 1.15; }
    .eh-psico-nav-item span { font-size: 0; display: block; }
    .eh-psico-nav-item span::after { content: attr(data-short); font-size: 10.5px; letter-spacing: -.02em; white-space: nowrap; }
    .eh-psico-container .eh-psico-nav-item.is-active { box-shadow: none; }
    .eh-psico-container .eh-psico-nav-item.is-active svg { stroke-width: 2.4; }
    .eh-topbar { gap: 10px; margin-bottom: 14px; }
    .eh-crumbs { font-size: 14px; flex: 1 1 100%; order: 1; }
    .eh-crumbs strong { font-size: 16px; }
    .eh-topbar .eh-ctx { order: 3; flex: 1 1 100%; flex-direction: column; align-items: stretch; }
    .eh-topbar .eh-ctx label { justify-content: space-between; }
    .eh-topbar .eh-ctx select { min-width: 0; flex: 1; max-width: 70%; }
    .eh-topbar__salir { display: inline-block; order: 2; flex: 0 0 auto; font-size: 13px; font-weight: 800; padding: 6px 14px; border: 1.5px solid var(--p-ink); border-radius: 99px; text-decoration: none !important; color: var(--p-ink) !important; background: #fff; }
    .eh-crumbs { flex: 1 1 0; }
    .eh-cuest__actions { bottom: 66px !important; }
    .eh-publico .eh-cuest__actions { bottom: 0 !important; }
    .eh-avance { top: 70px !important; }
}

/* primeros pasos */
.eh-onboard__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.eh-onboard__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.eh-onboard__list a { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border: 1px solid var(--p-line-soft); border-radius: 16px; text-decoration: none !important; color: var(--p-ink) !important; background: #fff; }
.eh-onboard__list a:hover { background: var(--p-soft); }
.eh-onboard__list strong { display: block; font-size: 16.5px; }
.eh-onboard__list small { display: block; color: var(--p-muted); font-size: 14px; }
.eh-onboard__n { flex: 0 0 34px; height: 34px; border-radius: 50%; border: 2px solid var(--p-line); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.eh-onboard__list li.is-ok .eh-onboard__n { background: var(--p-ok-bg); border-color: transparent; color: var(--p-ok-tx); }
.eh-onboard__list li.is-ok strong { text-decoration: line-through; text-decoration-color: rgba(23,28,24,.35); color: var(--p-muted); }
.eh-onboard__list li.is-next a { border: 2px solid var(--p-ink); background: #FBFFE9; }
.eh-onboard__list li.is-next .eh-onboard__n { background: var(--p-accent); border-color: var(--p-ink); }
.eh-onboard__list em { margin-left: auto; font-style: normal; font-weight: 800; font-size: 14px; white-space: nowrap; }
@media (max-width: 760px) { .eh-onboard__list em { display: none; } }

/* clientes en tarjetas */
.eh-clientes { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 22px; }
.eh-cliente { display: flex; flex-direction: column; gap: 18px; }
.eh-cliente h3 { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: 26px; margin-bottom: 4px; }
.eh-cliente__nums { font-size: 15px; margin-bottom: 8px; color: var(--p-muted); }
.eh-cliente__nums strong { color: var(--p-ink); }
.eh-cliente__acciones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; align-items: center; }
.eh-cliente__acciones .eh-button--primary { flex: 1 1 100%; justify-content: center; }
@media (max-width: 760px) { .eh-clientes { grid-template-columns: 1fr; } }

.eh-onboard__head .eh-pill { white-space: nowrap; flex: 0 0 auto; }
@media (max-width: 760px) {
    .eh-hide-m { display: none !important; }
    .eh-page-head .eh-actions .eh-button { flex: 1 1 calc(50% - 8px); padding: 0 10px; font-size: 14px !important; }
}
