/* 전체 레이아웃 */
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #eef1f5;
  margin: 0;
  padding: 40px 0;
}

/* 메인 카드 */
.container {
  width: 90%;
  max-width: 900px;
  margin: auto;
  background: #ffffff;
  padding: 30px 40px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* 제목 */
h1 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 28px;
  color: #333;
}

/* 섹션 제목 */
h2 {
  margin-top: 40px;
  margin-bottom: 15px;
  color: #444;
}

/* 라벨 */
label {
  font-weight: 600;
  margin-top: 15px;
  display: block;
  color: #333;
}

/* 입력창 */
input, select {
  width: 100%;
  padding: 12px;
  margin-top: 6px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #fafafa;
  font-size: 15px;
}

input:focus, select:focus {
  outline: none;
  border-color: #4a90e2;
  background: #fff;
}

/* 버튼 */
button {
  margin-top: 25px;
  padding: 14px 20px;
  background: #4a90e2;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  width: 100%;
}

button:hover {
  background: #357ABD;
}

/* 테이블 */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: white;
  border-radius: 10px;
  overflow: hidden;
}

th {
  background: #f0f2f5;
  padding: 14px;
  font-weight: 600;
  color: #333;
}

td {
  padding: 12px;
  border-bottom: 1px solid #eee;
}

tr:hover {
  background: #fafafa;
}

