/* ==========================================================================
   SIAGECI · Sitio público
   Hoja de estilos única. Se carga después de Bootstrap 4.1.3.

   1. Variables
   2. Base
   3. Utilidades y componentes comunes
   4. Encabezado
   5. Inicio
   6. Proceso
   7. Zonas
   8. Oficios
   9. Datos abiertos
   10. Preguntas
   11. Pie de página
   12. Animaciones al hacer scroll
   13. Inicio de sesión
   14. Panel de administración (sidebar, navbar y buscador)
   15. Dashboard
   ========================================================================== */


/* 1. Variables
   ========================================================================== */

:root {
    --sg-red:        #b4252d;
    --sg-red-dark:   #8e1c23;
    --sg-red-light:  #ef5a62;

    --sg-ink:        #111418;
    --sg-ink-2:      #1a1f25;
    --sg-text:       #4b525a;
    --sg-text-soft:  #6b727a;
    --sg-text-mute:  #9aa0a6;
    --sg-text-light: #c3c7cc;

    --sg-line:       #e5e7ea;
    --sg-line-soft:  #eef0f2;
    --sg-muted-bg:   #f6f6f4;

    --sg-font:       "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
    --sg-mono:       "Geist Mono", ui-monospace, Menlo, monospace;

    --sg-header-h:   72px;
    --sg-ease:       cubic-bezier(.2, .7, .2, 1);
}


/* 2. Base
   ========================================================================== */

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--sg-header-h) + 16px);
}

.sg-body {
    padding-top: var(--sg-header-h);
    font-family: var(--sg-font);
    color: var(--sg-ink);
    background: #fff;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.sg-body a        { color: var(--sg-red); text-decoration: none; }
.sg-body a:hover  { color: var(--sg-red-dark); text-decoration: none; }
.sg-body ::selection { background: var(--sg-red); color: #fff; }

.sg-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}


/* 3. Utilidades y componentes comunes
   ========================================================================== */

.sg-mono        { font-family: var(--sg-mono); }
.sg-text-accent { color: var(--sg-red-light); }

.sg-section            { padding: 120px 0; }
.sg-section--muted     { background: var(--sg-muted-bg); }
.sg-section--dark      { background: var(--sg-ink); color: #fff; }
.sg-section__head      { margin-bottom: 56px; }
.sg-section__head > div + div { margin-top: 20px; }

.sg-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-family: var(--sg-mono);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--sg-red);
}
.sg-kicker--light { color: #f08a90; }
.sg-hero .sg-kicker::before {
    content: "";
    width: 24px;
    height: 1px;
    background: var(--sg-red-light);
}
.sg-hero .sg-kicker { color: #a9b6cc; }

.sg-title {
    margin: 0;
    font-weight: 600;
    font-size: clamp(32px, 4vw, 56px);
    line-height: 1.02;
    letter-spacing: -.04em;
}

.sg-lead {
    margin: 0;
    max-width: 460px;
    font-size: 17px;
    line-height: 1.65;
    color: var(--sg-text);
}
.sg-lead--light { color: var(--sg-text-light); }

.sg-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--c, var(--sg-red));
    vertical-align: middle;
}
.sg-dot--live { --c: #7fd6b0; width: 6px; height: 6px; }

/* Botones */
.sg-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: background .2s, color .2s, border-color .2s;
}
.sg-btn--lg { height: 52px; padding: 0 24px; font-size: 15px; }

