/*
 * Medicuan · Módulo de Planes de Salud
 * Estilos para la lista de planes y la vista de creación con preview en vivo.
 */

/* ═══════════════════════════════════════════
   TOOLBAR + GRID DE PLANES
   ═══════════════════════════════════════════ */

.planes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 1.25rem;
}

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

@media (max-width: 640px) {
    .planes-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════
   TARJETA DE PLAN
   ═══════════════════════════════════════════ */

.plan-card {
    background: #fff;
    border: 1px solid var(--hbs-border, #e2e8f0);
    border-radius: 18px;
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    transition: transform .22s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow .22s cubic-bezier(0.4, 0, 0.2, 1),
                border-color .18s ease;
    animation: hbs-pop-in .3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    overflow: hidden;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(16, 94, 166, .13);
    border-color: rgba(16, 94, 166, .25);
}

.plan-card.is-featured {
    border-color: var(--hbs-primary, #105ea6);
    box-shadow: 0 0 0 2px rgba(16, 94, 166, .18), 0 12px 32px rgba(16, 94, 166, .12);
}

.plan-card.is-featured::before {
    content: 'Destacado';
    position: absolute;
    top: 14px;
    right: 14px;
    background: linear-gradient(135deg, var(--hbs-primary, #105ea6), var(--hbs-secondary, #2eb8cb));
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    padding: .2rem .6rem;
    border-radius: 999px;
    letter-spacing: .03em;
    text-transform: uppercase;
}

/* ── Estado badge (esquina superior izquierda) ── */
.plan-card__status {
    position: absolute;
    top: 14px;
    left: 14px;
    font-size: .72rem;
    font-weight: 700;
    padding: .18rem .55rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.plan-card__status--activo   { background: rgba(16,185,129,.12); color: #059669; }
.plan-card__status--borrador { background: rgba(245,158,11,.12);  color: #d97706; }
.plan-card__status--inactivo { background: rgba(100,116,139,.12); color: #64748b; }

/* ── Header: logo + info + precio ── */
.plan-card__header {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    margin-bottom: 1rem;
}

.plan-card__logo {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    background: #105ea6;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,.12);
    transition: transform .18s ease;
}
.plan-card:hover .plan-card__logo {
    transform: scale(1.06) rotate(-2deg);
}

.plan-card__info {
    flex: 1;
    min-width: 0;
}
.plan-card__company {
    font-size: .8rem;
    color: var(--hbs-muted, #64748b);
    font-weight: 500;
    margin-bottom: .15rem;
}
.plan-card__name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--hbs-text, #1e293b);
    line-height: 1.2;
}

.plan-card__price-wrap {
    text-align: right;
    flex-shrink: 0;
}
.plan-card__currency {
    font-size: .72rem;
    color: var(--hbs-muted, #64748b);
    display: block;
    line-height: 1;
}
.plan-card__amount {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--hbs-text, #1e293b);
    line-height: 1;
}
.plan-card__period {
    font-size: .75rem;
    color: var(--hbs-muted, #64748b);
    display: block;
    line-height: 1.2;
}

/* ── Descripción ── */
.plan-card__desc {
    font-size: .85rem;
    color: var(--hbs-muted, #64748b);
    line-height: 1.45;
    margin-bottom: .9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Divider ── */
.plan-card__divider {
    height: 1px;
    background: var(--hbs-border, #e2e8f0);
    margin: .9rem 0;
}

/* ── Sección de coberturas ── */
.plan-card__section-title {
    font-size: .88rem;
    font-weight: 700;
    color: var(--hbs-text, #1e293b);
    margin-bottom: .55rem;
}

.plan-card__features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .4rem;
    flex: 1;
}
.plan-card__features li {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    font-size: .85rem;
    color: var(--hbs-text, #1e293b);
    line-height: 1.4;
}
.plan-card__features li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: .8rem;
    color: var(--hbs-secondary, #2eb8cb);
    margin-top: .1rem;
    flex-shrink: 0;
}

/* ── Footer ── */
.plan-card__footer {
    margin-top: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
}

.plan-card__details-link {
    font-size: .85rem;
    font-weight: 600;
    color: var(--hbs-primary, #105ea6);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color .15s ease;
}
.plan-card__details-link:hover {
    color: var(--hbs-secondary, #2eb8cb);
}

.plan-card__actions {
    display: flex;
    gap: .4rem;
}

.plan-card__btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .42rem .85rem;
    border-radius: 10px;
    font-size: .82rem;
    font-weight: 600;
    border: 1px solid;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    text-decoration: none;
}
.plan-card__btn:hover { transform: translateY(-1px); }

.plan-card__btn--edit {
    background: rgba(16, 94, 166, .07);
    border-color: rgba(16, 94, 166, .2);
    color: var(--hbs-primary, #105ea6);
}
.plan-card__btn--edit:hover {
    background: rgba(16, 94, 166, .14);
    box-shadow: 0 4px 12px rgba(16, 94, 166, .12);
}

.plan-card__btn--delete {
    background: rgba(239, 68, 68, .07);
    border-color: rgba(239, 68, 68, .2);
    color: #ef4444;
}
.plan-card__btn--delete:hover {
    background: rgba(239, 68, 68, .14);
    box-shadow: 0 4px 12px rgba(239, 68, 68, .12);
}

/* ── Animación de salida al eliminar ── */
@keyframes plan-card-out {
    from { opacity: 1; transform: scale(1); }
    to   { opacity: 0; transform: scale(.92) translateY(-8px); }
}
.plan-card.is-removing {
    animation: plan-card-out .28s ease forwards;
    pointer-events: none;
}

/* ── Estado vacío ── */
.planes-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--hbs-muted, #64748b);
}
.planes-empty i {
    font-size: 3rem;
    opacity: .3;
    display: block;
    margin-bottom: 1rem;
}
.planes-empty p { font-size: .95rem; }


/* ═══════════════════════════════════════════
   MODAL DE DETALLE
   ═══════════════════════════════════════════ */

.plan-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: hbs-fade-in .2s ease both;
}

.plan-detail-modal[hidden] { display: none; }

.plan-detail-modal__box {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    max-width: 520px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .25);
    animation: hbs-pop-in .28s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    position: relative;
}

.plan-detail-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--hbs-border, #e2e8f0);
    background: #f8fafc;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: .9rem;
    color: var(--hbs-muted, #64748b);
    transition: background .15s ease, transform .15s ease;
}
.plan-detail-modal__close:hover {
    background: #e2e8f0;
    transform: rotate(90deg);
}

.plan-detail-modal__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-right: 2.5rem;
}

.plan-detail-modal__features {
    list-style: none;
    padding: 0;
    margin: .8rem 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .55rem;
}
.plan-detail-modal__features li {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .92rem;
    color: var(--hbs-text, #1e293b);
}
.plan-detail-modal__features li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--hbs-secondary, #2eb8cb);
    font-size: .85rem;
    flex-shrink: 0;
}


/* ═══════════════════════════════════════════
   VISTA CREAR PLAN — LAYOUT 2 COLUMNAS
   ═══════════════════════════════════════════ */

.planes-crear__layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
    margin-top: 1.25rem;
}

/* Evita que el intrinsic width del slider comprima la columna de preview */
.planes-crear__layout > * {
    min-width: 0;
}

@media (max-width: 900px) {
    .planes-crear__layout {
        grid-template-columns: 1fr;
    }
}

/* ── Panel formulario ── */
.pform {
    background: #fff;
    border: 1px solid var(--hbs-border, #e2e8f0);
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(16, 94, 166, .05);
    animation: hbs-pop-in .32s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.pform__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--hbs-text, #1e293b);
    margin-bottom: 1.2rem;
    padding-bottom: .8rem;
    border-bottom: 1px solid var(--hbs-border, #e2e8f0);
    display: flex;
    align-items: center;
    gap: .5rem;
}
.pform__title i {
    color: var(--hbs-primary, #105ea6);
}

.pform__group {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    margin-bottom: 1rem;
}
.pform__label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--hbs-text, #1e293b);
}
.pform__label span {
    color: #ef4444;
    margin-left: .15rem;
}

.pform__input,
.pform__select,
.pform__textarea {
    padding: .62rem .85rem;
    border-radius: 10px;
    border: 1px solid var(--hbs-border, #e2e8f0);
    font: inherit;
    font-size: .9rem;
    background: #fff;
    color: var(--hbs-text, #1e293b);
    transition: border-color .15s ease, box-shadow .15s ease;
    width: 100%;
}
.pform__input:focus,
.pform__select:focus,
.pform__textarea:focus {
    outline: none;
    border-color: var(--hbs-primary, #105ea6);
    box-shadow: 0 0 0 4px rgba(16, 94, 166, .1);
}
.pform__input.is-invalid,
.pform__select.is-invalid,
.pform__textarea.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .1);
}
.pform__textarea { resize: vertical; min-height: 72px; }

.pform__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .85rem;
}
@media (max-width: 500px) { .pform__row { grid-template-columns: 1fr; } }

/* ── Logo picker ── */
.pform__logo-picker {
    display: flex;
    align-items: center;
    gap: .85rem;
}
.pform__logo-preview {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    background: #105ea6;
    flex-shrink: 0;
    transition: background .2s ease, transform .15s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.pform__logo-controls {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    flex: 1;
}
.pform__color-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}
.pform__color-input {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--hbs-border, #e2e8f0);
    padding: 2px;
    cursor: pointer;
    background: none;
}
.pform__color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform .15s ease, border-color .15s ease;
    flex-shrink: 0;
}
.pform__color-swatch:hover,
.pform__color-swatch.is-active {
    transform: scale(1.15);
    border-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

/* ── Features dinámica ── */
.pform__features-list {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    margin-bottom: .6rem;
}
.pform__feature-row {
    display: flex;
    align-items: center;
    gap: .4rem;
    animation: hbs-fade-in .2s ease both;
}
.pform__feature-row input {
    flex: 1;
    padding: .52rem .75rem;
    border-radius: 9px;
    border: 1px solid var(--hbs-border, #e2e8f0);
    font: inherit;
    font-size: .88rem;
    background: #fff;
    transition: border-color .15s ease;
}
.pform__feature-row input:focus {
    outline: none;
    border-color: var(--hbs-secondary, #2eb8cb);
    box-shadow: 0 0 0 3px rgba(46, 184, 203, .12);
}
.pform__feature-remove {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    background: rgba(239, 68, 68, .08);
    color: #ef4444;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: .82rem;
    transition: background .15s ease, transform .15s ease;
    flex-shrink: 0;
}
.pform__feature-remove:hover {
    background: rgba(239, 68, 68, .16);
    transform: scale(1.1);
}
.pform__add-feature {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .42rem .75rem;
    border-radius: 9px;
    border: 1px dashed var(--hbs-secondary, #2eb8cb);
    background: rgba(46, 184, 203, .05);
    color: var(--hbs-secondary, #2eb8cb);
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
    width: 100%;
    justify-content: center;
    flex-shrink: 0;
}
.pform__add-feature:hover {
    background: rgba(46, 184, 203, .1);
}

/* ── Toggle switch ── */
.pform__toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .65rem .85rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid var(--hbs-border, #e2e8f0);
}
.pform__toggle-label {
    font-size: .88rem;
    font-weight: 500;
    color: var(--hbs-text, #1e293b);
}
.pform__toggle {
    position: relative;
    width: 46px;
    height: 26px;
}
.pform__toggle input { opacity: 0; width: 0; height: 0; }
.pform__toggle-slider {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 999px;
    cursor: pointer;
    transition: background .25s ease;
}
.pform__toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,.15);
    transition: transform .25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pform__toggle input:checked + .pform__toggle-slider {
    background: linear-gradient(135deg, var(--hbs-primary, #105ea6), var(--hbs-secondary, #2eb8cb));
}
.pform__toggle input:checked + .pform__toggle-slider::before {
    transform: translateX(20px);
}

/* ── Botones del formulario ── */
.pform__footer {
    margin-top: 1.4rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--hbs-border, #e2e8f0);
    display: flex;
    gap: .75rem;
    justify-content: flex-end;
}

/* ── Panel de preview ── */
.ppreview {
    position: sticky;
    top: 5.5rem;
    animation: hbs-pop-in .38s cubic-bezier(0.34, 1.56, 0.64, 1) .08s both;
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
    scrollbar-width: none;
}
.ppreview::-webkit-scrollbar { display: none; }

.ppreview__header {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1rem;
}

.ppreview__badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .28rem .7rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(16, 94, 166, .1), rgba(46, 184, 203, .1));
    border: 1px solid rgba(46, 184, 203, .3);
    font-size: .78rem;
    font-weight: 700;
    color: var(--hbs-primary, #105ea6);
    letter-spacing: .02em;
}

.ppreview__badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--hbs-secondary, #2eb8cb);
    animation: plan-live-pulse 1.4s ease-in-out infinite;
}

@keyframes plan-live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .5; transform: scale(.7); }
}

/* Preview usa exactamente los mismos estilos que .plan-card */
.ppreview .plan-card {
    cursor: default;
    box-shadow: 0 8px 32px rgba(16, 94, 166, .1);
    border-color: rgba(16, 94, 166, .2);
}
.ppreview .plan-card:hover {
    transform: none;
}

/* ── Tag input de botones de acción ── */
.pform__tag-input {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem;
    padding: .45rem .7rem;
    border: 1px solid var(--hbs-border, #e2e8f0);
    border-radius: 10px;
    background: #fff;
    cursor: text;
    min-height: 44px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.pform__tag-input:focus-within {
    border-color: var(--hbs-primary, #105ea6);
    box-shadow: 0 0 0 4px rgba(16, 94, 166, .1);
}

.pform__tag-chips {
    display: contents; /* los chips fluyen inline con el input */
}

.pform__tag-chip {
    display: inline-flex;
    align-items: center;
    gap: .28rem;
    padding: .22rem .55rem .22rem .7rem;
    background: var(--hbs-primary, #105ea6);
    color: #fff;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    animation: hbs-pop-in .2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    flex-shrink: 0;
}
.pform__tag-chip__remove {
    display: grid;
    place-items: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .25);
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: .65rem;
    padding: 0;
    transition: background .12s ease;
    font-family: inherit;
    line-height: 1;
}
.pform__tag-chip__remove:hover {
    background: rgba(255, 255, 255, .45);
}

.pform__tag-field {
    border: none;
    outline: none;
    font: inherit;
    font-size: .88rem;
    flex: 1;
    min-width: 130px;
    background: transparent;
    padding: .18rem 0;
    color: var(--hbs-text, #1e293b);
}
.pform__tag-field::placeholder {
    color: #94a3b8;
}

.pform__tag-hint {
    font-size: .75rem;
    color: var(--hbs-muted, #64748b);
    margin-top: .3rem;
}
.pform__tag-hint kbd {
    display: inline-block;
    padding: .05rem .3rem;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    background: #f1f5f9;
    font-size: .72rem;
    font-family: inherit;
    color: #475569;
}

/* ── Char counter para descripción ── */
.pform__char-count {
    font-size: .75rem;
    color: var(--hbs-muted, #64748b);
    text-align: right;
    margin-top: .15rem;
}
.pform__char-count.is-near  { color: #f59e0b; }
.pform__char-count.is-over  { color: #ef4444; font-weight: 600; }


/* ═══════════════════════════════════════════
   LISTA DE COBERTURAS (form crear)
   ═══════════════════════════════════════════ */

.pform__coverage-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-bottom: .65rem;
}

.pform__coverage-empty {
    text-align: center;
    padding: 1.8rem 1rem;
    color: #94a3b8;
    font-size: .85rem;
    border: 1.5px dashed #e2e8f0;
    border-radius: 12px;
}

.pform__coverage-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .65rem .85rem;
    background: #f8fafc;
    border: 1px solid var(--hbs-border, #e2e8f0);
    border-radius: 11px;
    animation: hbs-fade-in .2s ease both;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.pform__coverage-item:hover {
    border-color: rgba(16, 94, 166, .2);
    box-shadow: 0 2px 8px rgba(16, 94, 166, .06);
}

.pform__coverage-item__info {
    flex: 1;
    min-width: 0;
}
.pform__coverage-item__name {
    font-size: .88rem;
    font-weight: 600;
    color: var(--hbs-text, #1e293b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pform__coverage-item__meta {
    font-size: .75rem;
    color: var(--hbs-muted, #64748b);
    margin-top: .1rem;
}

.pform__coverage-item__total {
    font-size: .88rem;
    font-weight: 700;
    color: var(--hbs-primary, #105ea6);
    white-space: nowrap;
    flex-shrink: 0;
}

.pform__coverage-item__actions {
    display: flex;
    gap: .3rem;
    flex-shrink: 0;
}
.pform__coverage-item__btn {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    border: none;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: .78rem;
    transition: background .15s ease, transform .15s ease;
}
.pform__coverage-item__btn--edit {
    background: rgba(16, 94, 166, .08);
    color: var(--hbs-primary, #105ea6);
}
.pform__coverage-item__btn--edit:hover {
    background: rgba(16, 94, 166, .16);
    transform: scale(1.1);
}
.pform__coverage-item__btn--del {
    background: rgba(239, 68, 68, .08);
    color: #ef4444;
}
.pform__coverage-item__btn--del:hover {
    background: rgba(239, 68, 68, .16);
    transform: scale(1.1);
}


/* ═══════════════════════════════════════════
   MODAL NUEVA / EDITAR COBERTURA
   ═══════════════════════════════════════════ */

.coverage-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: hbs-fade-in .18s ease both;
}
.coverage-modal[hidden] { display: none; }

.coverage-modal__box {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .25);
    animation: hbs-pop-in .28s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    position: relative;
}

.coverage-modal__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--hbs-text, #1e293b);
    margin-bottom: 1.4rem;
    padding-right: 2.5rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.coverage-modal__title i { color: var(--hbs-primary, #105ea6); }

.coverage-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--hbs-border, #e2e8f0);
    background: #f8fafc;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: .9rem;
    color: var(--hbs-muted, #64748b);
    transition: background .15s ease, transform .15s ease;
}
.coverage-modal__close:hover {
    background: #e2e8f0;
    transform: rotate(90deg);
}

/* ── Fila de cálculo: tasa / valor / total ── */
.coverage-modal__calc {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: .65rem;
    padding: .85rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 1rem;
}
.coverage-modal__calc-label {
    font-size: .72rem;
    font-weight: 700;
    color: var(--hbs-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .3rem;
}
.coverage-modal__total-val {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--hbs-primary, #105ea6);
    line-height: 1.1;
}
.coverage-modal__formula {
    font-size: .72rem;
    color: #94a3b8;
    margin-top: .5rem;
    grid-column: 1 / -1;
    text-align: center;
    font-style: italic;
}

.coverage-modal__footer {
    display: flex;
    gap: .75rem;
    justify-content: flex-end;
    margin-top: 1.4rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--hbs-border, #e2e8f0);
}


/* ═══════════════════════════════════════════
   COBERTURAS EN MODAL DE DETALLE (lista)
   ═══════════════════════════════════════════ */

.plan-detail-modal__features li .cov-total {
    margin-left: .4rem;
    font-size: .78rem;
    font-weight: 700;
    color: var(--hbs-primary, #105ea6);
}
.plan-detail-modal__features li .cov-desc {
    display: block;
    font-size: .78rem;
    color: var(--hbs-muted, #64748b);
    margin-left: 1.4rem;
    margin-top: .1rem;
    line-height: 1.4;
}

/* ── Tags en tarjeta de plan (lista y preview) ── */
.plan-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .75rem;
}
.plan-card__tag {
    display: inline-flex;
    align-items: center;
    padding: .2rem .6rem;
    background: rgba(16, 94, 166, .08);
    border: 1px solid rgba(16, 94, 166, .18);
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    color: var(--hbs-primary, #105ea6);
}

/* ── Botones de acción en modal de detalle ── */
.plan-detail-modal__action-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: .5rem 0 1.25rem;
}
.plan-detail-modal__action-tag {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .3rem .75rem;
    background: rgba(16, 94, 166, .08);
    border: 1px solid rgba(16, 94, 166, .22);
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--hbs-primary, #105ea6);
}


/* ═══════════════════════════════════════════
   INDICADOR DE PASOS (stepper)
   ═══════════════════════════════════════════ */

.pstep {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 1.25rem;
}

.pstep__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .32rem;
    cursor: pointer;
    flex-shrink: 0;
    user-select: none;
}
.pstep__item:hover .pstep__dot {
    opacity: .85;
    transform: scale(1.06);
}
.pstep__item.is-active:hover .pstep__dot {
    opacity: 1;
    transform: scale(1.08);
}

.pstep__dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #94a3b8;
    display: grid;
    place-items: center;
    font-size: .82rem;
    font-weight: 700;
    transition: background .3s ease, color .3s ease, transform .22s ease,
                box-shadow .22s ease, opacity .2s ease;
    position: relative;
}
.pstep__item.is-active .pstep__dot {
    background: var(--hbs-primary, #105ea6);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(16, 94, 166, .18);
    transform: scale(1.08);
}
.pstep__item.is-done .pstep__dot {
    background: #10b981;
    color: #fff;
}

.pstep__label {
    font-size: .75rem;
    font-weight: 600;
    color: #94a3b8;
    transition: color .25s ease;
    white-space: nowrap;
}
.pstep__item.is-active .pstep__label { color: var(--hbs-primary, #105ea6); }
.pstep__item.is-done  .pstep__label  { color: #10b981; }

.pstep__line {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    margin: 17px .65rem 0; /* 17px = half of 34px dot height */
    transition: background .35s ease;
}
.pstep__line.is-done { background: #10b981; }


/* ═══════════════════════════════════════════
   SLIDER HORIZONTAL DE SECCIONES
   ═══════════════════════════════════════════ */

.pform__slider {
    overflow: hidden;
    border-radius: 18px;
    width: 100%;
}

.pform__slides-track {
    display: flex;
    align-items: flex-start;
    transition: transform .42s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.pform__slide {
    min-width: 100%;
}

/* Cada paso es flex-column: título + área scrollable + footer fijo */
.pform__slide .pform {
    animation: none;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 14rem);
    min-height: 480px;
}

/* Área de campos: scrollable internamente si el contenido es largo */
.pform__scrollable {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-right: .25rem;
    padding-bottom: .5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(16, 94, 166, .18) transparent;
}
.pform__scrollable::-webkit-scrollbar       { width: 4px; }
.pform__scrollable::-webkit-scrollbar-track { background: transparent; }
.pform__scrollable::-webkit-scrollbar-thumb {
    background: rgba(16, 94, 166, .18);
    border-radius: 999px;
}

/* Footer siempre visible (no se desplaza con el contenido) */
.pform__slide .pform__footer {
    flex-shrink: 0;
}


/* ═══════════════════════════════════════════
   TOTAL GENERAL DE COBERTURAS
   ═══════════════════════════════════════════ */

.pform__coverage-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .62rem .9rem;
    background: rgba(16, 94, 166, .05);
    border: 1px solid rgba(16, 94, 166, .18);
    border-radius: 10px;
    margin-top: .5rem;
    margin-bottom: .5rem;
    flex-shrink: 0;
    transition: opacity .2s ease;
}
.pform__coverage-total.is-zero {
    opacity: .5;
}
.pform__coverage-total__label {
    font-size: .83rem;
    font-weight: 600;
    color: var(--hbs-text, #1e293b);
    display: flex;
    align-items: center;
    gap: .4rem;
}
.pform__coverage-total__label i {
    color: var(--hbs-primary, #105ea6);
    font-size: .8rem;
}
.pform__coverage-total__amount {
    font-size: 1rem;
    font-weight: 800;
    color: var(--hbs-primary, #105ea6);
}


/* ═══════════════════════════════════════════
   BANNER DE RECUPERACIÓN DE BORRADOR
   ═══════════════════════════════════════════ */

.draft-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1.25rem;
    margin-bottom: 1.4rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    flex-wrap: wrap;
    animation: hbs-fade-in .25s ease both;
}

.draft-banner__body {
    display: flex;
    align-items: center;
    gap: .65rem;
    color: #1e40af;
    font-size: .88rem;
}

.draft-banner__body > i {
    font-size: 1.15rem;
    opacity: .8;
    flex-shrink: 0;
}

.draft-banner__body strong {
    display: block;
    font-size: .9rem;
    font-weight: 700;
}

.draft-banner__sub {
    font-size: .8rem;
    color: #3b82f6;
    display: block;
    margin-top: .1rem;
}

.draft-banner__actions {
    display: flex;
    gap: .6rem;
    flex-shrink: 0;
}


/* ═══════════════════════════════════════════
   TARJETA CON EDICIÓN PENDIENTE (lista)
   ═══════════════════════════════════════════ */

@keyframes pulse-edit-ring {
    0%, 100% { box-shadow: 0 0 0 0 rgba(251, 146, 60, 0); }
    50%       { box-shadow: 0 0 0 5px rgba(251, 146, 60, .3); }
}

.plan-card.has-unsaved-edit {
    border: 1.5px solid #fb923c;
    position: relative;
    animation: pulse-edit-ring 2.2s ease-in-out infinite;
}

.plan-card__edit-badge {
    position: absolute;
    top: .65rem;
    right: .65rem;
    background: #fb923c;
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    padding: .22rem .6rem .22rem .45rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: .3rem;
    z-index: 2;
    letter-spacing: .02em;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(251, 146, 60, .35);
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%       { opacity: .25; }
}

.plan-card__edit-badge__dot {
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulse-dot 1.2s ease-in-out infinite;
}


/* ═══════════════════════════════════════════
   TOM SELECT — diseño acorde a .pform__select
   ═══════════════════════════════════════════ */

/* Wrapper */
.pform-ts {
    width: 100%;
}

.pform-ts .ts-control {
    border: 1px solid var(--hbs-border, #e2e8f0) !important;
    border-radius: 10px !important;
    padding: .58rem .85rem !important;
    font-size: .9rem !important;
    font-family: inherit !important;
    background: #fff !important;
    color: var(--hbs-text, #1e293b) !important;
    box-shadow: none !important;
    min-height: unset !important;
    cursor: pointer !important;
    gap: .3rem !important;
    transition: border-color .15s ease, box-shadow .15s ease !important;
}

.pform-ts.focus .ts-control {
    border-color: var(--hbs-primary, #105ea6) !important;
    box-shadow: 0 0 0 4px rgba(16, 94, 166, .1) !important;
    outline: none !important;
}

.pform-ts.is-invalid .ts-control {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .1) !important;
}

.pform-ts.disabled .ts-control {
    background: #f8fafc !important;
    color: #94a3b8 !important;
    opacity: 1 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.pform-ts .ts-control input {
    font-size: .9rem !important;
    font-family: inherit !important;
    color: var(--hbs-text, #1e293b) !important;
}

.pform-ts .ts-control .item {
    font-size: .9rem;
    color: var(--hbs-text, #1e293b);
    padding: 0;
    margin: 0;
}

/* Dropdown — portal en body, clase pform-ts-dd */
.pform-ts-dd {
    border: 1px solid var(--hbs-border, #e2e8f0) !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .13) !important;
    font-family: inherit !important;
    font-size: .9rem !important;
    z-index: 1300 !important;
    overflow: hidden !important;
    margin-top: .3rem !important;
}

.pform-ts-dd .ts-dropdown-content {
    max-height: 210px;
    scrollbar-width: thin;
    scrollbar-color: rgba(16, 94, 166, .18) transparent;
}
.pform-ts-dd .ts-dropdown-content::-webkit-scrollbar       { width: 4px; }
.pform-ts-dd .ts-dropdown-content::-webkit-scrollbar-track { background: transparent; }
.pform-ts-dd .ts-dropdown-content::-webkit-scrollbar-thumb {
    background: rgba(16, 94, 166, .2);
    border-radius: 999px;
}

.pform-ts-dd .option {
    padding: .55rem .85rem !important;
    font-size: .9rem !important;
    color: var(--hbs-text, #1e293b) !important;
    cursor: pointer !important;
    transition: background .1s ease !important;
}

.pform-ts-dd .option:hover,
.pform-ts-dd .option.active {
    background: rgba(16, 94, 166, .07) !important;
    color: var(--hbs-primary, #105ea6) !important;
}

.pform-ts-dd .option.selected {
    background: rgba(16, 94, 166, .05) !important;
    font-weight: 600 !important;
    color: var(--hbs-primary, #105ea6) !important;
}

/* Input de búsqueda dentro del dropdown */
.pform-ts-dd .ts-dropdown-search-field input {
    font-family: inherit;
    font-size: .88rem;
    padding: .45rem .75rem;
    border: none;
    border-bottom: 1px solid var(--hbs-border, #e2e8f0);
    outline: none;
    width: 100%;
    color: var(--hbs-text, #1e293b);
}

/* "Sin resultados" */
.pform-ts-dd .no-results {
    padding: .65rem .85rem;
    color: var(--hbs-muted, #64748b);
    font-size: .88rem;
}

/* ═══════════════════════════════════════════
   CHECKLIST DE ASISTENCIAS MÉDICAS
   ═══════════════════════════════════════════ */

.pform__asistencia-check-list {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin-bottom: .75rem;
}

.pform__asistencia-check-item {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .55rem .75rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: background .13s ease, border-color .13s ease;
    user-select: none;
}

.pform__asistencia-check-item:hover {
    background: rgba(46, 184, 203, .06);
    border-color: rgba(46, 184, 203, .3);
}

.pform__asistencia-check-item input[type="checkbox"] {
    margin-top: .15rem;
    accent-color: var(--hbs-primary, #105ea6);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
}

.pform__asistencia-check-item__info {
    flex: 1;
    min-width: 0;
}

.pform__asistencia-check-item__name {
    font-size: .85rem;
    font-weight: 600;
    color: var(--hbs-text, #1e293b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pform__asistencia-check-item__meta {
    font-size: .74rem;
    color: var(--hbs-muted, #64748b);
    margin-top: .1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pform__asistencia-check-item__badge {
    font-size: .68rem;
    font-weight: 600;
    padding: .15rem .45rem;
    border-radius: 999px;
    background: rgba(16, 94, 166, .08);
    color: var(--hbs-primary, #105ea6);
    white-space: nowrap;
    flex-shrink: 0;
    align-self: center;
}

/* Variante compacta (dentro del formulario de grupo) */
.pform__asistencia-check-list--compact .pform__asistencia-check-item {
    padding: .35rem .55rem;
}

/* ── Grupos de asistencias ── */

.pform__asistencia-group {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: .55rem;
    overflow: hidden;
}

.pform__asistencia-group__header {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .75rem;
    background: #f8fafc;
    font-size: .83rem;
    font-weight: 600;
    color: var(--hbs-text, #1e293b);
}

.pform__asistencia-group__name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pform__asistencia-group__items {
    padding: .4rem .75rem .55rem;
    font-size: .78rem;
    color: var(--hbs-muted, #64748b);
    display: flex;
    flex-direction: column;
    gap: .18rem;
    border-top: 1px solid #f1f5f9;
}

/* ── Estado vacío de grupos de asistencias ── */

.pform__asistencia-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #94a3b8;
    animation: hbs-fade-in .25s ease both;
}

.pform__asistencia-empty i {
    font-size: 2.8rem;
    opacity: .2;
    display: block;
    margin-bottom: .8rem;
    color: var(--hbs-primary, #105ea6);
}

.pform__asistencia-empty p {
    font-size: .9rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: .3rem;
}

.pform__asistencia-empty span {
    font-size: .8rem;
    color: #94a3b8;
}

/* ── Grupo card mejorado ── */

.pform__asistencia-group {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: .6rem;
    overflow: hidden;
    transition: border-color .15s ease, box-shadow .15s ease;
    animation: hbs-fade-in .2s ease both;
}

.pform__asistencia-group:hover {
    border-color: rgba(16, 94, 166, .22);
    box-shadow: 0 2px 10px rgba(16, 94, 166, .07);
}

.pform__asistencia-group__header {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .65rem .85rem;
    background: #f8fafc;
    font-size: .85rem;
    font-weight: 600;
    color: var(--hbs-text, #1e293b);
}

.pform__asistencia-group__name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pform__asistencia-group__count {
    font-size: .72rem;
    font-weight: 600;
    padding: .15rem .5rem;
    background: rgba(16, 94, 166, .1);
    color: var(--hbs-primary, #105ea6);
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}

.pform__asistencia-group__items {
    padding: .55rem .85rem .65rem;
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    border-top: 1px solid #f1f5f9;
}

.pform__asistencia-group__items--empty {
    font-size: .78rem;
    color: #94a3b8;
    font-style: italic;
}

.pform__asistencia-group__chip {
    display: inline-flex;
    align-items: center;
    padding: .18rem .55rem;
    background: rgba(46, 184, 203, .08);
    border: 1px solid rgba(46, 184, 203, .22);
    border-radius: 999px;
    font-size: .73rem;
    font-weight: 500;
    color: #0e7490;
    white-space: nowrap;
}


/* ═══════════════════════════════════════════
   MODAL CREAR / EDITAR GRUPO DE ASISTENCIAS
   ═══════════════════════════════════════════ */

.asistencia-group-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: hbs-fade-in .18s ease both;
}

.asistencia-group-modal[hidden] { display: none; }

.asistencia-group-modal__box {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .25);
    animation: hbs-pop-in .28s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: rgba(16, 94, 166, .18) transparent;
}

.asistencia-group-modal__box::-webkit-scrollbar       { width: 4px; }
.asistencia-group-modal__box::-webkit-scrollbar-track { background: transparent; }
.asistencia-group-modal__box::-webkit-scrollbar-thumb {
    background: rgba(16, 94, 166, .18);
    border-radius: 999px;
}

.asistencia-group-modal__search-wrap {
    margin-bottom: .5rem;
}

.asistencia-group-modal__search {
    padding-left: .85rem !important;
}

.asistencia-group-modal__checklist {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .35rem;
    max-height: 320px;
    overflow-y: auto;
    padding: .1rem .1rem .1rem 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(16, 94, 166, .18) transparent;
}

.asistencia-group-modal__checklist::-webkit-scrollbar       { width: 4px; }
.asistencia-group-modal__checklist::-webkit-scrollbar-track { background: transparent; }
.asistencia-group-modal__checklist::-webkit-scrollbar-thumb {
    background: rgba(16, 94, 166, .18);
    border-radius: 999px;
}

/* En móvil: 1 columna */
@media (max-width: 480px) {
    .asistencia-group-modal__checklist {
        grid-template-columns: 1fr;
    }
}

/* Versión compacta del check-item dentro del modal */
.asistencia-group-modal__checklist .pform__asistencia-check-item {
    padding: .42rem .6rem;
    align-items: center;
}

/* ═══════════════════════════════════════════
   PASO 5: NOTAS TÉCNICAS EN CREAR PLAN
   ═══════════════════════════════════════════ */

.pform__subtitle {
    font-size: .85rem;
    color: var(--hbs-muted);
    margin: -.4rem 0 1rem;
    line-height: 1.5;
}

.pnt-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-bottom: 1rem;
}

.pnt-card {
    display: flex;
    flex-direction: column;
    padding: .75rem 1rem;
    border: 1.5px solid var(--hbs-border);
    border-radius: 12px;
    background: #fff;
    transition: border-color .15s, background .15s, box-shadow .15s;
    animation: hbs-pop-in .25s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.pnt-card:hover {
    border-color: rgba(16, 94, 166, .25);
    background: rgba(16, 94, 166, .02);
}

.pnt-card.is-selected {
    border-color: var(--hbs-primary);
    background: rgba(16, 94, 166, .05);
    box-shadow: 0 0 0 3px rgba(16, 94, 166, .08);
}

.pnt-card__top {
    display: flex;
    align-items: center;
    gap: .85rem;
}

.pnt-card__info {
    flex: 1;
    min-width: 0;
}

.pnt-card__name {
    font-weight: 700;
    font-size: .9rem;
    color: var(--hbs-text);
}

.pnt-card__meta {
    font-size: .76rem;
    color: var(--hbs-muted);
    margin-top: .15rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Variables editables por plan ── */
.pnt-vars {
    margin-top: .8rem;
    padding-top: .75rem;
    border-top: 1px dashed rgba(16, 94, 166, .2);
}

.pnt-vars__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .5rem;
}

.pnt-vars__header-label {
    font-size: .78rem;
    font-weight: 700;
    color: #475569;
    display: flex;
    align-items: center;
    gap: .35rem;
}

.pnt-vars__hint {
    font-size: .71rem;
    font-weight: 400;
    color: #94a3b8;
    font-style: italic;
}

.pnt-vars__list {
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

.pnt-var-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .3rem .5rem;
    border-radius: 8px;
    background: rgba(248, 250, 252, .9);
    border: 1px solid #e2e8f0;
    transition: opacity .18s ease, background .15s;
    cursor: pointer;
}

.pnt-var-row:hover {
    background: #fff;
    border-color: #cbd5e1;
}

.pnt-var-row--disabled {
    opacity: .45;
}

.pnt-var-row__check {
    cursor: pointer;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: var(--hbs-primary, #105ea6);
}

.pnt-var-row__check:disabled {
    cursor: not-allowed;
    opacity: .5;
}

.pnt-var-row__name {
    flex: 1;
    font-size: .82rem;
    color: #334155;
    font-weight: 500;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pnt-var-row__pct {
    width: 5rem;
    padding: .2rem .4rem;
    font-size: .82rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    text-align: right;
    color: #1e293b;
    background: #fff;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s;
    flex-shrink: 0;
}

.pnt-var-row__pct:focus {
    border-color: #105ea6;
    box-shadow: 0 0 0 2px rgba(16, 94, 166, .15);
}

.pnt-var-row__pct:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

.pnt-var-row__unit {
    font-size: .78rem;
    color: #64748b;
    font-weight: 600;
    flex-shrink: 0;
    width: .9rem;
}

.pnt-var-sum {
    margin-top: .45rem;
    font-size: .76rem;
    color: #475569;
    text-align: right;
    padding-right: .2rem;
}

.pnt-var-sum--invalid {
    color: #dc2626;
    font-weight: 600;
}

.pnt-card__toggle {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid var(--hbs-border);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--hbs-muted);
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s, transform .15s;
}

.pnt-card__toggle:hover {
    border-color: var(--hbs-primary);
    color: var(--hbs-primary);
    transform: scale(1.1);
}

.pnt-card__toggle.is-selected {
    background: var(--hbs-primary);
    border-color: var(--hbs-primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(16, 94, 166, .3);
}

.pnt-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .65rem;
    padding: 2.5rem 1rem;
    color: var(--hbs-muted);
    text-align: center;
}

.pnt-empty > i {
    font-size: 2.2rem;
    opacity: .25;
}

.pnt-empty p {
    font-size: .88rem;
    margin: 0;
}

.pnt-dep-warn {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    background: #fffbeb;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: .65rem .85rem;
    margin-bottom: .85rem;
    font-size: .83rem;
    color: #92400e;
    line-height: 1.45;
}
.pnt-dep-warn i {
    color: #f59e0b;
    margin-top: .1rem;
    flex-shrink: 0;
}

.pnt-selected-wrap {
    border-top: 1px solid var(--hbs-border);
    padding-top: .85rem;
    margin-top: .5rem;
}

.pnt-selected-title {
    font-size: .8rem;
    font-weight: 700;
    color: var(--hbs-primary);
    margin: 0 0 .5rem;
    display: flex;
    align-items: center;
    gap: .35rem;
}

.pnt-selected-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.pnt-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .7rem;
    border-radius: 999px;
    background: rgba(16, 94, 166, .08);
    border: 1px solid rgba(16, 94, 166, .2);
    color: var(--hbs-primary);
    font-size: .78rem;
    font-weight: 600;
}

.pnt-chip__remove {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--hbs-primary);
    opacity: .6;
    line-height: 1;
    display: flex;
    align-items: center;
    font-size: .72rem;
    transition: opacity .15s;
}

.pnt-chip__remove:hover { opacity: 1; }

/* ═══════════════════════════════════════════
   MODAL VER DETALLES — tabs
   ═══════════════════════════════════════════ */

.plan-detail-modal__box--wide {
    max-width: 680px;
}

.plan-detail-modal__status {
    display: inline-flex;
    align-items: center;
    padding: .2rem .65rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-left: auto;
    flex-shrink: 0;
}

.plan-detail-modal__status--activo {
    background: rgba(16, 185, 129, .1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, .25);
}

.plan-detail-modal__status--inactivo {
    background: rgba(100, 116, 139, .1);
    color: var(--hbs-muted);
    border: 1px solid rgba(100, 116, 139, .2);
}

.pdtabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--hbs-border);
    margin: .85rem 0 1rem;
}

.pdtab {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem .9rem;
    border: none;
    background: none;
    font-size: .83rem;
    font-weight: 600;
    color: var(--hbs-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color .15s, border-color .15s;
}

.pdtab:hover {
    color: var(--hbs-text);
}

.pdtab.is-active {
    color: var(--hbs-primary);
    border-bottom-color: var(--hbs-primary);
}

.pdtab-content {
    display: none;
}

.pdtab-content.is-active {
    display: block;
    animation: hbs-fade-in .15s ease both;
}

.pdtab-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .65rem;
    padding: 2rem 1rem;
    color: var(--hbs-muted);
    text-align: center;
}

.pdtab-empty > i { font-size: 2rem; opacity: .25; }
.pdtab-empty p { font-size: .85rem; margin: 0; }

.plan-detail-modal__footer {
    display: flex;
    gap: .65rem;
    margin-top: 1.25rem;
    padding-top: .85rem;
    border-top: 1px solid var(--hbs-border);
}

.plan-detail-modal__total {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
    padding: .55rem .85rem;
    background: rgba(16, 94, 166, .05);
    border: 1px solid rgba(16, 94, 166, .12);
    border-radius: 10px;
    font-size: .88rem;
    font-weight: 700;
    color: var(--hbs-primary);
    margin-top: .5rem;
}

/* Tabla de coberturas en el modal */
.pdcov-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .83rem;
    margin-top: .5rem;
}

.pdcov-table th {
    background: var(--hbs-bg);
    color: var(--hbs-muted);
    font-weight: 700;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .5rem .75rem;
    text-align: left;
    border-bottom: 1px solid var(--hbs-border);
}

.pdcov-table td {
    padding: .55rem .75rem;
    border-bottom: 1px solid var(--hbs-border);
    color: var(--hbs-text);
    vertical-align: middle;
}

.pdcov-table tr:last-child td { border-bottom: none; }
.pdcov-table tr:hover td { background: var(--hbs-bg); }

/* Asistencias en el modal */
.pdasis-group {
    margin-bottom: .85rem;
}

.pdasis-group__name {
    font-size: .8rem;
    font-weight: 700;
    color: var(--hbs-text);
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .35rem .65rem;
    background: var(--hbs-bg);
    border-radius: 7px;
    margin-bottom: .4rem;
}

.pdasis-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .65rem;
    font-size: .83rem;
    color: var(--hbs-text);
    border-bottom: 1px solid var(--hbs-border);
}

.pdasis-item:last-child { border-bottom: none; }
.pdasis-item::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--hbs-secondary);
    flex-shrink: 0;
}

/* Notas técnicas en el modal */
.pdnota-card {
    border: 1px solid var(--hbs-border);
    border-radius: 12px;
    padding: .9rem 1rem;
    margin-bottom: .65rem;
    background: #fff;
}

.pdnota-card__name {
    font-weight: 700;
    font-size: .92rem;
    color: var(--hbs-text);
    margin-bottom: .4rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.pdnota-card__name i { color: var(--hbs-primary); }

.pdnota-source {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .15rem .5rem;
    border-radius: 999px;
    background: rgba(46, 184, 203, .1);
    border: 1px solid rgba(46, 184, 203, .25);
    color: var(--hbs-secondary);
    font-size: .72rem;
    font-weight: 600;
    margin-bottom: .5rem;
}

.pdnota-vars {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    margin-bottom: .5rem;
}

.pdnota-var-chip {
    display: inline-flex;
    align-items: center;
    padding: .15rem .55rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    color: #fff;
}

.pdnota-formula {
    font-size: .8rem;
    color: var(--hbs-muted);
    background: var(--hbs-bg);
    border-radius: 7px;
    padding: .4rem .65rem;
    font-family: 'Courier New', Courier, monospace;
}

.asistencia-group-modal__checklist .pform__asistencia-check-item__name {
    font-size: .82rem;
}

.asistencia-group-modal__checklist .pform__asistencia-check-item__meta {
    font-size: .7rem;
}

/* ═══════════════════════════════════════════
   MODAL DETALLE PREVIEW (crear planes)
   ═══════════════════════════════════════════ */

.pdt-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(15, 23, 42, .6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: hbs-fade-in .18s ease both;
}
.pdt-modal[hidden] { display: none; }

.pdt-modal__box {
    background: #fff;
    border-radius: 20px;
    padding: 1.75rem;
    width: 100%;
    max-width: 900px;
    max-height: 88vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
    animation: hbs-pop-in .26s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.pdt-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--hbs-muted);
    display: grid;
    place-items: center;
    transition: background .15s ease, transform .15s ease;
}
.pdt-modal__close:hover { background: #e2e8f0; transform: rotate(90deg); }

.pdt-modal__header {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--hbs-text);
    margin-bottom: .35rem;
    padding-right: 2.5rem;
}
.pdt-modal__header i { color: var(--hbs-primary); }

.pdt-modal__subtitle {
    font-size: .82rem;
    color: var(--hbs-muted);
    margin: 0 0 1rem;
    line-height: 1.5;
}

.pdt-empty,
.pdt-no-notas {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--hbs-muted);
}
.pdt-empty > i, .pdt-no-notas > i { font-size: 2rem; opacity: .3; }
.pdt-empty p,  .pdt-no-notas p    { font-size: .88rem; margin: 0; }

.pdt-scroll-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--hbs-border);
}

/* Tabla */
.pdt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
    white-space: nowrap;
}

.pdt-table thead th {
    background: var(--hbs-bg, #f8fafc);
    padding: .6rem .85rem;
    text-align: right;
    font-weight: 700;
    color: var(--hbs-muted);
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 2px solid var(--hbs-border);
    position: sticky;
    top: 0;
    z-index: 1;
}

.pdt-item-th  { text-align: left !important; min-width: 180px; }
.pdt-pct-th   { text-align: center !important; min-width: 55px; }
.pdt-cov-th   { min-width: 130px; }
.pdt-total-th { min-width: 120px; }

.pdt-cov-name { display: block; }
.pdt-cov-base {
    display: block;
    font-size: .68rem;
    color: var(--hbs-muted);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

/* Fila base */
.pdt-base-row td {
    padding: .5rem .85rem;
    border-bottom: 1px solid var(--hbs-border);
    background: #f8fafc;
    text-align: right;
    color: var(--hbs-muted);
    font-weight: 500;
}

/* Fila variable */
.pdt-var-row td {
    padding: .42rem .85rem;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
    text-align: right;
    color: var(--hbs-text);
}

/* Fila resultado nota (azul gradiente) */
.pdt-nota-row td {
    padding: .6rem .85rem;
    border-bottom: 2px solid var(--hbs-border);
    background: linear-gradient(90deg, var(--hbs-primary, #105ea6) 0%, #1a74c4 100%);
    color: #fff;
    text-align: right;
    font-weight: 700;
}

/* Hover en filas de variable */
.pdt-var-row:hover td { background: #f8fafc; }

/* Primera columna: item */
.pdt-item-cell { text-align: left !important; }
.pdt-item-cell--base { font-style: italic; }
.pdt-item-cell--var  { padding-left: 2rem !important; font-size: .79rem; }
.pdt-item-cell--nota { font-weight: 800; }

.pdt-var-icon {
    color: var(--hbs-muted);
    font-size: .6rem;
    margin-right: .4rem;
    opacity: .6;
}

/* Celda % */
.pdt-pct-cell   { text-align: center !important; color: var(--hbs-muted); font-size: .78rem; }
.pdt-denom-cell { color: rgba(255, 255, 255, .7) !important; font-size: .76rem; }

/* Celda Total */
.pdt-total-cell          { font-weight: 700; color: var(--hbs-primary); }
.pdt-total-cell--nota    { color: #fff !important; font-size: 1rem; }


/* ════════════════════════════════════════════════════════════════════════════
   CADENA DE CÁLCULO — reutilizada en calculadora del plan (paso 5)
   ════════════════════════════════════════════════════════════════════════════ */

.nt-chain-step {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    padding: .55rem .85rem;
    border-radius: 10px;
    border: 1px solid var(--hbs-border);
    background: var(--hbs-bg);
    animation: hbs-pop-in .2s cubic-bezier(0.34,1.56,0.64,1) both;
}
.nt-chain-step--input {
    background: #fff;
    border-color: var(--hbs-border);
}
.nt-chain-step--final {
    background: linear-gradient(135deg, var(--hbs-primary) 0%, var(--hbs-secondary) 100%);
    border-color: transparent;
    color: #fff;
}
.nt-chain-step__label {
    font-size: .82rem;
    color: inherit;
    display: flex;
    align-items: center;
    gap: .35rem;
    flex: 1;
    min-width: 0;
}
.nt-chain-step--input .nt-chain-step__label { color: var(--hbs-muted); font-weight: 600; }
.nt-chain-step:not(.nt-chain-step--input):not(.nt-chain-step--final) .nt-chain-step__label { color: var(--hbs-text); }
.nt-chain-step__label em { font-style: normal; font-size: .73rem; opacity: .7; }
.nt-chain-step__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .15rem;
    flex-shrink: 0;
}
.nt-chain-step__value { font-size: .95rem; font-weight: 700; }
.nt-chain-step--input .nt-chain-step__value { color: var(--hbs-text); }
.nt-chain-step--final .nt-chain-step__value { color: #fff; font-size: 1.05rem; }
.nt-chain-step__exact { font-size: .68rem; opacity: .8; font-weight: 400; }


/* ════════════════════════════════════════════════════════════════════════════
   CALCULADORA RÁPIDA — columna de preview, paso 5 (Notas Técnicas)
   ════════════════════════════════════════════════════════════════════════════ */

.plan-calc {
    background: var(--hbs-card);
    border: 1px solid var(--hbs-border);
    border-radius: 16px;
    padding: 1.15rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .9rem;
}

.plan-calc__header {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.plan-calc__badge {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .75rem;
    font-weight: 700;
    color: var(--hbs-primary);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.plan-calc__badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    animation: calc-pulse 2s ease-in-out infinite;
}
@keyframes calc-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .5; transform: scale(1.35); }
}
.plan-calc__subtitle {
    font-size: .75rem;
    color: var(--hbs-muted);
}

.plan-calc__input-row {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
.plan-calc__label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--hbs-text);
}
.plan-calc__input-wrap {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}
.plan-calc__input {
    width: 100%;
    padding: .55rem .8rem;
    border: 1.5px solid var(--hbs-border);
    border-radius: 10px;
    font-size: .92rem;
    font-weight: 600;
    color: var(--hbs-text);
    background: var(--hbs-bg);
    transition: border-color .2s;
    box-sizing: border-box;
}
.plan-calc__input:focus {
    outline: none;
    border-color: var(--hbs-primary);
    box-shadow: 0 0 0 3px rgba(16,94,166,.12);
}
.plan-calc__hint {
    font-size: .72rem;
    color: var(--hbs-muted);
    display: flex;
    align-items: center;
    gap: .3rem;
}

.plan-calc__chain {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.plan-calc__no-notas {
    font-size: .78rem;
    color: var(--hbs-muted);
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .65rem;
    background: var(--hbs-bg);
    border-radius: 8px;
    border: 1px dashed var(--hbs-border);
}

.plan-calc__warning {
    margin: 0;
    font-size: .78rem;
    color: #ef4444;
    display: flex;
    align-items: center;
    gap: .4rem;
    background: rgba(239,68,68,.07);
    border: 1px solid rgba(239,68,68,.2);
    border-radius: 8px;
    padding: .45rem .7rem;
}

.plan-calc__totals {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .6rem;
}
.plan-calc__total-item {
    background: var(--hbs-bg);
    border: 1px solid var(--hbs-border);
    border-radius: 10px;
    padding: .65rem .85rem;
    display: flex;
    flex-direction: column;
    gap: .2rem;
}
.plan-calc__total-item--anual {
    background: linear-gradient(135deg,rgba(16,94,166,.08) 0%,rgba(46,184,203,.08) 100%);
    border-color: rgba(16,94,166,.2);
}
.plan-calc__total-label {
    font-size: .7rem;
    color: var(--hbs-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .3rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.plan-calc__total-val {
    font-size: 1rem;
    font-weight: 700;
    color: var(--hbs-primary);
}

.plan-calc__meta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    padding: .65rem 1rem;
    background: transparent;
    border: 1.5px dashed var(--hbs-primary);
    border-radius: 10px;
    color: var(--hbs-primary);
    font-size: .84rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s, color .18s;
}
.plan-calc__meta-btn:hover {
    background: var(--hbs-primary);
    color: #fff;
    border-style: solid;
}

/* Nota de info oculta en paso 5 */
.ppreview__info-note { transition: opacity .2s; }


/* ════════════════════════════════════════════════════════════════════════════
   MODAL META DESEADA
   ════════════════════════════════════════════════════════════════════════════ */

.meta-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(15,23,42,.55);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: hbs-fade-in .18s ease both;
}
.meta-modal[hidden] { display: none; }

.meta-modal__box {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(15,23,42,.25);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    animation: hbs-pop-in .28s cubic-bezier(0.34,1.56,0.64,1) both;
    scrollbar-width: thin;
}
.meta-modal__box::-webkit-scrollbar       { width: 4px; }
.meta-modal__box::-webkit-scrollbar-track { background: transparent; }
.meta-modal__box::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 99px; }

/* ── Chip "precio actual" ── */
.meta-modal__current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(16,94,166,.08) 0%, rgba(46,184,203,.06) 100%);
    border: 1px solid rgba(16,94,166,.18);
    border-radius: 12px;
    padding: .75rem 1rem;
}
.meta-modal__current-left {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.meta-modal__current-label {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #64748b;
}
.meta-modal__current-val {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--hbs-primary, #105ea6);
    line-height: 1.1;
}
.meta-modal__current-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(16,94,166,.12);
    display: grid;
    place-items: center;
    color: var(--hbs-primary, #105ea6);
    font-size: 1rem;
    flex-shrink: 0;
}

/* ── Input de meta ── */
.meta-modal__target-input {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: var(--hbs-text, #1e293b) !important;
    padding: .65rem .9rem !important;
}

/* ── Label de sección ── */
.meta-modal__section-label {
    font-size: .73rem;
    font-weight: 700;
    color: var(--hbs-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: .06em;
    display: flex;
    align-items: center;
    gap: .4rem;
    padding-bottom: .4rem;
    border-bottom: 1px solid var(--hbs-border, #e2e8f0);
    margin-bottom: -.3rem;
}
.meta-modal__section-hint {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: #94a3b8;
    font-size: .7rem;
    margin-left: auto;
}

/* ── Lista de variables ── */
.meta-modal__vars {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    flex-shrink: 0;
}

.meta-var-group {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}
.meta-var-group__title {
    font-size: .72rem;
    font-weight: 700;
    color: var(--hbs-primary, #105ea6);
    padding: .45rem .8rem;
    background: rgba(16,94,166,.06);
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: .35rem;
}
.meta-var-row {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .42rem .8rem;
    cursor: pointer;
    transition: background .12s;
}
.meta-var-row:hover { background: rgba(16,94,166,.04); }
.meta-var-row:not(:last-child) { border-bottom: 1px solid #e2e8f0; }
.meta-var-check {
    width: 15px;
    height: 15px;
    accent-color: var(--hbs-primary, #105ea6);
    cursor: pointer;
    flex-shrink: 0;
}
.meta-var-row__name { flex: 1; font-size: .82rem; color: #1e293b; }
.meta-var-row__val  {
    font-size: .74rem;
    font-weight: 700;
    color: #64748b;
    background: #e2e8f0;
    padding: .1rem .4rem;
    border-radius: 5px;
}
.meta-var-row__weight-label {
    display: flex;
    align-items: center;
    gap: .25rem;
    font-size: .72rem;
    color: #64748b;
    margin-left: .5rem;
    cursor: default;
    flex-shrink: 0;
}
.meta-var-row__weight-label i { font-size: .68rem; opacity: .55; }
.meta-var-weight {
    width: 3.8rem;
    padding: .15rem .3rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: .78rem;
    text-align: center;
    background: #fff;
    color: #1e293b;
    cursor: text;
}
.meta-var-weight:focus { outline: none; border-color: var(--hbs-primary, #105ea6); box-shadow: 0 0 0 2px rgba(16,94,166,.12); }

/* ── Validación ── */
.meta-modal__validation {
    margin: -.3rem 0 0;
    font-size: .76rem;
    color: #ef4444;
    display: flex;
    align-items: center;
    gap: .4rem;
    background: rgba(239,68,68,.06);
    border: 1px solid rgba(239,68,68,.2);
    border-radius: 8px;
    padding: .4rem .65rem;
    animation: hbs-pop-in .18s ease;
}

/* ── Sección comparativa ── */
.meta-modal__comparison {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    animation: hbs-pop-in .2s ease;
}
.meta-modal__comparison-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}
.meta-modal__comparison-label {
    font-size: .72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.meta-modal__result-badge {
    display: flex;
    align-items: center;
    gap: .4rem;
    background: linear-gradient(135deg, var(--hbs-primary, #105ea6) 0%, var(--hbs-secondary, #2eb8cb) 100%);
    color: #fff;
    border-radius: 20px;
    padding: .28rem .75rem;
    font-size: .8rem;
    font-weight: 700;
    white-space: nowrap;
    animation: hbs-pop-in .2s ease;
}
.meta-modal__result-badge[hidden] { display: none; }

.meta-modal__table-wrap {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}
.meta-modal__table {
    width: 100%;
    border-collapse: collapse;
    font-size: .79rem;
}
.meta-modal__table th {
    text-align: left;
    padding: .38rem .65rem;
    font-size: .67rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #64748b;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}
.meta-modal__table td {
    padding: .42rem .65rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}
.meta-modal__table tbody tr:last-child td { border-bottom: none; }
.meta-modal__table tbody tr:hover td { background: rgba(16,94,166,.03); }

/* Columna nota/variable */
.meta-col-name {
    display: flex;
    flex-direction: column;
    gap: .1rem;
}
.meta-nota-chip {
    font-size: .65rem;
    font-weight: 700;
    color: var(--hbs-primary, #105ea6);
    background: rgba(16,94,166,.1);
    padding: .05rem .35rem;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}
.meta-var-name {
    font-size: .8rem;
    color: #1e293b;
    font-weight: 500;
}

/* Valores antes / después / delta */
.meta-comparison__before { color: #64748b; font-weight: 500; }
.meta-comparison__after  { color: #10b981; font-weight: 700; }
.meta-comparison__delta  { font-size: .73rem; font-weight: 600; color: #94a3b8; }
.meta-delta--up          { color: #f59e0b !important; }
.meta-delta--down        { color: #10b981 !important; }

/* ─── Meta modal — título con botón de ayuda ─── */
.meta-modal__title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}
.nt-help-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .75rem;
    border-radius: 999px;
    border: 1px solid rgba(46,184,203,.35);
    background: rgba(46,184,203,.07);
    color: var(--hbs-secondary, #2eb8cb);
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    flex-shrink: 0;
}
.nt-help-btn:hover { background: rgba(46,184,203,.14); border-color: rgba(46,184,203,.5); }

/* ─── Modal Ayuda Meta Deseada ─── */
.meta-help-modal {
    position: fixed; inset: 0; z-index: 1300;
    background: rgba(15,23,42,.55); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
}
.meta-help-modal[hidden] { display: none; }
.meta-help-modal__box {
    background: #fff; border-radius: 14px; width: 100%;
    max-width: 560px; max-height: 90vh; overflow-y: auto;
    padding: 1.75rem 2rem; position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}

/* ─── Estilos compartidos de ayuda (nt-help-*) para planes ─── */
.nt-help-hero { display:flex; align-items:center; gap:1rem; margin-bottom:1.5rem; padding-bottom:1rem; border-bottom:1px solid #e2e8f0; }
.nt-help-hero__icon { width:52px; height:52px; border-radius:14px; background:linear-gradient(135deg,var(--hbs-primary,#105ea6),var(--hbs-secondary,#2eb8cb)); display:flex; align-items:center; justify-content:center; font-size:1.3rem; color:#fff; flex-shrink:0; }
.nt-help-hero__title { font-size:1.05rem; font-weight:700; color:#1e293b; margin:0 0 .2rem; }
.nt-help-hero__sub { font-size:.82rem; color:#64748b; margin:0; }
.nt-help-sections { display:flex; flex-direction:column; gap:1rem; margin-bottom:1rem; }
.nt-help-section { display:flex; gap:.85rem; align-items:flex-start; }
.nt-help-section__icon { width:36px; height:36px; border-radius:10px; background:rgba(16,94,166,.07); display:flex; align-items:center; justify-content:center; font-size:.9rem; color:var(--hbs-primary,#105ea6); flex-shrink:0; margin-top:.1rem; }
.nt-help-section h4 { font-size:.88rem; font-weight:700; color:#1e293b; margin:0 0 .25rem; }
.nt-help-section p { font-size:.83rem; color:#64748b; margin:0; line-height:1.55; }
.nt-help-formula { background:rgba(16,94,166,.06); border:1px solid rgba(16,94,166,.12); border-radius:8px; padding:.5rem .85rem; font-size:.82rem; color:#1e293b; margin-top:.4rem; font-family:'Courier New',Courier,monospace; }
.nt-help-example { background:linear-gradient(135deg,rgba(16,94,166,.04),rgba(46,184,203,.06)); border:1px solid rgba(16,94,166,.12); border-radius:12px; padding:1rem 1.1rem; }
.nt-help-example__title { font-size:.83rem; font-weight:700; color:var(--hbs-primary,#105ea6); margin-bottom:.75rem; display:flex; align-items:center; gap:.4rem; }
.nt-help-example__steps { display:flex; flex-direction:column; gap:.45rem; }
.nt-help-step { display:flex; align-items:flex-start; gap:.65rem; font-size:.84rem; color:#1e293b; }
.nt-help-step__num { width:22px; height:22px; border-radius:50%; background:var(--hbs-primary,#105ea6); color:#fff; font-size:.72rem; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0; margin-top:.05rem; }
.nt-help-step--result .nt-help-step__num { background:var(--hbs-secondary,#2eb8cb); font-size:.7rem; }
.nt-help-step--result { font-size:.92rem; margin-top:.25rem; }
.nt-help-tip { display:flex; align-items:flex-start; gap:.6rem; background:rgba(245,158,11,.07); border:1px solid rgba(245,158,11,.18); border-radius:10px; padding:.7rem .9rem; font-size:.82rem; color:#1e293b; line-height:1.5; }
.nt-help-tip > i { color:#f59e0b; margin-top:.1rem; flex-shrink:0; }

/* ─── Paso 6: Planes de Pago checklist ───────────────────────────────────── */

.ppp-list { display: flex; flex-direction: column; gap: .5rem; }

.ppp-item {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .75rem 1rem;
    border: 1px solid var(--hbs-border, #e2e8f0);
    border-radius: 10px;
    cursor: pointer;
    transition: background .12s, border-color .12s;
}

.ppp-item:hover { background: rgba(16, 94, 166, .04); }

.ppp-item.is-selected {
    border-color: var(--hbs-primary, #105ea6);
    background: rgba(16, 94, 166, .06);
}

.ppp-item__check {
    width: 18px;
    height: 18px;
    accent-color: var(--hbs-primary, #105ea6);
    cursor: pointer;
    flex-shrink: 0;
}

.ppp-item__info { flex: 1; }

.ppp-item__label {
    font-size: .9rem;
    font-weight: 600;
    color: #1e293b;
}

.ppp-item__meta {
    font-size: .78rem;
    color: #64748b;
    margin-top: .1rem;
}

.ppp-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
    text-align: center;
    gap: .5rem;
}

.ppp-empty > i { font-size: 2.2rem; opacity: .25; }

/* ═══════════════════════════════════════════════════════════
   PASO 7 — TARIFICACIÓN (dentro de crear plan)
   ═══════════════════════════════════════════════════════════ */

.ptar-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .65rem;
    padding: 2.5rem 1rem;
    color: var(--hbs-muted, #94a3b8);
    text-align: center;
}

.ptar-empty > i { font-size: 2.2rem; opacity: .25; }
.ptar-empty > p { font-size: .92rem; font-weight: 600; color: #64748b; margin: 0; }

.ptar-tool {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    flex: 1;
    min-height: 0;
}

.ptar-result {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 1rem 1.1rem;
    margin-top: .25rem;
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.ptar-result__value-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: 1.08rem;
    font-weight: 700;
    color: #059669;
}

.ptar-result__value-row strong {
    font-size: 1.3rem;
    font-weight: 800;
}

.ptar-result__meta {
    font-size: .76rem;
    color: #64748b;
    margin: 0 0 .35rem;
}
.ppp-empty p { font-size: .88rem; margin: 0; color: #64748b; }

/* ═══════════════════════════════════════════
   PASO 1 — RANGO DE EDAD
   ═══════════════════════════════════════════ */

.pform__edad-range {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.pform__edad-range .pform__input {
    flex: 1;
    min-width: 0;
}
.pform__edad-sep {
    font-size: .88rem;
    color: #64748b;
    flex-shrink: 0;
}
.pform__edad-adelante {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: .82rem;
    color: #64748b;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
}
.pform__edad-adelante input[type="checkbox"] { cursor: pointer; }

/* ═══════════════════════════════════════════
   PASO 1 — SEXO OBJETIVO
   ═══════════════════════════════════════════ */

.pform__sex-group {
    display: flex;
    gap: .4rem;
    margin-top: .25rem;
}
.pform__sex-btn {
    flex: 1;
    padding: .45rem .5rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    font-size: .84rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}
.pform__sex-btn:hover {
    border-color: #105ea6;
    color: #105ea6;
}
.pform__sex-btn.is-active {
    background: #105ea6;
    border-color: #105ea6;
    color: #fff;
}

/* ═══════════════════════════════════════════
   PASO 1 — CIUDADES DE COBERTURA
   ═══════════════════════════════════════════ */

.pform__group--full {
    width: 100%;
}
.pform__ciudad-list {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    max-height: 220px;
    overflow-y: auto;
    padding: .4rem .5rem;
    margin-top: .35rem;
    background: #fff;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: .15rem 0;
    align-content: start;
}
.pform__ciudad-dep-label {
    grid-column: 1 / -1;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #94a3b8;
    padding: .3rem .2rem .05rem;
    margin-top: .2rem;
}
.pform__ciudad-check-item {
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .28rem .4rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: .83rem;
    color: #334155;
    transition: background .12s;
    user-select: none;
}
.pform__ciudad-check-item:hover {
    background: #f1f5f9;
}
.pform__ciudad-check-item.is-checked {
    background: #eff6ff;
    color: #1d4ed8;
}
.pform__ciudad-check-item input {
    accent-color: #105ea6;
    cursor: pointer;
    flex-shrink: 0;
}
.pform__ciudad-empty {
    grid-column: 1 / -1;
    font-size: .82rem;
    color: #94a3b8;
    padding: .5rem .2rem;
    text-align: center;
}
.pform__ciudad-selall-row {
    display: flex;
    align-items: center;
    padding: .3rem .5rem;
    border: 1px solid #e2e8f0;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    background: #f8fafc;
    margin-top: .4rem;
}
.pform__ciudad-selall-label {
    display: flex;
    align-items: center;
    gap: .45rem;
    cursor: pointer;
    font-size: .8rem;
    font-weight: 600;
    color: #334155;
    user-select: none;
}
.pform__ciudad-selall-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #2eb8cb;
    cursor: pointer;
}
.pform__ciudad-selall-row + .pform__ciudad-list {
    border-top: none;
    border-radius: 0 0 8px 8px;
    margin-top: 0;
}
.pform__ciudad-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .5rem;
}
.pform__ciudad-chip {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 99px;
    padding: .22rem .7rem .22rem .65rem;
    font-size: .78rem;
    font-weight: 500;
}
.pform__ciudad-chip-remove {
    background: none;
    border: none;
    color: #60a5fa;
    font-size: .9rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}
.pform__ciudad-chip-remove:hover { color: #1e40af; }

/* ═══════════════════════════════════════════
   PASO 6 — TABLA DE TARIFICACIÓN FILTRADA
   ═══════════════════════════════════════════ */

.ptar-table__meta {
    font-size: .78rem;
    color: #475569;
    margin: .6rem 0 .1rem;
    font-weight: 600;
}
.ptar-table__scroll {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}
.ptar-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
    background: #fff;
}
.ptar-table thead th {
    background: #f8fafc;
    color: #64748b;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .55rem .65rem;
    border-bottom: 1.5px solid #e2e8f0;
    white-space: nowrap;
}
.ptar-table tbody tr:hover { background: #f8fafc; }
.ptar-table tbody tr:not(:last-child) td { border-bottom: 1px solid #f1f5f9; }
.ptar-table__range {
    padding: .5rem .65rem;
    color: #334155;
    font-weight: 600;
    white-space: nowrap;
}
.ptar-table__null {
    padding: .5rem .65rem;
    color: #cbd5e1;
    text-align: right;
}
.ptar-table__cell {
    padding: .5rem .65rem;
    text-align: right;
    color: #1e40af;
    font-weight: 600;
    border-radius: 4px;
}
.ptar-table__empty {
    font-size: .84rem;
    color: #94a3b8;
    padding: .75rem;
    text-align: center;
    margin: .5rem 0;
}
.ptar-table__empty i { margin-right: .4rem; }

/* ════════════════════════════════════════════════════════
   PASO 6 TARIFARIO — Acciones, selectores y modales
   ════════════════════════════════════════════════════════ */

.ptar-actions {
    display: flex;
    gap: .6rem;
    margin-bottom: 1rem;
}

.ptar-selectors-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.ptar-selectors-row .pform__group { flex: 1; min-width: 180px; }

.ptar-city-actions {
    display: flex;
    gap: .4rem;
    align-items: flex-end;
    padding-bottom: .15rem;
}
.ptar-city-actions__sep {
    width: 1px;
    height: 1.5rem;
    background: #e2e8f0;
    align-self: center;
    flex-shrink: 0;
}
.ptar-btn-delete { color: #ef4444 !important; border-color: rgba(239,68,68,.25) !important; }

/* ─── Modal overlay ─── */
.ptar-modal {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    padding: 1rem;
    overflow-y: auto;
}
.ptar-modal__box {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 780px;
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}
.ptar-modal__close {
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: #94a3b8;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background .15s, color .15s;
}
.ptar-modal__close:hover { background: #f1f5f9; color: #334155; }
.ptar-modal__title {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: 1.08rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.3rem;
}
.ptar-modal__title i { color: #2563eb; font-size: 1.1rem; }
.ptar-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: .6rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}
.ptar-modal__error {
    font-size: .8rem;
    color: #ef4444;
    margin-top: .3rem;
    display: flex;
    align-items: center;
    gap: .3rem;
}
.ptar-modal__tablas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1.2rem 0 .6rem;
}

/* ─── Bloque de tabla en el modal ─── */
.ptar-tabla-block {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 1.2rem;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.ptar-tabla-block__header {
    display: flex;
    align-items: center;
    gap: .6rem;
    background: #f8fafc;
    padding: .75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
}
.ptar-tabla-block__num {
    font-size: .78rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    min-width: 55px;
}
.ptar-tabla-block__meta {
    display: flex;
    gap: .5rem;
    flex: 1;
    flex-wrap: wrap;
}
.ptar-tabla-block__input {
    flex: 1;
    min-width: 120px;
    font-size: .82rem !important;
    padding: .35rem .6rem !important;
}
.ptar-tabla-block__remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #ef4444;
    font-size: .95rem;
    padding: .3rem;
    border-radius: 6px;
    transition: background .12s;
    flex-shrink: 0;
}
.ptar-tabla-block__remove:hover { background: #fee2e2; }

/* ─── Tabla de rangos×primas (reemplaza el grid) ─── */
.ptar-tabla-block__table-wrap {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}
.ptar-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.ptar-tg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .78rem;
    min-width: 280px;
}
.ptar-tg-table thead th {
    text-align: center;
    font-weight: 600;
    color: #64748b;
    padding: .35rem .5rem;
    border-bottom: 1px solid #e2e8f0;
    text-transform: uppercase;
    letter-spacing: .03em;
    white-space: nowrap;
    background: #f1f5f9;
    font-size: .72rem;
}
.ptar-tg-table thead th:first-child { text-align: left; padding-left: .8rem; }
.ptar-tg-table tbody tr:nth-child(even) { background: rgba(0,0,0,.02); }
.ptar-tg-table tbody tr:hover { background: #eff6ff; }
.ptar-tg-label {
    font-size: .75rem;
    color: #475569;
    font-weight: 500;
    padding: .25rem .5rem .25rem .8rem;
    white-space: nowrap;
}
.ptar-tg-label--edit {
    padding: .15rem .4rem .15rem .6rem;
}
.ptar-age-input {
    width: 46px;
    font-size: .75rem;
    padding: .2rem .3rem;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    background: #fff;
    color: #334155;
    text-align: center;
    outline: none;
}
.ptar-age-input:focus { border-color: #2eb8cb; }
.ptar-age-sep {
    font-size: .7rem;
    color: #94a3b8;
    margin: 0 .2rem;
}
.ptar-tg-table tbody td {
    padding: .2rem .3rem;
    vertical-align: middle;
}
.ptar-tg-del-cell { width: 28px; text-align: center; }
.ptar-tg-del {
    background: none;
    border: none;
    cursor: pointer;
    color: #cbd5e1;
    padding: .2rem .3rem;
    border-radius: 4px;
    font-size: .7rem;
    transition: color .12s, background .12s;
    line-height: 1;
}
.ptar-tg-del:hover { color: #ef4444; background: #fee2e2; }
.ptar-tg-input {
    width: 100%;
    font-size: .78rem !important;
    padding: .25rem .3rem !important;
    text-align: right;
    min-width: 68px;
}

/* ─── Fila de agregar rango manual ─── */
.ptar-add-rango-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .8rem;
    border-top: 1px dashed #e2e8f0;
    flex-wrap: wrap;
}
.ptar-add-rango-row .pform__input {
    width: 82px !important;
    font-size: .8rem !important;
    padding: .3rem .5rem !important;
}
.ptar-add-rango-sep {
    font-size: .78rem;
    color: #94a3b8;
}
.ptar-btn-add-rango {
    font-size: .8rem !important;
    padding: .3rem .7rem !important;
}
.ptar-add-rango-adelante-label {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: .8rem;
    color: #64748b;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
}
.ptar-add-rango-adelante-label input[type="checkbox"] { cursor: pointer; }
.ptar-age-adelante-label {
    font-size: .78rem;
    color: #2eb8cb;
    font-style: italic;
    flex-shrink: 0;
    white-space: nowrap;
}

/* ─── Radio tipo de aumento (Agregar Valor Asegurado) ─── */
.ptar-av-tipo-row {
    display: flex;
    gap: 1.2rem;
    margin-bottom: .5rem;
}
.ptar-av-radio {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .85rem;
    color: #334155;
    cursor: pointer;
    user-select: none;
}
.ptar-av-radio input[type="radio"] { cursor: pointer; }

/* ─── Confirm eliminar ciudad ─── */
.ptar-confirm {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1300;
    padding: 1rem;
}
.ptar-confirm__box {
    background: #fff;
    border-radius: 14px;
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
}
.ptar-confirm__icon { font-size: 2.2rem; color: #f59e0b; margin-bottom: .8rem; }
.ptar-confirm__title { font-size: 1rem; font-weight: 700; color: #1e293b; margin: 0 0 .5rem; }
.ptar-confirm__body { font-size: .85rem; color: #64748b; margin: 0 0 1.5rem; }
.ptar-confirm__footer { display: flex; gap: .6rem; justify-content: center; }
.ptar-confirm__ok { background: #ef4444 !important; color: #fff !important; border-color: #ef4444 !important; }
.ptar-confirm__ok:hover { background: #dc2626 !important; border-color: #dc2626 !important; }

/* ════════════════════════════════════════════════════════
   PASO 6 TARIFARIO — Celdas editables (inline edit)
   ════════════════════════════════════════════════════════ */

/* Ícono de edición dentro de la celda */
.ptar-cell-edit-icon {
    opacity: 0;
    font-size: .6rem;
    color: #105ea6;
    margin-left: .35rem;
    vertical-align: middle;
    transition: opacity .15s ease;
    pointer-events: none;
}

/* Celda con capacidad de edición */
.ptar-table__cell--editable {
    cursor: pointer;
    position: relative;
    transition: background .15s ease, color .15s ease;
    user-select: none;
}
.ptar-table__cell--editable:hover {
    background: rgba(16, 94, 166, .07) !important;
    color: #105ea6;
}
.ptar-table__cell--editable:hover .ptar-cell-edit-icon {
    opacity: 1;
}
.ptar-table__cell--editable:active {
    background: rgba(16, 94, 166, .13) !important;
    transform: scale(.98);
}

/* Tabla con encabezados premium (reemplaza el gris plano) */
.ptar-table thead th {
    background: #105ea6 !important;
    color: #e2eeff !important;
    font-size: .72rem !important;
    border-bottom: none !important;
    padding: .6rem .75rem !important;
}
.ptar-table thead th:first-child {
    border-radius: 8px 0 0 0;
}
.ptar-table thead th:last-child {
    border-radius: 0 8px 0 0;
}

/* Zebra striping mejorado */
.ptar-table tbody tr:nth-child(odd) { background: #fff; }
.ptar-table tbody tr:nth-child(even) { background: #f8fafc; }
.ptar-table tbody tr:hover { background: rgba(16,94,166,.05) !important; }
.ptar-table tbody tr:not(:last-child) td {
    border-bottom: 1px solid #f1f5f9 !important;
}

/* Contenedor de la tabla con sombra y radio más premium */
.ptar-table__scroll {
    overflow-x: auto;
    border-radius: 12px !important;
    border: 1px solid #dde6f0 !important;
    box-shadow: 0 2px 12px rgba(16,94,166,.07);
}

/* Primera fila marcada como origen de notas técnicas */
.ptar-rango-row--nota-base td {
    background: rgba(16, 94, 166, .04) !important;
}
.ptar-rango-row--nota-base td:first-child {
    border-left: 3px solid rgba(16, 94, 166, .45);
    padding-left: .45rem !important;
}

/* Animación de aparición del bloque de herramienta */
@keyframes ptar-fadein {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
#ptarTool:not([hidden]) {
    animation: ptar-fadein .22s cubic-bezier(.16,1,.3,1) both;
}

/* Estado vacío mejorado */
.ptar-empty {
    gap: 1rem !important;
    padding: 3rem 1.5rem !important;
    border: 1.5px dashed #dde6f0 !important;
    border-radius: 14px !important;
    background: #fafcff;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.ptar-empty > i {
    font-size: 2.8rem !important;
    opacity: .18 !important;
    color: #105ea6;
}
.ptar-empty > p {
    font-size: .95rem !important;
    color: #64748b !important;
    font-weight: 500 !important;
}

/* Botones de acción mejorados */
.ptar-actions {
    gap: .75rem !important;
    flex-wrap: wrap;
}

/* Meta badge en tabla */
.ptar-table__meta {
    font-size: .78rem;
    color: #64748b;
    margin: 0 0 .6rem;
    display: flex;
    flex-wrap: wrap;
    gap: .4rem .6rem;
    align-items: center;
}

/* ════════════════════════════════════════════════════════
   MODAL EDICIÓN INLINE — Celda / Fila / Columna
   ════════════════════════════════════════════════════════ */

/* Tags de contexto de celda (usados en ptar-cell-meta__context) */
.ptar-edit-tag {
    font-size: .75rem;
    font-weight: 600;
    color: #475569;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: .18rem .55rem;
    white-space: nowrap;
}
.ptar-edit-tag--col {
    background: rgba(16,94,166,.08);
    color: #105ea6;
    border-color: rgba(16,94,166,.2);
}

/* ════════════════════════════════════════════════════════
   WIZARD "CREAR PLAN" — Mejoras generales de UI/UX
   ════════════════════════════════════════════════════════ */

/* Step indicator más visual */
.pform__steps {
    gap: 0 !important;
}
.pform__step {
    position: relative;
    flex: 1;
    min-width: 0;
}
/* Línea de progreso entre pasos */
.pform__step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    left: calc(50% + 14px);
    right: calc(-50% + 14px);
    height: 2px;
    background: #e2e8f0;
    transform: translateY(-50%);
    z-index: 0;
    transition: background .3s;
}
.pform__step.is-done:not(:last-child)::after {
    background: #105ea6;
}

/* Número del paso con circle premium */
.pform__step-num {
    width: 28px !important;
    height: 28px !important;
    font-size: .78rem !important;
    font-weight: 700 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative;
    z-index: 1;
    transition: background .25s, box-shadow .25s, transform .2s cubic-bezier(.34,1.56,.64,1);
}
.pform__step.is-active .pform__step-num {
    transform: scale(1.15);
    box-shadow: 0 0 0 4px rgba(16,94,166,.18);
}

/* Card del formulario más premium */
.pform {
    border-radius: 18px !important;
    box-shadow: 0 4px 24px rgba(16,94,166,.07), 0 1px 4px rgba(0,0,0,.04) !important;
}

/* Transición suave entre pasos (slides) */
.pform__slide {
    transition: opacity .18s ease, transform .18s ease;
}

/* Botones nav con mejor proporción */
.pform__footer {
    padding-top: 1.2rem !important;
    border-top: 1px solid #f1f5f9 !important;
}

/* Hover en filas de tabla (tg-table) consistente con el resto */
.ptar-tg-table tbody tr:hover { background: #eff6ff !important; }

/* ════════════════════════════════════════════════════════
   MODAL "META DESEADA POR CELDA" — ptar-cell-meta
   Mismo patrón que meta-modal pero scoped a tarificación
   ════════════════════════════════════════════════════════ */

@keyframes ptar-modal-in {
    from { opacity: 0; transform: scale(.94) translateY(10px); }
    to   { opacity: 1; transform: scale(1)   translateY(0); }
}

/* Overlay */
.ptar-cell-meta {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .58);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1400;
    padding: 1rem;
    overflow-y: auto;
}

/* Caja del modal */
.ptar-cell-meta__box {
    background: #fff;
    border-radius: 18px;
    padding: 2rem;
    width: 100%;
    max-width: 560px;
    box-shadow: 0 24px 64px rgba(16, 94, 166, .18), 0 4px 16px rgba(0,0,0,.08);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: ptar-modal-in .24s cubic-bezier(.34, 1.56, .64, 1) both;
}

/* Cabecera */
.ptar-cell-meta__title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .9rem;
}
.ptar-cell-meta__title {
    font-size: 1.08rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: .55rem;
}
.ptar-cell-meta__title i { color: #105ea6; font-size: 1rem; }

/* Tags de contexto */
.ptar-cell-meta__context {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: 1.1rem;
    padding: .65rem .85rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
}

/* Prima actual (idéntico a meta-modal__current) */
.ptar-cell-meta__current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: .9rem 1.1rem;
    margin-bottom: 1.1rem;
}
.ptar-cell-meta__current-left {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.ptar-cell-meta__current-label {
    font-size: .72rem;
    font-weight: 600;
    color: #3b82f6;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.ptar-cell-meta__current-val {
    font-size: 1.45rem;
    font-weight: 800;
    color: #1e40af;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
}
.ptar-cell-meta__current-icon {
    font-size: 1.6rem;
    color: #93c5fd;
    opacity: .7;
}

/* Input de target */
.ptar-cell-meta__target-input {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #105ea6 !important;
    text-align: right;
    padding: .7rem 1rem !important;
    letter-spacing: .02em;
}
.ptar-cell-meta__target-input:focus {
    border-color: #105ea6 !important;
    box-shadow: 0 0 0 3px rgba(16, 94, 166, .12) !important;
}

/* ═══════════════════════════════════════════
   TARIFICACIÓN — MODAL GESTIONAR RANGOS
   ═══════════════════════════════════════════ */

.ptar-rangos-box { max-width: 680px; }

.ptar-tg-scroll {
    max-height: 360px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: .75rem;
}

.ptar-tg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
}
.ptar-tg-table thead tr { background: #f8fafc; }
.ptar-tg-table th,
.ptar-tg-table td { padding: .5rem .55rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.ptar-tg-table thead th { font-weight: 700; font-size: .78rem; color: #475569; text-transform: uppercase; letter-spacing: .03em; }

.ptar-tg-label { font-weight: 600; white-space: nowrap; }
.ptar-tg-label--edit { display: flex; align-items: center; gap: .3rem; }

.ptar-age-input {
    width: 54px;
    padding: .3rem .4rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: .8rem;
    text-align: center;
    -moz-appearance: textfield;
}
.ptar-age-input:focus { outline: none; border-color: #105ea6; box-shadow: 0 0 0 2px rgba(16,94,166,.12); }
.ptar-age-input::-webkit-inner-spin-button { display: none; }
.ptar-age-sep { color: #94a3b8; font-size: .75rem; }

.ptar-age-adelante-label {
    font-size: .78rem;
    font-style: italic;
    color: #105ea6;
    padding: .25rem .4rem;
    background: rgba(16,94,166,.07);
    border-radius: 5px;
}

.ptar-tg-input {
    width: 80px !important;
    padding: .3rem .4rem !important;
    font-size: .8rem !important;
    text-align: right;
    -moz-appearance: textfield;
}
.ptar-tg-input::-webkit-inner-spin-button { display: none; }

.ptar-tg-del-cell { text-align: center; width: 32px; }
.ptar-tg-del {
    background: none;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    padding: .2rem .35rem;
    border-radius: 5px;
    font-size: .8rem;
    transition: background .12s, color .12s;
}
.ptar-tg-del:hover { background: #fee2e2; color: #ef4444; }

.ptar-tg-add-row { margin-bottom: .25rem; }

/* ═══════════════════════════════════════════
   TARIFICACIÓN — MODO ÚNICO (dos columnas)
   ═══════════════════════════════════════════ */

@keyframes ptarFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ptar-unico-layout {
    display: grid;
    grid-template-columns: 272px 1fr;
    gap: 1.25rem;
    align-items: start;
    animation: ptarFadeIn .25s ease;
}

@media (max-width: 860px) {
    .ptar-unico-layout { grid-template-columns: 1fr; }
}

/* ── Columna izquierda ── */
.ptar-unico-card {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
}

.ptar-unico-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
}

.ptar-unico-card__title {
    font-size: .85rem;
    font-weight: 700;
    color: #334155;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.ptar-unico-card__title i { color: #105ea6; font-size: .9rem; }

/* ── Lista de ítems ── */
.ptar-unico-list { padding: .4rem; }

.ptar-unico-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .6rem .75rem;
    border-radius: 10px;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: background .15s, border-color .15s, transform .12s;
    user-select: none;
}
.ptar-unico-item:hover {
    background: rgba(16,94,166,.05);
    transform: translateX(2px);
}
.ptar-unico-item.is-active {
    background: rgba(16,94,166,.08);
    border-color: rgba(16,94,166,.28);
}

.ptar-unico-item__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .1rem;
}

.ptar-unico-item__nombre {
    font-size: .84rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ptar-unico-item__valor {
    font-size: .75rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: .3rem;
}

.ptar-unico-item__del {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    color: #94a3b8;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    transition: background .15s, color .15s;
}
.ptar-unico-item__del:hover { background: #fee2e2; color: #ef4444; }

/* ── Estado vacío ── */
.ptar-unico-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: #94a3b8;
}
.ptar-unico-empty i { font-size: 1.8rem; opacity: .35; display: block; margin-bottom: .6rem; }
.ptar-unico-empty p { font-size: .82rem; font-weight: 600; color: #64748b; margin: 0; }

/* ── Columna derecha ── */
.ptar-unico-right { display: flex; flex-direction: column; gap: .75rem; }

.ptar-unico-right__actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

#ptarTableWrap { animation: ptarFadeIn .2s ease; }

/* ═══════════════════════════════════════════
   TARIFICACIÓN — MODO MULTI-PRODUCTO
   ═══════════════════════════════════════════ */

.ptar-multi-section { animation: ptarFadeIn .25s ease; }

.ptar-multi-empty {
    padding: 2.5rem 1rem;
    text-align: center;
    color: #94a3b8;
}
.ptar-multi-empty i { font-size: 2rem; opacity: .3; display: block; margin-bottom: .7rem; }
.ptar-multi-empty p { font-size: .88rem; font-weight: 600; color: #64748b; margin: 0; }

/* ── Lista de ítems ── */
.ptar-multi-list {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    padding: .1rem 0 .25rem;
}

.ptar-multi-item {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .8rem 1rem;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    transition: background .15s, border-color .15s, box-shadow .15s;
    user-select: none;
}
.ptar-multi-item:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.ptar-multi-item--active {
    background: #eef5ff !important;
    border-color: rgba(16,94,166,.35) !important;
    box-shadow: 0 0 0 3px rgba(16,94,166,.07);
}

/* Indicador de color lateral */
.ptar-multi-item__dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #cbd5e1;
    flex-shrink: 0;
    transition: background .15s, transform .15s;
}
.ptar-multi-item--active .ptar-multi-item__dot {
    background: #105ea6;
    transform: scale(1.2);
}

/* Cuerpo: nombre + stats */
.ptar-multi-item__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .18rem;
}
.ptar-multi-item__nombre {
    font-size: .88rem;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ptar-multi-item__stats {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .73rem;
    color: #64748b;
}
.ptar-multi-item__stats-sep { opacity: .35; }

/* Precio final destacado */
.ptar-multi-item__price {
    font-size: .9rem;
    font-weight: 800;
    color: #105ea6;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Botones de acción */
.ptar-multi-item__actions {
    display: flex;
    align-items: center;
    gap: .3rem;
    flex-shrink: 0;
}
.ptar-mi-btn {
    width: 28px;
    height: 28px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    border-radius: 7px;
}
.ptar-mi-btn--del {
    color: #ef4444;
    border-color: rgba(239,68,68,.2) !important;
}
.ptar-mi-btn--del:hover {
    background: #fee2e2 !important;
    border-color: rgba(239,68,68,.35) !important;
}

/* ── Preview precio final en modal multi ── */
.ptar-multi-preview {
    background: rgba(16,94,166,.06);
    border: 1px solid rgba(16,94,166,.15);
    border-radius: 10px;
    padding: .6rem .9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: .5rem;
    transition: opacity .2s;
}
.ptar-multi-preview__label {
    font-size: .8rem;
    color: #475569;
    font-weight: 500;
}
.ptar-multi-preview__val {
    font-size: 1rem;
    font-weight: 800;
    color: #105ea6;
}

/* ═══════════════════════════════════════════
   PASO 7 — PLANES DE PAGO (CRUD integrado)
   Prefijo: .ppc-*
   ═══════════════════════════════════════════ */

/* ─── Header row con botón ─── */
.ppc-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: .85rem;
    padding-top: .1rem;
    flex-shrink: 0;
}

/* ─── Tabla contenedor ─── */
.ppc-table-wrap {
    border-radius: 14px;
    border: 1px solid var(--hbs-border, #e2e8f0);
    overflow: hidden;          /* sin scroll horizontal */
    background: #fff;
    min-height: 160px;
    width: 100%;
}

/* ─── Table: fixed layout para que no desborde ─── */
.ppc-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;       /* columnas con ancho controlado */
}

/* Anchos de columnas: suma = 100% */
.ppc-table colgroup col:nth-child(1) { width: 42px;  }   /* checkbox */
.ppc-table colgroup col:nth-child(2) { width: 22%;   }   /* nombre */
.ppc-table colgroup col:nth-child(3) { width: auto;  }   /* etiqueta — ocupa resto */
.ppc-table colgroup col:nth-child(4) { width: 90px;  }   /* meses */
.ppc-table colgroup col:nth-child(5) { width: 78px;  }   /* recargo */
.ppc-table colgroup col:nth-child(6) { width: 86px;  }   /* acciones */

.ppc-table thead th {
    text-align: left;
    padding: .7rem .85rem;
    background: rgba(16, 94, 166, .04);
    color: var(--hbs-primary-dark, #0d4f91);
    font-weight: 600;
    font-size: .82rem;
    border-bottom: 1px solid var(--hbs-border, #e2e8f0);
    white-space: nowrap;
    overflow: hidden;
    letter-spacing: .01em;
}

.ppc-table tbody td {
    padding: .78rem .85rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: .87rem;
    color: var(--hbs-text, #1e293b);
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ppc-table tbody tr:last-child td {
    border-bottom: none;
}

/* La celda de acciones no debe recortar los botones */
.ppc-table tbody td:last-child {
    overflow: visible;
    text-overflow: clip;
}

.ppc-row {
    cursor: pointer;
    transition: background .13s ease;
}

.ppc-row:hover {
    background: rgba(16, 94, 166, .04);
}

.ppc-row.is-selected {
    background: rgba(16, 94, 166, .07);
}

@keyframes ppc-row-out {
    from { opacity: 1; transform: scaleY(1); }
    to   { opacity: 0; transform: scaleY(0); }
}

.ppc-row--removing {
    animation: ppc-row-out .22s ease forwards;
    pointer-events: none;
    transform-origin: top;
}

/* Checkbox de selección */
.ppc-row__chk {
    width: 15px;
    height: 15px;
    accent-color: var(--hbs-primary, #105ea6);
    cursor: pointer;
    vertical-align: middle;
}

/* Badge nombre */
.ppc-nombre-badge {
    display: inline-block;
    padding: .22rem .65rem;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 600;
    background: rgba(16, 94, 166, .1);
    color: var(--hbs-primary, #105ea6);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

/* Celda etiqueta: trunca automáticamente con table-layout:fixed */
.ppc-td-etiq {
    color: #475569;
    /* overflow/ellipsis ya vienen del td global de ppc-table */
}

/* ─── Acciones ─── */
.ppc-row__actions {
    display: flex;
    gap: .3rem;
    align-items: center;
    overflow: visible;  /* botones no se recortan */
    white-space: nowrap;
}

.ppc-row__btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: .78rem;
    background: transparent;
    transition: background .15s ease, transform .12s ease;
    line-height: 1;
}

.ppc-row__btn:hover { transform: scale(1.1); }
.ppc-row__btn:active { transform: scale(.97); }

.ppc-row__btn--edit {
    background: rgba(16, 94, 166, .07);
    border-color: rgba(16, 94, 166, .2);
    color: var(--hbs-primary, #105ea6);
}
.ppc-row__btn--edit:hover { background: rgba(16, 94, 166, .15); }

.ppc-row__btn--del {
    background: rgba(239, 68, 68, .07);
    border-color: rgba(239, 68, 68, .2);
    color: var(--hbs-danger, #ef4444);
}
.ppc-row__btn--del:hover { background: rgba(239, 68, 68, .15); }

/* ─── Estado vacío ─── */
.ppc-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    padding: 2.5rem 1rem;
    text-align: center;
    color: #94a3b8;
}

.ppc-empty[hidden] { display: none; }

.ppc-empty__icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(16, 94, 166, .08);
    color: var(--hbs-primary, #105ea6);
    display: grid;
    place-items: center;
    font-size: 1.3rem;
    opacity: .7;
}

.ppc-empty p {
    margin: 0;
    font-size: .9rem;
    color: #64748b;
    font-weight: 500;
}

/* ─── Modal crear / editar ─── */
.ppc-modal {
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: hbs-fade-in .2s ease both;
}

.ppc-modal[hidden] { display: none; }

.ppc-modal__box {
    background: #fff;
    border-radius: 20px;
    padding: 1.75rem;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
    animation: hbs-pop-in .28s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    position: relative;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
}

.ppc-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    cursor: pointer;
    display: grid;
    place-items: center;
    color: #64748b;
    font-size: .82rem;
    transition: background .15s, transform .2s ease;
}

.ppc-modal__close:hover {
    background: #e2e8f0;
    transform: rotate(90deg);
}

.ppc-modal__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 1.25rem;
    padding-right: 2.5rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.ppc-modal__title i {
    color: var(--hbs-primary, #105ea6);
}

.ppc-modal__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem 1rem;
}

.ppc-modal__field {
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

.ppc-modal__field--full {
    grid-column: 1 / -1;
}

.ppc-modal__label {
    font-size: .83rem;
    font-weight: 600;
    color: #374151;
}

.ppc-modal__label span {
    color: var(--hbs-danger, #ef4444);
    margin-left: .1rem;
}

.ppc-modal__input {
    padding: .62rem .85rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font: inherit;
    font-size: .9rem;
    color: #1e293b;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
}

.ppc-modal__input:focus {
    border-color: var(--hbs-primary, #105ea6);
    box-shadow: 0 0 0 4px rgba(16, 94, 166, .1);
}

.ppc-modal__input.is-invalid {
    border-color: var(--hbs-danger, #ef4444);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .1);
}

.ppc-modal__error {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .79rem;
    color: var(--hbs-danger, #ef4444);
    margin-top: .7rem;
}

.ppc-modal__error[hidden] { display: none; }

.ppc-modal__footer {
    margin-top: 1.4rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: .65rem;
    justify-content: flex-end;
}

/* ─── Confirm eliminar ─── */
.ppc-confirm {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(15, 23, 42, .6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: hbs-fade-in .18s ease both;
}

.ppc-confirm[hidden] { display: none; }

.ppc-confirm__box {
    background: #fff;
    border-radius: 18px;
    padding: 2rem 1.75rem 1.5rem;
    max-width: 370px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
    animation: hbs-pop-in .26s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.ppc-confirm__icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(239, 68, 68, .1);
    color: var(--hbs-danger, #ef4444);
    display: grid;
    place-items: center;
    font-size: 1.3rem;
    margin: 0 auto .9rem;
}

.ppc-confirm__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 .4rem;
}

.ppc-confirm__body {
    font-size: .88rem;
    color: #64748b;
    margin: 0 0 1.4rem;
    line-height: 1.5;
}

.ppc-confirm__footer {
    display: flex;
    gap: .65rem;
    justify-content: center;
}

.ppc-confirm__ok {
    background: var(--hbs-danger, #ef4444);
    color: #fff;
    border-color: var(--hbs-danger, #ef4444);
}
.ppc-confirm__ok:hover { background: #dc2626; border-color: #dc2626; }

/* ─── Toast ─── */
@keyframes ppc-toast-in {
    from { opacity: 0; transform: translateY(10px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes ppc-toast-out {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(6px) scale(.97); }
}

.ppc-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1200;
    display: flex;
    align-items: center;
    gap: .6rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: .75rem 1.1rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .13);
    font-size: .88rem;
    color: #1e293b;
    min-width: 210px;
    animation: ppc-toast-in .25s ease both;
}

.ppc-toast[hidden] { display: none; }

.ppc-toast__icon { font-size: 1.05rem; color: #22c55e; }
.ppc-toast--error .ppc-toast__icon { color: var(--hbs-danger, #ef4444); }
