/* ==========================================================================
   views/salud.css — Estilos exclusivos de Salud (salud.html)
   Prefijo de clases: sl-
   ========================================================================== */

/* Credencial médica de emergencia */
.sl-id {
    position: relative;
    overflow: hidden;
    padding: 18px;
    border-radius: 22px;
    color: var(--white);
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .18) 0%, rgba(255, 255, 255, 0) 55%),
        linear-gradient(145deg, #14B8A6 0%, #0F766E 55%, #134E4A 100%);
    box-shadow: 0 24px 48px -20px rgba(15, 118, 110, .55);
}
.sl-id::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 5px;
    background: repeating-linear-gradient(90deg, #F87171 0 18px, #FFFFFF 18px 26px);
    opacity: .85;
}
.sl-id-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    z-index: 1;
}
.sl-id-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .72); }
.sl-id-name { font-size: 19px; font-weight: 700; color: var(--white); line-height: 1.2; margin-top: 2px; }
.sl-id-sub { display: block; font-size: 12px; color: rgba(255, 255, 255, .78); margin-top: 2px; }

.sl-blood {
    flex-shrink: 0;
    min-width: 84px;
    padding: 8px 8px 8px;
    border-radius: 16px;
    background: var(--white);
    color: var(--c-red);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .35);
}
.sl-blood strong { font-size: 26px; font-weight: 800; line-height: 1; margin-top: 2px; }
.sl-blood small { white-space: nowrap; font-size: 8.5px; font-weight: 700; color: var(--greyscale-500); text-transform: uppercase; letter-spacing: .04em; margin-top: 3px; }

.sl-id-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 16px;
    position: relative;
    z-index: 1;
}
.sl-id-field {
    padding: 9px 11px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .13);
    backdrop-filter: blur(6px);
    min-width: 0;
}
.sl-id-field span { display: block; font-size: 10.5px; color: rgba(255, 255, 255, .72); }
.sl-id-field p { font-size: 13.5px; font-weight: 700; color: var(--white); line-height: 1.25; margin-top: 1px; }
.sl-id-field.is-alert { background: rgba(254, 202, 202, .95); }
.sl-id-field.is-alert span { color: #B91C1C; }
.sl-id-field.is-alert p { color: #7F1D1D; }

.sl-id-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed rgba(255, 255, 255, .3);
    position: relative;
    z-index: 1;
}
.sl-id-contact { font-size: 14px; font-weight: 600; color: var(--white); margin-top: 2px; }
.sl-call {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    color: #0F766E;
    transition: transform .15s var(--app-ease);
}
.sl-call:active { transform: scale(.92); }

.sl-id-mark {
    position: absolute;
    right: -30px;
    bottom: -34px;
    width: 170px;
    height: 170px;
    fill: none;
    stroke: rgba(255, 255, 255, .1);
    stroke-width: 1.2;
}

/* Fecha de cita */
.sl-date {
    width: 44px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 14px;
    background: var(--c-teal-bg);
    color: var(--c-teal);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.sl-date small { font-size: 9.5px; font-weight: 700; letter-spacing: .08em; }
.sl-date b { font-size: 18px; font-weight: 800; margin-top: 3px; }
.sl-date.is-soon { background: linear-gradient(145deg, #2DD4BF, #0F766E); color: var(--white); box-shadow: 0 8px 18px -8px rgba(15, 118, 110, .7); }

/* Tratamientos */
.sl-meds { display: grid; gap: 0; padding-top: 6px; padding-bottom: 6px; }
.sl-med {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--greyscale-200);
}
.sl-med:last-child { border-bottom: 0; }
.sl-med-body { flex: 1; min-width: 0; }
.sl-med-body > p { font-size: 14px; font-weight: 600; color: var(--primary-base); }
.sl-med-body > span { display: block; font-size: 12px; color: var(--greyscale-500); margin-top: 2px; }
.sl-med .ui-status { margin-top: 2px; }
.sl-times { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sl-times span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--greyscale-100);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--greyscale-700);
}

/* Gráfica de peso */
.sl-chart-head { display: flex; justify-content: space-between; align-items: flex-start; }
.sl-chart-value { font-size: 26px; font-weight: 700; color: var(--primary-base); line-height: 1.15; }
.sl-chart-value small { font-size: 14px; font-weight: 600; color: var(--greyscale-500); }
.sl-delta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--c-green-bg);
    color: var(--c-green);
    font-size: 12px;
    font-weight: 700;
}
.sl-chart { display: block; width: 100%; height: auto; margin-top: 10px; overflow: visible; }
.sl-grid line { stroke: var(--greyscale-100); stroke-width: 1; stroke-dasharray: 4 4; }
.sl-area { fill: url(#sl-area); }
.sl-line {
    fill: none;
    stroke: #0D9488;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 320;
    stroke-dashoffset: 320;
    animation: sl-draw 1.2s var(--app-ease) .2s forwards;
}
.sl-dots circle { fill: var(--white); stroke: #0D9488; stroke-width: 2.5; }
.sl-dots circle.is-last { fill: #0D9488; stroke: var(--c-teal-bg); stroke-width: 4; }
.sl-axis text { font-size: 7.5px; fill: var(--greyscale-500); text-anchor: middle; font-family: inherit; }

@keyframes sl-draw { to { stroke-dashoffset: 0; } }

.sl-stat {
    padding: 10px;
    border-radius: 14px;
    background: var(--greyscale-50);
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.sl-stat span { font-size: 11px; color: var(--greyscale-500); }
.sl-stat b { font-size: 16px; font-weight: 700; color: var(--primary-base); }
.sl-stat small { font-size: 10.5px; color: var(--greyscale-500); }

/* Chips de filtro: anula el width:100% y padding que template.css aplica a <button> */
.mod-toolbar button.ui-chip { width: auto; padding: 8px 14px; font-size: 13px; font-weight: 500; line-height: 1.2; }
