:root {
  --ink: #18202a;
  --muted: #607083;
  --paper: #f7f8f4;
  --line: rgba(24, 32, 42, 0.13);
  --white: #ffffff;
  --red: #e94c3d;
  --shadow: 0 24px 70px rgba(18, 31, 45, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.admin-shell {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 54px 0;
}

.admin-shell.narrow {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.admin-header h1,
.admin-card h1,
.admin-card h2 {
  margin: 0 0 10px;
}

.admin-header p {
  margin: 0;
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: start;
}

.admin-actions a,
.admin-form button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  color: var(--white);
  background: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.admin-card {
  width: min(520px, 100%);
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.admin-shell > .admin-card {
  width: 100%;
  margin-bottom: 18px;
}

.admin-form {
  display: grid;
  gap: 16px;
}

.admin-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.admin-form input {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
}

.error {
  padding: 12px;
  border-radius: 6px;
  color: #9a241c;
  background: rgba(233, 76, 61, 0.12);
  font-weight: 800;
}

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

.status-grid div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbf8;
}

.status-grid dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.status-grid dd {
  margin: 8px 0 0;
  font-size: 18px;
  font-weight: 900;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.filter-tabs a,
.link-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--white);
  font-size: 13px;
  font-weight: 900;
}

.filter-tabs a.active,
.link-button:hover {
  color: var(--white);
  background: var(--red);
  border-color: var(--red);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

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

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

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

tr.unread td:first-child {
  color: var(--red);
  font-weight: 900;
}

.detail-list dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px 18px;
  margin: 0 0 26px;
}

.detail-list dt {
  color: var(--muted);
  font-weight: 900;
}

.detail-list dd {
  margin: 0;
}

.detail-list pre {
  overflow: auto;
  white-space: pre-wrap;
  padding: 18px;
  border-radius: 8px;
  background: #f3f5f0;
  font: inherit;
  line-height: 1.7;
}

@media (max-width: 720px) {
  .admin-header,
  .status-grid {
    display: grid;
    grid-template-columns: 1fr;
  }
}