.sg-body .sg-btn--primary       { background: var(--sg-red); color: #fff; }
.sg-body .sg-btn--primary:hover { background: #c8333b; color: #fff; }

.sg-body .sg-btn--dark          { height: 38px; border-radius: 8px; background: var(--sg-ink); color: #fff; }
.sg-body .sg-btn--dark:hover    { background: var(--sg-red); color: #fff; }

.sg-body .sg-btn--outline-light       { border-color: rgba(255, 255, 255, .2); color: #fff; }
.sg-body .sg-btn--outline-light:hover { background: #fff; color: var(--sg-ink); border-color: #fff; }

.sg-body .sg-link-underline {
    display: inline-flex;
    align-items: center;
    height: 52px;
    padding: 0 6px;
    border-bottom: 1px solid rgba(255, 255, 255, .6);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
}
.sg-body .sg-link-underline:hover { color: #fff; border-color: var(--sg-red-light); }

.sg-link-btn {
    padding: 0;
    border: 0;
    background: none;
    color: var(--sg-red);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

/* Campos */
.sg-input {
    width: 100%;
    height: 52px;
    padding: 0 14px;
    border: 1px solid var(--sg-line);
    border-radius: 10px;
    background: #fff;
    font-size: 15px;
    color: var(--sg-ink);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.sg-input:focus {
    border-color: var(--sg-ink);
    box-shadow: 0 0 0 4px rgba(17, 20, 24, .06);
}


/* 4. Encabezado
   ========================================================================== */

.sg-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: var(--sg-ink);
    border-bottom: 1px solid transparent;
    transition: border-color .35s, background .35s, box-shadow .35s;
}
.sg-header.is-scrolled {
    background: rgba(17, 20, 24, .94);
    border-color: rgba(255, 255, 255, .08);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-shadow:
        0 1px 0 0 rgba(180, 37, 45, .4),
        0 8px 32px -8px rgba(0, 0, 0, .55);
}

.sg-header .navbar {
    padding-top: 0;
    padding-bottom: 0;
}

/* La altura fija va en el logo (no en la barra) para que la primera fila
   no se desplace cuando se abre el menú móvil */
.sg-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    height: var(--sg-header-h);
}
.sg-brand__logo { height: 40px; width: auto; }
.sg-brand__divider { width: 1px; height: 28px; background: rgba(255, 255, 255, .18); }
.sg-brand__divider--light { height: 36px; background: rgba(255, 255, 255, .16); }
.sg-body .sg-brand__name {
    font-weight: 600;
    font-size: 16px;
    letter-spacing: .04em;
    color: #fff;
}

.sg-nav {
    display: flex;
    gap: 28px;
    margin: 0 32px 0 auto;
    padding: 0;
    list-style: none;
}
.sg-body .sg-nav__link {
    font-size: 14px;
    color: rgba(255, 255, 255, .62);
    white-space: nowrap;
    transition: color .2s;
}
.sg-body .sg-nav__link:hover { color: #fff; }

/* Botón "Iniciar sesión" sobre fondo oscuro */
.sg-header .sg-btn--dark {
    border: 1px solid rgba(255, 255, 255, .22);
    background: transparent;
    color: #fff;
}
.sg-body .sg-header .sg-btn--dark:hover {
    background: #fff;
    color: var(--sg-ink);
    border-color: #fff;
}

/* Botón de menú (solo móvil) */
.sg-menu-toggle {
    position: relative;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
}
.sg-menu-toggle span {
    position: absolute;
    left: 11px;
    width: 16px;
    height: 1.5px;
    background: #fff;
    transition: transform .3s var(--sg-ease), top .3s var(--sg-ease);
}
.sg-menu-toggle span:first-child { top: 15px; }
.sg-menu-toggle span:last-child  { top: 22px; }
.sg-menu-toggle[aria-expanded="true"] span:first-child { top: 19px; transform: rotate(45deg); }
.sg-menu-toggle[aria-expanded="true"] span:last-child  { top: 19px; transform: rotate(-45deg); }

@media (max-width: 991.98px) {
    #sg-menu {
        padding: 8px 0 24px;
        background: var(--sg-ink);
        border-top: 1px solid rgba(255, 255, 255, .08);
    }
    .sg-nav {
        flex-direction: column;
        gap: 0;
        margin: 0 0 16px;
    }
    .sg-nav li { border-bottom: 1px solid rgba(255, 255, 255, .08); }
    .sg-body .sg-nav__link {
        display: block;
        padding: 14px 0;
        font-size: 16px;
        color: rgba(255, 255, 255, .75);
    }
    #sg-menu .sg-btn--dark { width: 100%; height: 48px; justify-content: center; }
}


/* 5. Inicio
   ========================================================================== */

.sg-hero {
    position: relative;
    overflow: hidden;
    background: var(--sg-ink);
    color: #fff;
}

.sg-hero__grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse at 75% 45%, #000 10%, transparent 70%);
    mask-image: radial-gradient(ellipse at 75% 45%, #000 10%, transparent 70%);
    pointer-events: none;
}

.sg-hero__inner { position: relative; padding-top: 88px; }
.sg-hero__copy  { margin-bottom: 56px; }

.sg-hero__title {
    margin: 0 0 32px;
    font-weight: 600;
    font-size: clamp(40px, 5.4vw, 88px);
    line-height: .96;
    letter-spacing: -.045em;
}

.sg-hero__lead {
    max-width: 480px;
    margin: 0 0 32px;
    font-size: 18px;
    line-height: 1.65;
    color: #c3cddc;
}

.sg-hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

/* Mapa ilustrativo */
.sg-map {
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
    background: var(--sg-ink-2);
    box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .6);
}

.sg-map__head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 6px 14px;
    font-family: var(--sg-mono);
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #a9b6cc;
}

.sg-map__canvas {
    position: relative;
    aspect-ratio: 5 / 4;
    overflow: hidden;
    border-radius: 10px;
    background: var(--sg-ink);
}
@supports not (aspect-ratio: 1) {
    .sg-map__canvas { height: 0; padding-bottom: 80%; }
}

.sg-map__blocks {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 10px;
    padding: 10px;
}
.sg-map__block          { border-radius: 4px; background: #222932; }
.sg-map__block.is-dark  { background: #181d23; }
.sg-map__block.is-park  { background: radial-gradient(rgba(127, 214, 176, .35) 1px, transparent 1.5px) 0 0 / 8px 8px, #1c2a26; }

.sg-map__avenue {
    position: absolute;
    left: -10%;
    top: 52%;
    width: 120%;
    height: 16px;
    background: var(--sg-ink);
    border-top: 1px solid rgba(255, 255, 255, .08);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    transform: rotate(-24deg);
}
.sg-map__avenue span {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    border-top: 1px dashed rgba(255, 255, 255, .2);
}
.sg-map__avenue-label {
    position: absolute;
    left: 56%;
    top: 43%;
    font-family: var(--sg-mono);
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    white-space: nowrap;
    color: rgba(169, 182, 204, .7);
    transform: rotate(-24deg);
}
.sg-map__zone {
    position: absolute;
    left: 8%;
    top: 9%;
    width: 52%;
    height: 46%;
    border: 1.5px dashed rgba(239, 90, 98, .55);
    border-radius: 8px;
    background: rgba(239, 90, 98, .05);
}

/* Puntos del mapa */
.sg-pin {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}
.sg-pin:focus { outline: none; }
.sg-pin__ring {
    position: absolute;
    inset: 0;
    border: 1.5px solid var(--c);
    border-radius: 50%;
    opacity: 0;
    transform: scale(.4);
    transition: opacity .35s var(--sg-ease), transform .35s var(--sg-ease);
}
.sg-pin__dot {
    position: relative;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--c);
    box-shadow: 0 0 0 2px var(--sg-ink);
    transition: width .3s var(--sg-ease), height .3s var(--sg-ease), box-shadow .3s;
}
.sg-pin.is-active { z-index: 3; }
.sg-pin.is-active .sg-pin__ring { opacity: .9; transform: scale(1); }
.sg-pin.is-active .sg-pin__dot  { width: 14px; height: 14px; box-shadow: 0 0 0 2px var(--sg-ink), 0 0 18px var(--c); }

.sg-map__card {
    position: absolute;
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .5);
    white-space: nowrap;
    pointer-events: none;
    transition: left .45s var(--sg-ease), top .45s var(--sg-ease), transform .45s var(--sg-ease);
}
.sg-map__card-folio { font-size: 11px; letter-spacing: .06em; color: var(--sg-text-soft); }
.sg-map__card-giro  { font-size: 14px; font-weight: 600; color: var(--sg-ink); }
.sg-map__card-calle { font-size: 12px; color: var(--sg-text-soft); }

.sg-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin: 0;
    padding: 14px 6px 2px;
    list-style: none;
    font-size: 12px;
    color: #a9b6cc;
}

/* Cifras */
.sg-stats {
    margin-top: 80px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}
.sg-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding-top: 32px;
    padding-bottom: 64px;
    text-align: center;
}
.sg-stat__value {
    font-weight: 500;
    font-size: clamp(34px, 3.6vw, 48px);
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
}
.sg-stat__label { font-size: 14px; color: #a9b6cc; }

/* Entrada al cargar la página (se activa con body.is-loaded) */
.sg-line          { display: block; overflow: hidden; padding-bottom: .06em; }
.sg-line__in      { display: inline-block; white-space: nowrap; transform: translateY(105%); transition: transform 1s var(--sg-ease) var(--d, 0s); }
.sg-load          { opacity: 0; transform: translateY(16px); transition: opacity .9s ease var(--d, 0s), transform .9s var(--sg-ease) var(--d, 0s); }
.sg-pin           { opacity: 0; transform: translateY(-14px); transition: opacity .5s ease var(--d, 0s), transform .6s var(--sg-ease) var(--d, 0s); }
.sg-map__block    { opacity: 0; transition: opacity .8s ease .3s; }

.is-loaded .sg-line__in,
.is-loaded .sg-load,
.is-loaded .sg-pin       { opacity: 1; transform: none; }
.is-loaded .sg-map__block { opacity: 1; }


/* 6. Proceso
   ========================================================================== */

.sg-steps > div { margin-bottom: 24px; }

.sg-step {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    padding: 32px 28px 8px 0;
    border: 0;
    background: none;
    text-align: left;
    color: var(--sg-ink);
    cursor: pointer;
}
.sg-step:focus { outline: none; }
.sg-step__line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(var(--sg-ink), var(--sg-ink)) no-repeat left / 0% 100%, #d8dbde;
    transition: background-size .6s var(--sg-ease);
}
.sg-step__num   { font-size: 13px; color: var(--sg-text-mute); transition: color .3s; }
.sg-step__title { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.sg-step__text  { max-width: 280px; font-size: 15px; line-height: 1.6; color: var(--sg-text-mute); transition: color .3s; }

.sg-step.is-active .sg-step__line { background-size: 100% 100%; }
.sg-step.is-active .sg-step__num  { color: var(--sg-red); }
.sg-step.is-active .sg-step__text { color: var(--sg-text); }


/* 7. Zonas
   ========================================================================== */

.sg-sticky { position: -webkit-sticky; position: sticky; top: calc(var(--sg-header-h) + 40px); }
.sg-sticky .sg-title { margin-bottom: 20px; }

.sg-zone-detail {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--sg-line);
}
.sg-zone-detail__num  { font-size: 12px; color: var(--sg-text-soft); }
.sg-zone-detail__name { font-size: 40px; font-weight: 600; line-height: 1; letter-spacing: -.04em; }
.sg-zone-detail__cols { font-size: 15px; line-height: 1.6; color: var(--sg-text); }
.sg-zone-detail__link { align-self: flex-start; margin-top: 8px; font-size: 15px; font-weight: 500; }

.sg-zone {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    padding: 22px 0;
    border: 0;
    border-bottom: 1px solid var(--sg-line-soft);
    background: none;
    text-align: left;
    color: var(--sg-ink);
    cursor: pointer;
}
.sg-zone:focus { outline: none; }
.sg-zone__row   { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.sg-zone__label { display: flex; align-items: baseline; gap: 16px; }
.sg-zone__num   { font-size: 12px; color: var(--sg-text-mute); }
.sg-zone__name  { font-size: 20px; letter-spacing: -.02em; color: var(--sg-text); transition: font-size .35s var(--sg-ease), color .35s; }
.sg-zone__count { font-size: 14px; color: var(--sg-text); font-variant-numeric: tabular-nums; }
.sg-zone__track { display: block; height: 2px; background: var(--sg-line-soft); }
.sg-zone__bar   { display: block; width: 0; height: 100%; background: var(--sg-ink); transition: width 1.2s var(--sg-ease) var(--d, 0s), background .3s; }

.sg-zones.is-visible .sg-zone__bar { width: var(--w); }
.sg-zone.is-active .sg-zone__name  { font-size: 24px; font-weight: 600; color: var(--sg-ink); }
.sg-zone.is-active .sg-zone__bar   { background: var(--sg-red); }


/* 8. Oficios
   ========================================================================== */

.sg-trade-group__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .16);
    font-size: 15px;
    font-weight: 600;
}
.sg-trade-group__head .sg-mono { font-size: 12px; font-weight: 400; color: #8a9097; }

.sg-trade {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    transition: background .2s;
}
.sg-trade:hover { background: rgba(255, 255, 255, .03); }

.sg-trade__thumb {
    flex: none;
    width: 76px;
    height: 76px;
    border-radius: 12px;
    object-fit: cover;
    background: #1d2228;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.sg-trade__name { display: block; font-size: 17px; font-weight: 500; letter-spacing: -.01em; }
.sg-trade__desc { display: block; font-size: 13px; line-height: 1.45; color: var(--sg-text-mute); }


/* 9. Datos abiertos
   ========================================================================== */

.sg-panel {
    border: 1px solid var(--sg-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 50px -40px rgba(17, 20, 24, .35);
}

.sg-panel__toolbar {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--sg-line-soft);
}

.sg-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}
.sg-filters label { margin: 0; }
.sg-filters .sg-input {
    height: 44px;
    border-radius: 10px;
    background: var(--sg-muted-bg);
    border-color: transparent;
    font-size: 14px;
}
.sg-filters .sg-input:focus { background: #fff; border-color: var(--sg-ink); }

.sg-search { position: relative; flex: 1 1 260px; }
.sg-search::before {
    content: "";
    position: absolute;
    z-index: 1;
    left: 15px;
    top: 50%;
    width: 13px;
    height: 13px;
    border: 1.5px solid var(--sg-text-soft);
    border-radius: 50%;
    transform: translateY(-60%);
}
.sg-search::after {
    content: "";
    position: absolute;
    z-index: 1;
    left: 26px;
    top: 27px;
    width: 5px;
    height: 1.5px;
    background: var(--sg-text-soft);
    transform: rotate(45deg);
}
.sg-search__input { padding-left: 40px; }

/* Selector de colonias
   El <select> nativo se conserva oculto (guarda el valor del filtro) y
   siageci.js construye encima un desplegable con buscador y grupos por zona. */
.sg-select-wrap { position: relative; flex: 0 1 240px; }
.sg-select-wrap::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid var(--sg-text-soft);
    border-bottom: 1.5px solid var(--sg-text-soft);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
    transition: transform .25s var(--sg-ease), border-color .2s;
}
.sg-select-wrap:hover::after,
.sg-select-wrap.is-open::after { border-color: var(--sg-ink); }
.sg-select-wrap.is-open::after { transform: translateY(-25%) rotate(-135deg); }

.sg-picker__native {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.sg-filters .sg-picker__trigger {
    display: flex;
    align-items: center;
    padding-right: 40px;
    text-align: left;
    color: var(--sg-text);
    cursor: pointer;
}
.sg-filters .sg-picker__trigger:hover { background-color: #efefec; }
.sg-filters .sg-picker__trigger.has-value {
    border-color: var(--sg-ink);
    background-color: #fff;
    color: var(--sg-ink);
    font-weight: 500;
}
.sg-select-wrap.is-open .sg-picker__trigger {
    border-color: var(--sg-ink);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(17, 20, 24, .06);
}
.sg-picker__value { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.sg-picker__panel {
    position: absolute;
    z-index: 30;
    top: calc(100% + 8px);
    right: 0;
    width: max(100%, 320px);
    max-width: calc(100vw - 40px);
    padding: 6px;
    border: 1px solid var(--sg-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 24px 48px -20px rgba(17, 20, 24, .35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .2s ease, transform .25s var(--sg-ease), visibility .2s;
}
.sg-select-wrap.is-open .sg-picker__panel { opacity: 1; visibility: visible; transform: none; }

.sg-picker__search {
    position: relative;
    padding: 4px 4px 8px;
    border-bottom: 1px solid var(--sg-line-soft);
}
.sg-picker__search::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 50%;
    width: 12px;
    height: 12px;
    border: 1.5px solid var(--sg-text-mute);
    border-radius: 50%;
    transform: translateY(-65%);
}
.sg-picker__input {
    width: 100%;
    height: 38px;
    padding: 0 12px 0 34px;
    border: 0;
    border-radius: 8px;
    background: var(--sg-muted-bg);
    font-size: 13.5px;
    color: var(--sg-ink);
    outline: none;
}

.sg-picker__list {
    position: relative;
    max-height: 300px;
    margin: 0;
    padding: 4px 0 2px;
    overflow-y: auto;
    overscroll-behavior: contain;
    list-style: none;
}

.sg-picker__group {
    display: flex;
    justify-content: space-between;
    padding: 12px 10px 6px;
    font-family: var(--sg-mono);
    font-size: 10.5px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--sg-text-mute);
}

.sg-picker__option {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 34px 8px 10px;
    border-radius: 8px;
    font-size: 13.5px;
    line-height: 1.3;
    color: var(--sg-text);
    cursor: pointer;
}
.sg-picker__option.is-active   { background: var(--sg-muted-bg); color: var(--sg-ink); }
.sg-picker__option.is-selected { color: var(--sg-ink); font-weight: 500; }
.sg-picker__option.is-selected::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    width: 5px;
    height: 9px;
    border-right: 1.5px solid var(--sg-red);
    border-bottom: 1.5px solid var(--sg-red);
    transform: translateY(-60%) rotate(45deg);
}

.sg-picker__empty {
    margin: 0;
    padding: 20px 10px;
    text-align: center;
    font-size: 13px;
    color: var(--sg-text-soft);
}

.sg-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.sg-chip {
    height: 30px;
    padding: 0 12px;
    border: 1px solid var(--sg-line);
    border-radius: 999px;
    background: #fff;
    font-size: 12.5px;
    color: var(--sg-text);
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}
.sg-chip:focus     { outline: none; }
.sg-chip:hover     { border-color: var(--sg-ink); color: var(--sg-ink); }
.sg-chip.is-active { border-color: var(--sg-ink); background: var(--sg-ink); color: #fff; }

.sg-panel__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    font-size: 13px;
    color: var(--sg-text-soft);
}
.sg-panel__meta strong { color: var(--sg-ink); font-weight: 600; }
.sg-link-btn { font-size: 13px; }

.sg-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 13.5px;
}
.sg-table th {
    padding: 10px 16px;
    border-top: 1px solid var(--sg-line-soft);
    border-bottom: 1px solid var(--sg-line-soft);
    background: #fafafa;
    font-family: var(--sg-mono);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--sg-text-mute);
    white-space: nowrap;
}
.sg-table th:first-child,
.sg-table td:first-child { padding-left: 24px; }
.sg-table th:last-child,
.sg-table td:last-child  { padding-right: 24px; }

.sg-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--sg-line-soft);
    vertical-align: middle;
    line-height: 1.4;
}
.sg-table tbody tr { position: relative; cursor: pointer; transition: background .2s; }
.sg-table tbody tr:hover       { background: #fafafa; }
.sg-table tbody tr.is-selected { background: #fbeced; }
.sg-table tbody tr.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--sg-red); }

.sg-table__folio { font-family: var(--sg-mono); font-size: 12.5px; white-space: nowrap; }
.sg-table__muted { color: var(--sg-text-mute); }
.sg-table__main  { display: block; font-weight: 500; color: var(--sg-ink); }
.sg-table__sub   { display: block; margin-top: 2px; font-size: 12.5px; color: var(--sg-text-soft); }
.sg-table__soft  { color: var(--sg-text); }

.sg-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--sg-muted-bg);
    font-size: 12px;
    white-space: nowrap;
    color: var(--sg-ink);
}
.sg-badge__num { font-family: var(--sg-mono); font-size: 11px; color: var(--sg-text-mute); }

