/* Barra global de progreso: aislada, sin afectar layout ni formularios. */
.app-top-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2147483000;
    height: 3px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 160ms ease;
}
.app-top-progress.is-visible {
    opacity: 1;
    visibility: visible;
}
.app-top-progress__fill {
    position: relative;
    width: 100%;
    height: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    background: var(--top-progress-gradient,
        linear-gradient(90deg, var(--top-progress-start, #8B5CF6) 0%, var(--top-progress-end, #EC4899) 100%));
    box-shadow: 0 0 7px var(--top-progress-glow, var(--top-progress-end, #EC4899));
    border-radius: 0 99px 99px 0;
    transition: transform 240ms ease;
    will-change: transform;
}
.app-top-progress__fill::after {
    content: "";
    position: absolute;
    right: 0;
    top: -1px;
    width: 46px;
    height: 5px;
    background: var(--top-progress-glow, var(--top-progress-end, #EC4899));
    opacity: .38;
    filter: blur(5px);
    pointer-events: none;
}

/* Vista previa y dos controles de color dentro de Apariencia. */
.top-progress-editor-intro {
    grid-column: 1 / -1;
    padding: 13px 16px;
    border: 1px solid var(--line, #d8dfec);
    background: var(--surface-soft, #f8f8fd);
    border-radius: 14px;
}
.top-progress-editor-intro h4 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--text, #26375e);
}
.top-progress-editor-intro p {
    font-size: 12px;
    margin: 0 0 13px;
    color: var(--muted, #697488);
    line-height: 1.45;
}
.top-progress-demo-track {
    height: 5px;
    overflow: visible;
    width: 100%;
    background: color-mix(in srgb, var(--color-primary, #8B5CF6) 10%, transparent);
    border-radius: 999px;
}
.top-progress-demo-fill {
    display: block;
    width: 73%;
    height: 100%;
    border-radius: 999px;
    background: var(--top-progress-gradient,
        linear-gradient(90deg, var(--top-progress-start, #8B5CF6), var(--top-progress-end, #EC4899)));
    box-shadow: 0 0 8px var(--top-progress-glow, var(--top-progress-end, #EC4899));
}
.top-progress-editor-intro .top-progress-demo-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}
.top-progress-demo-controls span {
    font-size: 11px;
    color: var(--muted, #697488);
}
.top-progress-demo-button {
    border: 1px solid var(--line, #d8dfec);
    border-radius: 8px;
    padding: 7px 11px;
    background: var(--card-surface, #fff);
    color: var(--text, #26375e);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.top-progress-demo-button:hover,
.top-progress-demo-button:focus-visible {
    border-color: var(--color-primary, #8B5CF6);
    outline-offset: 2px;
}
.top-progress-preview-demo {
    display: grid;
    gap: 10px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--line, #d8dfec);
}
.top-progress-preview-demo strong {
    font-size: 12px;
    font-weight: 700;
}
.top-progress-preview-demo small {
    font-size: 11px;
    color: var(--muted, #697488);
}
@media (max-width: 575px) {
    .top-progress-editor-intro { padding: 12px; }
    .top-progress-preview-demo { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .app-top-progress,
    .app-top-progress__fill { transition: none !important; }
    .app-top-progress__fill { will-change: auto; }
}