/* ==========================================================================
   views/suscripciones.css — Estilos exclusivos de Suscripciones (suscripciones.html)
   Prefijo de clases: sb-
   ========================================================================== */

/* Colores por categoría para la barra apilada */
.sb-c1 { background: #A5B4FC; }
.sb-c2 { background: #86EFAC; }
.sb-c3 { background: #FDA4AF; }
.sb-c4 { background: #FDBA74; }
.sb-c5 { background: #5EEAD4; }
.sb-c6 { background: #E2E8F0; }

/* Tarjeta destacada: gasto total */
.sb-total {
    position: relative;
    overflow: hidden;
    padding: 18px;
    border-radius: 22px;
    color: var(--white);
    background: linear-gradient(140deg, #6366F1 0%, #4338CA 50%, #1E1B4B 100%);
    box-shadow: 0 24px 48px -20px rgba(30, 27, 75, .6);
}
.sb-total::before {
    content: "";
    position: absolute;
    width: 200px;
    height: 200px;
    right: -80px;
    top: -110px;
    border-radius: 50%;
    border: 30px solid rgba(255, 255, 255, .07);
    pointer-events: none;
}
.sb-total-row {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 10px;
}
.sb-total-label { font-size: 12px; color: rgba(255, 255, 255, .75); }
.sb-total-amount { font-size: 30px; font-weight: 700; line-height: 1.15; color: var(--white); }
.sb-total-year { font-size: 18px; font-weight: 700; color: var(--white); }

.sb-stack {
    display: flex;
    gap: 3px;
    height: 12px;
    margin-top: 16px;
}
.sb-stack i {
    display: block;
    height: 100%;
    border-radius: 4px;
    transform-origin: left;
    animation: ui-bar-in 1.1s var(--app-ease) both;
}
.sb-stack i:first-child { border-radius: 999px 4px 4px 999px; }
.sb-stack i:last-child { border-radius: 4px 999px 999px 4px; }

.sb-legend {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px 10px;
    margin-top: 14px;
    font-size: 12px;
    color: rgba(255, 255, 255, .8);
}
.sb-legend li { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; }
.sb-legend i { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.sb-legend b { color: var(--white); font-weight: 700; }
.sb-total-note {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed rgba(255, 255, 255, .2);
    font-size: 11.5px;
    color: rgba(255, 255, 255, .7);
}

/* Próximos cobros */
.sb-due {
    width: 138px;
    padding: 14px;
    border-radius: 18px;
    background: var(--white);
    border: 1px solid var(--greyscale-100);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sb-due-date {
    width: 46px;
    height: 50px;
    margin-bottom: 10px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--c-indigo);
    background: var(--c-indigo-bg);
    line-height: 1.1;
}
.sb-due-date b { font-size: 19px; letter-spacing: 0; }
.sb-due.is-soon .sb-due-date { color: var(--white); background: linear-gradient(135deg, #818CF8, #4338CA); }
.sb-due p {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--primary-base);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sb-due span:not(.sb-due-date) { font-size: 11.5px; color: var(--greyscale-500); }
.sb-due strong { margin-top: 6px; font-size: 16px; color: var(--primary-base); }

/* Considera cancelar */
.sb-cancel {
    padding: 16px;
    border-radius: 20px;
    background: linear-gradient(180deg, #FFF7ED 0%, var(--white) 70%);
    border: 1px solid #FED7AA;
}
.sb-cancel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.sb-cancel-head p { font-size: 15px; font-weight: 700; color: var(--primary-base); }
.sb-cancel-head span { font-size: 12.5px; color: var(--greyscale-600); }
.sb-cancel-head b { color: var(--c-orange); }
.sb-cancel .mod-kv li span { min-width: 0; }
.sb-cancel .mod-kv li b { white-space: nowrap; }

/* Lista */
#sb-list .mod-item-end .ui-status { display: inline-flex; }

/* Ajustes locales: chips-botón sin ancho completo y carrusel alineado al margen */
.page-mod button.ui-chip { width: auto; line-height: 1.2; white-space: nowrap; }
.page-mod .ui-scroll-x { scroll-padding-inline: 24px; }
