@charset "utf-8";

/* 다크 테마 기본 스타일 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #0f172a;
  color: #f8fafc;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  line-height: 1.5;
}

.biz-container {
  max-width: 1100px;
  margin: 30px auto;
  padding: 20px;
}

.biz-header {
  text-align: center;
  margin-bottom: 24px;
}

.biz-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 16px;
}

/* 검색바 영역 */
.search-box {
  display: flex;
  justify-content: center;
  max-width: 600px;
  margin: 0 auto;
  gap: 8px;
}

.search-input {
  flex: 1;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #f8fafc;
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
}

.search-input:focus {
  border-color: #38bdf8;
}

.btn-search {
  background: #2563eb;
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-search:hover {
  background: #1d4ed8;
}

/* 필터 카드 */
.filter-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.filter-group {
  margin-bottom: 18px;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-title {
  font-size: 13px;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 드롭다운 필터 라인 (소관부처, 수행기관용) */
.select-filter-row {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.select-filter-item {
  flex: 1;
}

.filter-select {
  width: 100%;
  background: #0f172a;
  border: 1px solid #334155;
  color: #f8fafc;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

.filter-select:focus {
  border-color: #38bdf8;
}

.chip-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* 칩 스타일 (다크버전) */
.filter-chip {
  padding: 6px 12px;
  border-radius: 8px;
  background: #0f172a;
  border: 1px solid #334155;
  color: #f8fafc;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-chip:hover {
  border-color: #38bdf8;
}

.filter-chip.active {
  background: #38bdf8;
  color: #0f172a;
  border-color: #38bdf8;
  font-weight: bold;
}

.count-badge {
  background: rgba(255, 255, 255, 0.1);
  color: #38bdf8;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
}

.filter-chip.active .count-badge {
  background: #0f172a;
  color: #38bdf8;
}

/* 테이블 영역 */
.table-wrapper {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  overflow: hidden;
}

.biz-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.biz-table th {
  background: #0f172a;
  padding: 12px 14px;
  font-size: 13px;
  color: #cbd5e1;
  border-bottom: 1px solid #334155;
}

.biz-table td {
  padding: 14px;
  font-size: 13px;
  color: #f8fafc;
  border-bottom: 1px solid #334155;
}

.biz-table tr:last-child td {
  border-bottom: none;
}

.biz-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

.badge-calc-type {
  background: #0f172a;
  color: #38bdf8;
  border: 1px solid #38bdf8;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
}

.biz-link {
  color: #f8fafc;
  text-decoration: none;
  font-weight: 600;
}

.biz-link:hover {
  color: #38bdf8;
  text-decoration: underline;
}

/* 페이징 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
}

.page-btn {
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid #334155;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}

.page-btn.active {
  background: #38bdf8;
  color: #0f172a;
  border-color: #38bdf8;
  font-weight: bold;
}

/* 모바일 반응형 (768px 이하) */
@media (max-width: 768px) {
  .biz-container {
    margin: 10px auto;
    padding: 12px;
  }

  .select-filter-row {
    flex-direction: column;
    gap: 12px;
  }

  .biz-table thead {
    display: none;
  }

  .biz-table, 
  .biz-table tbody, 
  .biz-table tr, 
  .biz-table td {
    display: block;
    width: 100%;
  }

  .biz-table tr {
    border-bottom: 1px solid #334155;
    padding: 16px 14px;
  }

  .biz-table tr:last-child {
    border-bottom: none;
  }

  .biz-table td {
    padding: 3px 0;
    border: none;
    font-size: 13px;
  }

  .biz-table td:nth-child(2) {
    margin: 6px 0;
  }

  .biz-table td:nth-child(2) .biz-link {
    font-size: 15px;
    line-height: 1.4;
    word-break: keep-all;
    display: block;
  }

  .biz-table td:nth-child(3),
  .biz-table td:nth-child(4),
  .biz-table td:nth-child(5) {
    color: #94a3b8;
    font-size: 12px;
  }
}