/* =====================================================================
   Aero Minimal — sistema de diseño de FlyLow (nav, footer, cookies)
   Cargado desde plantilla.blade.php, así que afecta a todas las páginas.
   ===================================================================== */
:root {
    --fl-navy: #0a1628;
    --fl-navy-deep: #060d19;
    --fl-sky: #0ea5e9;
    --fl-sky-dark: #0284c7;
    --fl-sky-rgb: 14, 165, 233;
    --fl-cyan: #06b6d4;
    --fl-slate: #64748b;
    --fl-ground: #f8fafc;
    --fl-surface-low: #eff4ff;
    --fl-surface-container: #e5eeff;
    --fl-border: #e2e8f0;
    --fl-ink: #0b1c30;
    --fl-ink-soft: #45474c;
    --fl-radar: #10b981;
    --fl-shadow-card: 0 4px 20px -2px rgba(10, 22, 40, 0.05), 0 2px 6px -1px rgba(10, 22, 40, 0.03);
    --fl-shadow-float: 0 20px 40px -15px rgba(10, 22, 40, 0.12), 0 0 1px 1px rgba(10, 22, 40, 0.04);
}

body.bg-light {
    background-color: var(--fl-ground) !important;
    color: var(--fl-ink);
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Punto pulsante de "en vivo" (home y radar) */
.pulse-dot {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--fl-radar);
    animation: fl-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes fl-pulse {
    50% {
        opacity: 0.35;
    }
}

/* =========================== Navegación =========================== */
.fl-nav {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.82);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 8px rgba(10, 22, 40, 0.05);
}

.fl-nav__inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
}

.fl-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--fl-ink);
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.fl-brand img {
    height: 34px;
    width: auto;
}

.fl-nav__toggle {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--fl-surface-low);
    color: var(--fl-ink);
}

.fl-nav__menu {
    flex-basis: 100%;
    padding-top: 0.5rem;
}

.fl-nav__links,
.fl-nav__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
}

.fl-nav__actions {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--fl-border);
}

.fl-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--fl-ink-soft);
    text-decoration: none;
    background: none;
    border: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.fl-nav__link:hover {
    background: var(--fl-surface-low);
    color: var(--fl-ink);
}

.fl-nav__link.active {
    background: var(--fl-surface-container);
    color: var(--fl-ink);
}

.fl-nav__link--cta {
    background: var(--fl-navy);
    color: #fff;
    justify-content: center;
}

.fl-nav__link--cta.active,
.fl-nav__link--cta:hover {
    background: #16263f;
    color: #fff;
}

.logout-button {
    border: none !important;
}

/* ===================== Menú de usuario (sesión iniciada) ===================== */
.fl-user {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    max-width: 100%;
    padding: 0.3rem 0.7rem 0.3rem 1rem;
    color: var(--fl-ink);
    background: var(--fl-surface-low);
    border: 1px solid transparent;
    border-radius: 9999px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

/* Quita el triángulo propio de Bootstrap (se carga después, de ahí la doble clase) */
.fl-user.dropdown-toggle::after {
    display: none;
}

.fl-user:hover,
.fl-user.show {
    background: #dce9ff;
    border-color: #b9d7ff;
}

.fl-user__text {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 0;
    text-align: right;
    line-height: 1.15;
}

.fl-user__text strong {
    max-width: 11rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.8rem;
    font-weight: 700;
}

.fl-user__text small {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #006591;
}

.fl-user__avatar,
.fl-menu__avatar {
    flex: 0 0 auto;
    object-fit: cover;
    background: #fff;
    border-radius: 50%;
}

.fl-user__avatar {
    width: 34px;
    height: 34px;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(10, 22, 40, 0.2);
}

.fl-user__caret {
    font-size: 0.7rem;
    color: var(--fl-ink-soft);
    transition: transform 0.2s ease;
}

.fl-user.show .fl-user__caret {
    transform: rotate(180deg);
}

.fl-menu {
    width: 320px;
    max-width: calc(100vw - 2rem);
    margin-top: 0.6rem !important;
    padding: 0.5rem;
    border: 1px solid var(--fl-border);
    border-radius: 1rem;
    box-shadow: 0 20px 40px -10px rgba(10, 22, 40, 0.2), 0 0 1px 1px rgba(10, 22, 40, 0.04);
}

.fl-menu__head {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem;
    background: var(--fl-surface-low);
    border-radius: 0.75rem;
}

.fl-menu__avatar {
    width: 48px;
    height: 48px;
    border: 3px solid #8fd0ff;
}

.fl-menu__head>div {
    min-width: 0;
}

.fl-menu__head strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--fl-ink);
}

