
@keyframes skeleton-loading {
    0% { 
        background-position: -200px 0; 
    }
    100% { 
        background-position: calc(200px + 100%) 0; 
    }
}

@keyframes skeleton-pulse {
    0%, 100% { 
        opacity: 1; 
    }
    50% { 
        opacity: 0.5; 
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    display: block;
    position: relative;
    overflow: hidden;
}

.skeleton::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    animation: skeleton-pulse 2s infinite;
}

.skeleton-text {
    height: 1.2em;
    width: 100%;
    margin-bottom: 0.5em;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

.skeleton-text.long {
    width: 100%;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-avatar.large {
    width: 80px;
    height: 80px;
}

.skeleton-avatar.xlarge {
    width: 120px;
    height: 120px;
}

.skeleton-button {
    height: 36px;
    width: 100px;
    border-radius: 6px;
}

.skeleton-button.wide {
    width: 150px;
}

.skeleton-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 16px;
}

.skeleton-table-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.skeleton-table-row:last-child {
    border-bottom: none;
}

.skeleton-table-cell {
    flex: 1;
    margin-right: 16px;
}

.skeleton-table-cell:last-child {
    margin-right: 0;
}

.skeleton-stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    text-align: center;
}

.skeleton-stat-number {
    height: 2.5em;
    width: 60%;
    margin: 0 auto 16px;
    border-radius: 8px;
}

.skeleton-stat-label {
    height: 1em;
    width: 80%;
    margin: 0 auto;
}

.skeleton-list {
    space-y: 12px;
}

.loading-container {
    position: relative;
    min-height: 200px;
}

.loading-container.full-height {
    min-height: 400px;
}

.skeleton-glass {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.skeleton-shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-table {
    width: 100%;
    border-collapse: collapse;
}

.skeleton-table th,
.skeleton-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.skeleton-table-header {
    height: 20px;
    width: 100%;
}

.skeleton-chart {
    height: 300px;
    border-radius: 8px;
    position: relative;
}

.skeleton-chart::before {
    content: "";
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: #e0e0e0;
}

.skeleton-chart::after {
    content: "";
    position: absolute;
    top: 20px;
    left: 20px;
    bottom: 40px;
    width: 2px;
    background: #e0e0e0;
}

@media (max-width: 768px) {
    .skeleton-card {
        padding: 16px;
        margin-bottom: 12px;
    }
    
    .skeleton-table-row {
        padding: 8px 12px;
    }
    
    .skeleton-stat-card {
        padding: 16px;
    }
}

@media (prefers-color-scheme: dark) {
    .skeleton {
        background: linear-gradient(90deg, #2a2a2a 25%, #1a1a1a 50%, #2a2a2a 75%);
    }
    
    .skeleton-card {
        background: #333;
        box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    }
    
    .skeleton-table-row {
        border-bottom: 1px solid #444;
    }
}

@media (prefers-reduced-motion: reduce) {
    .skeleton,
    .skeleton::after {
        animation: none;
    }
    
    .skeleton {
        background: #f0f0f0;
    }
}

.hide-on-load {
    display: none;
}

.show-on-load {
    display: block;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.skeleton-user-card {
    display: flex;
    align-items: center;
    padding: 16px;
    background: white;
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.skeleton-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 16px;
    flex-shrink: 0;
}

.skeleton-user-info {
    flex: 1;
}

.skeleton-user-name {
    height: 1.2em;
    width: 40%;
    margin-bottom: 8px;
}

.skeleton-user-role {
    height: 1em;
    width: 30%;
    margin-bottom: 4px;
}

.skeleton-user-department {
    height: 0.9em;
    width: 35%;
}

.skeleton-calendar-container {
    padding: 20px;
    background: white;
    border-radius: 8px;
}

.skeleton-calendar-header {
    height: 40px;
    width: 100%;
    margin-bottom: 20px;
    border-radius: 8px;
}

.skeleton-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.skeleton-calendar-cell {
    aspect-ratio: 1;
    border-radius: 8px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s infinite;
}