/* ══════════════════════════ Módulo Helpdesk ══════════════════════════
   Prefijo de clases: .help-
   Paleta corporativa (variables globales con fallback):
     azul oscuro  #1e3a5f   azul medio  #2c5282   azul claro #1976d2
     dorado       #d4af37   naranja     #fe7800   fondo      #f5f7fb
     linea        #e0e4ec   OK #2e7d32  warn #c77700  critico  #c62828
   ═══════════════════════════════════════════════════════════════════════ */

.help-page {
    --help-azul-oscuro: var(--primario, #1e3a5f);
    --help-azul-medio: #2c5282;
    --help-azul-claro: #1976d2;
    --help-dorado: #d4af37;
    --help-naranja: var(--secundario, #fe7800);
    --help-fondo: #f5f7fb;
    --help-linea: #e0e4ec;
    --help-ok: #2e7d32;
    --help-warn: #c77700;
    --help-crit: #c62828;
    background: var(--help-fondo);
    padding: 4px 2px 16px;
}

/* ── Contenedor de tablas (tickets + config) ── */

.help-tablewrap {
    position: relative;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e0e4ec;
    overflow: auto;
}

.help-table thead th {
    background: #2c5282;
    color: #fff;
    font-size: .8rem;
    white-space: nowrap;
}

/* ════════════════════ Cabecera de la página de tickets ════════════════════ */

.help-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 6px 4px 14px;
}

.help-head__title {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--help-azul-oscuro, #1e3a5f);
    margin: 0;
    letter-spacing: -.01em;
}

.help-head__sub {
    margin: 4px 0 0;
    font-size: .86rem;
    color: #64748b;
    max-width: 640px;
}

.help-head__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ── Botones del rediseño ── */

.help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 8px 16px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, box-shadow .15s ease, border-color .15s ease, transform .1s ease;
    white-space: nowrap;
}

.help-btn:active { transform: translateY(1px); }
.help-btn:disabled { opacity: .6; cursor: not-allowed; }

.help-btn--sm { padding: 5px 11px; font-size: .8rem; }

