:root {
  --bg: #0f141a;
  --panel: #141b23;
  --panel-2: #10161d;
  --text: #e6edf3;
  --muted: #9aa5b1;
  --accent: #f6c544;
  --accent-2: #7fd1ae;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "IBM Plex Sans KR", "Noto Sans KR", system-ui, sans-serif;
  background:
    radial-gradient(circle at 10% 10%, rgba(246, 197, 68, 0.08), transparent 45%),
    radial-gradient(circle at 90% 20%, rgba(127, 209, 174, 0.12), transparent 40%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 24px 80px;
  display: grid;
  gap: 28px;
}

.hero {
  background: linear-gradient(135deg, rgba(246, 197, 68, 0.18), rgba(20, 27, 35, 0.4));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 32px;
  box-shadow: var(--shadow);
}

.eyebrow {
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  font-size: 12px;
  margin: 0 0 12px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: 38px;
}

.hero .sub {
  margin: 0;
  color: var(--muted);
  max-width: 620px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  align-items: end;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}

.hint {
  color: var(--muted);
  font-size: 12px;
}

.label-with-info {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  position: relative;
  top: -6px;
  border: none;
  cursor: pointer;
}

.info-icon:hover {
  background: rgba(255, 255, 255, 0.22);
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 12, 0.7);
}

.modal-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 22px;
  width: min(520px, 92vw);
  box-shadow: var(--shadow);
}

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

.modal-head h3 {
  margin: 0;
  font-size: 18px;
}

.modal-body {
  color: var(--text);
}

.region-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  font-size: 14px;
}

button.small {
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
}

.field input,
.field select {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
}

.region-select {
  display: grid;
  gap: 8px;
}

.field.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.field.checkbox input {
  width: 18px;
  height: 18px;
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

button {
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 600;
  background: var(--accent);
  color: #1b1f24;
  cursor: pointer;
}

button.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.results {
  background: var(--panel-2);
}

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

.meta {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.pagination span {
  color: var(--muted);
  font-size: 14px;
}

.page-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.page-buttons button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
}

.page-buttons button.active {
  background: var(--accent);
  color: #1b1f24;
  border-color: transparent;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

th, td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

th {
  background: rgba(255, 255, 255, 0.03);
  font-weight: 600;
  cursor: pointer;
  position: relative;
}

th[data-sort]::after {
  content: "↕";
  color: var(--muted);
  font-size: 11px;
  margin-left: 6px;
}

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

@media (max-width: 720px) {
  .hero h1 {
    font-size: 28px;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }
}
