* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', sans-serif; padding: 20px; background: #f5f5f5; }
.content-area { max-width: 100%; margin: 0 auto; padding: 0 20px; }
h1 { margin-bottom: 20px; color: #333; }
.info { margin-bottom: 15px; color: #666; font-size: 14px; }
.controls { margin-bottom: 20px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
button { padding: 8px 16px; background: #4a90d9; color: white; border: none; border-radius: 4px; cursor: pointer; }
button:hover { background: #357abd; }
button:disabled { background: #ccc; cursor: not-allowed; }
table { width: 100%; border-collapse: collapse; background: white; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eee; font-size: 13px; white-space: nowrap; }
th { background: #f8f9fa; font-weight: 600; position: sticky; top: 0; }
tr:hover { background: #f0f7ff; }
.pv { text-align: right; }
.title-cell { white-space: normal; max-width: 400px; }
.title-cell a { color: #333; text-decoration: none; }
.title-cell a:hover { color: #4a90d9; text-decoration: underline; }
.pagination { margin-top: 15px; display: flex; gap: 8px; align-items: center; justify-content: center; position: relative; }
.page-size-wrap { position: absolute; left: 0; }
.page-size-wrap select { padding: 4px 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; }
.page-numbers { display: flex; gap: 4px; }
.page-numbers button { padding: 5px 10px; border: 1px solid #ddd; border-radius: 4px; background: white; color: #333; font-size: 13px; cursor: pointer; }
.page-numbers button:hover { background: #e9ecef; }
.page-numbers button.active { background: #4a90d9; color: white; border-color: #4a90d9; }

.header-bar { display: none; }
.logout-btn { padding: 6px 12px; background: #e74c3c; color: white; text-decoration: none; border-radius: 4px; font-size: 13px; border: none; }
.logout-btn:hover { background: #c0392b; }

/* 상단 바 */
.top-bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 20px; background: white; border-bottom: 2px solid #2c3e50; margin: -20px -20px 10px -20px; }
.top-bar-left { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #333; }
.top-bar-icon { width: 18px; height: 18px; color: #333; }
.top-bar-right { display: flex; align-items: center; gap: 12px; }
.user-name { font-size: 13px; color: #555; }
.user-dept { font-size: 12px; color: #888; }

/* 네비게이션 바 */
.nav-bar { display: flex; gap: 0; margin-left: 20px; }
.nav-item { padding: 10px 16px; text-decoration: none; color: #888; font-size: 13px; }
.nav-item:hover { color: #333; }
.nav-item.active { color: #2c3e50; font-weight: 700; }

.footer-bar { margin-top: 40px; padding: 20px 0; border-top: 1px solid #eee; text-align: center; color: #999; font-size: 12px; }

/* 날짜 필터 */
.filter-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; background: white; padding: 10px 20px; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); flex-wrap: wrap; }
.period-buttons { display: flex; gap: 6px; }
.period-btn { padding: 6px 14px; background: #e9ecef; color: #495057; border: 1px solid #dee2e6; border-radius: 4px; font-size: 13px; cursor: pointer; }
.period-btn:hover { background: #dee2e6; }
.period-btn.active { background: #4a90d9; color: white; border-color: #4a90d9; }
.date-inputs { display: flex; gap: 8px; align-items: center; }
.date-inputs input[type="date"] { padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; }
.date-inputs span { color: #999; }
.search-inputs { display: flex; gap: 6px; align-items: center; }
.search-inputs input, .search-inputs select { padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; }
.search-inputs input[type="text"] { width: 150px; }
.filter-bar > button { padding: 6px 16px; font-size: 13px; }
.btn-reset { padding: 6px 16px; font-size: 13px; background: #6c757d; color: white; border: none; border-radius: 4px; cursor: pointer; }
.btn-reset:hover { background: #5a6268; }

/* 반응형: 테이블 가로 스크롤 */
@media (max-width: 992px) {
    table { display: block; overflow-x: auto; }
}

@media (max-width: 576px) {
    body { padding: 12px; }
    th, td { padding: 8px 6px; font-size: 12px; }
    .header-bar h1 { font-size: 18px; }
}

/* 모달 */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; justify-content: center; align-items: center; }
.modal-content { position: relative; width: 90%; max-width: 900px; height: 85vh; background: white; border-radius: 8px; overflow: hidden; }
.modal-content iframe { width: 100%; height: 100%; }
.modal-close { position: absolute; top: 10px; right: 14px; font-size: 28px; background: none; border: none; color: #333; cursor: pointer; z-index: 1001; line-height: 1; }
.modal-close:hover { color: #e74c3c; }

/* 로딩 오버레이 */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
}
.loading-bar-container {
    width: 200px;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    overflow: hidden;
}
.loading-bar {
    width: 40%;
    height: 100%;
    background: #4a90d9;
    border-radius: 2px;
    animation: slide 1s ease-in-out infinite;
}
.loading-text {
    margin-top: 12px;
    color: #555;
    font-size: 13px;
    font-weight: 500;
}
@keyframes slide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(500%); }
}


/* 검토요청 버튼 */
.btn-review {
    padding: 4px 10px;
    background: #e67e22;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    white-space: nowrap;
}
.btn-review:hover {
    background: #d35400;
}

/* 토스트 메시지 */
.toast-msg { position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-100px); padding: 12px 24px; border-radius: 6px; font-size: 14px; color: white; z-index: 99999; transition: transform 0.3s ease; opacity: 0.95; }
.toast-msg.show { transform: translateX(-50%) translateY(0); }
.toast-success { background: #27ae60; }
.toast-error { background: #e74c3c; }
.toast-info { background: #2c3e50; }

/* 검토 팝업 */
.review-popup { background: white; border-radius: 10px; padding: 28px 32px; box-shadow: 0 8px 30px rgba(0,0,0,0.3); min-width: 400px; max-width: 500px; }
.review-popup h3 { margin-bottom: 20px; font-size: 16px; color: #2c3e50; }
.review-field { margin-bottom: 16px; }
.review-field label { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 6px; }
.review-field p { font-size: 13px; color: #333; line-height: 1.4; word-break: break-all; }
.review-field select, .review-field textarea { display: block; width: 100%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }
.review-field textarea { resize: vertical; }
.review-buttons { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.btn-submit { padding: 9px 20px; background: #2c3e50; color: white; border: none; border-radius: 6px; cursor: pointer; font-size: 13px; }
.btn-cancel { padding: 9px 20px; background: #95a5a6; color: white; border: none; border-radius: 6px; cursor: pointer; font-size: 13px; }
.btn-danger { padding: 9px 20px; background: #e74c3c; color: white; border: none; border-radius: 6px; cursor: pointer; font-size: 13px; }
.btn-reviewing { padding: 4px 10px; background: #f39c12; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 12px; }
.btn-reviewing:hover { background: #e67e22; }
.review-approved { font-size: 12px; color: #27ae60; font-weight: 600; }
.review-rejected { font-size: 12px; color: #e74c3c; font-weight: 600; }

/* 평가 규칙 요약 */
.score-rule-summary { display: flex; flex-direction: column; gap: 8px; padding: 10px 16px; background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 6px; }
.rule-summary-label { font-size: 12px; font-weight: 600; color: #666; }
.rule-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.rule-tag { font-size: 11px; color: #555; padding: 3px 10px; background: white; border: 1px solid #dee2e6; border-radius: 12px; white-space: nowrap; }
.rule-tag strong { color: #4a90d9; }

/* 점수 클릭 유도 */
.score-clickable { font-weight: 700; text-align: center; cursor: pointer; color: #2980b9; transition: all 0.2s; }
.score-clickable:hover { color: #e74c3c; background: #fef9e7; text-decoration: underline; }
