/* 폰트 등록 (9dok_3와 동일) */
@font-face { font-family: 'Dalmoori'; src: url('./fonts/dalmoori.woff2') format('woff2'); font-weight: normal; font-style: normal; font-display: swap; }
@font-face { font-family: 'Pretendard'; src: url('./fonts/Pretendard-Thin.subset.woff2') format('woff2'); font-weight: 100; font-display: swap; }
@font-face { font-family: 'Pretendard'; src: url('./fonts/Pretendard-ExtraLight.subset.woff2') format('woff2'); font-weight: 200; font-display: swap; }
@font-face { font-family: 'Pretendard'; src: url('./fonts/Pretendard-Light.subset.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Pretendard'; src: url('./fonts/Pretendard-Regular.subset.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Pretendard'; src: url('./fonts/Pretendard-Medium.subset.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Pretendard'; src: url('./fonts/Pretendard-SemiBold.subset.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Pretendard'; src: url('./fonts/Pretendard-Bold.subset.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Pretendard'; src: url('./fonts/Pretendard-ExtraBold.subset.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Pretendard'; src: url('./fonts/Pretendard-Black.subset.woff2') format('woff2'); font-weight: 900; font-display: swap; }

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif; background-color: #f4f4f8; color: #333; font-weight: 400; }
.container { max-width: none; width: 100%; margin: 0; background-color: #f4f4f8; min-height: 100vh; padding: 0; box-sizing: border-box; }

/* 헤더 */
.header { background: white; color: #333; padding: 30px 30px; position: relative; overflow: visible; border-bottom: 1px solid #ddd; box-shadow: 0 2px 8px rgba(0,0,0,0.05); min-height: 80px; }
.header-content { max-width: none; margin: 0; padding: 0 !important; display: flex; justify-content: flex-start; align-items: center; position: relative; height: 100%; }
.header h1 { font-family: 'Dalmoori', 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif; font-size: 28px; font-weight: normal; color: rgba(0,0,0,0.8); letter-spacing: -0.5px; margin: 0 !important; padding: 0 !important; position: relative; left: 0; top: 0; transform: none; z-index: 10; display: flex; align-items: center; height: 100%; }
.header h1 .channel-version { font-size: 22px; font-weight: 300; opacity: 0.8; }

/* 컨텐츠 영역 */
.content {
  width: 100%;
  margin: 24px auto;
  padding: 0 24px;
}

@media (min-width: 1200px) {
  .content {
    width: 95%;
  }
}
.card { background: #fff; border: 1px solid #e7e7e7; border-radius: 12px; padding: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.muted { color: #666; }

.actions { display: flex; gap: 10px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; background: #333; color: #fff; border: 1px solid #ddd; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .2s ease; box-shadow: 3px 3px 8px rgba(0,0,0,.1); font-family: 'Pretendard', sans-serif; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); box-shadow: 6px 6px 12px rgba(0,0,0,.15); background: #555; }
.btn.secondary { background: #666; }
.btn.danger { background: #dc3545; border-color: #dc3545; }
.btn.danger:hover { background: #c82333; }

.user-badge { margin-left: auto; font-size: 13px; color: #444; opacity: .9; }

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: #fff;
  margin: 15% auto;
  padding: 0;
  border-radius: 12px;
  width: 95%;
  max-width: 1200px;
  max-height: 75vh;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e7e7e7;
  background: #f8f9fa;
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.close {
  color: #666;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.close:hover {
  color: #333;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: calc(90vh - 80px);
}

.filter-section {
  margin-bottom: 20px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
}

.form-row {
  display: flex;
  gap: 15px;
  align-items: end;
  flex-wrap: wrap;
}

.form-group {
  display: flex;
  flex-direction: column;
  min-width: 120px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: #555;
  margin-bottom: 4px;
}

.form-group input,
.form-group select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  font-family: 'Pretendard', sans-serif;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 13px;
}

.table th,
.table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e7e7e7;
}

.table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #555;
  position: sticky;
  top: 0;
}

.table tbody tr:hover {
  background: #f8f9fa;
}

.pagination {
  display: flex;
  gap: 5px;
  margin-top: 16px;
  justify-content: center;
}

.pagination .btn {
  padding: 8px 12px;
  min-width: 40px;
  justify-content: center;
}

.btn.btn-primary {
  background: #007bff;
  border-color: #007bff;
}

.btn.btn-primary:hover {
  background: #0056b3;
}

/* KTCS 페이지 DOM 최적화용 클래스 */
.period-btn.active {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
}

.modal-close-btn {
  position: sticky;
  top: 0;
  width: 100%;
  padding: 12px 16px;
  background: #fff;
  color: #000;
  border: none;
  font-size: 16px;
  font-weight: 500;
  border-bottom: 1px solid #ddd;
  z-index: 1001;
}

.detail-panel--overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 1000;
  overflow-y: auto;
  display: block !important;
}

@media (max-width: 768px) {
  .detail-panel--hidden {
    display: none !important;
  }
}