.fl-menu__head strong i {
    margin-left: 0.2rem;
    font-size: 0.8rem;
    color: #10b981;
}

.fl-menu__head span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
    color: var(--fl-ink-soft);
}

.fl-menu__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    margin: 0.5rem 0;
}

.fl-menu__stats a {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.55rem 0.25rem;
    text-decoration: none;
    background: var(--fl-surface-low);
    border-radius: 0.6rem;
    transition: background-color 0.15s ease;
}

.fl-menu__stats a:hover {
    background: #dce9ff;
}

.fl-menu__stats b {
    font-size: 1.15rem;
    font-weight: 800;
    color: #006591;
}

.fl-menu__stats span {
    font-size: 0.7rem;
    color: var(--fl-ink-soft);
}

.fl-menu__list {
    display: grid;
    gap: 0.1rem;
    padding: 0.4rem 0;
    border-top: 1px solid var(--fl-border);
    border-bottom: 1px solid var(--fl-border);
}

.fl-menu__list a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--fl-ink);
    text-decoration: none;
    border-radius: 0.6rem;
    transition: background-color 0.15s ease;
}

.fl-menu__list a i {
    width: 1.2rem;
    text-align: center;
    color: #006591;
}

.fl-menu__list a span {
    flex: 1 1 auto;
}

.fl-menu__list a em {
    padding: 0.1rem 0.6rem;
    font-size: 0.7rem;
    font-style: normal;
    font-weight: 700;
    color: #004666;
    background: #d6e8ff;
    border-radius: 9999px;
}

.fl-menu__list a:hover {
    background: var(--fl-surface-low);
}

.fl-menu__list a.is-active {
    background: #e3effd;
}

.fl-menu__logout {
    margin: 0;
    padding-top: 0.4rem;
}

.fl-menu__logout button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--fl-ink);
    text-align: left;
    background: none;
    border-radius: 0.6rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.fl-menu__logout button i {
    width: 1.2rem;
    text-align: center;
    color: #006591;
}

.fl-menu__logout button:hover {
    color: #b91c1c;
    background: #fef2f2;
}

.fl-menu__logout button:hover i {
    color: #b91c1c;
}

@media (max-width: 991.98px) {
    .fl-nav__actions .dropdown {
        width: 100%;
    }

    .fl-user {
        width: 100%;
        justify-content: space-between;
    }

    .fl-user__text {
        flex: 1 1 auto;
        align-items: flex-start;
        text-align: left;
    }

    .fl-menu {
        position: static !important;
        transform: none !important;
        width: 100%;
        max-width: 100%;
        margin-top: 0.5rem !important;
        box-shadow: none;
    }
}

@media (min-width: 992px) {
    .fl-nav__inner {
        flex-wrap: nowrap;
        padding: 0 2rem;
        min-height: 72px;
    }

    .fl-nav__menu {
        display: flex !important;
        flex: 1 1 auto;
        height: auto !important;
        padding-top: 0;
        align-items: center;
        justify-content: space-between;
        margin-left: 1.5rem;
    }

    .fl-nav__links,
    .fl-nav__actions {
        flex-direction: row;
        align-items: center;
    }

    .fl-nav__actions {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
}

/* ============================== Footer ============================== */
.fl-footer {
    background: var(--fl-surface-low);
    color: var(--fl-ink-soft);
    margin-top: auto;
}

.fl-footer__inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 3rem 1rem 1.5rem;
}

