/* Module: components/spa.css — SPA Loader */
/* ==========================================================================
   SPA â€” Content-area loader, page transitions, skeleton placeholders
   ========================================================================== */
.and-spa-loader {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(165deg, rgba(238, 242, 255, 0.96), rgba(255, 247, 237, 0.96));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 320ms ease, visibility 320ms ease;
}

.and-spa-loader.is-visible {
    opacity: 1;
    visibility: visible;
}

.and-spa-loader.is-hiding {
    opacity: 0;
    visibility: hidden;
}

.and-spa-loader__panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: min(280px, 86vw);
    padding: 24px 28px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
}

.and-spa-loader__spinner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid rgba(255, 90, 0, 0.18);
    border-top-color: var(--and-accent, #ff5a00);
    animation: and-spa-spin 0.85s linear infinite;
}

.and-spa-loader__label {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--and-text-muted, #64748b);
    text-align: center;
}

.and-spa-loader__progress {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.and-spa-loader__progress-track {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 90, 0, 0.12);
    overflow: hidden;
}

.and-spa-loader__progress-bar {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ff7a33, var(--and-accent, #ff5a00));
    transition: width 280ms ease;
}

.and-spa-loader__percent {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--and-accent, #ff5a00);
    text-align: center;
    font-variant-numeric: tabular-nums;
}

@keyframes and-spa-spin {
    to {
        transform: rotate(360deg);
    }
}

.and-spa-outlet {
    min-height: 100vh;
    opacity: 1;
}

.and-spa-outlet--hidden {
    opacity: 0;
    pointer-events: none;
}

.and-spa-outlet--enter {
    animation: and-nav-page-in 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes and-nav-page-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.and-skeleton--sm {
    height: 12px;
    width: 55%;
    margin-bottom: 8px;
}

.and-skeleton--xs {
    height: 10px;
    width: 40%;
}

.and-sk-grid {
    display: grid;
    gap: 12px;
}

.and-sk-grid--stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.and-sk-grid--barang {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.and-sk-stat {
    min-height: 96px;
    padding: 14px;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.and-sk-stat--card {
    min-height: 108px;
}

.and-sk-stat__icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    margin-bottom: 10px;
}

.and-sk-stat__line {
    margin-bottom: 10px;
}

.and-sk-stat__val {
    height: 28px;
    width: 72px;
}

.and-sk-barang {
    border-radius: 1rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.and-sk-barang__media {
    aspect-ratio: 1;
    width: 100%;
}

.and-sk-barang__body {
    padding: 12px;
    min-height: 72px;
}

.and-sk-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.and-sk-pjm {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    min-height: 96px;
    padding: 14px;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.and-sk-pjm__avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    flex-shrink: 0;
}

.and-sk-pjm__body {
    flex: 1;
    min-width: 0;
}

.and-sk-feed {
    display: flex;
    gap: 12px;
    min-height: 72px;
    padding: 12px;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.and-sk-feed__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    flex-shrink: 0;
}

.and-sk-feed__body {
    flex: 1;
}

.and-sk-ai {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px 0;
}

.and-sk-ai__row {
    display: flex;
}

.and-sk-ai__row--user {
    justify-content: flex-end;
}

.and-sk-ai__bubble {
    width: min(72%, 280px);
    height: 56px;
    border-radius: 18px;
}

.and-sk-chart {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 160px;
    padding: 16px;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.and-sk-chart__bar {
    flex: 1;
    height: var(--h, 60%);
    border-radius: 8px 8px 4px 4px;
}

.and-list-sentinel {
    width: 100%;
    height: 1px;
    margin-top: 8px;
    pointer-events: none;
    visibility: hidden;
}
