:root {
  --bg: #0f1115;
  --bg-soft: #151922;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-strong: rgba(255, 255, 255, 0.09);
  --panel-soft: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f7fb;
  --muted: #adb7c5;
  --muted-strong: #c5cfdb;
  --accent: #82b7ff;
  --accent-soft: rgba(130, 183, 255, 0.16);
  --chip: rgba(130, 183, 255, 0.14);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  --radius: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Pretendard, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(130, 183, 255, 0.18), transparent 24%),
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.05), transparent 20%),
    linear-gradient(180deg, #10131a 0%, #0f1115 100%);
  min-height: 100vh;
}

.shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.card {
  background: var(--panel);
  backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* 헤더 */
.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  padding: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
}

.sub {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.hero-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.meta-box {
  min-width: 154px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--panel-strong);
}

.meta-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.meta-box strong {
  font-size: 28px;
  line-height: 1;
}

/* 툴바 */
.toolbar {
  margin-top: 18px;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: min(460px, 100%);
  color: var(--muted);
  font-size: 13px;
}

.search-box input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.search-box input::placeholder {
  color: #8c97a6;
}

.search-box input:focus {
  border-color: rgba(130, 183, 255, 0.45);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 4px rgba(130, 183, 255, 0.08);
}

.toolbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ghost-btn {
  height: 46px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-1px);
}

.ghost-btn.active {
  border-color: rgba(130, 183, 255, 0.5);
  background: var(--chip);
  color: #dceaff;
}

/* 본문 레이아웃: 왼쪽 요약 크게 / 오른쪽 전체 목록 */
.content-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1.28fr 0.92fr;
  gap: 24px;
  align-items: start;
}

.summary-card,
.table-card {
  padding: 22px;
}

.summary-card {
  min-height: 720px;
}

.table-card {
  min-height: 720px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
}

.updated-text {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

/* 왼쪽 사용자 요약 */
.summary-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.summary-item {
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045) 0%, rgba(255,255,255,0.03) 100%);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.summary-item:hover {
  transform: translateY(-2px);
  border-color: rgba(130, 183, 255, 0.20);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.035) 100%);
}

.summary-owner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.summary-owner strong {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
}

.summary-owner strong::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(130, 183, 255, 0.55);
  flex: 0 0 auto;
}

.summary-owner span {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.summary-rewards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 14px;
  line-height: 1.35;
  color: var(--muted-strong);
}

.summary-chip b {
  color: var(--text);
  font-weight: 700;
}

/* 오른쪽 전체 목록 */
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

thead th {
  text-align: left;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody td {
  padding: 15px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 14px;
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--accent);
  font-weight: 700;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 40px 16px;
}

/* 공통 */
b {
  font-weight: 700;
}

/* 스크롤바 */
.table-wrap::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.table-wrap::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.table-wrap::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: transparent;
}

/* 반응형 */
@media (max-width: 1180px) {
  .content-grid {
    grid-template-columns: 1.12fr 0.88fr;
  }
}

@media (max-width: 980px) {
  .hero {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-meta {
    justify-content: flex-start;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .summary-card,
  .table-card {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .shell {
    padding: 20px 14px 40px;
  }

  .hero,
  .toolbar,
  .summary-card,
  .table-card {
    padding: 18px;
  }

  .meta-box {
    min-width: 132px;
  }

  .summary-owner {
    flex-direction: column;
    align-items: flex-start;
  }

  .summary-owner span {
    white-space: normal;
  }

  .toolbar {
    align-items: stretch;
  }

  .toolbar-actions {
    width: 100%;
  }

  .ghost-btn {
    flex: 1 1 auto;
  }
}