.sg-table.is-loading tbody { opacity: .4; transition: opacity .2s; }

.sg-empty { margin: 0; padding: 48px 24px; text-align: center; font-size: 14px; color: var(--sg-text-soft); }

.sg-pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    font-size: 13px;
    color: var(--sg-text-soft);
}
.sg-pager__buttons { display: flex; align-items: center; gap: 10px; }
.sg-pager__page    { font-family: var(--sg-mono); font-size: 12px; color: var(--sg-text); white-space: nowrap; }
.sg-pager__btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--sg-line);
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    color: var(--sg-ink);
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.sg-pager__btn:hover:not(:disabled) { border-color: var(--sg-ink); }
.sg-pager__btn:disabled { color: #c6cacf; cursor: default; }

/* Ficha */
.sg-record {
    position: -webkit-sticky;
    position: sticky;
    top: calc(var(--sg-header-h) + 24px);
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 360px;
    padding: 24px;
    border-radius: 16px;
    background: var(--sg-ink);
    color: #fff;
}
.sg-record__kicker { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: #8a9097; }

.sg-record__empty {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}
.sg-record__empty p { margin: 0; max-width: 260px; font-size: 16px; line-height: 1.5; color: var(--sg-text-light); }
.sg-record__icon {
    position: relative;
    width: 40px;
    height: 40px;
    border: 1px dashed rgba(255, 255, 255, .3);
    border-radius: 10px;
}
.sg-record__icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    border-radius: 50%;
    background: var(--sg-red-light);
}

.sg-record__folio { display: block; font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.sg-record__giro  { display: block; margin-top: 4px; font-size: 14px; color: var(--sg-text-light); }
.sg-record__list  { margin: 18px 0 0; }
.sg-record__list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: 13px;
}
.sg-record__list dt { font-weight: 400; color: #8a9097; }
.sg-record__list dd { margin: 0; font-weight: 500; text-align: right; }
.sg-record__body    { animation: sg-fade-up .45s var(--sg-ease); }


/* 10. Preguntas
   ========================================================================== */

.sg-faq-tabs { display: flex; flex-direction: column; gap: 4px; }

.sg-faq-tab {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 20px 22px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    text-align: left;
    color: var(--sg-text);
    cursor: pointer;
    transition: background .3s var(--sg-ease), border-color .3s, box-shadow .3s, color .3s;
}
.sg-faq-tab:focus   { outline: none; }
.sg-faq-tab__num    { font-size: 12px; color: var(--sg-text-mute); transition: color .3s; }
.sg-faq-tab__text   { flex: 1; font-size: 17px; font-weight: 500; line-height: 1.35; letter-spacing: -.01em; }
.sg-faq-tab__arrow  { color: var(--sg-red); opacity: 0; transform: translateX(-6px); transition: opacity .3s, transform .3s var(--sg-ease); }

.sg-faq-tab.is-active {
    border-color: var(--sg-line);
    background: #fff;
    color: var(--sg-ink);
    box-shadow: 0 10px 30px -18px rgba(17, 20, 24, .35);
}
.sg-faq-tab.is-active .sg-faq-tab__num   { color: var(--sg-red); }
.sg-faq-tab.is-active .sg-faq-tab__arrow { opacity: 1; transform: none; }

.sg-help-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding: 24px;
    border-radius: 14px;
    background: var(--sg-ink);
    color: #fff;
}
.sg-faq-tabs + .sg-help-card { margin-top: 16px; }
@media (min-width: 992px) { .sg-faq-tabs + .sg-help-card { margin-top: auto; } }
.sg-help-card strong { font-size: 17px; font-weight: 600; }
.sg-help-card span   { font-size: 14px; line-height: 1.55; color: var(--sg-text-mute); }

.sg-faq-panels {
    display: grid;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--sg-line);
    border-radius: 16px;
    background: #fff;
}
.sg-faq-panel {
    grid-area: 1 / 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 40px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .45s ease, transform .5s var(--sg-ease), visibility .45s;
}
.sg-faq-panel.is-active { opacity: 1; visibility: visible; transform: none; }
.sg-faq-panel__kicker { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--sg-red); }
.sg-faq-panel__title  { margin: 0; font-size: clamp(24px, 2.4vw, 32px); font-weight: 600; line-height: 1.15; letter-spacing: -.03em; }
.sg-faq-panel__text   { margin: 0; max-width: 560px; font-size: 17px; line-height: 1.7; color: var(--sg-text); }
.sg-faq-panel__foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid var(--sg-line-soft);
    font-size: 15px;
    font-weight: 500;
}
.sg-faq-panel__foot .sg-mono { font-size: 12px; font-weight: 400; color: var(--sg-text-mute); }


/* 11. Pie de página
   ========================================================================== */

.sg-footer { background: var(--sg-ink); color: var(--sg-text-mute); }

