/* JCM logo page loader */
.app-page-loader {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.app-page-loader.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.app-page-loader-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.app-loader-brand {
    margin-top: 14px;
    text-align: center;
}

.app-loader-brand-name {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: #1a237e;
    line-height: 1.1;
}

.app-loader-brand-tag {
    display: block;
    margin-top: 4px;
    font-family: 'Josefin Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: #8a7a2a;
}

.app-loader-logo {
    position: relative;
    width: 74px;
    height: 74px;
}

.app-loader-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid rgba(26, 35, 126, 0.12);
    border-top-color: #1a237e;
    animation: app-loader-spin 0.45s linear infinite;
}

.app-loader-mark {
    position: absolute;
    inset: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #1a237e;
    color: #ffd600;
    font-size: 1.45rem;
    box-shadow: 0 4px 14px rgba(26, 35, 126, 0.22);
    animation: app-loader-pulse 0.8s ease-in-out infinite;
}

.app-loader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-top-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20001;
    height: 2px;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.app-top-progress.is-visible {
    opacity: 1;
    visibility: visible;
}

.app-top-progress-bar {
    position: absolute;
    top: 0;
    left: -35%;
    width: 35%;
    height: 100%;
    background: #1a237e;
    animation: app-loader-progress 0.6s ease-in-out infinite;
}

.app-inline-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px 16px;
    color: #4a5780;
    text-align: center;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
}

.app-inline-spinner {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2.5px solid rgba(26, 35, 126, 0.12);
    border-top-color: #1a237e;
    animation: app-loader-spin 0.45s linear infinite;
}

.app-inline-loader p {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 500;
}

button.is-loading,
.btn.is-loading {
    position: relative;
    pointer-events: none;
    color: transparent !important;
}

button.is-loading::after,
.btn.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    animation: app-loader-spin 0.45s linear infinite;
}

@keyframes app-loader-spin {
    to { transform: rotate(360deg); }
}

@keyframes app-loader-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes app-loader-progress {
    0% { left: -35%; }
    100% { left: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .app-page-loader,
    .app-top-progress,
    .app-user-avatar img {
        transition: none;
    }

    .app-loader-ring,
    .app-loader-mark,
    .app-inline-spinner,
    .app-top-progress-bar,
    button.is-loading::after,
    .btn.is-loading::after {
        animation: none;
    }
}

@media print {
    .app-page-loader,
    .app-top-progress {
        display: none !important;
    }
}
