:root {
  --bg: #f5efe7;
  --bg-2: #efe4d4;
  --card: rgba(255, 255, 255, 0.82);
  --line: rgba(25, 25, 25, 0.1);
  --text: #1d1d1d;
  --muted: #6a6257;
  --accent: #0d5d8f;
  --accent-2: #d46f2b;
  --ok: #0f7b45;
  --danger: #a12f24;
  --warn: #8f5c14;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.09);
  --radius: 24px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Pretendard Variable", "Noto Sans KR", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(13, 93, 143, 0.18), transparent 32%),
    radial-gradient(circle at bottom right, rgba(212, 111, 43, 0.15), transparent 28%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

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

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.brand {
  display: grid;
  gap: 6px;
}

.brand h1 {
  margin: 0;
  font-size: clamp(24px, 4vw, 40px);
  letter-spacing: -0.04em;
}

.brand p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

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

.pill,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

button.primary, .pill.primary {
  background: var(--accent);
  border-color: transparent;
  color: white;
}

button.secondary, .pill.secondary {
  background: rgba(255,255,255,0.8);
}

button.warn {
  background: var(--danger);
  border-color: transparent;
  color: white;
}

.hero {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.hero .eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.grid {
  display: grid;
  gap: 20px;
}

.grid.two {
  grid-template-columns: 380px minmax(0, 1fr);
}

.grid.cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.card-header h2,
.card-header h3 {
  margin: 0;
  font-size: 18px;
}

.card-body {
  padding: 20px;
}

.stack {
  display: grid;
  gap: 14px;
}

.row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.row.triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

input, select, textarea {
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 14px;
  padding: 12px 13px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

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

.flash {
  padding: 14px 16px;
  border-radius: 16px;
  line-height: 1.5;
  margin-bottom: 18px;
}

.flash.notice {
  background: rgba(15, 123, 69, 0.1);
  color: var(--ok);
  border: 1px solid rgba(15, 123, 69, 0.18);
}

.flash.error {
  background: rgba(161, 47, 36, 0.09);
  color: var(--danger);
  border: 1px solid rgba(161, 47, 36, 0.18);
}

.flash.warning {
  background: rgba(143, 92, 20, 0.1);
  color: var(--warn);
  border: 1px solid rgba(143, 92, 20, 0.2);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.76);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 800;
}

.badge.ok { color: var(--ok); }
.badge.warn { color: var(--warn); }
.badge.danger { color: var(--danger); }
.badge.muted { color: var(--muted); }

.metric-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.68);
  padding: 14px;
}

.metric .label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.metric .value {
  font-weight: 800;
  font-size: 14px;
  word-break: break-word;
}

.value {
  font-weight: 800;
  font-size: clamp(24px, 4vw, 36px);
}

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

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

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

.table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

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

.mono {
  font-family: "SFMono-Regular", Menlo, monospace;
}

pre {
  margin: 0;
  min-height: 360px;
  max-height: 640px;
  overflow: auto;
  border-radius: 18px;
  background: #101418;
  color: #d7e3ef;
  padding: 18px;
  line-height: 1.5;
  font-size: 13px;
  font-family: "SFMono-Regular", Menlo, monospace;
}

.muted {
  color: var(--muted);
}

.center {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 80px);
}

.auth-card {
  width: min(520px, 100%);
}

.inline-form {
  display: inline-flex;
}

.inline-form button {
  padding-inline: 14px;
}

@media (max-width: 980px) {
  .grid.two,
  .grid.cards,
  .row,
  .row.triple,
  .metric-grid {
    grid-template-columns: 1fr;
  }

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