/* =========================================================
   Global app progress bar (navigation + operations)
   ========================================================= */

.app-progress-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 10050;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    background: transparent;
}

.app-progress-top.is-visible {
    opacity: 1;
}

.app-progress-top-fill {
    height: 100%;
    width: 0;
    border-radius: 0 2px 2px 0;
    background: linear-gradient(90deg, #14b8a6 0%, #0ea5e9 50%, #6366f1 100%);
    box-shadow: 0 0 12px rgba(14, 165, 233, 0.65);
    transition: width 0.12s linear;
}

/* Blocking overlay for Save / Edit / Delete / Print / Export / Download */
.app-progress-overlay {
    position: fixed;
    inset: 0;
    z-index: 10040;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(11, 27, 51, 0.38);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: app-progress-fade-in 0.16s ease;
}

.app-progress-card {
    position: relative;
    width: min(360px, 92vw);
    padding: 1.35rem 1.4rem 1.2rem;
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(240, 253, 250, 0.96));
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow:
        0 24px 48px rgba(15, 23, 42, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    text-align: center;
    overflow: hidden;
}

.app-progress-glow {
    position: absolute;
    top: -40%;
    left: 20%;
    width: 60%;
    height: 80%;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.18), transparent 70%);
    pointer-events: none;
}

.app-progress-op {
    position: relative;
    display: inline-flex;
    margin-bottom: 0.45rem;
    padding: 0.22rem 0.7rem;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.1);
    color: #0f766e;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.app-progress-msg {
    position: relative;
    margin: 0 0 0.95rem;
    color: #0b1b33;
    font-size: 1rem;
    font-weight: 700;
}

.app-progress-track {
    position: relative;
    height: 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.app-progress-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #14b8a6, #0ea5e9 55%, #6366f1);
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.45);
    transition: width 0.12s linear;
}

.app-progress-pct {
    position: relative;
    margin-top: 0.7rem;
    font-size: 1.35rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #0f766e;
    letter-spacing: -0.02em;
}

/* Non-blocking float (navigation / light load) */
.app-progress-float {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10045;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.88);
    color: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(8px);
    animation: app-progress-fade-in 0.16s ease;
    pointer-events: none;
}

.app-progress-float-msg {
    font-size: 0.82rem;
    font-weight: 650;
    opacity: 0.95;
}

.app-progress-float-pct {
    font-size: 0.85rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #5eead4;
}

@keyframes app-progress-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-progress-top-fill,
    .app-progress-fill {
        transition: none;
    }

    .app-progress-overlay,
    .app-progress-float {
        animation: none;
    }
}
