/* ═══════════════════════════════════════════
   기업교육 대시보드 스타일
   ═══════════════════════════════════════════ */

.corp-dashboard-section {
    min-height: 100vh;
    padding: 120px 0 60px;
    background: #f8fafc;
}

.corp-dash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.corp-dash-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.corp-dash-header h1 i {
    color: #553AE7;
    margin-right: 0.5rem;
}

.corp-dash-subtitle {
    color: #64748b;
    font-size: 0.95rem;
}

/* 액션 영역 */
.corp-dash-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* LIVE 인디케이터 */
.live-indicator {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #16a34a;
    transition: all 0.3s;
}

.live-indicator.refreshing {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #3b82f6;
}

.live-indicator.refreshing .live-dot {
    background: #3b82f6;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.live-meta {
    font-weight: 400;
    color: #64748b;
    font-size: 0.75rem;
}

.live-countdown {
    color: #94a3b8;
}

.btn-refresh {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-refresh:hover {
    background: #f1f5f9;
    color: #553AE7;
    border-color: #553AE7;
}

.btn-refresh:active i {
    animation: spinOnce 0.5s ease;
}

@keyframes spinOnce {
    to { transform: rotate(360deg); }
}

.btn-export {
    padding: 0.6rem 1.2rem;
    background: #553AE7;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: background 0.2s;
}

.btn-export:hover {
    background: #4028C4;
}

/* 통계 카드 */
.corp-stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.corp-stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
}

.corp-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.25rem;
}

.corp-stat-icon.blue { background: #eff6ff; color: #3b82f6; }
.corp-stat-icon.green { background: #f0fdf4; color: #22c55e; }
.corp-stat-icon.orange { background: #fff7ed; color: #f97316; }
.corp-stat-icon.purple { background: #f5f3ff; color: #553AE7; }

.corp-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.corp-stat-label {
    font-size: 0.85rem;
    color: #64748b;
}

/* 탭 */
.corp-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.corp-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.corp-tab:hover {
    color: #553AE7;
}

.corp-tab.active {
    color: #553AE7;
    border-bottom-color: #553AE7;
}

/* 탭 컨텐츠 */
.corp-tab-content {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
    min-height: 300px;
}

/* 테이블 */
.corp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.corp-table thead th {
    text-align: left;
    padding: 0.75rem 0.5rem;
    color: #64748b;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border-bottom: 2px solid #e2e8f0;
}

.corp-table tbody td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.corp-table tbody tr:hover {
    background: #f8fafc;
}

.corp-table tbody tr.row-changed {
    animation: rowHighlight 2s ease;
}

@keyframes rowHighlight {
    0% { background: #fef9c3; }
    100% { background: transparent; }
}

/* 테이블 헤더 영역 */
.corp-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.realtime-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #16a34a;
    font-weight: 500;
}

/* 상태 뱃지 */
.status-online {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: #22c55e;
    font-weight: 500;
}

.status-online::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
}

.status-offline {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 500;
}

.status-offline::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
}

/* 진도율 바 */
.progress-bar-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-bar-track {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: #553AE7;
    transition: width 0.3s;
}

.progress-bar-fill.complete {
    background: #22c55e;
}

.progress-bar-text {
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 3rem;
    text-align: right;
    color: #334155;
}

/* 수료 뱃지 */
.badge-completed {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: #dcfce7;
    color: #16a34a;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-inprogress {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: #eff6ff;
    color: #3b82f6;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 로딩 */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #553AE7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.empty-message {
    text-align: center;
    padding: 3rem;
    color: #94a3b8;
}

.empty-message i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* 반응형 */
@media (max-width: 768px) {
    .corp-stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .corp-dash-header {
        flex-direction: column;
        gap: 1rem;
    }
    .corp-tabs {
        overflow-x: auto;
    }
    .corp-table {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .corp-stat-cards {
        grid-template-columns: 1fr 1fr;
    }
    .corp-dashboard-section {
        padding-top: 100px;
    }
}