.sg-footer__stripe {
    height: 3px;
    background: linear-gradient(90deg, #b4252d 0 25%, #ef5a62 25% 50%, #f2b84b 50% 75%, #7fd6b0 75% 100%);
}

.sg-footer__top { padding: 64px 0 56px; }

.sg-footer__brand { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.sg-footer__brand img    { height: 56px; width: auto; }
.sg-footer__brand strong { display: block; font-size: 18px; font-weight: 600; letter-spacing: .04em; color: #fff; }
.sg-footer__brand small  { display: block; font-size: 13px; white-space: nowrap; }

.sg-footer__text { max-width: 420px; margin: 0 0 20px; font-size: 15px; line-height: 1.65; }

.sg-footer__title {
    display: block;
    margin-bottom: 14px;
    font-family: var(--sg-mono);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #8a9097;
}
.sg-footer__links { margin: 0; padding: 0; list-style: none; }
.sg-footer__links li + li { margin-top: 14px; }

.sg-body .sg-footer__links a,
.sg-body .sg-footer__external,
.sg-body .sg-footer__legal a       { color: var(--sg-text-light); transition: color .2s; }
.sg-body .sg-footer__links a:hover,
.sg-body .sg-footer__external:hover,
.sg-body .sg-footer__legal a:hover { color: #fff; }

.sg-footer__address { margin-bottom: 14px; font-size: 15px; font-style: normal; line-height: 1.6; color: var(--sg-text-light); }

.sg-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px 24px;
    padding: 24px 0 32px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: 13px;
}
.sg-footer__legal { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }

.sg-body .sg-to-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
    color: #fff;
}
.sg-body .sg-to-top:hover { background: #fff; color: var(--sg-ink); }


/* 12. Animaciones al hacer scroll
   ========================================================================== */

[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .9s ease, transform .9s var(--sg-ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

@keyframes sg-fade-up {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
    [data-reveal], .sg-load, .sg-line__in, .sg-pin, .sg-map__block { opacity: 1 !important; transform: none !important; }
}


/* Ajustes para pantallas pequeñas
   ========================================================================== */

@media (max-width: 767.98px) {
    .sg-container      { padding: 0 20px; }
    .sg-section        { padding: 80px 0; }
    .sg-section__head  { margin-bottom: 40px; }
    .sg-hero__inner    { padding-top: 56px; }
    .sg-hero__lead     { font-size: 16px; }
    .sg-stats          { margin-top: 56px; }
    .sg-stat           { padding-top: 24px; padding-bottom: 32px; }
    .sg-map__head span:last-child { display: none; }
    .sg-map__avenue-label { display: none; }
    .sg-map__card      { padding: 8px 10px; }
    .sg-map__card-giro { font-size: 12px; }
    .sg-zone-detail__name { font-size: 32px; }
    .sg-faq-tab        { padding: 16px; }
    .sg-faq-panel      { padding: 28px 24px; }
    .sg-select-wrap    { flex-basis: 100%; }
    .sg-panel__toolbar,
    .sg-panel__meta,
    .sg-pager          { padding-left: 16px; padding-right: 16px; }
    .sg-table th:first-child,
    .sg-table td:first-child { padding-left: 16px; }
    .sg-record         { position: static; min-height: 0; }
}

/* ==========================================================================
   16. FAB · Botón flotante de registro
   ========================================================================== */

.sg-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 1020;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 52px;
    padding: 0 24px;
    border: none;
    border-radius: 999px;
    background: var(--sg-red);
    color: #fff;
    font-family: var(--sg-font);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 8px 28px -4px rgba(180, 37, 45, .55);
    opacity: 0;
    transform: translateY(12px) scale(.94);
    transition: opacity .4s ease, transform .4s var(--sg-ease), background .2s, box-shadow .2s, color .2s;
    pointer-events: none;
}
.sg-fab.is-visible {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}
.sg-body .sg-fab:hover {
    background: var(--sg-red-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 14px 36px -4px rgba(180, 37, 45, .65);
}

.sg-fab__text  { position: relative; z-index: 1; }
.sg-fab__arrow { position: relative; z-index: 1; font-size: 16px; line-height: 1; }
.sg-body .sg-fab,
.sg-body .sg-fab:visited { color: #fff; }

.sg-fab__pulse {
    position: absolute;
    inset: -3px;
    border-radius: 999px;
    border: 1.5px solid var(--sg-red-light);
    opacity: 0;
    animation: sg-fab-pulse 3s ease-out 4s infinite;
}
@keyframes sg-fab-pulse {
    0%   { opacity: .85; transform: scale(1); }
    100% { opacity: 0;   transform: scale(1.2); }
}

@media (max-width: 575.98px) {
    .sg-fab { height: 48px; padding: 0 18px; font-size: 14px; bottom: 18px; right: 18px; }
}


/* ==========================================================================
   17. Hero · Línea de scan (efecto radar)
   ========================================================================== */

.sg-hero__scan {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.sg-hero__scan::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 28%;
    top: -28%;
    background: linear-gradient(
        to bottom,
        transparent          0%,
        rgba(239, 90, 98, .04) 40%,
        rgba(239, 90, 98, .08) 50%,
        rgba(239, 90, 98, .04) 60%,
        transparent          100%
    );
    animation: sg-scan-line 9s cubic-bezier(.38, 0, .62, 1) 1.2s infinite;
}
@keyframes sg-scan-line {
    0%   { top: -28%; }
    65%  { top: 115%; }
    100% { top: 115%; }
}


/* ==========================================================================
   18. Sección registro · Glow animado
   ========================================================================== */

#registro {
    position: relative;
    overflow: hidden;
}
.sg-registro__glow {
    position: absolute;
    right: -8%;
    top: 50%;
    width: 55%;
    padding-bottom: 55%;
    margin-top: -27.5%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(180, 37, 45, .3) 0%, transparent 65%);
    pointer-events: none;
    animation: sg-glow-breathe 5.5s ease-in-out infinite;
}
@keyframes sg-glow-breathe {
    0%, 100% { transform: scale(1);    opacity: .65; }
    50%       { transform: scale(1.18); opacity: 1; }
}


/* ==========================================================================
   13. Inicio de sesión (auth/login.blade.php)
   Clases con prefijo .lg-
   ========================================================================== */

/* 13.1 Login · Base y estructura
   ========================================================================== */

.lg-body {
    margin: 0;
    font-family: var(--sg-font);
    color: var(--sg-ink);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}
.lg-body a       { color: var(--sg-red); text-decoration: none; }
.lg-body a:hover { color: var(--sg-red-dark); text-decoration: none; }

.lg-page {
    display: flex;
    min-height: 100vh;
}

.lg-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--sg-mono);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #a9b6cc;
}
.lg-panel .lg-kicker::before {
    content: "";
    width: 24px;
    height: 1px;
    background: var(--sg-red-light);
}
.lg-kicker--red { font-size: 11px; color: var(--sg-red); }


/* 13.2 Login · Panel izquierdo
   ========================================================================== */

.lg-panel {
    position: relative;
    flex: 1 1 52%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 48px;
    padding: 48px 56px;
    overflow: hidden;
    background: var(--sg-ink);
    color: #fff;
}

.lg-panel__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse at 60% 55%, #000 10%, transparent 72%);
    mask-image: radial-gradient(ellipse at 60% 55%, #000 10%, transparent 72%);
    pointer-events: none;
}

.lg-panel__stripes {
    position: absolute;
    top: -80px;
    right: -80px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: repeating-linear-gradient(135deg, rgba(180, 37, 45, .5) 0 1.5px, transparent 1.5px 12px);
    background-size: 160px 160px;
    -webkit-mask-image: radial-gradient(circle, #000 30%, transparent 70%);
    mask-image: radial-gradient(circle, #000 30%, transparent 70%);
    animation: lg-stripes 12s linear infinite;
    pointer-events: none;
}

.lg-brand {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
}
.lg-body .lg-brand,
.lg-body .lg-brand:hover { color: #fff; }
.lg-brand img       { height: 48px; width: auto; }
.lg-brand__divider  { width: 1px; height: 32px; background: rgba(255, 255, 255, .18); }
.lg-brand strong    { display: block; font-size: 17px; font-weight: 600; letter-spacing: .04em; }
.lg-brand small     { display: block; font-size: 12px; color: var(--sg-text-mute); white-space: nowrap; }

.lg-panel__body {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 36px;
    max-width: 520px;
}
.lg-panel__head  { display: flex; flex-direction: column; gap: 18px; }
.lg-panel__title {
    margin: 0;
    font-weight: 600;
    font-size: clamp(34px, 3.6vw, 52px);
    line-height: 1.02;
    letter-spacing: -.04em;
}
.lg-panel__title span { color: var(--sg-red-light); }

.lg-panel__copy { position: relative; font-size: 13px; color: #8a9097; }


/* 13.3 Login · Gráfica
   ========================================================================== */

.lg-chart {
    display: flex;
    flex-direction: column;
    gap: 22px;
    max-width: 440px;
}

.lg-chart__top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.lg-chart__tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
}
.lg-chart__tab {
    height: 30px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--sg-text-light);
    white-space: nowrap;
    cursor: pointer;
    transition: background .3s, color .3s;
}
.lg-chart__tab:focus     { outline: none; }
.lg-chart__tab.is-active { background: #fff; color: var(--sg-ink); }

.lg-chart__total        { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.lg-chart__total strong { font-size: 26px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.lg-chart__total span   { font-family: var(--sg-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: #8a9097; }

.lg-chart__plot {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 180px;
    padding-bottom: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.lg-chart__plot::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 45px);
    pointer-events: none;
}

.lg-chart__col {
    position: relative;
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
}
.lg-chart__value {
    font-family: var(--sg-mono);
    font-size: 10.5px;
    color: #8a9097;
    opacity: 0;
    transition: opacity .4s ease calc(var(--d) + .4s), color .4s;
}
.lg-chart__bar {
    display: block;
    width: 100%;
    height: 0;
    border-radius: 6px 6px 2px 2px;
    background: rgba(255, 255, 255, .16);
    transition: height .9s var(--sg-ease) var(--d), background .4s;
}
.lg-chart__col.is-peak .lg-chart__value { color: var(--sg-red-light); }
.lg-chart__col.is-peak .lg-chart__bar   { background: repeating-linear-gradient(135deg, #b4252d 0 6px, #c9454d 6px 12px); }

.is-loaded .lg-chart__value { opacity: 1; }
.is-loaded .lg-chart__bar   { height: var(--h); }

.lg-chart__labels {
    display: flex;
    gap: 10px;
    margin-top: -12px;
}
.lg-chart__labels span {
    flex: 1;
    text-align: center;
    font-family: var(--sg-mono);
    font-size: 11px;
    color: var(--sg-text-soft);
    transition: color .4s;
}
.lg-chart__labels span.is-peak { color: #fff; }


/* 13.4 Login · Formulario
   ========================================================================== */

.lg-main {
    flex: 1 1 48%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
}
.lg-main__inner {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.lg-body .lg-back-site       { align-self: flex-start; font-size: 14px; color: var(--sg-text); }
.lg-body .lg-back-site:hover { color: var(--sg-ink); }

/* Solo una vista visible a la vez */
.lg-view           { display: none; flex-direction: column; gap: 22px; }
.lg-view.is-active { display: flex; }

.lg-head  { display: flex; flex-direction: column; gap: 10px; }
.lg-title { margin: 0; font-weight: 600; font-size: 34px; line-height: 1.05; letter-spacing: -.035em; }
.lg-text  { margin: 0; font-size: 15px; line-height: 1.55; color: var(--sg-text-soft); }
.lg-text strong { font-weight: 600; color: var(--sg-ink); }

/* Candado: se abre cuando el formulario tiene usuario y contraseña */
.lg-lock {
    position: relative;
    align-self: flex-start;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 10px;
    border-radius: 14px;
    background: var(--sg-ink);
    transition: background .4s ease, box-shadow .4s ease;
}
.lg-lock__shackle {
    position: absolute;
    left: 50%;
    top: 11px;
    width: 14px;
    height: 13px;
    margin-left: -7px;
    border: 2.5px solid #fff;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    transform-origin: 100% 100%;
    transition: transform .45s var(--sg-ease);
}
.lg-lock__body {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 15px;
    margin-top: 9px;
    border-radius: 4px;
    background: #fff;
}
.lg-lock__body span {
    width: 3px;
    height: 6px;
    border-radius: 2px;
    background: var(--sg-ink);
    transition: background .4s ease;
}

.is-ready .lg-lock              { background: var(--sg-red); box-shadow: 0 12px 28px -12px rgba(180, 37, 45, .7); }
.is-ready .lg-lock__shackle     { transform: translateY(-4px) rotate(-22deg); }
.is-ready .lg-lock__body span   { background: var(--sg-red); }

.lg-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--sg-line-soft);
    font-size: 12px;
    color: var(--sg-text-mute);
}
.lg-body .lg-footer a       { font-size: 13px; color: var(--sg-text-soft); }
.lg-body .lg-footer a:hover { color: var(--sg-ink); }
.lg-footer span { display: flex; align-items: center; gap: 8px; }
.lg-footer img  { height: 22px; width: auto; }


/* 13.5 Login · Campos
   ========================================================================== */

.lg-field        { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.lg-field__label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 13px;
    font-weight: 500;
    color: var(--sg-text);
}
.lg-body .lg-link { font-size: 13px; font-weight: 500; }

.lg-field__control { position: relative; display: block; }

.lg-input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1px solid var(--sg-line);
    border-radius: 10px;
    background: var(--sg-muted-bg);
    font-size: 15px;
    color: var(--sg-ink);
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.lg-input:focus {
    border-color: var(--sg-ink);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(17, 20, 24, .06);
}
.lg-input.is-invalid       { border-color: var(--sg-red); background: #fff; }
.lg-input--password        { padding-right: 96px; }

/* Línea roja que crece bajo el campo activo */
.lg-field__line {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--sg-red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .4s var(--sg-ease);
    pointer-events: none;
}
.lg-field__control:focus-within .lg-field__line { transform: scaleX(1); }

.lg-toggle-pass {
    position: absolute;
    top: 50%;
    right: 6px;
    height: 36px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: var(--sg-text);
    transform: translateY(-50%);
    cursor: pointer;
}
.lg-toggle-pass:hover { background: var(--sg-line-soft); color: var(--sg-ink); }
.lg-toggle-pass:focus { outline: none; }

/* Casilla "Mantener sesión iniciada" */
.lg-check {
    position: relative;
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 14px;
    color: var(--sg-text);
    cursor: pointer;
    user-select: none;
}
.lg-check input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.lg-check__box {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 1.5px solid #c6cacf;
    border-radius: 6px;
    background: #fff;
    transition: background .2s, border-color .2s;
}
.lg-check__box::after {
    content: "";
    width: 5px;
    height: 9px;
    margin-top: -2px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg) scale(0);
    transition: transform .2s var(--sg-ease);
}
.lg-check input:checked + .lg-check__box         { border-color: var(--sg-ink); background: var(--sg-ink); }
.lg-check input:checked + .lg-check__box::after  { transform: rotate(45deg) scale(1); }
.lg-check input:focus-visible + .lg-check__box   { box-shadow: 0 0 0 4px rgba(17, 20, 24, .1); }


/* 13.6 Login · Botones
   ========================================================================== */

.lg-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    border: 0;
    border-radius: 10px;
    background: var(--sg-red);
    font-size: 15px;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    transition: background .2s, transform .15s;
}
.lg-submit:hover      { background: var(--sg-red-dark); }
.lg-submit:active     { transform: scale(.98); }
.lg-submit:focus      { outline: none; box-shadow: 0 0 0 4px rgba(180, 37, 45, .2); }
.lg-submit.is-loading { background: var(--sg-red-dark); cursor: default; }

.lg-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lg-spin .7s linear infinite;
}
.lg-submit.is-loading .lg-spinner { display: block; }

.lg-back,
.lg-secondary {
    font-size: 14px;
    font-weight: 500;
    color: var(--sg-text);
    cursor: pointer;
}
.lg-back {
    align-self: center;
    padding: 0;
    border: 0;
    background: none;
}
.lg-back:hover { color: var(--sg-ink); }

.lg-secondary {
    height: 52px;
    border: 1px solid var(--sg-line);
    border-radius: 10px;
    background: #fff;
    font-size: 15px;
    color: var(--sg-ink);
}
.lg-secondary:hover { border-color: var(--sg-ink); }
.lg-back:focus,
.lg-secondary:focus { outline: none; }


/* 13.7 Login · Mensajes y confirmación
   ========================================================================== */

.lg-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #fbeced;
    font-size: 14px;
    line-height: 1.5;
    color: var(--sg-red-dark);
}
.lg-alert.d-none   { display: none !important; }
.lg-alert.is-shaking,
.lg-view.is-active .lg-alert { animation: lg-shake .45s ease both; }
.lg-alert__icon {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border-radius: 50%;
    background: var(--sg-red);
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.lg-success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #e8f6ef;
    animation: lg-pop .6s var(--sg-ease) both;
}
.lg-success-icon span {
    width: 10px;
    height: 18px;
    margin-top: -4px;
    border-right: 2.5px solid #1f8a5b;
    border-bottom: 2.5px solid #1f8a5b;
    transform: rotate(45deg);
}


/* 13.8 Login · Animaciones
   ========================================================================== */

/* Entrada escalonada: cada elemento .lg-anim usa su propio retraso --d.
   Se repite cada vez que una vista se vuelve visible. */
.lg-view.is-active .lg-anim,
.lg-back-site.lg-anim,
.lg-footer.lg-anim {
    animation: lg-in .6s var(--sg-ease) var(--d, 0s) both;
}
.lg-view.is-active .lg-lock { animation: lg-pop .6s var(--sg-ease) both; }

@keyframes lg-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}
@keyframes lg-pop {
    0%   { opacity: 0; transform: scale(.6); }
    60%  { opacity: 1; transform: scale(1.08); }
    100% { opacity: 1; transform: none; }
}
@keyframes lg-shake {
    0%   { opacity: 0; transform: translateX(0); }
    20%  { opacity: 1; transform: translateX(-6px); }
    40%  { transform: translateX(5px); }
    60%  { transform: translateX(-3px); }
    80%  { transform: translateX(2px); }
    100% { opacity: 1; transform: none; }
}
@keyframes lg-spin    { to { transform: rotate(360deg); } }
@keyframes lg-stripes { from { background-position: 0 0; } to { background-position: -160px 0; } }

@media (prefers-reduced-motion: reduce) {
    .lg-body *, .lg-body *::before, .lg-body *::after { animation: none !important; transition: none !important; }
    .lg-chart__bar   { height: var(--h); }
    .lg-chart__value { opacity: 1; }
}


/* 13.9 Login · Pantallas pequeñas
   ========================================================================== */

@media (max-width: 899.98px) {
    .lg-page  { flex-direction: column; }

    /* El panel se reduce a una franja con el logotipo */
    .lg-panel {
        flex: none;
        padding: 20px 24px;
    }
    .lg-panel__body,
    .lg-panel__copy,
    .lg-panel__stripes { display: none; }

    .lg-main { flex: none; padding: 40px 24px 32px; }
}



/* 14. Panel de administración
   Layout: layouts/admin.blade.php · Parciales: layouts/admin/sidebar y navbar
   Tema oscuro: clase .sga-dark en <html>. Sidebar contraído: .sga-collapsed en <html>.
   ========================================================================== */

/* 14.1 Variables y tema */
.sga-body {
    --a-bg:        #eef0f2;
    --a-panel:     #ffffff;
    --a-field:     #f4f5f6;
    --a-line:      #e3e5e8;
    --a-text:      #111418;
    --a-soft:      #5f666e;
    --a-mute:      #8a9097;
    --a-hover:     #f2f3f4;
    --a-accent:    #b4252d;
    --a-accent-bg: rgba(180, 37, 45, .08);
    --a-dot:       #d6d9dd;
    --a-glass:     rgba(255, 255, 255, .72);
    --a-shadow:    0 20px 40px -24px rgba(17, 20, 24, .22);
    --a-ease:      cubic-bezier(.2, .7, .2, 1);
}
.sga-dark .sga-body {
    --a-bg:        #0a0c0e;
    --a-panel:     #14181d;
    --a-field:     #1a1f25;
    --a-line:      #242a31;
    --a-text:      #eef0f2;
    --a-soft:      #a2a8ae;
    --a-mute:      #6b727a;
    --a-hover:     #1d2228;
    --a-accent:    #ef5a62;
    --a-accent-bg: rgba(239, 90, 98, .12);
    --a-dot:       #1b2026;
    --a-glass:     rgba(20, 24, 29, .72);
    --a-shadow:    0 20px 40px -20px rgba(0, 0, 0, .7);
}

.sga-only-dark                  { display: none; }
.sga-dark .sga-only-light       { display: none; }
.sga-dark .sga-only-dark        { display: block; }

@keyframes sgaDrop  { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes sgaPop   { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes sgaFade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes sgaPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(34, 160, 107, .5); } 50% { box-shadow: 0 0 0 5px rgba(34, 160, 107, 0); } }


/* 14.2 Estructura */
.sga-body {
    margin: 0;
    padding: 0 !important;
    background-color: var(--a-bg);
    background-image: radial-gradient(var(--a-dot) 1px, transparent 1px);
    background-size: 20px 20px;
    background-attachment: fixed;
    transition: background-color .35s;
}

#wrapper.sga-shell {
    display: flex;
    gap: 0;
    min-height: 100vh;
    padding: 0;
    box-sizing: border-box;
    background: transparent;
}

.sga-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 0 14px 14px;
}

.sga-content {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--a-line);
    border-radius: 14px;
    background: var(--a-panel);
    overflow: hidden;
    transition: background .35s;
}

/* Footer general del panel (al final del área central) */
.sga-footer {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
    padding: 16px 10px 8px;
    border-top: 1px solid var(--a-line);
    font-family: var(--sg-font);
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--a-soft);
}
.sga-footer__name { font-weight: 600; letter-spacing: .06em; color: var(--a-text); }

/* Neutraliza los márgenes del tema anterior en las vistas existentes */
.sga-body #page-wrapper {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    position: static !important;
    background: transparent !important;
}

.sga-sidebar,
.sga-navbar,
.sga-palette {
    font-family: var(--sg-font);
    color: var(--a-text);
    -webkit-font-smoothing: antialiased;
}
.sga-sidebar a,
.sga-navbar a,
.sga-palette a,
.sga-sidebar a:hover,
.sga-navbar a:hover,
.sga-palette a:hover,
.sga-sidebar a:focus,
.sga-navbar a:focus { text-decoration: none; outline: none; }
.sga-sidebar button,
.sga-navbar button { font-family: inherit; outline: none; }


/* 14.3 Sidebar */
.sga-sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    width: 272px;
    height: 100vh;
    box-sizing: border-box;
    overflow: hidden;
    border: 0;
    border-right: 1px solid var(--a-line);
    border-radius: 0;
    background: var(--a-panel);
    box-shadow: var(--a-shadow);
    transition: width .32s var(--a-ease), margin-right .32s var(--a-ease), box-shadow .32s, transform .32s var(--a-ease), background .35s;
}

