/* ============================================
   골프장 리스트 페이지
   ============================================ */
.list-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-height-actual, 56px));
  background: #fff;
}

.list-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  flex-shrink: 0;
}

.list-toolbar__left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.list-toolbar__count {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.list-toolbar__reset {
  padding: 6px 12px;
  border: 1px solid var(--color-border);
  background: #fff;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  color: var(--color-text-secondary);
}
.list-toolbar__reset:hover {
  background: #f5f5f5;
  color: var(--color-text);
}

.list-toolbar__export {
  padding: 8px 16px;
  border: none;
  background: var(--color-primary-dark);
  color: #fff;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.list-toolbar__export:hover {
  background: var(--color-primary-deep);
}

.list-scroll {
  flex: 1;
  overflow: auto;
  position: relative;
  padding: 0 16px 16px;
}

.list-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  color: var(--color-text-muted);
  z-index: 5;
}

/* ===== 테이블 ===== */
.ct {
  border-collapse: collapse;
  table-layout: auto;
  font-size: 13px;
  width: max-content;       /* 컨텐츠 폭에 맞춤 */
  min-width: 100%;
}

.ct thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f7f7f5;
  border-bottom: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text);
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.ct thead th:hover {
  background: #efefea;
}

.ct thead th.has-filter {
  background: var(--color-primary-pale);
  color: var(--color-primary-dark);
}

.ct thead th .ct-th-inner {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ct thead th .ct-sort-arrow {
  font-size: 10px;
  color: var(--color-text-muted);
}

.ct thead th .ct-filter-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary-dark);
  display: inline-block;
}

.ct tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid #f0f0f0;
  border-right: 1px solid #f5f5f5;
  white-space: nowrap;
  color: var(--color-text);
}

.ct tbody tr:nth-child(even) td {
  background: #fafaf8;
}

.ct tbody tr:hover td {
  background: #fff8e1;
}

.ct .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ct a.ct-link {
  color: var(--color-primary-dark);
  text-decoration: none;
}
.ct a.ct-link:hover {
  text-decoration: underline;
}

.ct .ct-empty {
  color: var(--color-text-muted);
}

/* ===== 헤더 드롭다운 (정렬 + 필터) ===== */
.ct-menu {
  position: fixed;
  z-index: 1000;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  min-width: 220px;
  max-width: 320px;
  padding: 4px 0;
  display: none;
}
.ct-menu.open {
  display: block;
}

.ct-menu__sort {
  display: block;
  width: 100%;
  padding: 8px 14px;
  background: none;
  border: none;
  text-align: left;
  font-size: 13px;
  cursor: pointer;
  color: var(--color-text);
}
.ct-menu__sort:hover {
  background: var(--color-primary-pale);
}
.ct-menu__sort.active {
  background: var(--color-primary-pale);
  color: var(--color-primary-dark);
  font-weight: 600;
}

.ct-menu__divider {
  height: 1px;
  background: var(--color-border);
  margin: 4px 0;
}

.ct-menu__search {
  width: calc(100% - 16px);
  margin: 4px 8px 6px;
  padding: 6px 8px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 12px;
}
.ct-menu__search:focus {
  outline: none;
  border-color: var(--color-primary-dark);
}

.ct-menu__list {
  max-height: 220px;
  overflow-y: auto;
  padding: 0 0 4px;
}

.ct-menu__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  font-size: 12px;
  cursor: pointer;
  color: var(--color-text);
}
.ct-menu__item:hover {
  background: #f5f5f5;
}
.ct-menu__item input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
}
.ct-menu__item-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ct-menu__item-count {
  color: var(--color-text-muted);
  font-size: 11px;
}

.ct-menu__actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px 10px;
  border-top: 1px solid var(--color-border);
}
.ct-menu__btn {
  padding: 5px 12px;
  border: 1px solid var(--color-border);
  background: #fff;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}
.ct-menu__btn--primary {
  background: var(--color-primary-dark);
  color: #fff;
  border-color: var(--color-primary-dark);
}
.ct-menu__btn--primary:hover {
  background: var(--color-primary-deep);
}
.ct-menu__btn--ghost:hover {
  background: #f5f5f5;
}

@media (max-width: 768px) {
  .list-toolbar {
    padding: 10px 12px;
    flex-wrap: wrap;
  }
  .list-scroll {
    padding: 0 12px 12px;
  }
  .ct thead th, .ct tbody td {
    padding: 8px 10px;
    font-size: 12px;
  }
}
