/* ==================== LOADING SPINNER COMPONENT ==================== */
.spinner-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-gray-200, #e2e8f0);
    border-top-color: var(--color-primary, #f2a83a);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.spinner-lg {
    width: 60px;
    height: 60px;
    border-width: 4px;
}

.spinner-primary {
    border-top-color: var(--color-primary, #f2a83a);
}

.spinner-secondary {
    border-top-color: var(--color-secondary, #1f2a44);
}

.spinner-white {
    border-top-color: white;
    border-color: rgba(255,255,255,0.2);
    border-top-color: white;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Skeleton Loader */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--color-gray-200, #e2e8f0) 25%,
        var(--color-gray-100, #f1f5f9) 50%,
        var(--color-gray-200, #e2e8f0) 75%
    );
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s infinite;
    border-radius: 8px;
}

@keyframes skeletonLoading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 12px;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.skeleton-card {
    padding: 20px;
    border-radius: 16px;
    background: white;
}

/* Page Loader Overlay */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    flex-direction: column;
    gap: 16px;
}

.page-loader.hidden {
    display: none;
}

/* Button Loading State */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading .btn-spinner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.btn-loading .btn-text {
    visibility: hidden;
}