:root {
  --bg: #f4efe4;
  --panel: rgba(255, 250, 243, 0.92);
  --line: rgba(92, 71, 46, 0.14);
  --text: #2e2418;
  --muted: #70604b;
  --accent: #0f766e;
  --accent-soft: #d6f2ee;
  --warn: #9a3412;
  --shadow: 0 24px 80px rgba(61, 41, 17, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.8), transparent 28rem),
    linear-gradient(135deg, #f4efe4 0%, #eadcc8 48%, #d5d9cc 100%);
  color: var(--text);
  font-family: "Nanum Gothic", "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

.bg-shape {
  position: fixed;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.34;
  pointer-events: none;
}

.bg-shape-a {
  top: 3rem;
  right: 8rem;
  width: 16rem;
  height: 16rem;
  background: #e0b97f;
}

.bg-shape-b {
  bottom: 4rem;
  left: 6rem;
  width: 14rem;
  height: 14rem;
  background: #78c8bd;
}

.layout {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.hero {
  margin-bottom: 1.75rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 0.95;
}

.hero-copy {
  max-width: 100%;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.board,
.report-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.board {
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.board-head,
.report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.board-head h2,
.report-head h2 {
  margin: 0;
  font-size: 1.25rem;
}

.refresh-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  padding: 0.7rem 1rem;
  background: var(--text);
  color: white;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.result-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.76);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.result-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(59, 42, 20, 0.12);
  border-color: rgba(15, 118, 110, 0.22);
}

.result-card.is-selected {
  border-color: rgba(15, 118, 110, 0.55);
  box-shadow: 0 18px 38px rgba(15, 118, 110, 0.18);
}

.result-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.result-code {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.result-summary {
  margin: 0.8rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.55;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  margin-top: 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  border: 1px solid transparent;
}

.status-ok {
  background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
  color: #f8fbff;
  border-color: rgba(30, 64, 175, 0.34);
  box-shadow: 0 10px 22px rgba(29, 78, 216, 0.24);
}

.status-error {
  background: linear-gradient(135deg, #f97316, #fb923c);
  color: #fff8f3;
  border-color: rgba(194, 65, 12, 0.26);
}

.status-warn {
  background: #e5e7eb;
  color: #1f2937;
  border-color: rgba(107, 114, 128, 0.18);
}

.report-panel {
  padding: 1.25rem;
}

.report-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.report-content {
  margin: 1rem 0 0;
  min-height: 22rem;
  padding: 1.2rem;
  overflow: auto;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(43, 30, 15, 0.94);
  color: #f8f3ea;
  font-family: "Nanum Gothic", "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 0.92rem;
  line-height: 1.8;
  white-space: pre-wrap;
}

.controls {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.9rem 1rem;
  margin: 1rem 0 1.25rem;
}

.control {
  display: grid;
  gap: 0.35rem;
}

.control-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(71, 52, 31, 0.05);
}

.log-controls {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.9rem 1rem;
  margin-top: 1rem;
}

.row-selected td {
  background: rgba(15, 118, 110, 0.08);
}

.control-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 700;
}

.control-input {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.65rem 0.9rem;
  font: inherit;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  outline: none;
}

.control-input:focus {
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-top: 1px solid var(--line);
  vertical-align: top;
  font-size: 0.9rem;
}

.data-table thead th {
  border-top: 0;
  background: rgba(71, 52, 31, 0.08);
  color: var(--muted);
  font-weight: 800;
  font-size: 0.85rem;
}

.data-table thead th.th-sort {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.data-table thead th.th-sort:hover {
  color: var(--text);
}

.empty {
  padding: 1rem;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.66);
}

@media (max-width: 720px) {
  .layout {
    padding: 2rem 1rem 3rem;
  }

  .board-head,
  .report-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .controls {
    align-items: stretch;
  }

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

  .control {
    width: 100%;
  }

  .control-input {
    width: 100%;
  }
}