@media (min-width: 992px) {
    .fl-footer__inner {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.fl-footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .fl-footer__grid {
        grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
        gap: 2.5rem;
    }
}

.fl-footer .fl-brand {
    font-size: 1.1rem;
}

.fl-footer .fl-brand img {
    height: 28px;
}

.fl-footer__about {
    font-size: 0.85rem;
    line-height: 1.5;
    max-width: 20rem;
    margin: 0.75rem 0 0;
}

.fl-footer__title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--fl-ink);
    margin: 0 0 0.75rem;
}

.fl-footer__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.4rem;
    font-size: 0.85rem;
}

.fl-footer a {
    color: var(--fl-ink-soft);
    text-decoration: none;
    transition: color 0.15s ease;
}

.fl-footer a:hover {
    color: var(--fl-ink);
}

.fl-footer__list i {
    width: 1.25rem;
    color: var(--fl-sky-dark);
}

.fl-footer__bottom {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(10, 22, 40, 0.08);
    font-size: 0.8rem;
}

@media (min-width: 768px) {
    .fl-footer__bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* ============================== Cookies ============================== */
.cookies-banner.fixed-bottom {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: 38rem;
    padding: 1.25rem !important;
    border: 1px solid var(--fl-border);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.96) !important;
    color: var(--fl-ink) !important;
    box-shadow: 0 20px 50px -10px rgba(10, 22, 40, 0.22);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

@media (min-width: 576px) {
    .cookies-banner.fixed-bottom {
        left: auto;
        right: 1.5rem;
    }
}

.cookies-banner .container {
    max-width: none;
    padding: 0;
}

.cookies-banner h5 {
    font-size: 0.95rem;
    color: var(--fl-ink);
}

.cookies-banner h5 i {
    color: var(--fl-sky-dark);
}

.cookies-banner p {
    color: var(--fl-ink-soft);
}

.cookies-banner .col-lg-8,
.cookies-banner .col-lg-4 {
    width: 100%;
    flex: 0 0 100%;
    max-width: 100%;
    text-align: left !important;
}

.cookies-banner .d-flex.flex-column {
    flex-direction: row !important;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.cookies-banner .btn {
    flex-grow: 0 !important;
    border-radius: 9999px;
    font-weight: 600;
    padding: 0.4rem 1rem;
}

.cookies-banner .btn-primary {
    order: 3;
    background: var(--fl-navy);
    border-color: var(--fl-navy);
    color: #fff;
}

.cookies-banner .btn-outline-light {
    order: 2;
    border-color: transparent;
    color: var(--fl-ink-soft);
}

.cookies-banner .btn-link {
    order: 1;
    color: var(--fl-ink-soft) !important;
    text-decoration: none;
}

.cookies-banner .btn-outline-light:hover,
.cookies-banner .btn-link:hover {
    background: var(--fl-surface-low);
    color: var(--fl-ink) !important;
}

/* Modal de preferencias de cookies */
.custom-modal {
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background-color: rgba(6, 13, 25, 0.6);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.ck-modal {
    position: relative;
    width: 100%;
    max-width: 620px;
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    margin: auto;
    overflow: hidden;
    background: #fff;
    border-radius: 0.9rem;
    box-shadow: 0 24px 50px -12px rgba(6, 13, 25, 0.35), 0 0 1px rgba(0, 0, 0, 0.08);
    animation: slideDown 0.3s;
}

.ck-bar {
    flex: 0 0 6px;
    background: linear-gradient(90deg, #39b8fd, #006591, #004666);
}

.ck-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.5rem;
    color: #fff;
    background: #101c2e;
}

.ck-head__title {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.ck-head__icon {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #39b8fd;
    background: rgba(57, 184, 253, 0.2);
    border-radius: 50%;
}

.ck-head small {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #39b8fd;
}

.ck-head h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #fff;
}

.ck-close {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #eaf1ff;
    background: rgba(211, 228, 254, 0.12);
    border: none;
    border-radius: 50%;
    transition: background-color 0.15s ease;
}

.ck-close:hover {
    background: rgba(211, 228, 254, 0.25);
}

.ck-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding: 1.5rem;
    overflow-y: auto;
}

.ck-intro {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--fl-ink-soft);
}

.ck-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin: 0;
    padding: 1rem 1.1rem;
    background: #fff;
    border-radius: 0.8rem;
    box-shadow: 0 2px 10px rgba(10, 22, 40, 0.06);
}

