html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(30, 136, 229, 0.08) 0%, rgba(21, 101, 192, 0.10) 100%);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    color: #0f172a;
}

/* ── Boot Screen ───────────────────────────────────────── */

.boot-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    background: linear-gradient(180deg, rgba(30, 136, 229, 0.08) 0%, rgba(21, 101, 192, 0.10) 100%);
    transition: opacity 0.4s ease;
}

.boot-screen.is-fading {
    opacity: 0;
    pointer-events: none;
}

.boot-card {
    min-width: 280px;
    max-width: 360px;
    padding: 28px 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
    text-align: center;
}

.boot-logo-img {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    display: block;
    margin: 0 auto 12px;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(21, 101, 192, 0.14), rgba(100, 181, 246, 0.18));
}

.boot-logo {
    font-size: 44px;
    line-height: 1;
    margin-bottom: 12px;
}

.boot-title {
    color: #1565C0;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.boot-subtitle {
    margin-top: 8px;
    color: #475569;
    font-size: 14px;
}

.boot-spinner {
    width: 42px;
    height: 42px;
    margin: 20px auto 0;
    border-radius: 50%;
    border: 4px solid rgba(30, 136, 229, 0.18);
    border-top-color: #1E88E5;
    animation: eqm-spin 0.9s linear infinite;
}

.boot-noscript {
    position: fixed;
    inset: auto 16px 16px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(229, 57, 53, 0.1);
    color: #b91c1c;
    font-size: 14px;
}

/* ── Update Banner ─────────────────────────────────────── */

.pwa-update-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 16px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
    border: 1.5px solid rgba(30, 136, 229, 0.25);
    box-sizing: border-box;
    transform: translateY(-24px);
    opacity: 0;
    pointer-events: none;
    transition: transform 280ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 200ms ease;
}

.pwa-update-banner.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.pwa-update-banner__content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pwa-update-banner__icon {
    flex: 0 0 auto;
}

.pwa-update-banner__text {
    min-width: 0;
}

.pwa-update-banner__title {
    color: #1565C0;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
}

.pwa-update-banner__subtitle {
    margin-top: 3px;
    color: #475569;
    font-size: 13px;
    line-height: 1.35;
}

.pwa-update-banner__actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.pwa-update-banner__button {
    min-height: 44px;
    padding: 0 16px;
    border-radius: 14px;
    border: none;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    font-size: 14px;
}

.pwa-update-banner__button--ghost {
    background: transparent;
    color: #1565C0;
}

.pwa-update-banner__button--primary {
    color: #ffffff;
    background: linear-gradient(90deg, #1565C0 0%, #1E88E5 55%, #64B5F6 100%);
}

@media (min-width: 720px) {
    .pwa-update-banner {
        left: auto;
        right: 16px;
        width: min(420px, calc(100vw - 32px));
    }
}

/* ── Install Banner ────────────────────────────────────── */

.pwa-install-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
    border: 1px solid rgba(30, 136, 229, 0.14);
    box-sizing: border-box;
    transform: translateY(16px);
    opacity: 0;
    pointer-events: none;
    transition: transform 280ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 200ms ease;
}

.pwa-install-banner.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.pwa-install-banner__content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pwa-install-banner__icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: block;
    object-fit: cover;
    flex: 0 0 auto;
    background: linear-gradient(135deg, rgba(21, 101, 192, 0.14), rgba(100, 181, 246, 0.18));
}

.pwa-install-banner__text {
    min-width: 0;
}

.pwa-install-banner__title {
    color: #1565C0;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
}

.pwa-install-banner__subtitle {
    margin-top: 4px;
    color: #475569;
    font-size: 13px;
    line-height: 1.35;
}

.pwa-install-banner__actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.pwa-install-banner__button {
    min-height: 44px;
    padding: 0 16px;
    border-radius: 14px;
    border: none;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    font-size: 14px;
}

.pwa-install-banner__button--ghost {
    background: transparent;
    color: #1565C0;
}

.pwa-install-banner__button--primary {
    color: #ffffff;
    background: linear-gradient(90deg, #1565C0 0%, #1E88E5 55%, #64B5F6 100%);
}

@media (min-width: 720px) {
    .pwa-install-banner {
        left: auto;
        width: min(420px, calc(100vw - 32px));
    }
}

/* ── Animaciones ───────────────────────────────────────── */

@keyframes eqm-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}