.sga-brand {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 18px 14px;
    color: var(--a-text);
    white-space: nowrap;
}
.sga-brand:hover { color: var(--a-text); }
.sga-brand__mark { width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center; }
.sga-brand__mark img { width: 42px; height: 42px; object-fit: contain; }
.sga-brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.sga-brand__name { font-size: 16px; font-weight: 700; letter-spacing: .06em; }
.sga-brand__sub  { font-size: 12px; color: var(--a-soft); }

.sga-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 6px 12px 12px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
}
.sga-menu__section { display: flex; flex-direction: column; gap: 2px; }
.sga-menu__title {
    padding: 0 12px 6px;
    font-family: var(--sg-mono);
    font-size: 10.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--a-mute);
}
.sga-menu__rule { display: none; height: 1px; margin: 0 8px 8px; background: var(--a-line); }

/* Opción principal */
.sga-item { display: flex; flex-direction: column; }

.sga-link {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: 44px;
    padding: 0 13px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--a-text);
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
    transition: background .2s, color .25s, transform .25s var(--a-ease), box-shadow .25s;
}
.sga-link:hover,
.sga-link:focus { background: var(--a-accent-bg); color: var(--a-accent); transform: translateX(4px); }

.sga-link__icon  { width: 20px; height: 20px; flex-shrink: 0; display: grid; place-items: center; }
.sga-link__label { flex: 1; }
.sga-link__count {
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    box-sizing: border-box;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--a-field);
    color: var(--a-soft);
    font-family: var(--sg-mono);
    font-size: 11px;
}
.sga-link__chev { display: grid; opacity: .5; transition: transform .3s var(--a-ease); }