.ck-card--fixed {
    background: rgba(239, 244, 255, 0.7);
    box-shadow: none;
}

.ck-card--option {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.ck-card--option:hover {
    background: rgba(239, 244, 255, 0.6);
}

.ck-check {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ck-box {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    margin-top: 0.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: transparent;
    background: #dce9ff;
    border-radius: 0.35rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.ck-box.is-on,
.ck-check:checked+.ck-box {
    color: #fff;
    background: #006591;
}

.ck-check:focus-visible+.ck-box {
    box-shadow: 0 0 0 3px rgba(0, 101, 145, 0.35);
}

.ck-card__text {
    flex: 1 1 auto;
    min-width: 0;
}

.ck-card__title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.ck-card__title strong {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--fl-ink);
}

.ck-card__text p {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--fl-ink-soft);
}

.ck-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.1rem 0.6rem;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--fl-ink-soft);
    background: var(--fl-surface-container);
    border-radius: 9999px;
}

.ck-tag--on {
    color: #004666;
    background: #dce9ff;
}

.ck-tag--on i {
    width: 6px;
    height: 6px;
    background: #006591;
    border-radius: 50%;
}

.ck-lock {
    flex: 0 0 auto;
    margin-top: 0.2rem;
    font-size: 0.85rem;
    color: #c5c6cd;
}

.ck-info {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.8rem 1rem;
    background: var(--fl-surface-low);
    border-radius: 0.7rem;
}

.ck-info>i {
    margin-top: 0.15rem;
    color: #006591;
}

.ck-info p {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.55;
    color: #004666;
}

.ck-foot {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: #fff;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.04);
}

