.loading-container {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(240, 243, 244, 0.86);
    backdrop-filter: blur(6px);
    z-index: 9999;
}

.page-skeleton-container {
    position: fixed;
    top: 80px;
    right: 0;
    bottom: 0;
    left: 300px;
    display: none;
    padding: 24px;
    background: #f0f3f4;
    z-index: 850;
}

.page-skeleton-container.is-visible {
    display: block;
}

body:has(.login) .page-skeleton-container {
    inset: 0;
}

.page-skeleton {
    display: grid;
    gap: 18px;
    width: 100%;
    height: 100%;
}

.page-skeleton__title,
.page-skeleton__actions,
.page-skeleton__card,
.page-skeleton__table span {
    position: relative;
    overflow: hidden;
    background: #eef2f7;
}

.page-skeleton__title::after,
.page-skeleton__actions::after,
.page-skeleton__card span::after,
.page-skeleton__table span::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
    animation: skeleton-shimmer 1.25s infinite;
}

.page-skeleton__title {
    width: min(420px, 72%);
    height: 44px;
    border-radius: 10px;
}

.page-skeleton__actions {
    width: min(760px, 100%);
    height: 76px;
    border-radius: 14px;
}

.page-skeleton__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.page-skeleton__card {
    display: grid;
    gap: 12px;
    min-height: 170px;
    padding: 24px;
    border-radius: 14px;
}

.page-skeleton__card span,
.page-skeleton__table span {
    position: relative;
    display: block;
    height: 14px;
    border-radius: 999px;
    background: #dfe6ef;
}

.page-skeleton__card span:nth-child(1) {
    width: 70%;
}

.page-skeleton__card span:nth-child(2) {
    width: 88%;
}

.page-skeleton__card span:nth-child(3) {
    width: 56%;
}

.page-skeleton__table {
    display: grid;
    gap: 12px;
    padding: 20px;
    border-radius: 14px;
    background: #ffffff;
}

.page-skeleton__table span {
    height: 22px;
}

.loading-container.is-visible {
    display: flex;
}

.loading-panel {
    width: min(560px, 100%);
    padding: 28px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 70px rgba(32, 38, 48, 0.16);
    color: #202838;
    text-align: center;
}

.loading-panel strong,
.loading-panel span {
    display: block;
}

.loading-panel strong {
    margin-top: 16px;
    font-size: 20px;
    font-weight: 900;
}

.loading-panel > span {
    margin-top: 8px;
    color: #697386;
    font-size: 15px;
    font-weight: 700;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto;
    border: 4px solid #fff1dc;
    border-top-color: #ffad13;
    border-radius: 50%;
    animation: loading-spin 0.8s linear infinite;
}

body.is-action-loading {
    cursor: progress;
}

body.is-action-loading button,
body.is-action-loading a {
    cursor: progress;
}

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

@keyframes skeleton-shimmer {
    100% {
        transform: translateX(100%);
    }
}

@media (max-width: 768px) {
    .page-skeleton-container {
        top: 80px;
        left: 0;
        padding: 16px;
    }
}

@media (max-width: 640px) {
    .page-skeleton__grid {
        grid-template-columns: 1fr;
    }

    .loading-panel {
        padding: 22px;
    }
}