.sga-item.is-open .sga-link__chev  { transform: rotate(90deg); }
.sga-item.is-open .sga-link__count { display: none; }

/* Activo: opción principal (ancho completo) */
.sga-link.is-active,
.sga-item.has-active:not(.is-open) > .sga-link {
    background: var(--sg-red);
    color: #fff;
    font-weight: 600;
    transform: none;
    box-shadow: 0 10px 22px -10px rgba(180, 37, 45, .85);
}
.sga-item.has-active.is-open > .sga-link { color: var(--a-accent); font-weight: 600; }
.sga-item.has-active:not(.is-open) > .sga-link .sga-link__count { background: rgba(255, 255, 255, .2); color: #fff; }

/* Sub opciones (animación de alto con grid) */
.sga-sub {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .35s var(--a-ease);
}
.sga-item.is-open .sga-sub { grid-template-rows: 1fr; }
.sga-sub__inner { overflow: hidden; }
.sga-sub__list {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 4px 0 4px 22px;
    padding-left: 12px;
}
.sga-sub__list::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 1.5px;
    border-radius: 2px;
    background: var(--a-line);
}

.sga-sublink {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 6px 11px;
    border-radius: 10px;
    color: var(--a-soft);
    font-size: 13.5px;
    line-height: 1.3;
    transition: background .2s, color .25s, transform .25s var(--a-ease);
}
.sga-sublink:hover,
.sga-sublink:focus { background: var(--a-accent-bg); color: var(--a-accent); transform: translateX(4px); }

.sga-sublink__tag {
    flex-shrink: 0;
    width: 26px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: var(--a-field);
    color: var(--a-mute);
    font-family: var(--sg-mono);
    font-size: 10.5px;
    transition: background .25s, color .25s;
}

/* Activo: sub opción (solo el ancho de la sub opción) */
.sga-sublink.is-active,
.sga-sublink.is-active:hover {
    background: var(--sg-red);
    color: #fff;
    font-weight: 600;
    transform: none;
    box-shadow: 0 10px 22px -10px rgba(180, 37, 45, .85);
}
.sga-sublink.is-active .sga-sublink__tag { background: rgba(255, 255, 255, .2); color: #fff; }

/* Pie */
.sga-sidebar__foot {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    margin: 10px;
    padding: 10px;
    border-radius: 16px;
    background: var(--a-field);
}
.sga-collapse-btn {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--a-line);
    border-radius: 11px;
    background: var(--a-panel);
    color: var(--a-soft);
    cursor: pointer;
    transition: color .2s, border-color .2s;
}
.sga-collapse-btn:hover { color: var(--a-accent); border-color: var(--a-accent); }
.sga-collapse-btn svg   { transition: transform .32s; }

/* Contraído (solo escritorio) */
@media (min-width: 960px) {
    .sga-collapsed .sga-sidebar { width: 80px; }
    .sga-collapsed .sga-collapse-btn svg { transform: rotate(180deg); }

    .sga-collapsed .sga-sidebar:not(.is-peek) .sga-label,
    .sga-collapsed .sga-sidebar:not(.is-peek) .sga-sub { display: none; }
    .sga-collapsed .sga-sidebar:not(.is-peek) .sga-menu__section + .sga-menu__section .sga-menu__rule { display: block; }
    .sga-collapsed .sga-sidebar:not(.is-peek) .sga-link:hover { transform: none; }
    .sga-collapsed .sga-sidebar:not(.is-peek) .sga-item.has-active > .sga-link {
        background: var(--sg-red);
        color: #fff;
        box-shadow: 0 10px 22px -10px rgba(180, 37, 45, .85);
    }

    /* Al pasar el mouse se expande sobre el contenido sin moverlo */
    /* z-index: el sidebar expandido queda por encima del navbar (1000) y su franja (999).
       Al cerrarse, conserva la capa hasta terminar de contraerse (.32s) para no cortarse. */
    .sga-collapsed .sga-sidebar { transition: width .32s var(--a-ease), margin-right .32s var(--a-ease), box-shadow .32s, transform .32s var(--a-ease), background .35s, z-index 0s linear .32s; }
    .sga-collapsed .sga-sidebar.is-peek {
        z-index: 1010;
        width: 272px;
        margin-right: -192px;
        box-shadow: 0 30px 60px -20px rgba(17, 20, 24, .45);
        transition: width .32s var(--a-ease), margin-right .32s var(--a-ease), box-shadow .32s, transform .32s var(--a-ease), background .35s, z-index 0s;
    }
}

