/* admin/index.html의 인라인 스타일을 외부 파일로 분리 */

/* 관리자 사이드바 */
.admin-sidebar {
    width: 200px;
    background: #ffffff;
    border-right: 1px solid #ddd;
    padding: 10px;
    overflow-x: auto; /* 가로 스크롤 추가 */
    overflow-y: auto; /* 세로 스크롤 유지 */
}

.admin-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-menu-item {
    padding: 10px;
    margin-bottom: 5px;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.3s;
    white-space: nowrap; /* 텍스트 줄바꿈 방지 */
    min-width: max-content; /* 콘텐츠 크기에 맞추기 */
}

.admin-menu-item:hover {
    background: #f0f0f0;
}

.admin-menu-item.active {
    background: #1976d2;
    color: white;
}

/* 관리자 콘텐츠 영역 */
.admin-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    position: relative;
}



/* 통계 컨테이너 - admin-dashboard.css와 충돌 방지 */
.admin-content .stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* 통계 카드 - 페이지별 스타일과 분리 */
.admin-content .stat-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.admin-content .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.admin-content .stat-card h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.admin-content .stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    transition: opacity 0.3s;
}

.admin-content .stat-sub {
    font-size: 14px;
    color: #999;
    margin-top: 5px;
}

/* 활동 섹션 */
.admin-content .activity-section {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.admin-content .activity-section h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
}

.admin-content .activity-item {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.admin-content .activity-item:hover {
    background: #f9f9f9;
}

.admin-content .activity-item:last-child {
    border-bottom: none;
}

.activity-left {
    flex: 1;
    display: flex;
    gap: 10px;
    align-items: center;
}

.activity-user {
    font-weight: 600;
    color: #333;
}

.activity-action {
    color: #666;
    padding: 2px 8px;
    background: #f0f0f0;
    border-radius: 12px;
    font-size: 13px;
}

.activity-resource {
    color: #1976d2;
    font-size: 13px;
}

.activity-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.activity-academy {
    color: #999;
    font-size: 13px;
}

.activity-time {
    color: #999;
    font-size: 13px;
    min-width: 60px;
    text-align: right;
}

/* 차트 스타일 */
.simple-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 200px;
    padding: 20px;
    gap: 10px;
}

.chart-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.bar {
    width: 100%;
    background: linear-gradient(180deg, #4CAF50, #2196F3);
    border-radius: 4px 4px 0 0;
    position: relative;
    min-height: 5px;
    transition: all 0.3s;
    cursor: pointer;
}

.bar:hover {
    transform: scaleY(1.05);
    filter: brightness(1.1);
}

.bar-value {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: bold;
    color: #333;
}

.bar-label {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* 로딩 오버레이 */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-fixed, 1030);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1976d2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 새로고침 버튼 - 기존 스타일과 병합 */
.admin-content .btn-refresh {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.admin-content .btn-refresh:hover {
    background: #45a049;
}
