/* ==========================================================================
   views/seguros.css — Estilos exclusivos de Seguros y pólizas (seguros.html)
   Prefijo de clases: sg-
   ========================================================================== */

/* Alerta destacada: póliza por vencer */
.sg-alert {
    position: relative;
    overflow: hidden;
    padding: 18px;
    border-radius: 22px;
    color: var(--white);
    background: linear-gradient(140deg, #FB7185 0%, #E11D48 55%, #881337 100%);
    box-shadow: 0 24px 48px -20px rgba(225, 29, 72, .55);
}
.sg-alert::before {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -70px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .14), transparent 70%);
}
.sg-alert-top { position: relative; display: flex; gap: 12px; align-items: flex-start; }
.sg-alert-ico {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .18);
    animation: sg-pulse 2s ease-in-out infinite;
}
@keyframes sg-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .35); }
    50%      { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
}
.sg-alert-label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .8); }
.sg-alert-title { font-size: 18px; font-weight: 700; color: var(--white); line-height: 1.2; margin-top: 2px; }
.sg-alert-sub { display: block; font-size: 12px; color: rgba(255, 255, 255, .8); margin-top: 2px; }
.sg-alert-days {
    flex-shrink: 0;
    text-align: center;
    line-height: 1;
    padding: 8px 10px;
    border-radius: 14px;
    background: var(--white);
    color: #BE123C;
}
.sg-alert-days strong { display: block; font-size: 24px; font-weight: 800; }
.sg-alert-days span { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }

.sg-alert-meta {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 16px 0 14px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .12);
}
.sg-alert-meta small { display: block; font-size: 11px; color: rgba(255, 255, 255, .75); }
.sg-alert-meta b { display: block; font-size: 13px; font-weight: 700; color: var(--white); }

.sg-alert-actions { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sg-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 44px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition: transform .15s var(--app-ease);
}
.sg-btn:active { transform: scale(.96); }
.sg-btn-light { background: var(--white); color: #BE123C; }
.sg-btn-ghost { background: rgba(255, 255, 255, .16); color: var(--white); border: 1px solid rgba(255, 255, 255, .3); }
.sg-btn-ghost:hover, .sg-btn-light:hover { color: inherit; }

/* Lista de pólizas con barra de vigencia */
.sg-policy { align-items: flex-start; }
.sg-policy .mod-item-body > span:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-policy .sg-vig { display: block; margin-top: 10px; height: 5px; }
.sg-vig-dates { display: flex !important; justify-content: space-between; font-size: 10.5px !important; }
.sg-vig-dates em { font-style: normal; }
.sg-expired { opacity: .65; }
.sg-expired .ui-bar i { background: var(--greyscale-300); }

/* En caso de siniestro */
.sg-sos-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.sg-sos-ico {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background: linear-gradient(140deg, #FB7185, #E11D48);
}
.sg-sos-head p { font-size: 15px; font-weight: 700; color: var(--primary-base); }
.sg-sos-head span { font-size: 12px; color: var(--greyscale-500); }
.sg-sos-list { display: grid; }
.sg-sos-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px dashed var(--greyscale-200);
    color: inherit;
}
.sg-sos-item .mod-item-ico { width: 38px; height: 38px; border-radius: 12px; }
.sg-sos-body { flex: 1; min-width: 0; }
.sg-sos-body b { display: block; font-size: 13.5px; font-weight: 600; color: var(--primary-base); }
.sg-sos-body small { display: block; font-size: 12px; color: var(--greyscale-500); }
.sg-call {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background: var(--c-green);
    box-shadow: 0 6px 14px -6px var(--c-green);
}
.sg-sos-tip {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 12.5px;
    color: #9F1239;
    background: var(--c-rose-bg);
}
.sg-sos-tip .ico { flex-shrink: 0; margin-top: 1px; }

/* Gasto anual en primas */
.sg-total { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.sg-total-amount { font-size: 24px; font-weight: 800; color: var(--primary-base); }
.sg-total-month { text-align: right; }
.sg-total-month small { display: block; font-size: 11.5px; color: var(--greyscale-500); }
.sg-total-month b { font-size: 15px; color: var(--primary-base); }

.sg-stack {
    display: flex;
    gap: 3px;
    height: 14px;
    margin: 14px 0 12px;
    border-radius: 999px;
    overflow: hidden;
}
.sg-stack i {
    display: block;
    height: 100%;
    background: var(--tone) !important;
    transform-origin: left;
    animation: ui-bar-in 1.1s var(--app-ease) both;
}
.sg-legend { display: grid; gap: 8px; }
.sg-legend li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    background: none !important;
    color: var(--greyscale-600) !important;
}
.sg-legend li::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: var(--tone);
}
.sg-legend li span { flex: 1; }
.sg-legend li b { color: var(--primary-base); font-weight: 700; }

/* Chips de filtro: anula el estilo global de <button> de la plantilla (width:100%, padding, colores) */
.sg-filter .ui-chip {
    width: auto;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--greyscale-700);
    background: var(--white);
    border: 1px solid var(--greyscale-200);
}
.sg-filter .ui-chip:hover { color: var(--greyscale-700); background: var(--white); border-color: var(--greyscale-200); }
.sg-filter .ui-chip.active,
.sg-filter .ui-chip.active:hover { color: var(--white); background: var(--primary-base); border-color: var(--primary-base); }
