* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  background: #0f1420;
  color: #e2e8f0;
}
a { color: #7dd3fc; text-decoration: none; }
a:hover { text-decoration: underline; }

.topnav {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 24px;
  background: #1e293b;
  border-bottom: 1px solid #2e3849;
}
.topnav-brand a { font-weight: 700; font-size: 18px; color: #f1f5f9; }
.topnav-links { display: flex; gap: 16px; flex: 1; }
.topnav-links a { color: #cbd5e1; }
.topnav-user { display: flex; gap: 12px; align-items: center; color: #94a3b8; font-size: 14px; }

.page { max-width: 1100px; margin: 0 auto; padding: 28px 24px 60px; }
h1 { font-size: 24px; margin-bottom: 8px; }
h2 { font-size: 18px; margin-top: 32px; }
.muted { color: #64748b; font-size: 14px; }

.stat-cards { display: flex; gap: 16px; margin: 20px 0; }
.stat-card {
  display: block; background: #1a2332; border: 1px solid #2e3849; border-radius: 10px;
  padding: 18px 24px; min-width: 160px; text-decoration: none; color: inherit;
  transition: border-color .15s, transform .15s;
}
.stat-card:hover { border-color: #7dd3fc; text-decoration: none; transform: translateY(-1px); }
.stat-num { font-size: 28px; font-weight: 700; color: #7dd3fc; }
.stat-label { font-size: 13px; color: #94a3b8; margin-top: 4px; }

.data-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.data-table th, .data-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #232d3f; font-size: 14px; }
.data-table th { color: #94a3b8; font-weight: 600; font-size: 13px; }
.ellipsis { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.badge-pending { background: #422006; color: #fbbf24; }
.badge-done { background: #052e1a; color: #4ade80; }
.badge-error { background: #450a0a; color: #f87171; }
.badge-skipped { background: #1e293b; color: #94a3b8; }

.search-form { margin: 16px 0; display: flex; gap: 8px; }
.search-form input { flex: 1; padding: 8px 12px; border-radius: 6px; border: 1px solid #2e3849; background: #1a2332; color: #e2e8f0; }

.btn { display: inline-block; padding: 8px 16px; border-radius: 6px; border: 1px solid #2e3849; background: #1a2332; color: #e2e8f0; cursor: pointer; font-size: 14px; }
.btn-primary { background: #2563eb; border-color: #2563eb; color: #fff; }
.btn-delete {
  padding: 5px 12px; border-radius: 6px; border: 1px solid #450a0a; background: #1a2332;
  color: #f87171; cursor: pointer; font-size: 13px;
}
.btn-delete:hover { background: #450a0a; color: #fecaca; }

.pager { display: flex; gap: 8px; align-items: center; margin-top: 20px; color: #94a3b8; font-size: 14px; }
.pager a { padding: 4px 10px; border-radius: 6px; border: 1px solid #2e3849; color: #cbd5e1; }
.pager a:hover { border-color: #7dd3fc; text-decoration: none; }
.pager-current { padding: 4px 10px; border-radius: 6px; background: #2563eb; color: #fff; }
.pager-ellipsis { padding: 0 4px; color: #64748b; }

.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 12px; }
.compare-col h3 { font-size: 14px; color: #94a3b8; margin-bottom: 6px; }
.text-block { background: #1a2332; border: 1px solid #2e3849; border-radius: 8px; padding: 14px; white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.5; }
.markdown { white-space: pre-wrap; }

.history-item { margin: 8px 0; }
.history-item summary { cursor: pointer; color: #cbd5e1; }

.login-wrap { display: flex; align-items: center; justify-content: center; height: 100vh; }
.login-card { background: #1a2332; border: 1px solid #2e3849; border-radius: 12px; padding: 40px; text-align: center; min-width: 320px; }
.login-card h1 { margin-bottom: 8px; }
.error-box { background: #450a0a; color: #f87171; padding: 10px; border-radius: 6px; margin: 16px 0; font-size: 14px; }

@media (max-width: 720px) {
  .compare-grid { grid-template-columns: 1fr; }
}
