:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --border: #e3e5e8;
  --text: #1d1f24;
  --muted: #767b85;
  --primary: #3b5bdb;
  --kakao: #fee500;
  --kakao-text: #191600;
  --danger: #e03131;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Malgun Gothic", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}

/* ===== 로그인 ===== */
.login-card {
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.logo {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.subtitle {
  margin: 4px 0 24px;
  color: var(--muted);
}

.btn-kakao {
  width: 100%;
  border: none;
  border-radius: 8px;
  background: var(--kakao);
  color: var(--kakao-text);
  font-size: 15px;
  font-weight: 700;
  padding: 13px 16px;
  cursor: pointer;
}

.btn-kakao:hover {
  filter: brightness(0.97);
}

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

.alert {
  background: #fff0f0;
  border: 1px solid #ffc9c9;
  color: var(--danger);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 16px;
  font-size: 13px;
}

/* ===== 상단바 ===== */
.topbar {
  height: 56px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.brand {
  font-weight: 800;
  letter-spacing: -0.3px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-name {
  color: var(--muted);
  font-size: 13px;
}

.btn-ghost {
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 6px;
  padding: 7px 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--bg);
}

/* ===== 대시보드 ===== */
.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 20px;
}

.section-title {
  font-size: 16px;
  margin: 0 0 12px;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table th,
.info-table td {
  text-align: left;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.info-table th {
  width: 160px;
  color: var(--muted);
  font-weight: 500;
}

.info-table tr:last-child th,
.info-table tr:last-child td {
  border-bottom: none;
}

.loading {
  text-align: center;
  color: var(--muted);
  padding: 60px 0;
}

/* ===== 필터 바 ===== */
.filter-bar {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.field input,
.field select {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
  color: var(--text);
  background: var(--card);
}

.field input {
  width: 100px;
}

.btn-primary {
  border: none;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 16px;
  cursor: pointer;
}

.btn-primary:hover {
  filter: brightness(0.95);
}

/* ===== 목록 테이블 ===== */
.table-scroll {
  overflow-x: auto;
}

.list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  white-space: nowrap;
}

.list-table th,
.list-table td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
}

.list-table th {
  color: var(--muted);
  font-weight: 500;
  background: var(--bg);
}

.btn-mini {
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--card);
  padding: 4px 9px;
  font-size: 12px;
  cursor: pointer;
}

.btn-mini:hover {
  filter: brightness(0.97);
}

.btn-ok {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-no {
  border-color: var(--danger);
  color: var(--danger);
}

/* ===== 스피너 ===== */
.spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto 12px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== 페이지네이션 ===== */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
}

.btn-ghost:disabled {
  opacity: 0.4;
  cursor: default;
}

/* ===== 모달 ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}

.modal-card {
  background: var(--card);
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
}

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

.modal-foot {
  margin-top: 16px;
  text-align: right;
}