/* Móvil: menú lateral */
.sga-backdrop { display: none; }

@media (max-width: 959px) {
    .sga-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 284px;
        transform: translateX(calc(-100% - 40px));
    }
    .sga-sidebar         { z-index: 1010; } /* el menú móvil queda sobre el navbar */
    .sga-sidebar.is-open { transform: none; }
    .sga-sidebar__foot   { display: none; }

    .sga-backdrop.is-open {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1005;
        background: rgba(8, 10, 12, .5);
        -webkit-backdrop-filter: blur(3px);
        backdrop-filter: blur(3px);
        animation: sgaFade .2s;
    }
}


/* 14.4 Navbar (isla flotante) */

/* Franja con el color del fondo detrás de la isla: el contenido se desvanece antes de llegar a ella */
.sga-navbar-scrim {
    position: sticky;
    top: 0;
    z-index: 999;
    height: 0;
    margin-bottom: -14px;
    pointer-events: none;
}
.sga-navbar-scrim::before {
    content: "";
    display: block;
    height: 96px;
    margin: 0 -14px;
    background: linear-gradient(var(--a-bg) 38%, transparent);
    opacity: 0;
    transition: opacity .3s;
}
.sga-navbar-scrim.is-scrolled::before { opacity: 1; }

.sga-navbar {
    position: sticky;
    top: 12px;
    z-index: 1000; /* por encima de selects, calendarios y mapa del contenido */
    align-self: center;
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 58px;
    margin-top: 12px;
    padding: 0 8px;
    box-sizing: border-box;
    border: 1px solid var(--a-line);
    border-radius: 14px;
    background: var(--a-panel);
    box-shadow: 0 18px 40px -18px rgba(17, 20, 24, .4);
    transition: height .25s var(--a-ease), box-shadow .3s, background .35s;
}
/* Al hacer scroll: halo de acento y sombra más marcada (clase desde navbar.blade.php) */
.sga-navbar.is-scrolled {
    height: 52px;
    box-shadow: 0 0 0 4px var(--a-accent-bg), 0 22px 44px -16px rgba(17, 20, 24, .5);
}
.sga-dark .sga-navbar             { box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .7); }
.sga-dark .sga-navbar.is-scrolled { box-shadow: 0 0 0 4px var(--a-accent-bg), 0 22px 44px -16px rgba(0, 0, 0, .8); }

.sga-navbar__menu {
    display: none;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--sg-red);
    color: #fff;
    cursor: pointer;
}

.sga-navbar__page   { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
.sga-navbar__icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--a-accent-bg);
    color: var(--a-accent);
}
.sga-navbar__titles { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.sga-navbar__crumb  { display: flex; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap; color: var(--a-mute); }
.sga-navbar__title  { font-size: 17px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sga-navbar__divider { width: 1px; height: 30px; flex-shrink: 0; background: var(--a-line); }

.sga-key {
    padding: 3px 7px;
    border: 1px solid var(--a-line);
    border-radius: 7px;
    background: var(--a-panel);
    color: var(--a-soft);
    font-family: var(--sg-mono);
    font-size: 11px;
    line-height: 1.2;
}

/* Botón del buscador */
.sga-search-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 320px;
    height: 42px;
    flex-shrink: 0;
    padding: 0 8px 0 13px;
    box-sizing: border-box;
    border: 1px solid var(--a-line);
    border-radius: 13px;
    background: var(--a-field);
    color: var(--a-mute);
    font-size: 13.5px;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}
.sga-search-btn:hover { border-color: var(--a-accent); box-shadow: 0 0 0 4px var(--a-accent-bg); }
.sga-search-btn svg   { flex-shrink: 0; }
.sga-search-btn__text { flex: 1; text-align: left; }

/* Interruptor de tema */
.sga-theme {
    position: relative;
    width: 72px;
    height: 38px;
    flex-shrink: 0;
    padding: 0;
    border: 1px solid var(--a-line);
    border-radius: 12px;
    background: var(--a-field);
    cursor: pointer;
}
.sga-theme__knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 4px 10px -2px rgba(0, 0, 0, .25);
    transition: left .38s cubic-bezier(.34, 1.45, .5, 1), background .3s;
}
.sga-theme__icons {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    pointer-events: none;
}
.sga-theme__icons svg { position: relative; transition: color .3s; }
.sga-theme__sun       { color: #d4881c; }
.sga-theme__moon      { color: var(--a-mute); }
.sga-dark .sga-theme__knob { left: 37px; background: #2a3038; }
.sga-dark .sga-theme__sun  { color: var(--a-mute); }
.sga-dark .sga-theme__moon { color: #eef0f2; }

/* Usuario */
.sga-user { position: relative; flex-shrink: 0; }
.sga-user__btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px;
    border: 0;
    border-radius: 15px;
    background: transparent;
    color: var(--a-text);
    cursor: pointer;
    transition: background .2s;
}
.sga-user__btn:hover,
.sga-user.is-open .sga-user__btn { background: var(--a-hover); }
.sga-user__text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.sga-user__name { font-size: 13.5px; font-weight: 600; }
.sga-user__role { font-size: 12px; color: var(--a-soft); }
.sga-user__chev { display: grid; opacity: .5; transition: transform .25s; }
.sga-user.is-open .sga-user__chev { transform: rotate(180deg); }

.sga-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--sg-red);
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
}
.sga-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}
.sga-avatar__status {
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 12px;
    height: 12px;
    box-sizing: border-box;
    border: 2.5px solid var(--a-panel);
    border-radius: 50%;
    background: #22a06b;
    animation: sgaPulse 2.4s infinite;
}
.sga-avatar--lg { width: 44px; height: 44px; border-radius: 14px; font-size: 15px; }

.sga-user__menu {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 60;
    width: 290px;
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid var(--a-line);
    border-radius: 20px;
    background: var(--a-panel);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .35);
}
.sga-user.is-open .sga-user__menu { display: block; animation: sgaDrop .22s var(--a-ease); }

.sga-user__card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    padding: 12px;
    border-radius: 14px;
    background: var(--a-field);
}
.sga-user__card-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sga-user__email     { font-size: 12.5px; color: var(--a-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sga-user__link {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    color: var(--a-text);
    font-size: 14px;
}
.sga-user__link:hover          { background: var(--a-hover); color: var(--a-text); }
.sga-user__link--danger,
.sga-user__link--danger:hover  { color: var(--a-accent); }
.sga-user__link--danger:hover  { background: var(--a-accent-bg); }

/* En la isla el usuario se muestra solo con su avatar */
.sga-navbar .sga-user__text,
.sga-navbar .sga-user__chev { display: none; }

/* Navbar responsive */
@media (max-width: 719px) {
    .sga-search-btn { width: 42px; padding: 0; justify-content: center; }
    .sga-search-btn__text,
    .sga-search-btn .sga-key { display: none; }
}
@media (max-width: 959px) {
    .sga-navbar__menu { display: grid; }
}
@media (max-width: 719px) {
    .sga-user__text,
    .sga-user__chev,
    .sga-navbar__divider,
    .sga-navbar__icon { display: none; }
}


/* 14.5 Buscador (Ctrl K) */
.sga-palette {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1100;
    justify-content: center;
    align-items: flex-start;
    padding: 14vh 16px 0;
    background: rgba(8, 10, 12, .5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.sga-palette.is-open { display: flex; animation: sgaFade .15s; }

.sga-palette__box {
    width: 100%;
    max-width: 560px;
    overflow: hidden;
    border: 1px solid var(--a-line);
    border-radius: 22px;
    background: var(--a-panel);
    box-shadow: 0 40px 80px -24px rgba(0, 0, 0, .45);
    animation: sgaPop .22s var(--a-ease);
}

.sga-palette__head {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 60px;
    padding: 0 18px;
    border-bottom: 1px solid var(--a-line);
    color: var(--a-mute);
}
.sga-palette__head svg { flex-shrink: 0; }
.sga-palette__head input {
    flex: 1;
    height: 100%;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--a-text);
    font: inherit;
    font-size: 16px;
}
.sga-palette__head input::placeholder { color: var(--a-mute); }

.sga-palette__list {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 360px;
    padding: 8px;
    overflow-y: auto;
}
.sga-palette__item {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 48px;
    padding: 0 12px;
    border-radius: 14px;
    color: var(--a-text);
}
.sga-palette__item:hover { color: var(--a-text); }
.sga-palette__item.is-selected { background: var(--a-hover); }

.sga-palette__icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--a-field);
    color: var(--a-soft);
    transition: background .15s, color .15s;
}
.sga-palette__item.is-selected .sga-palette__icon { background: var(--sg-red); color: #fff; }
.sga-palette__label  { flex: 1; font-size: 14px; }
.sga-palette__parent { font-size: 12.5px; color: var(--a-mute); }

.sga-palette__empty {
    display: none;
    padding: 28px 12px;
    text-align: center;
    font-size: 14px;
    color: var(--a-soft);
}



/* 15. Dashboard (resources/views/dashboard.blade.php)
   Usa las variables del panel (--a-*) para modo claro y oscuro.
   ========================================================================== */

.sgd {
    --c-sisco: #2f7fc1;
    --c-b16:   #d9652b;
    --c-censo: #23956a;

    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: clamp(18px, 2.4vw, 32px);
    font-family: var(--sg-font);
    color: var(--a-text);
    -webkit-font-smoothing: antialiased;
}
.sga-dark .sgd {
    --c-sisco: #5aa9e6;
    --c-b16:   #f08a4b;
    --c-censo: #3fbf8a;
}
.sgd a,
.sgd a:hover,
.sgd a:focus { text-decoration: none; outline: none; }
.sgd h1, .sgd h2, .sgd p { margin: 0; }

/* Colores por base */
.sgd-c-sisco { background: var(--c-sisco); }
.sgd-c-b16   { background: var(--c-b16); }
.sgd-c-censo { background: var(--c-censo); }

.sgd-swatch { width: 9px; height: 9px; flex-shrink: 0; border-radius: 3px; }
.sgd-num    { font-family: var(--sg-mono); font-weight: 500; letter-spacing: -.03em; line-height: 1; }

/* 15.1 Encabezado */
.sgd-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}
.sgd-head__text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sgd-kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--sg-mono);
    font-size: 11.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--a-accent);
}
.sgd-kicker::before { content: ""; width: 22px; height: 1.5px; background: currentColor; }
.sgd-title {
    font-family: var(--sg-font);
    font-size: clamp(26px, 2.6vw, 34px);
    font-weight: 600;
    letter-spacing: -.025em;
    line-height: 1.1;
    color: var(--a-text);
}
.sgd-lead { max-width: 560px; font-size: 14.5px; line-height: 1.5; color: var(--a-soft); }