.help-btn--accent {
    background: var(--help-naranja, #fe7800);
    color: #fff;
    box-shadow: 0 2px 6px rgba(254,120,0,.28);
}
.help-btn--accent:hover { background: #e96d00; }

.help-btn--dark {
    background: var(--help-azul-oscuro, #1e3a5f);
    color: #fff;
}
.help-btn--dark:hover { background: #16304e; }

.help-btn--ghost {
    background: #fff;
    color: #334155;
    border-color: var(--help-linea, #e0e4ec);
}
.help-btn--ghost:hover { background: #f1f5fb; border-color: #cbd5e1; }

.help-btn--success {
    background: var(--help-ok, #2e7d32);
    color: #fff;
    box-shadow: 0 2px 6px rgba(46,125,50,.25);
}
.help-btn--success:hover { background: #276b2b; }

.help-btn--amber {
    background: var(--help-warn, #c77700);
    color: #fff;
}
.help-btn--amber:hover { background: #ad6800; }

.help-btn--amber-outline {
    background: #fff;
    color: var(--help-warn, #c77700);
    border-color: #f0c37a;
}
.help-btn--amber-outline:hover { background: #fff7ea; }

/* ════════════════════ KPI cards ════════════════════ */

.help-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 14px;
}

.help-kpi {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: 1px solid var(--help-linea, #e0e4ec);
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 1px 3px rgba(16,32,58,.05);
}

.help-kpi__icon {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.help-kpi__icon--blue { background: #e6effb; color: var(--help-azul-claro, #1976d2); }
.help-kpi__icon--red { background: #fdeaea; color: var(--help-crit, #c62828); }
.help-kpi__icon--orange { background: #fff0e0; color: var(--help-naranja, #fe7800); }
.help-kpi__icon--green { background: #e7f4e8; color: var(--help-ok, #2e7d32); }

.help-kpi__num {
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1;
    color: var(--help-azul-oscuro, #1e3a5f);
}

.help-kpi__label {
    font-size: .78rem;
    color: #64748b;
    margin-top: 4px;
}

/* ════════════════════ Barra de filtros ════════════════════ */

.help-filterbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid var(--help-linea, #e0e4ec);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 16px;
}

.help-search {
    position: relative;
    flex: 1 1 260px;
    min-width: 220px;
}

.help-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: .85rem;
}

.help-search input {
    width: 100%;
    border: 1px solid var(--help-linea, #e0e4ec);
    border-radius: 9px;
    padding: 8px 12px 8px 34px;
    font-size: .85rem;
    background: #f8fafc;
    outline: none;
    transition: border-color .15s ease, background .15s ease;
}

.help-search input:focus {
    border-color: var(--help-azul-claro, #1976d2);
    background: #fff;
}

.help-seg {
    display: inline-flex;
    background: #eef2f8;
    border: 1px solid var(--help-linea, #e0e4ec);
    border-radius: 9px;
    padding: 3px;
    gap: 2px;
}

.help-seg__pill {
    border: none;
    background: transparent;
    color: #475569;
    font-size: .82rem;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 7px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.help-seg__pill:hover { color: var(--help-azul-oscuro, #1e3a5f); }

.help-seg__pill.is-active {
    background: var(--help-azul-oscuro, #1e3a5f);
    color: #fff;
    box-shadow: 0 1px 3px rgba(16,32,58,.2);
}

.help-select {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: 190px;
}

.help-select i {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    font-size: .82rem;
    pointer-events: none;
}

.help-select select {
    width: 100%;
    border: 1px solid var(--help-linea, #e0e4ec);
    border-radius: 9px;
    padding: 8px 12px 8px 32px;
    font-size: .83rem;
    background: #f8fafc;
    color: #334155;
    outline: none;
    cursor: pointer;
    appearance: none;
}

.help-select select:focus { border-color: var(--help-azul-claro, #1976d2); background: #fff; }

.help-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .82rem;
    color: #475569;
    margin: 0;
    cursor: pointer;
    user-select: none;
}

.help-check input { width: 15px; height: 15px; cursor: pointer; }

/* ── Puntos de color por estado (kanban / pills / stepper) ── */

.help-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex: 0 0 auto;
    background: #94a3b8;
}

.help-dot--Nuevo { background: #1976d2; }
.help-dot--EnAtencion { background: #0891b2; }
.help-dot--EnEsperaCliente { background: #c77700; }
.help-dot--Escalado { background: #c62828; }
.help-dot--Resuelto { background: #2e7d32; }
.help-dot--Cerrado { background: #6c757d; }

/* ════════════════════ Kanban ════════════════════ */

.help-kanban-wrap { position: relative; }

.help-kanban {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.help-col {
    flex: 0 0 280px;
    max-width: 280px;
    background: #eef1f7;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 340px);
    min-height: 160px;
}

.help-col__header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-weight: 700;
    font-size: .84rem;
    color: #334155;
    border-bottom: 1px solid #e2e7f0;
}

.help-col__label { flex: 1 1 auto; }

.help-col__count {
    background: #fff;
    border: 1px solid #dbe1ec;
    color: #475569;
    border-radius: 20px;
    padding: 1px 9px;
    font-size: .74rem;
    font-weight: 700;
}

.help-col__body {
    padding: 10px;
    overflow-y: auto;
    flex: 1 1 auto;
}

.help-col__empty {
    text-align: center;
    color: #94a3b8;
    font-size: .8rem;
    padding: 18px 0;
}

.help-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid var(--help-linea, #e0e4ec);
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(16,32,58,.05);
    transition: box-shadow .15s ease, transform .12s ease, border-color .15s ease;
}

.help-card:hover {
    box-shadow: 0 6px 16px rgba(16,32,58,.12);
    transform: translateY(-2px);
    border-color: #cdd6e5;
}

.help-card__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.help-card__codigo {
    font-weight: 700;
    font-size: .76rem;
    letter-spacing: .02em;
    color: #64748b;
    font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
}

.help-card__sla {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .73rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    background: #f1f5f9;
}

.help-card__sla i { font-size: .7rem; }

/* Tinte del chip SLA segun urgencia (reutiliza .help-sla-*) */
.help-card__sla.help-sla-ok { background: #e7f4e8; }
.help-card__sla.help-sla-warn { background: #fbf0dc; }
.help-card__sla.help-sla-crit { background: #fdeaea; }
.help-card__sla.help-sla-none { background: #f1f5f9; }

.help-sla-ok { color: #2e7d32; }
.help-sla-warn { color: #c77700; }
.help-sla-crit { color: #c62828; }
.help-sla-none { color: #94a3b8; }

.help-card__asunto {
    font-size: .9rem;
    font-weight: 700;
    color: #1f2937;
    margin: 8px 0 2px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.help-card__cliente {
    font-size: .78rem;
    color: #64748b;
    margin-bottom: 8px;
}

.help-card__chips {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.help-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .7rem;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 20px;
    line-height: 1.5;
}

.help-tag--tipo { background: #eef1f6; color: #475569; }
.help-tag--nivel { background: #e6effb; color: var(--help-azul-claro, #1976d2); }
.help-tag--premium { background: #fbf3d7; color: #9a7a10; }

.help-card__slabar {
    height: 4px;
    border-radius: 4px;
    background: #edf1f6;
    overflow: hidden;
    margin-bottom: 9px;
}

.help-card__slabar span {
    display: block;
    height: 100%;
    border-radius: 4px;
    background: currentColor;
    transition: width .3s ease;
}

.help-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: .74rem;
    color: #64748b;
}

.help-card__asesor {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.help-card__asesor-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

.help-card__unassigned {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #c77700;
    font-weight: 600;
}

.help-card__fecha { white-space: nowrap; }

/* ── Avatares con iniciales ── */

.help-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--help-azul-medio, #2c5282);
    color: #fff;
    font-weight: 700;
    flex: 0 0 auto;
    line-height: 1;
}

.help-avatar--xs { width: 22px; height: 22px; font-size: .62rem; }
.help-avatar--md { width: 42px; height: 42px; font-size: .95rem; }

/* ════════════════════ Modal Nuevo ticket (legacy bootstrap) ════════════════════ */

.help-modal .modal-header {
    background: var(--primario, #1e3a5f);
    color: #fff;
    border-bottom: 3px solid #d4af37;
}

.help-modal .modal-title { font-weight: 700; }

.help-modal .close { color: #fff; opacity: .9; }

/* ════════════════════ Drawer de detalle ════════════════════ */

.help-drawer-backdrop {
    position: fixed;
    top: 48px; /* debajo del .main-header navbar (48px), para no taparlo */
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(15, 27, 45, .5);
    z-index: 1050;
    animation: help-fade-in .2s ease;
}

.help-drawer {
    position: fixed;
    top: 48px; /* arranca debajo del .main-header navbar (48px) */
    right: 0;
    bottom: 0;
    width: 460px;
    max-width: 100vw;
    background: #fff;
    z-index: 1051;
    display: flex;
    flex-direction: column;
    box-shadow: -12px 0 34px rgba(16, 32, 58, .22);
    animation: help-drawer-in .28s cubic-bezier(.22, 1, .36, 1);
}

@keyframes help-drawer-in {
    from { right: -480px; }
    to { right: 0; }
}

@keyframes help-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Header oscuro */
.help-drawer__head {
    position: relative;
    background: linear-gradient(135deg, var(--help-azul-oscuro, #1e3a5f) 0%, var(--help-azul-medio, #2c5282) 100%);
    border-bottom: 3px solid var(--help-dorado, #d4af37);
    color: #fff;
    padding: 16px 46px 16px 20px;
    flex: 0 0 auto;
}

.help-drawer__x {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    cursor: pointer;
    transition: background .15s ease;
}

.help-drawer__x:hover { background: rgba(255, 255, 255, .25); }

.help-drawer__eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.help-drawer__codigo {
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .03em;
    opacity: .85;
    font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
}

.help-drawer__title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.help-state-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .68rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .18);
    color: #fff;
}

.help-state-badge--Nuevo { background: #1976d2; }
.help-state-badge--EnAtencion { background: #0891b2; }
.help-state-badge--EnEsperaCliente { background: #c77700; }
.help-state-badge--Escalado { background: #c62828; }
.help-state-badge--Resuelto { background: #2e7d32; }
.help-state-badge--Cerrado { background: #64748b; }
.help-state-badge--premium { background: var(--help-dorado, #d4af37); color: #3d3005; }

/* Barra SLA bajo el header */
.help-drawer__sla {
    flex: 0 0 auto;
    padding: 9px 20px 11px;
    background: #f8fafc;
    border-bottom: 1px solid var(--help-linea, #e0e4ec);
}

.help-drawer__sla-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 7px;
}

.help-drawer__sla-txt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    font-weight: 700;
}

.help-drawer__sla-limit {
    font-size: .78rem;
    color: #64748b;
    font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
}

.help-drawer__sla-bar {
    height: 5px;
    border-radius: 5px;
    background: #e5eaf1;
    overflow: hidden;
}

.help-drawer__sla-bar span {
    display: block;
    height: 100%;
    border-radius: 5px;
    background: currentColor;
    transition: width .3s ease;
}

/* Cuerpo con scroll */
.help-drawer__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 14px 20px 18px;
}

/* Footer sticky */
.help-drawer__foot {
    flex: 0 0 auto;
    display: flex;
    gap: 10px;
    padding: 12px 20px;
    border-top: 1px solid var(--help-linea, #e0e4ec);
    background: #fff;
}

.help-drawer__foot .help-btn { flex: 1 1 auto; }

/* ── Campos del detalle ── */

.help-field-block { margin-bottom: 16px; }

.help-flabel {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 5px;
}

.help-desc {
    font-size: .88rem;
    color: #334155;
    line-height: 1.5;
    white-space: pre-line;
}

.help-count-pill {
    text-transform: none;
    letter-spacing: 0;
    background: #eef1f6;
    color: #475569;
    border-radius: 20px;
    padding: 0 8px;
    font-size: .7rem;
    font-weight: 700;
}

.help-mt { margin-top: 18px; }

.help-link {
    color: var(--help-azul-claro, #1976d2);
    font-weight: 600;
    cursor: pointer;
}
.help-link:hover { text-decoration: underline; }

/* Grid de campos */
.help-fgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
    margin-bottom: 16px;
}

.help-fval {
    font-size: .86rem;
    color: #1f2937;
    font-weight: 600;
    word-break: break-word;
}

.help-fval--danger { color: var(--help-crit, #c62828); }

/* Card de cliente */
.help-cliente-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid var(--help-linea, #e0e4ec);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.help-cliente-card__info { flex: 1 1 auto; min-width: 0; }

.help-cliente-card__name {
    font-size: .95rem;
    font-weight: 700;
    color: #1f2937;
}

.help-phone-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #e7f4e8;
    color: var(--help-ok, #2e7d32);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: .8rem;
    font-weight: 700;
    white-space: nowrap;
}

/* ── Stepper de flujo ── */

.help-stepper {
    display: flex;
    align-items: flex-start;
    margin-top: 4px;
}

.help-step {
    position: relative;
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
}

.help-step__dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .74rem;
    font-weight: 700;
    z-index: 1;
    transition: background .2s ease, color .2s ease;
}

.help-step__line {
    position: absolute;
    top: 14px;
    left: 50%;
    width: 100%;
    height: 3px;
    background: #e2e8f0;
    z-index: 0;
}

.help-step__label {
    font-size: .68rem;
    color: #94a3b8;
    margin-top: 6px;
    line-height: 1.2;
    padding: 0 2px;
}

.help-step.is-done .help-step__dot { background: #bcd6f0; color: #1e3a5f; }
.help-step.is-done .help-step__line { background: #bcd6f0; }
.help-step.is-done .help-step__label { color: #64748b; }

.help-step.is-current .help-step__dot {
    background: var(--help-azul-claro, #1976d2);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(25, 118, 210, .18);
}
.help-step.is-current .help-step__label { color: var(--help-azul-oscuro, #1e3a5f); font-weight: 700; }

/* ── Paneles de acción ── */

.help-panel {
    background: #f8fafc;
    border: 1px solid var(--help-linea, #e0e4ec);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 14px;
}

.help-panel--escalar {
    background: #fffaf1;
    border-color: #f0dcb4;
}

.help-panel__title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .9rem;
    font-weight: 700;
    color: var(--help-azul-oscuro, #1e3a5f);
    margin-bottom: 12px;
}

.help-panel--escalar .help-panel__title { color: #a86a00; }

.help-panel__actions {
    display: flex;
    gap: 9px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.help-input {
    width: 100%;
    border: 1px solid var(--help-linea, #e0e4ec);
    border-radius: 9px;
    padding: 8px 12px;
    font-size: .84rem;
    background: #fff;
    outline: none;
    transition: border-color .15s ease;
}

.help-input:focus { border-color: var(--help-azul-claro, #1976d2); }

.help-textarea { resize: vertical; min-height: 52px; }

/* Pills de estado */
.help-statepills {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 12px;
}

.help-statepill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--help-linea, #e0e4ec);
    background: #fff;
    color: #475569;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.help-statepill:hover { border-color: #cbd5e1; background: #f1f5fb; }

.help-statepill.is-active {
    background: var(--help-azul-oscuro, #1e3a5f);
    color: #fff;
    border-color: var(--help-azul-oscuro, #1e3a5f);
}

.help-statepill.is-active .help-dot { box-shadow: 0 0 0 2px rgba(255, 255, 255, .5); }

/* Pills de nivel (escalar) */
.help-nivelpills {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.help-nivelpill {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    border: 1.5px solid var(--help-linea, #e0e4ec);
    background: #fff;
    border-radius: 10px;
    padding: 10px 8px;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.help-nivelpill b { font-size: .86rem; color: #334155; }
.help-nivelpill span { font-size: .72rem; color: #94a3b8; }

.help-nivelpill:hover { border-color: #f0c37a; }

.help-nivelpill.is-active {
    border-color: var(--help-naranja, #fe7800);
    background: #fff5eb;
    box-shadow: 0 2px 8px rgba(254, 120, 0, .15);
}

.help-nivelpill.is-active b { color: #c15b00; }
.help-nivelpill.is-active span { color: #d07d2e; }

/* Chips de persona */
.help-personchips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 12px;
}

.help-personchips__empty { font-size: .8rem; color: #94a3b8; }

.help-personchip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--help-linea, #e0e4ec);
    background: #fff;
    color: #475569;
    border-radius: 20px;
    padding: 4px 12px 4px 4px;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.help-personchip:hover { border-color: #cbd5e1; background: #f1f5fb; }

.help-personchip.is-active {
    background: var(--help-azul-oscuro, #1e3a5f);
    color: #fff;
    border-color: var(--help-azul-oscuro, #1e3a5f);
}

.help-alert {
    background: #fdf3d6;
    border: 1px solid #f0dca0;
    color: #7a5b00;
    border-radius: 9px;
    padding: 9px 12px;
    font-size: .82rem;
    margin-top: 6px;
}

/* ── Dropzone de adjuntos ── */

.help-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 4px;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 22px 16px;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
    margin-bottom: 12px;
}

.help-dropzone:hover { border-color: var(--help-azul-claro, #1976d2); background: #f2f7fd; }

.help-dropzone > i {
    font-size: 1.6rem;
    color: var(--help-azul-claro, #1976d2);
    margin-bottom: 2px;
}

.help-dropzone__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.help-dropzone__t { font-size: .85rem; font-weight: 600; color: #334155; }
.help-dropzone__s { font-size: .74rem; color: #94a3b8; }

.help-dropzone__sel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #eef4fc;
    border: 1px solid #d5e3f5;
    border-radius: 9px;
    padding: 8px 12px;
    font-size: .82rem;
    color: #334155;
    margin-bottom: 12px;
}

.help-dropzone__sel > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Lista de archivos ── */

.help-files { display: flex; flex-direction: column; gap: 8px; }

.help-file {
    display: flex;
    align-items: center;
    gap: 11px;
    border: 1px solid var(--help-linea, #e0e4ec);
    border-radius: 10px;
    padding: 9px 12px;
    background: #fff;
}

.help-file__badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 30px;
    border-radius: 7px;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .03em;
    color: #fff;
    background: #64748b;
}

.help-file__badge--img { background: #0891b2; }
.help-file__badge--pdf { background: #c62828; }
.help-file__badge--xls { background: #2e7d32; }
.help-file__badge--doc { background: #1976d2; }
.help-file__badge--txt { background: #64748b; }
.help-file__badge--other { background: #94a3b8; }

.help-file__info { flex: 1 1 auto; min-width: 0; }

.help-file__name {
    display: block;
    font-size: .84rem;
    font-weight: 600;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.help-file__name:hover { color: var(--help-azul-claro, #1976d2); }

.help-file__meta { font-size: .72rem; color: #94a3b8; }

.help-file__dl,
.help-file__del {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--help-linea, #e0e4ec);
    background: #fff;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.help-file__dl { color: var(--help-azul-claro, #1976d2); }
.help-file__dl:hover { background: #eef4fc; }

.help-file__del { color: var(--help-crit, #c62828); }
.help-file__del:hover { background: #fdeaea; border-color: #f3c2c2; }

/* ════════════════════ Timeline (bitácora) ════════════════════ */

.help-timeline {
    list-style: none;
    padding-left: 0;
    margin: 6px 0 0;
}

.help-timeline__empty {
    color: #94a3b8;
    font-size: .82rem;
    padding: 8px 2px;
}

.help-tl-item {
    display: flex;
    gap: 11px;
    padding: 0 0 14px;
    position: relative;
}

.help-tl-item:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 24px;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.help-tl-item__ico {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef1f6;
    color: #94a3b8;
    font-size: .6rem;
    z-index: 1;
}

.help-tl-item__ico--up {
    background: #fdeaea;
    color: var(--help-crit, #c62828);
    font-size: .72rem;
}

.help-tl-item__body { flex: 1 1 auto; min-width: 0; padding-top: 1px; }

.help-tl-item__evento {
    font-weight: 700;
    color: var(--help-azul-oscuro, #1e3a5f);
    font-size: .84rem;
}

.help-tl-item__detalle {
    font-size: .82rem;
    color: #475569;
    margin-top: 2px;
    white-space: pre-line;
}

.help-tl-item__meta {
    font-size: .72rem;
    color: #94a3b8;
    margin-top: 3px;
}

/* Titulo de sección de timeline (compartido con otras vistas) */
.help-timeline__seccion {
    color: var(--primario, #1e3a5f);
    font-weight: 700;
    margin: 6px 0 10px;
}

/* ── Actividades vinculadas (Productividad) ── */

.help-actividades {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

.help-actividad-card {
    border: 1px solid var(--linea, #e0e4ec);
    border-radius: 10px;
    padding: 11px 13px;
    background: #fff;
}

.help-actividad-card__top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.help-adot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.help-adot--open { background: #c77700; }
.help-adot--done { background: #2e7d32; }

.help-actividad-card__tipo {
    font-size: .8rem;
    font-weight: 600;
    color: #334155;
}

.help-abadge {
    font-size: .68rem;
    font-weight: 700;
    padding: 1px 9px;
    border-radius: 20px;
}

.help-abadge--open { background: #fbf0dc; color: #c77700; }
.help-abadge--done { background: #e7f4e8; color: #2e7d32; }

.help-actividad-card__fecha {
    margin-left: auto;
    font-size: .74rem;
    color: #94a3b8;
}

.help-actividad-card__asunto {
    font-weight: 600;
    color: #263449;
    font-size: .85rem;
}

.help-actividad-card__detalle {
    font-size: .82rem;
    color: #475569;
    margin-top: 2px;
    white-space: pre-line;
}

.help-actividad-card__meta {
    font-size: .74rem;
    color: #64748b;
    margin-top: 4px;
}

/* ── H2: panel de contexto en la bandeja de chat (plugin PanelContextoHelpdesk, prefijo .help-panel-) ── */

.help-panel-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.help-panel-item {
    border: 1px solid var(--linea, #e0e4ec);
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff;
}

.help-panel-item__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.help-panel-item__codigo {
    font-weight: 700;
    color: var(--primario, #1e3a5f);
    font-size: .85rem;
}

.help-panel-item__asunto {
    font-size: .82rem;
    color: #333;
    margin-bottom: 4px;
}

.help-panel-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: .72rem;
    color: #64748b;
}

.help-panel-item__nivel {
    font-weight: 700;
    color: var(--secundario, #fe7800);
}

.help-panel-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px dashed var(--linea, #e0e4ec);
    padding-top: 10px;
    margin-top: 6px;
}

.help-panel-form__ta {
    min-height: 60px;
    resize: vertical;
}

.help-panel-form__acciones {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ── H3: Escalamiento sobre Productividad — Checklist ────────── */

.help-checklist {
    margin-top: 8px;
    border-top: 1px dashed var(--linea, #e0e4ec);
    padding-top: 6px;
}

.help-checklist__toggle {
    background: none;
    border: none;
    padding: 2px 0;
    font-size: .8rem;
    color: var(--primario, #1e3a5f);
    font-weight: 600;
    cursor: pointer;
}

.help-checklist__toggle:hover {
    text-decoration: underline;
}

.help-checklist__body {
    margin-top: 6px;
    padding-left: 4px;
}

.help-checklist__item {
    margin-bottom: 6px;
}

.help-checklist__item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: .82rem;
    font-weight: 600;
    color: #334155;
    padding: 3px 4px;
    border-radius: 4px;
}

.help-checklist__item-head:hover {
    background: #f5f7fb;
}

.help-checklist__avance {
    font-size: .75rem;
    color: #64748b;
    display: flex;
    align-items: center;
}

.help-checklist__items {
    list-style: none;
    margin: 4px 0 6px 18px;
    padding: 0;
}

.help-checklist__items li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .8rem;
    padding: 2px 0;
}

.help-checklist__done span {
    text-decoration: line-through;
    color: #94a3b8;
}

.help-checklist__additem {
    display: flex;
    gap: 6px;
    margin-left: 18px;
    margin-bottom: 4px;
}

.help-checklist__addlist {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    border-top: 1px dashed var(--linea, #e0e4ec);
    padding-top: 8px;
}

/* ══════════════════════ Dashboard de Soporte (H4) ══════════════════════
   Prefijo: .helpdash-
   ═══════════════════════════════════════════════════════════════════════ */

.helpdash-filtros {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--linea, #e0e4ec);
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 14px;
}

.helpdash-filtro-fechas {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.helpdash-filtro-fechas label {
    margin: 0;
    font-size: .8rem;
    font-weight: 600;
    color: var(--primario, #1e3a5f);
}

.helpdash-filtro-fechas input[type="date"] {
    width: auto;
    min-width: 140px;
}

.helpdash-presets {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.helpdash-card-head {
    background: var(--primario, #1e3a5f);
    color: #fff;
    font-weight: 600;
    border-bottom: 2px solid #d4af37;
    display: flex;
    align-items: center;
    gap: 8px;
}

.helpdash-card-head--alerta {
    background: #c62828;
    border-bottom-color: #fe7800;
}

.helpdash-table {
    font-size: .85rem;
}

.helpdash-table thead th {
    background: #f5f7fb;
    color: var(--primario, #1e3a5f);
    border-bottom: 2px solid var(--linea, #e0e4ec);
    font-weight: 600;
}

.helpdash-table tbody tr:hover {
    background: #f5f7fb;
}

.helpdash-carga {
    display: inline-block;
    min-width: 26px;
    padding: 1px 8px;
    border-radius: 10px;
    background: #2c5282;
    color: #fff;
    font-weight: 600;
    font-size: .8rem;
}

.helpdash-sla-ok   { color: #2e7d32; font-weight: 600; }
.helpdash-sla-warn { color: #c77700; font-weight: 600; }
.helpdash-sla-bad  { color: #c62828; font-weight: 600; }

.helpdash-row-alerta td {
    background: #fff5f5;
}

.helpdash-empty {
    text-align: center;
    color: #8a94a6;
    padding: 24px 10px;
    font-size: .9rem;
}

.helpdash-empty i {
    display: block;
    font-size: 1.6rem;
    margin-bottom: 6px;
    opacity: .6;
}

/* ── H5: sugerencia IA (boton + caja de sugerencia, usados en el modal Nuevo ticket
      de HelpTicketsPage y en el mini-form de PanelContextoHelpdesk) ── */
.help-ia-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.help-ia-box {
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px solid var(--linea-suave, #e0e4ec);
    border-left: 3px solid var(--primario, #284A70);
    border-radius: 6px;
    background: var(--fondo-neutro, #f5f7fb);
    font-size: .82rem;
}

.help-ia-box__t {
    font-weight: 600;
    color: var(--primario, #284A70);
    margin-bottom: 4px;
}

.help-ia-box__prob {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed var(--linea-suave, #e0e4ec);
}

.help-ia-box__sol {
    margin: 4px 0;
    font-style: italic;
    color: #2e7d32;
    white-space: pre-wrap;
}

.help-ia-box__linked {
    color: #2e7d32;
    font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════════════════
   Página de configuración del Helpdesk (HelpConfigPage) — prefijo .help-cfg
   Reutiliza .help-page (variables), .help-head*, .help-btn*, .help-search,
   .help-seg*, .help-check, .help-input, .help-tag*, .help-tablewrap/.help-table.
   ══════════════════════════════════════════════════════════════════════════ */

.help-cfg {
    padding-bottom: 24px;
}

/* ── Chip de estado de guardado (cabecera) ── */

.help-cfg-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    border: 1px solid transparent;
    white-space: nowrap;
}

.help-cfg-chip--ok {
    background: #e7f4e8;
    color: var(--help-ok, #2e7d32);
    border-color: #c3e3c6;
}

.help-cfg-chip--warn {
    background: #fbf0dc;
    color: var(--help-warn, #c77700);
    border-color: #edd6ac;
}

/* ── Pestañas tipo pill ── */

.help-ctabs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0 4px 14px;
}

.help-ctab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--help-linea, #e0e4ec);
    background: #fff;
    color: #475569;
    font-size: .84rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}

.help-ctab i { font-size: .82rem; opacity: .85; }

.help-ctab:hover {
    border-color: #cbd5e1;
    color: var(--help-azul-oscuro, #1e3a5f);
}

.help-ctab.is-active {
    background: var(--help-azul-oscuro, #1e3a5f);
    border-color: var(--help-azul-oscuro, #1e3a5f);
    color: #fff;
}

.help-ctab__badge {
    min-width: 20px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #eef1f6;
    color: #475569;
    font-size: .7rem;
    font-weight: 700;
    text-align: center;
}

.help-ctab.is-active .help-ctab__badge {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}

.help-ctab__badge.is-on { background: #e7f4e8; color: var(--help-ok, #2e7d32); }
.help-ctab__badge.is-off { background: #eef1f6; color: #94a3b8; }
.help-ctab.is-active .help-ctab__badge.is-on { background: #2e7d32; color: #fff; }
.help-ctab.is-active .help-ctab__badge.is-off { background: rgba(255, 255, 255, .22); color: #fff; }

/* ── Layout principal + columna lateral ── */

.help-cfg-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 16px;
    align-items: start;
}

.help-cfg-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.help-cfg-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ── Tarjetas ── */

.help-cfg-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--help-linea, #e0e4ec);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(30, 58, 95, .04);
}

.help-cfg-card__head {
    padding: 14px 16px 10px;
    border-bottom: 1px solid #eef1f6;
}

.help-cfg-card__title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--help-azul-oscuro, #1e3a5f);
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-cfg-card__title code {
    font-size: .78rem;
    color: #64748b;
    background: #f1f5f9;
    padding: 1px 5px;
    border-radius: 4px;
}

.help-cfg-card__sub {
    font-size: .78rem;
    color: #64748b;
    margin-top: 4px;
}

.help-cfg-card__sub code {
    font-size: .74rem;
    background: #f1f5f9;
    padding: 1px 5px;
    border-radius: 4px;
    color: #475569;
}

.help-cfg-card__body { padding: 12px 16px 16px; }

.help-cfg-card--intro { background: linear-gradient(180deg, #fbfcfe, #fff); }

/* ── Toolbar de filtros ── */

.help-cfg-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.help-cfg-toolbar__grow { flex: 1 1 auto; }

/* La búsqueda no debe comerse la barra: el espacio libre lo absorbe __grow. */
.help-cfg-toolbar .help-search { flex: 0 1 300px; }

/* ── Tabla / árbol de categorías ── */

.help-cfg-tbl { margin-bottom: 0; }

.help-cfg-tbl thead th {
    background: var(--help-azul-medio, #2c5282);
    letter-spacing: .04em;
    text-transform: uppercase;
    font-size: .7rem;
}

.help-cfg-tbl__col-tickets { width: 88px; }
.help-cfg-tbl__col-estado { width: 92px; }
.help-cfg-tbl__col-acc { width: 132px; }

/* Conteo de tickets de la categoría (el número propio; el subárbol va en el title). */
.help-cfg-tpill {
    display: inline-block;
    min-width: 30px;
    padding: 2px 9px;
    border-radius: 999px;
    background: #eef1f6;
    color: var(--help-azul-oscuro, #1e3a5f);
    font-size: .76rem;
    font-weight: 700;
    line-height: 1.5;
    cursor: default;
}

.help-cfg-tpill.is-zero {
    background: #f6f8fb;
    color: #b9c4d4;
    font-weight: 600;
}

.help-cfg-tbl tbody td {
    vertical-align: middle;
    border-top: 1px solid #eef1f6;
}

.help-cfg-trow:hover > td { background: #f7f9fd; }

.help-cfg-trow.is-child > td { background: #fcfdff; }

/* La sangría por nivel se calcula en el markup (padding-left inline). */
.help-cfg-treecell {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.help-cfg-chev {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border: none;
    background: transparent;
    color: #94a3b8;
    border-radius: 4px;
    cursor: pointer;
    font-size: .7rem;
    padding: 0;
}

.help-cfg-chev:hover { background: #e8eef8; color: var(--help-azul-oscuro, #1e3a5f); }

.help-cfg-chev--empty {
    cursor: default;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.help-cfg-chev--empty:hover { background: transparent; }

.help-cfg-fold { color: var(--help-dorado, #d4af37); font-size: .9rem; }
.help-cfg-fold--sm { font-size: .78rem; color: #b9c4d4; }

.help-cfg-bullet {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #cbd5e1;
    flex: 0 0 5px;
}

.help-cfg-catname {
    font-weight: 700;
    color: var(--help-azul-oscuro, #1e3a5f);
    font-size: .86rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.help-cfg-catname--sm { font-weight: 500; color: #334155; }
.help-cfg-catname.is-off { color: #94a3b8; text-decoration: line-through; }

.help-cfg-subs {
    font-size: .68rem;
    font-weight: 700;
    color: var(--help-azul-claro, #1976d2);
    background: #e6effb;
    padding: 1px 7px;
    border-radius: 999px;
    white-space: nowrap;
}

.help-cfg-parenthint {
    font-size: .68rem;
    color: #94a3b8;
    white-space: nowrap;
}

.help-cfg-acts {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.help-cfg-iconbtn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--help-linea, #e0e4ec);
    background: #fff;
    color: #64748b;
    font-size: .74rem;
    cursor: pointer;
    padding: 0;
    transition: background .15s, color .15s, border-color .15s;
}

.help-cfg-iconbtn:hover {
    background: #eef4fc;
    border-color: #bcd6f0;
    color: var(--help-azul-claro, #1976d2);
}

.help-cfg-iconbtn--danger:hover {
    background: #fdeaea;
    border-color: #f3c2c2;
    color: var(--help-crit, #c62828);
}

/* ── Interruptor (switch) ── */

.help-cfg-switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
    border-radius: 999px;
    border: none;
    background: #cbd5e1;
    padding: 0;
    cursor: pointer;
    vertical-align: middle;
    transition: background .18s;
}

.help-cfg-switch.is-on { background: var(--help-ok, #2e7d32); }
.help-cfg-switch:disabled { opacity: .6; cursor: not-allowed; }

.help-cfg-switch__knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
    transition: left .18s;
}

.help-cfg-switch.is-on .help-cfg-switch__knob { left: 20px; }

.help-cfg-switch--lg { width: 52px; height: 27px; }
.help-cfg-switch--lg .help-cfg-switch__knob { width: 23px; height: 23px; }
.help-cfg-switch--lg.is-on .help-cfg-switch__knob { left: 27px; }

/* ── Estado vacío ── */

.help-cfg-empty {
    text-align: center;
    color: #94a3b8;
    font-size: .84rem;
    padding: 26px 12px !important;
}

.help-cfg-empty i { display: block; font-size: 1.5rem; margin-bottom: 8px; opacity: .5; }
.help-cfg-empty--block { padding: 34px 12px !important; }

/* ── KEDB: cabecera con contadores ── */

.help-cfg-intro {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    flex-wrap: wrap;
}

.help-cfg-intro__ico {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 10px;
    background: #e6effb;
    color: var(--help-azul-claro, #1976d2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}

.help-cfg-intro__txt { flex: 1 1 260px; min-width: 0; }

.help-cfg-intro__title {
    font-size: .98rem;
    font-weight: 700;
    color: var(--help-azul-oscuro, #1e3a5f);
}

.help-cfg-intro__txt p {
    margin: 4px 0 0;
    font-size: .8rem;
    color: #64748b;
}

.help-cfg-intro__nums { display: flex; gap: 22px; }

.help-cfg-bignum { text-align: right; }

.help-cfg-bignum b {
    display: block;
    font-size: 1.5rem;
    line-height: 1.1;
    font-weight: 700;
    color: var(--help-azul-oscuro, #1e3a5f);
}

.help-cfg-bignum b.is-ok { color: var(--help-ok, #2e7d32); }
.help-cfg-bignum b.is-crit { color: var(--help-crit, #c62828); }
/* H6: contador de problemas creados por la detección proactiva. */
.help-cfg-bignum b.is-proactivo { color: #4c56a8; }

.help-cfg-bignum span {
    font-size: .7rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* ── KEDB: grilla de tarjetas ── */

.help-cfg-gridwrap { position: relative; min-height: 80px; }

.help-cfg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
    gap: 12px;
}

.help-cfg-kcard {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--help-linea, #e0e4ec);
    border-radius: 8px;
    padding: 12px 13px;
    box-shadow: 0 1px 2px rgba(30, 58, 95, .04);
}

.help-cfg-kcard:hover { border-color: #cbd5e1; box-shadow: 0 3px 10px rgba(30, 58, 95, .08); }

.help-cfg-kcard__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.help-cfg-kcard__code {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: .7rem;
    color: #94a3b8;
    letter-spacing: .03em;
}

/* Badges del encabezado de la tarjeta (origen + estado). */
.help-cfg-kcard__tags {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 0;
}

.help-cfg-kbadge {
    font-size: .66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.help-cfg-kbadge--abierto { background: #fdeaea; color: var(--help-crit, #c62828); }
.help-cfg-kbadge--correccion { background: #fbf0dc; color: var(--help-warn, #c77700); }
.help-cfg-kbadge--corregido { background: #e7f4e8; color: var(--help-ok, #2e7d32); }
.help-cfg-kbadge--descartado { background: #eef1f6; color: #64748b; }

/* H6: origen proactivo (azul-morado suave, para no competir con los estados). */
.help-cfg-kbadge--proactivo {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #eceffb;
    color: #4c56a8;
    cursor: default;
}

.help-cfg-kbadge--proactivo i { font-size: .6rem; }

.help-cfg-kcard__title {
    font-size: .88rem;
    font-weight: 700;
    color: var(--help-azul-oscuro, #1e3a5f);
    line-height: 1.3;
}

.help-cfg-kcard__desc {
    font-size: .78rem;
    color: #64748b;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.help-cfg-kcard__chips { display: flex; flex-wrap: wrap; gap: 6px; }

.help-cfg-ksol {
    display: flex;
    gap: 7px;
    font-size: .76rem;
    line-height: 1.4;
    color: #2f6b34;
    background: #f2f9f3;
    border: 1px solid #d8ebda;
    border-radius: 6px;
    padding: 7px 9px;
}

.help-cfg-ksol > i { color: var(--help-dorado, #d4af37); margin-top: 2px; }

.help-cfg-ksol > span {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: pre-wrap;
}

.help-cfg-kcard__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px dashed #eef1f6;
}

/* Columna izquierda del pie: tickets vinculados + datos H6 (ocurrencias / última vez). */
.help-cfg-kfoot {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-width: 0;
}

.help-cfg-klinked {
    font-size: .72rem;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.help-cfg-kfoot .help-cfg-klinked { white-space: nowrap; }

/* Los botones del pie no se comprimen aunque el bloque de datos crezca. */
.help-cfg-kcard__foot > .help-cfg-acts { flex: 0 0 auto; }

/* ── Parámetros: filas de SLA ── */

.help-cfg-slarow {
    display: grid;
    grid-template-columns: 190px minmax(60px, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
}

.help-cfg-slarow + .help-cfg-slarow { border-top: 1px solid #f1f5f9; }

.help-cfg-slarow__label {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.help-cfg-slarow__label b {
    display: block;
    font-size: .86rem;
    color: var(--help-azul-oscuro, #1e3a5f);
}

.help-cfg-slarow__label small { font-size: .72rem; color: #94a3b8; }

.help-cfg-pdot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex: 0 0 9px;
    display: inline-block;
}

.help-cfg-pdot--premium { background: var(--help-dorado, #d4af37); }
.help-cfg-pdot--estandar { background: var(--help-azul-claro, #1976d2); }

.help-cfg-bar {
    height: 8px;
    border-radius: 999px;
    background: #eef1f6;
    overflow: hidden;
}

.help-cfg-bar__fill { display: block; height: 100%; border-radius: 999px; }
.help-cfg-bar__fill--premium { background: var(--help-dorado, #d4af37); }
.help-cfg-bar__fill--estandar { background: var(--help-azul-claro, #1976d2); }

.help-cfg-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--help-linea, #e0e4ec);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.help-cfg-stepper button {
    width: 30px;
    height: 30px;
    border: none;
    background: #f7f9fd;
    color: #475569;
    font-size: .7rem;
    cursor: pointer;
    padding: 0;
}

.help-cfg-stepper button:hover { background: #e8eef8; color: var(--help-azul-oscuro, #1e3a5f); }

.help-cfg-stepper__in {
    width: 62px;
    height: 30px;
    border: none;
    border-left: 1px solid var(--help-linea, #e0e4ec);
    border-right: 1px solid var(--help-linea, #e0e4ec);
    text-align: center;
    font-size: .84rem;
    font-weight: 700;
    color: var(--help-azul-oscuro, #1e3a5f);
    background: #fff;
}

.help-cfg-stepper__in:focus { outline: none; background: #f7f9fd; }

/* ── Parámetros: filas genéricas ── */

.help-cfg-prow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    flex-wrap: wrap;
}

.help-cfg-prow + .help-cfg-prow { border-top: 1px solid #f1f5f9; }

.help-cfg-prow__txt { flex: 1 1 240px; min-width: 0; }

.help-cfg-prow__txt b {
    display: block;
    font-size: .86rem;
    color: var(--help-azul-oscuro, #1e3a5f);
}

.help-cfg-prow__txt small { font-size: .74rem; color: #94a3b8; }

.help-cfg-prow__ctrl { width: 190px; }
.help-cfg-prow__ctrl .help-input { width: 100%; }

/* ── Columna lateral: tarjetas de apoyo ── */

.help-cfg-sidecard {
    background: #fff;
    border: 1px solid var(--help-linea, #e0e4ec);
    border-radius: 8px;
    padding: 13px 14px;
    font-size: .8rem;
    color: #475569;
}

.help-cfg-sidecard__title {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--help-azul-oscuro, #1e3a5f);
    margin-bottom: 9px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.help-cfg-sidecard p { margin: 0 0 8px; line-height: 1.45; }
.help-cfg-sidecard p:last-child { margin-bottom: 0; }

.help-cfg-sidecard--info {
    background: #eef4fc;
    border-color: #cfe0f5;
    color: #33526f;
}

.help-cfg-sidecard--info .help-cfg-sidecard__title { color: var(--help-azul-medio, #2c5282); }

.help-cfg-sidecard--ok {
    background: #f2f9f3;
    border-color: #d8ebda;
    color: #2f6b34;
}

.help-cfg-sidecard--ok .help-cfg-sidecard__title { color: var(--help-ok, #2e7d32); }

.help-cfg-sidecard--warn {
    background: #fbf5e9;
    border-color: #eeddba;
    color: #7d5a12;
}

.help-cfg-sidecard--warn .help-cfg-sidecard__title { color: var(--help-warn, #c77700); }

.help-cfg-sidecard--dark {
    background: var(--help-azul-oscuro, #1e3a5f);
    border-color: var(--help-azul-oscuro, #1e3a5f);
    border-bottom: 3px solid var(--help-dorado, #d4af37);
    color: #dbe6f2;
}

.help-cfg-sidecard--dark .help-cfg-sidecard__title { color: #fff; }
.help-cfg-sidecard--dark b { color: #fff; }

.help-cfg-sidecard--soon { background: #fafbfd; }
.help-cfg-sidecard--soon .help-cfg-sidecard__title { color: #64748b; }

.help-cfg-statline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 0;
    font-size: .8rem;
}

.help-cfg-statline + .help-cfg-statline { border-top: 1px solid #f1f5f9; }

.help-cfg-statline b { color: var(--help-azul-oscuro, #1e3a5f); font-size: .88rem; }
.help-cfg-statline b.is-ok { color: var(--help-ok, #2e7d32); }
.help-cfg-statline b.is-off { color: #94a3b8; }

.help-cfg-statline--total { border-top: 1px solid #e0e4ec; margin-top: 3px; }

/* ── Distribución de tickets por categoría (reusa .help-cfg-bar / .help-cfg-bar__fill) ── */

.help-cfg-dist {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.help-cfg-distrow { min-width: 0; }

.help-cfg-distrow__top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.help-cfg-distrow__name {
    font-size: .78rem;
    color: #475569;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.help-cfg-distrow__val {
    font-size: .82rem;
    font-weight: 700;
    color: var(--help-azul-oscuro, #1e3a5f);
    flex: 0 0 auto;
}

.help-cfg-distrow.is-resto .help-cfg-distrow__name { color: #94a3b8; font-style: italic; }
.help-cfg-distrow.is-resto .help-cfg-distrow__val { color: #64748b; }

.help-cfg-bar--dist { height: 6px; }

/* Paleta rotativa; t0 = fila "otras categorías". */
.help-cfg-dfill--t0 { background: #cbd5e1; }
.help-cfg-dfill--t1 { background: var(--help-azul-claro, #1976d2); }
.help-cfg-dfill--t2 { background: var(--help-naranja, #fe7800); }
.help-cfg-dfill--t3 { background: var(--help-ok, #2e7d32); }
.help-cfg-dfill--t4 { background: var(--help-dorado, #d4af37); }
.help-cfg-dfill--t5 { background: #7c6bd6; }
.help-cfg-dfill--t6 { background: var(--help-azul-medio, #2c5282); }

.help-cfg-distempty {
    font-size: .78rem;
    color: #94a3b8;
    line-height: 1.45;
}

.help-cfg-dist + .help-cfg-statline--total { margin-top: 10px; padding-top: 8px; }

.help-cfg-prev__lead { font-size: .82rem; line-height: 1.5; }
.help-cfg-prev__hour { color: var(--help-dorado, #d4af37) !important; }

.help-cfg-prev__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
    font-size: .8rem;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.help-cfg-prev__row span { display: inline-flex; align-items: center; gap: 7px; }

.help-cfg-prev__foot {
    margin-top: 9px;
    font-size: .72rem;
    color: rgba(219, 230, 242, .72);
    line-height: 1.4;
}

.help-cfg-savebtn { width: 100%; justify-content: center; }

.help-cfg-soon { display: flex; flex-direction: column; gap: 7px; }

.help-cfg-soon span {
    display: flex;
    gap: 8px;
    font-size: .78rem;
    color: #64748b;
    line-height: 1.35;
}

.help-cfg-soon span i { color: #b9c4d4; margin-top: 2px; }

.help-cfg-soon__note {
    margin: 9px 0 0 !important;
    font-size: .72rem;
    color: #94a3b8;
}

/* ── Agente IA ── */

.help-cfg-card--agent { border-left: 3px solid var(--help-azul-claro, #1976d2); }

.help-cfg-agent {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    flex-wrap: wrap;
}

.help-cfg-agent__ico {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 12px;
    background: #eef1f6;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.help-cfg-agent__ico.is-on { background: #e6effb; color: var(--help-azul-claro, #1976d2); }

.help-cfg-agent__txt { flex: 1 1 240px; min-width: 0; }

.help-cfg-agent__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--help-azul-oscuro, #1e3a5f);
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.help-cfg-agent__txt p {
    margin: 5px 0 0;
    font-size: .81rem;
    color: #64748b;
    line-height: 1.45;
}

.help-cfg-agent__toggle { display: flex; align-items: center; gap: 9px; }

.help-cfg-cap {
    display: flex;
    gap: 10px;
    padding: 10px 0;
}

.help-cfg-cap + .help-cfg-cap { border-top: 1px solid #f1f5f9; }

.help-cfg-cap > i {
    color: var(--help-ok, #2e7d32);
    font-size: .92rem;
    margin-top: 2px;
}

.help-cfg-cap.is-off > i { color: #cbd5e1; }

.help-cfg-cap b {
    display: block;
    font-size: .85rem;
    color: var(--help-azul-oscuro, #1e3a5f);
}

.help-cfg-cap small {
    font-size: .76rem;
    color: #64748b;
    line-height: 1.4;
    display: block;
    margin-top: 2px;
}

.help-cfg-cap.is-off b { color: #64748b; }

.help-cfg-cap--rule > i { color: var(--help-dorado, #d4af37); }

/* ════════════════════ SQL 36: SLA por prioridad ════════════════════ */
/* Puntos y barras de las 3 prioridades del ticket (1 Baja / 2 Media / 3 Alta). Reusan
   .help-cfg-slarow / .help-cfg-bar ya existentes: solo se agregan los colores. */

.help-cfg-pdot--alta { background: var(--help-critico, #c62828); }
.help-cfg-pdot--media { background: var(--help-warn, #c77700); }
.help-cfg-pdot--baja { background: var(--help-ok, #2e7d32); }

.help-cfg-bar__fill--alta { background: var(--help-critico, #c62828); }
.help-cfg-bar__fill--media { background: var(--help-warn, #c77700); }
.help-cfg-bar__fill--baja { background: var(--help-ok, #2e7d32); }

/* Separador entre el bloque de prioridades y el ajuste por plan. */
.help-cfg-slasep {
    margin: 14px 0 2px;
    padding-top: 12px;
    border-top: 1px dashed var(--help-linea, #e0e4ec);
}

.help-cfg-slasep > span {
    display: block;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--help-azul-medio, #2c5282);
}

.help-cfg-slasep > small { font-size: .74rem; color: #94a3b8; }

/* ════════════════════ SQL 36: horario de atención ════════════════════ */

.help-cfg-horas {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.help-cfg-horas__sep { font-size: .78rem; color: #94a3b8; }

.help-cfg-hora { width: 108px; text-align: center; }

.help-cfg-daypills { display: inline-flex; gap: 5px; flex-wrap: wrap; }

.help-cfg-daypill {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--help-linea, #e0e4ec);
    background: #fff;
    color: #64748b;
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    transition: background .16s, color .16s, border-color .16s;
}

.help-cfg-daypill:hover { background: #f2f6fc; color: var(--help-azul-oscuro, #1e3a5f); }

.help-cfg-daypill.is-on {
    background: var(--help-azul-claro, #1976d2);
    border-color: var(--help-azul-claro, #1976d2);
    color: #fff;
}

/* Interruptor dentro de una fila de parámetros. */
.help-cfg-prow__ctrl--switch {
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    justify-content: flex-end;
}

/* ════════════════════ SQL 36: tono e instrucciones de la IA ════════════════════ */

.help-cfg-tonos { display: flex; flex-direction: column; gap: 8px; }

.help-cfg-tono {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    text-align: left;
    padding: 11px 13px;
    border: 1px solid var(--help-linea, #e0e4ec);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color .16s, background .16s;
}

.help-cfg-tono:hover { border-color: #bcd0ea; background: #fbfcfe; }

.help-cfg-tono.is-active {
    border-color: var(--help-azul-claro, #1976d2);
    background: #f4f8fd;
}

.help-cfg-tono__check { color: #cbd5e1; font-size: .95rem; line-height: 1.2; }
.help-cfg-tono.is-active .help-cfg-tono__check { color: var(--help-azul-claro, #1976d2); }

.help-cfg-tono__txt { min-width: 0; }

.help-cfg-tono__txt b {
    display: block;
    font-size: .86rem;
    color: var(--help-azul-oscuro, #1e3a5f);
}

.help-cfg-tono__txt small { font-size: .76rem; color: #64748b; line-height: 1.4; }

.help-cfg-ta {
    width: 100%;
    resize: vertical;
    min-height: 110px;
    font-size: .84rem;
    line-height: 1.5;
}

.help-cfg-tafoot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.help-cfg-tafoot > span { font-size: .74rem; color: #94a3b8; }

/* ════════════════════ Responsive ════════════════════ */

@media (max-width: 1200px) {
    .help-cfg-layout { grid-template-columns: minmax(0, 1fr) 288px; }
}

@media (max-width: 1024px) {
    .help-cfg-layout { grid-template-columns: 1fr; }
    .help-cfg-side { flex-direction: row; flex-wrap: wrap; }
    .help-cfg-side > * { flex: 1 1 260px; }
}

@media (max-width: 992px) {
    .help-kpis { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .help-kpis { grid-template-columns: 1fr; }
    .help-drawer { width: 100%; }
    @keyframes help-drawer-in {
        from { right: -100%; }
        to { right: 0; }
    }
    .help-head { flex-direction: column; }
    .help-head__actions { width: 100%; }
    .help-head__actions .help-btn { flex: 1 1 auto; }
    .help-fgrid { grid-template-columns: 1fr; }
    .help-cfg-slarow { grid-template-columns: 1fr auto; }
    .help-cfg-slarow .help-cfg-bar { grid-column: 1 / -1; order: 3; }
    .help-cfg-intro__nums { width: 100%; justify-content: space-between; }
    .help-cfg-bignum { text-align: left; }
    .help-cfg-prow__ctrl { width: 100%; }
    .help-cfg-prow__ctrl--switch { width: auto; }
    .help-cfg-horas { width: 100%; }
    .help-cfg-hora { flex: 1 1 auto; width: auto; }
}