/* 링크 */
a {
  color: #4a90e2;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}
.tag {
  padding: 4px 10px;
  border-radius: 6px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  display: inline-block;
}

.tag-red { background: #e74c3c; }      /* 극우 */
.tag-orange { background: #e67e22; }   /* 우파 */
.tag-yellow { background: #f1c40f; }   /* 중도우파 */
.tag-gray { background: #7f8c8d; }     /* 중도 */
.tag-blue { background: #3498db; }     /* 중도좌파 */
.tag-indigo { background: #3f51b5; }   /* 좌파 */
.tag-purple { background: #8e44ad; }   /* 극좌 */

.mini-graph {
  width: 80px;
  height: 80px;
  background: #f0f0f0;
  border: 1px solid #ccc;
  position: relative;
  border-radius: 6px;
}

.mini-graph .axis-x,
.mini-graph .axis-y {
  position: absolute;
  background: #bbb;
}

.mini-graph .axis-x {
  width: 100%;
  height: 1px;
  top: 50%;
  left: 0;
}

.mini-graph .axis-y {
  height: 100%;
  width: 1px;
  left: 50%;
  top: 0;
}

.mini-dot {
  width: 8px;
  height: 8px;
  background: #e74c3c;
  border-radius: 50%;
  position: absolute;
  transform: translate(-50%, -50%);
}
.role-icon {
  font-size: 18px;
  margin-right: 6px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 30px;
  margin-top: 20px;
}

.form-grid .full {
  grid-column: span 2;
}
.search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  align-items: center;
}

.search-box input {
  flex: 3; /* 입력창을 훨씬 넓게 */
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #fafafa;
  font-size: 15px;
}

.search-box button {
  flex: 1; /* 버튼은 좁게 */
  padding: 10px 0;
  background: #4a90e2;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
}

.search-box button:hover {
  background: #357ABD;
}
.filter-box {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 14px;
  background: #e0e0e0;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.filter-btn.active {
  background: #4a90e2;
  color: white;
}

.filter-btn:hover {
  background: #d5d5d5;
}
.sort-box {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.sort-btn {
  padding: 8px 14px;
  background: #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: #333;
}

.sort-btn.active {
  background: #4a90e2;
  color: white;
}

.sort-btn:hover {
  background: #d5d5d5;
}
.pagination {
  margin-top: 20px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.page-btn {
  padding: 8px 12px;
  background: #e0e0e0;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  font-weight: 600;
}

.page-btn.active {
  background: #4a90e2;
  color: white;
}

.page-btn:hover {
  background: #d5d5d5;
}
.detail-card {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  margin-top: 20px;
}

.detail-card h2 {
  margin-bottom: 10px;
}

.back-btn {
  display: inline-block;
  margin-bottom: 15px;
  text-decoration: none;
  color: #4a90e2;
  font-weight: 600;
}

.mini-graph.large {
  width: 200px;
  height: 200px;
  margin: 15px 0;
}
.mini-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  position: absolute;
  transform: translate(-50%, -50%);
}

/* 색상 적용 */
.dot-red { background: #e74c3c; }
.dot-orange { background: #e67e22; }
.dot-yellow { background: #f1c40f; }
.dot-gray { background: #7f8c8d; }
.dot-blue { background: #3498db; }
.dot-indigo { background: #3f51b5; }
.dot-purple { background: #8e44ad; }
.compare-wrapper {
  display: flex;
  gap: 30px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.compare-card {
  flex: 1;
  min-width: 260px;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.mini-graph.large {
  width: 200px;
  height: 200px;
  margin-top: 15px;
}

.dot-red { background: #e74c3c; }
.dot-orange { background: #e67e22; }
.dot-yellow { background: #f1c40f; }
.dot-gray { background: #7f8c8d; }
.dot-blue { background: #3498db; }
.dot-indigo { background: #3f51b5; }
.dot-purple { background: #8e44ad; }
.compare-link {
  font-size: 12px;
  color: #4a90e2;
  text-decoration: none;
}

.compare-link:hover {
  text-decoration: underline;
}
/* 비교 링크 */
.compare-link {
  font-size: 12px;
  color: #4a90e2;
  text-decoration: none;
}
.compare-link:hover {
  text-decoration: underline;
}

/* 상세 카드 */
.detail-card {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  margin-top: 20px;
}
.detail-card h2 {
  margin-bottom: 10px;
}
.back-btn {
  display: inline-block;
  margin-bottom: 15px;
  text-decoration: none;
  color: #4a90e2;
  font-weight: 600;
}

/* 큰 그래프 */
.mini-graph.large {
  width: 200px;
  height: 200px;
  margin: 15px 0;
}

/* 비교 페이지 */
.compare-wrapper {
  display: flex;
  gap: 30px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.compare-card {
  flex: 1;
  min-width: 260px;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 점 색상 */
.mini-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  position: absolute;
  transform: translate(-50%, -50%);
}
.dot-red { background: #e74c3c; }
.dot-orange { background: #e67e22; }
.dot-yellow { background: #f1c40f; }
.dot-gray { background: #7f8c8d; }
.dot-blue { background: #3498db; }
.dot-indigo { background: #3f51b5; }
.dot-purple { background: #8e44ad; }

/* 페이지네이션 */
.pagination {
  margin-top: 20px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.page-btn {
  padding: 8px 12px;
  background: #e0e0e0;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  font-weight: 600;
}
.page-btn.active {
  background: #4a90e2;
  color: white;
}
.page-btn:hover {
  background: #d5d5d5;
}

/* 비교 선택 리스트 */
.compare-select-list {
  margin-top: 15px;
}
.compare-select-list li {
  margin-bottom: 6px;
}
.admin-btn {
  padding: 10px 16px;
  background: #4a90e2;
  color: white;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.admin-btn:hover {
  background: #357ac8;
}

.edit-link {
  color: #4a90e2;
  text-decoration: none;
}

.edit-link:hover {
  text-decoration: underline;
}

.edit-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
}

.edit-form input, .edit-form select {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
}
.admin-link {
  float: right;
  font-size: 14px;
  color: #4a90e2;
  text-decoration: none;
}
.admin-link:hover {
  text-decoration: underline;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 300px;
}

.login-form input {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
}
.dashboard-box {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}
.delete-link {
  color: #e74c3c;
  text-decoration: none;
}
.delete-link:hover {
  text-decoration: underline;
}

.restore-link {
  color: #27ae60;
  text-decoration: none;
}
.restore-link:hover {
  text-decoration: underline;
}
.admin-status {
    background: #f0f0f0;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center; /*가운데 정렬*/
}
.admin-status a {
    margin-left: 10px;
}
.edit-link {
    color: #007bff;
    font-size: 13px;
}
.edit-link:hover {
    text-decoration: underline;
}
.back-btn {
    display: inline-block;
    padding: 8px 14px;
    background: #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
}
.back-btn:hover {
    background: #ccc;
}