.sgd-legend {
    display: flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--a-line);
    border-radius: 14px;
    background: var(--a-field);
}
.sgd-legend__item {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 12px;
    font-size: 13px;
    white-space: nowrap;
    color: var(--a-soft);
}

/* 15.2 Tarjeta base */
.sgd-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px;
    border: 1px solid var(--a-line);
    border-radius: 22px;
    background: var(--a-panel);
    transition: background .35s;
}
.sgd-card__head  { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sgd-card__title { font-family: var(--sg-font); font-size: 14px; font-weight: 600; line-height: 1.3; color: inherit; }
.sgd-card__desc  { margin-top: 3px !important; font-size: 12.5px; color: var(--a-soft); }

.sgd-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 11px;
    border-radius: 9px;
    background: var(--a-field);
    color: var(--a-text);
    font-size: 12.5px;
    font-weight: 500;
    white-space: nowrap;
    transition: transform .2s;
}
.sgd-chip:hover { transform: translateX(3px); color: var(--a-text); }

/* 15.3 Bases iniciales → Información depurada */
.sgd-flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}
.sgd-flow__card { gap: 20px; }
.sgd-flow__card--1 { grid-row: 1; }
.sgd-flow__link    { grid-row: 2; }
.sgd-flow__card--2 { grid-row: 3; }

.sgd-flow__card--strong {
    border-color: transparent;
    background: #111418;
    color: #fff;
}
.sga-dark .sgd-flow__card--strong { background: #1f1416; }
.sgd-flow__card--strong .sgd-card__desc,
.sgd-flow__card--strong .sgd-flow__unit,
.sgd-flow__card--strong .sgd-flow__pct  { color: #a2a8ae; }
.sgd-flow__card--strong .sgd-chip       { background: rgba(255, 255, 255, .1); color: #fff; }
.sgd-flow__card--strong .sgd-stack      { background: rgba(255, 255, 255, .08); }
.sgd-flow__card--strong .sgd-flow__row  { color: #fff; }
.sgd-flow__card--strong .sgd-flow__row:hover { background: rgba(255, 255, 255, .06); color: #fff; }

.sgd-flow__total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.sgd-flow__total .sgd-num { font-size: clamp(40px, 4.2vw, 56px); letter-spacing: -.04em; }
.sgd-flow__unit  { font-size: 13px; color: var(--a-soft); }

.sgd-stack {
    display: flex;
    gap: 3px;
    height: 12px;
    overflow: hidden;
    border-radius: 6px;
    background: var(--a-field);
}
.sgd-stack__seg {
    width: 0;
    border-radius: 3px;
    transition: width 1.1s var(--a-ease) var(--d, 0s);
}
.sgd.is-ready .sgd-stack__seg { width: var(--w); }

.sgd-flow__rows { display: flex; flex-direction: column; gap: 2px; margin: 0 -10px; }
.sgd-flow__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 52px 16px;
    align-items: center;
    gap: 14px;
    height: 42px;
    padding: 0 10px;
    border-radius: 11px;
    color: var(--a-text);
    transition: background .2s;
}
.sgd-flow__row:hover { background: var(--a-hover); color: var(--a-text); }
.sgd-flow__name  { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sgd-flow__value { font-family: var(--sg-mono); font-size: 14.5px; font-weight: 500; }
.sgd-flow__pct   { font-family: var(--sg-mono); font-size: 12.5px; text-align: right; color: var(--a-soft); }
.sgd-flow__arrow { opacity: .45; }

/* Conector */
.sgd-flow__link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 8px;
}
.sgd-flow__line {
    flex: 1;
    height: 1.5px;
    background: repeating-linear-gradient(90deg, var(--a-line) 0 6px, transparent 6px 11px);
}
.sgd-flow__badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 12px;
    border-radius: 18px;
    background: var(--a-accent-bg);
    color: var(--a-accent);
    text-align: center;
}
.sgd-flow__badge-num  { font-family: var(--sg-mono); font-size: 17px; font-weight: 500; }
.sgd-flow__badge-text { font-size: 11.5px; line-height: 1.25; }

/* Lado a lado a partir de 1100 px de pantalla */
@media (min-width: 1100px) {
    .sgd-flow { grid-template-columns: minmax(0, 1fr) 88px minmax(0, 1fr); }
    .sgd-flow__card--1,
    .sgd-flow__link,
    .sgd-flow__card--2 { grid-row: 1; }
    .sgd-flow__card--1 { grid-column: 1; }
    .sgd-flow__link    { grid-column: 2; flex-direction: column; padding: 0; }
    .sgd-flow__card--2 { grid-column: 3; }
    .sgd-flow__line {
        width: 1.5px;
        height: auto;
        background: repeating-linear-gradient(180deg, var(--a-line) 0 6px, transparent 6px 11px);
    }
}

/* 15.4 Con / sin SISCOVIP */
.sgd-cov {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
    gap: 14px;
}
.sgd-cov__head { display: flex; align-items: center; gap: 12px; }
.sgd-cov__icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 12px;
}
.sgd-cov__icon--ok    { background: rgba(35, 149, 106, .1); color: var(--c-censo); }
.sgd-cov__icon--alert { background: var(--a-accent-bg); color: var(--a-accent); }
.sga-dark .sgd-cov__icon--ok { background: rgba(63, 191, 138, .14); }
.sgd-cov__text  { flex: 1; min-width: 0; }

.sgd-cov__total { display: flex; flex-direction: column; align-items: flex-end; color: var(--a-text); }
.sgd-cov__total:hover { color: var(--a-accent); }
.sgd-cov__total .sgd-num { font-size: 28px; }
.sgd-cov__total-label { margin-top: 2px; font-size: 11.5px; color: var(--a-mute); }

.sgd-cov__rows { display: flex; flex-direction: column; gap: 6px; }
.sgd-cov__row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 -12px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--a-text);
    transition: background .2s;
}
.sgd-cov__row:hover { background: var(--a-hover); color: var(--a-text); }
.sgd-cov__line  { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.sgd-cov__name  { color: var(--a-soft); white-space: nowrap; }
.sgd-cov__nums  { display: flex; align-items: baseline; gap: 8px; }
.sgd-cov__value { font-family: var(--sg-mono); font-size: 14.5px; font-weight: 500; }
.sgd-cov__pct   { min-width: 40px; font-family: var(--sg-mono); font-size: 12px; text-align: right; color: var(--a-mute); }

.sgd-bar       { height: 8px; overflow: hidden; border-radius: 4px; background: var(--a-field); }
.sgd-bar__fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 4px;
    transition: width 1.1s var(--a-ease) var(--d, 0s);
}
.sgd.is-ready .sgd-bar__fill { width: var(--w); }

/* 15.5 Por zona territorial */
.sgd-zones { gap: 20px; }
.sgd-zones__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}
.sgd-zones__top   { font-size: 12.5px; color: var(--a-soft); }
.sgd-zones__top b { font-weight: 600; color: var(--a-text); }

.sgd-zones__chart {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    align-items: end;
    gap: clamp(6px, 1.2vw, 16px);
    height: 240px;
}
.sgd-zone {
    --bar:   rgba(180, 37, 45, .16);
    --bar-h: rgba(180, 37, 45, .35);

    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    color: var(--a-text);
}
.sga-dark .sgd-zone { --bar: rgba(239, 90, 98, .22); --bar-h: rgba(239, 90, 98, .45); }
.sgd-zone.is-top    { --bar: var(--sg-red); --bar-h: var(--sg-red-dark); }
.sgd-zone:hover     { color: var(--a-text); }

.sgd-zone__value { font-family: var(--sg-mono); font-size: 12.5px; font-weight: 500; text-align: center; }
.sgd-zone__bar {
    height: 0;
    min-height: 4px;
    border-radius: 10px 10px 4px 4px;
    background: var(--bar);
    transition: height 1.1s var(--a-ease) var(--d, 0s), background .2s;
}
.sgd.is-ready .sgd-zone__bar { height: calc((100% - 70px) * var(--h)); }
.sgd-zone:hover .sgd-zone__bar { background: var(--bar-h); }

.sgd-zone__tag  { font-family: var(--sg-mono); font-size: 11px; line-height: 1.2; text-align: center; color: var(--a-mute); }
.sgd-zone__name {
    margin-top: -7px;
    font-size: 12.5px;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 719px) {
    .sgd-legend       { flex-wrap: wrap; }
    .sgd-zones__chart { height: 200px; }
    .sgd-zone__name   { display: none; }
}