.ck-foot__main {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (min-width: 576px) {
    .ck-foot {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .ck-foot__main {
        flex-direction: row;
        align-items: center;
    }
}

.ck-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    border: none;
    border-radius: 0.6rem;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.ck-btn--ghost {
    color: var(--fl-ink-soft);
    background: transparent;
}

.ck-btn--ghost:hover {
    color: var(--fl-ink);
    background: var(--fl-surface-low);
}

.ck-btn--primary {
    color: #fff;
    background: #006591;
    box-shadow: 0 6px 16px -4px rgba(0, 101, 145, 0.4);
}

.ck-btn--primary:hover {
    background: #004666;
}

.ck-toast {
    position: absolute;
    top: 5.5rem;
    left: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background: #060d19;
    border-radius: 9999px;
    box-shadow: 0 10px 25px -5px rgba(6, 13, 25, 0.4);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 0.5rem);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.ck-toast i {
    color: #10b981;
}

.ck-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ======================= Pantalla de carga (loading.js) ======================= */
html.fl-loading {
    overflow: hidden;
}

.fl-loader {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(6, 13, 25, 0.72);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    animation: flLoaderIn 0.25s ease-out;
}

.fl-loader[hidden] {
    display: none;
}

@keyframes flLoaderIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fl-loader__card {
    width: 100%;
    max-width: 26rem;
    padding: 1.75rem 1.75rem 1.5rem;
    text-align: center;
    background: #fff;
    border-radius: 1.1rem;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.45);
    animation: flLoaderPop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

@keyframes flLoaderPop {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.fl-loader__sky {
    position: relative;
    height: 5.5rem;
    margin-bottom: 1rem;
    overflow: hidden;
    background: linear-gradient(180deg, #dff0ff 0%, #f4faff 100%);
    border-radius: 0.8rem;
}

.fl-loader__cloud {
    position: absolute;
    height: 14px;
    background: #fff;
    border-radius: 9999px;
    opacity: 0.9;
    animation: flCloud 6s linear infinite;
}

.fl-loader__cloud--a {
    top: 18%;
    width: 52px;
}

.fl-loader__cloud--b {
    top: 68%;
    width: 36px;
    animation-duration: 4.5s;
    animation-delay: -2s;
}

@keyframes flCloud {
    from {
        left: 105%;
    }

    to {
        left: -25%;
    }
}

.fl-loader__trail {
    position: absolute;
    left: 8%;
    right: 8%;
    top: 50%;
    border-top: 2px dashed rgba(0, 101, 145, 0.35);
}

.fl-loader__plane {
    position: absolute;
    top: 50%;
    left: 0;
    font-size: 1.6rem;
    color: #006591;
    transform: translateY(-50%);
    animation: flFly 2.8s ease-in-out infinite;
}

@keyframes flFly {
    0% {
        left: 2%;
        transform: translateY(-50%) rotate(-10deg);
    }

    50% {
        transform: translateY(-82%) rotate(-4deg);
    }

    100% {
        left: calc(98% - 1.6rem);
        transform: translateY(-50%) rotate(-10deg);
    }
}

.fl-loader__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--fl-ink);
}

.fl-loader__context {
    display: inline-block;
    margin: 0.5rem 0 0;
    padding: 0.2rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    white-space: pre;
    color: #006591;
    background: var(--fl-surface-low);
    border-radius: 9999px;
}

.fl-loader__context[hidden] {
    display: none;
}

.fl-loader__phrase {
    min-height: 2.8em;
    margin: 0.9rem 0 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--fl-ink-soft);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.fl-loader__phrase.is-out {
    opacity: 0;
    transform: translateY(6px);
}

.fl-loader__bar {
    height: 4px;
    margin-top: 0.9rem;
    overflow: hidden;
    background: var(--fl-surface-container);
    border-radius: 9999px;
}

.fl-loader__bar span {
    display: block;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, #39b8fd, #006591);
    border-radius: 9999px;
    animation: flBar 1.3s ease-in-out infinite;
}

@keyframes flBar {
    0% {
        transform: translateX(-110%);
    }

    100% {
        transform: translateX(260%);
    }
}

@media (prefers-reduced-motion: reduce) {

    .fl-loader,
    .fl-loader__card,
    .fl-loader__cloud,
    .fl-loader__plane,
    .fl-loader__bar span {
        animation: none;
    }

    .fl-loader__plane {
        left: 50%;
        transform: translate(-50%, -50%);
    }
}

/* ===================== Diálogos y avisos (dialogs.js) ===================== */
html.fd-open {
    overflow: hidden;
}

.fd-root {
    position: fixed;
    inset: 0;
    z-index: 1900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.fd-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(11, 28, 48, 0.5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.fd-root.is-open .fd-backdrop {
    opacity: 1;
}

.fd-dialog {
    position: relative;
    width: 100%;
    max-width: 32rem;
    max-height: calc(100vh - 2rem);
    padding: 1.5rem;
    overflow-y: auto;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 30px 60px -15px rgba(10, 22, 40, 0.35);
    opacity: 0;
    transform: scale(0.95) translateY(8px);
    transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.fd-dialog:focus {
    outline: none;
}

.fd-root.is-open .fd-dialog {
    opacity: 1;
    transform: none;
}

.fd-head {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.fd-icon {
    width: 3rem;
    height: 3rem;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    border-radius: 0.8rem;
    box-shadow: 0 1px 2px rgba(10, 22, 40, 0.08);
}

.fd-icon--destructive,
.fd-icon--danger {
    color: #93000a;
    background: #ffdad6;
}

.fd-icon--primary,
.fd-icon--info {
    color: #006591;
    background: #dce9ff;
}

.fd-icon--success {
    color: #047857;
    background: #d1fae5;
}

.fd-icon--warning {
    color: #b45309;
    background: #fef3c7;
}

.fd-titles {
    min-width: 0;
}

.fd-eyebrow {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #006591;
}

.fd-eyebrow--destructive,
.fd-eyebrow--danger {
    color: #ba1a1a;
}

.fd-eyebrow--success {
    color: #047857;
}

.fd-eyebrow--warning {
    color: #b45309;
}

.fd-title {
    margin: 0.15rem 0 0;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--fl-ink);
}

.fd-message {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-line;
    color: var(--fl-ink-soft);
}

.fd-context {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.1rem;
    padding: 0.8rem 1rem;
    background: var(--fl-surface-low);
    border-radius: 0.8rem;
}

.fd-context__icon {
    width: 2.4rem;
    height: 2.4rem;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #006591;
    background: #fff;
    border-radius: 0.6rem;
    box-shadow: 0 1px 2px rgba(10, 22, 40, 0.08);
}

.fd-context__text {
    min-width: 0;
}

.fd-context__text strong,
.fd-context__text span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fd-context__text strong {
    font-size: 0.85rem;
    color: var(--fl-ink);
}

.fd-context__text span {
    font-size: 0.75rem;
    color: var(--fl-ink-soft);
}

.fd-field {
    margin-bottom: 1.1rem;
}

.fd-field label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--fl-ink-soft);
}

.fd-field input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--fl-ink);
    background: var(--fl-surface-low);
    border: none;
    border-radius: 0.6rem;
    outline: none;
}

.fd-field input:focus {
    background: #fff;
    box-shadow: 0 0 0 2px rgba(0, 101, 145, 0.4);
}

.fd-actions {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.5rem;
    padding-top: 0.25rem;
}

@media (min-width: 576px) {
    .fd-actions {
        flex-direction: row;
        justify-content: flex-end;
    }
}

.fd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.2rem;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    border: none;
    border-radius: 0.65rem;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.fd-btn:active {
    transform: scale(0.97);
}

.fd-btn:focus-visible {
    outline: 2px solid #39b8fd;
    outline-offset: 2px;
}

.fd-btn--ghost {
    color: var(--fl-ink);
    background: #dce9ff;
}

.fd-btn--ghost:hover {
    background: #d3e4fe;
}

.fd-btn--primary {
    color: #fff;
    background: #006591;
    box-shadow: 0 6px 16px -4px rgba(0, 101, 145, 0.4);
}

.fd-btn--primary:hover {
    background: #004666;
}

.fd-btn--danger {
    color: #fff;
    background: #ba1a1a;
    box-shadow: 0 6px 16px -4px rgba(186, 26, 26, 0.4);
}

.fd-btn--danger:hover {
    background: #93000a;
}

/* Avisos flotantes */
.ft-viewport {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 1950;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: calc(100% - 2rem);
    max-width: 26rem;
    pointer-events: none;
}

@media (max-width: 575px) {
    .ft-viewport {
        right: 1rem;
        bottom: 1rem;
    }
}

.ft-toast {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.85rem 1rem;
    background: #fff;
    border-radius: 0.8rem;
    box-shadow: 0 20px 40px -12px rgba(10, 22, 40, 0.28), 0 0 1px rgba(10, 22, 40, 0.1);
    opacity: 0;
    transform: translateY(1rem);
    pointer-events: auto;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.ft-toast.is-in {
    opacity: 1;
    transform: none;
}

.ft-toast.is-out {
    opacity: 0;
    transform: scale(0.92);
}

.ft-icon {
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.6rem;
}

.ft-toast--success .ft-icon {
    color: #10b981;
    background: #ecfdf5;
}

.ft-toast--info .ft-icon {
    color: #006591;
    background: var(--fl-surface-container);
}

.ft-toast--warning .ft-icon {
    color: #f59e0b;
    background: #fffbeb;
}

.ft-toast--danger .ft-icon {
    color: #ba1a1a;
    background: #ffdad6;
}

.ft-text {
    flex: 1;
    min-width: 0;
}

.ft-text strong,
.ft-text span {
    display: block;
}

.ft-text strong {
    font-size: 0.85rem;
    color: var(--fl-ink);
}

.ft-text span {
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--fl-ink-soft);
}

.ft-tools {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.25rem;
}

.ft-undo {
    padding: 0.25rem 0.5rem;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    color: #006591;
    background: none;
    border: none;
    cursor: pointer;
}

.ft-undo:hover {
    text-decoration: underline;
}

.ft-close {
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0.8rem;
    color: #75777d;
    background: none;
    border: none;
    border-radius: 0.4rem;
    cursor: pointer;
}

.ft-close:hover {
    color: var(--fl-ink);
    background: rgba(10, 22, 40, 0.06);
}

@media (prefers-reduced-motion: reduce) {

    .fd-backdrop,
    .fd-dialog,
    .ft-toast {
        transition: none;
    }
}
