/* PWA Install Banner */
.pwa-banner {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9999;
    background: linear-gradient(135deg, rgba(14,107,104,0.95), rgba(215,168,74,0.95));
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 0.7rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.88rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    transform: translateY(-100%);
    transition: transform 0.35s ease;
}
.pwa-banner.show { transform: translateY(0); }

.pwa-banner-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: rgba(255,255,255,0.18);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.pwa-banner-icon svg { width: 18px; height: 18px; color: #fff; }

.pwa-banner-text {
    flex: 1;
    line-height: 1.35;
    min-width: 0;
}
.pwa-banner-text strong {
    display: block;
    font-weight: 600;
    font-size: 0.92rem;
}
.pwa-banner-text span {
    color: rgba(255,255,255,0.82);
    font-size: 0.8rem;
}

.pwa-banner-btn {
    background: #fff;
    color: #084543;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}
.pwa-banner-btn:hover { opacity: 0.9; }

.pwa-banner-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}
.pwa-banner-close:hover { background: rgba(255,255,255,0.15); color: #fff; }
.pwa-banner-close svg { width: 16px; height: 16px; }

/* iOS instructions modal */
.pwa-ios-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}
.pwa-ios-modal .box {
    background: #FFFFFF;
    border: 1px solid #DCE5E3;
    border-radius: 16px;
    padding: 1.75rem 1.5rem;
    max-width: 360px;
    width: 100%;
    color: #202428;
}
.pwa-ios-modal h3 {
    color: #202428;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 700;
}
.pwa-ios-modal ol {
    padding-left: 1.2rem;
    color: #5C6873;
    font-size: 0.9rem;
    line-height: 1.65;
}
.pwa-ios-modal ol li { margin-bottom: 0.5rem; }
.pwa-ios-modal ol li strong { color: #0E6B68; }
.pwa-ios-modal-close {
    margin-top: 1.25rem;
    background: linear-gradient(135deg, #0E6B68, #084543);
    color: #fff;
    border: none;
    border-radius: 9px;
    padding: 0.7rem 1.2rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    font-family: inherit;
}

/* Push body down when banner shown */
body.pwa-banner-active {
    padding-top: 56px !important;
}
@media (max-width: 600px) {
    body.pwa-banner-active {
        padding-top: 72px !important;
    }
    .pwa-banner-text span { display: none; }
    .pwa-banner { padding: 0.6rem 0.85rem; gap: 0.6rem; }
    .pwa-banner-btn { padding: 0.45rem 0.8rem; font-size: 0.8rem; }
    .pwa-banner-icon { width: 28px; height: 28px; }
    .pwa-banner-icon svg { width: 16px; height: 16px; }
}

/* Admin: si el sidebar es fixed, ajustar */
body.pwa-banner-active .sidebar {
    top: 56px;
    height: calc(100vh - 56px);
}
@media (max-width: 900px) {
    body.pwa-banner-active .sidebar {
        top: 0;
        height: 100vh;
    }
    body.pwa-banner-active .mobile-topbar {
        top: 72px;
    }
    /* En admin mobile, cuando hay banner, empujar el contenido más abajo */
    body.pwa-banner-active .admin-main {
        padding-top: calc(5rem + 72px) !important;
    }
}
