:root {
  --bg: #101114;
  --panel: #181b21;
  --line: #2b303a;
  --text: #eceef2;
  --muted: #8b93a4;
  --accent: #e85d4c;
  --accent2: #f3b184;
  --ok: #3ecf8e;
  --warn: #f0b44c;
  --err: #ff6b6b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 "Noto Sans KR", -apple-system, "Segoe UI", Pretendard, "Malgun Gothic", sans-serif;
}
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
}
.login-card { width: min(420px, 100%); }
.eyebrow {
  margin: 0 0 6px;
  color: var(--accent2);
  letter-spacing: 0.08em;
  font-size: 11px;
  text-transform: uppercase;
}
h1, h2 { margin: 0 0 8px; letter-spacing: -0.02em; }
h1 { font-size: 22px; }
h1 span { color: var(--muted); font-size: 13px; font-weight: 400; margin-left: 8px; }
h2 { font-size: 17px; }
.muted, .hint { color: var(--muted); }
.hint { font-size: 12px; margin: -4px 0 8px; }
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  background: #15171c;
}
.tabs {
  display: flex;
  gap: 8px;
  padding: 16px 22px 0;
  flex-wrap: wrap;
}
.tabs button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  font: inherit;
}
.tabs button.on { color: var(--text); border-color: var(--accent); background: #2a1714; }
main { padding: 18px 22px 40px; display: flex; flex-direction: column; gap: 16px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stats article, .account, .keybox {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}
.stats b { display: block; font-size: 26px; letter-spacing: -0.03em; }
.stats span { color: var(--muted); font-size: 12px; }
.panel-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.cards { display: flex; flex-direction: column; gap: 10px; }
.account { display: flex; gap: 12px; align-items: center; }
.account img, .avatar {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #2a2f3a;
}
.avatar { display: grid; place-items: center; font-weight: 700; }
.grow { flex: 1; min-width: 0; }
.grow strong, .grow small { display: block; }
.grow small { color: var(--muted); }
.bad { color: var(--err) !important; }
.stack { display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
label { font-size: 12px; color: var(--muted); }
input, select, textarea, button, .btn {
  font: inherit;
}
input, select, textarea {
  width: 100%;
  background: #12141a;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
textarea { resize: vertical; }
button, .btn {
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.primary {
  background: linear-gradient(135deg, var(--accent), #c44738);
  color: #fff;
  padding: 11px 16px;
  font-weight: 650;
}
.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 8px 12px;
}
.empty {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 36px 16px;
  text-align: center;
  color: var(--muted);
}
.flash { border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.flash.ok { background: #143226; color: var(--ok); }
.flash.err { background: #3a1717; color: #ffb4b4; }
.flash.warn { background: #33260f; color: var(--warn); }
.flashes { padding: 12px 22px 0; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 12px; font-weight: 500; }
.clip { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { font-size: 11px; padding: 2px 8px; border-radius: 999px; }
.pill.ok { background: #143226; color: var(--ok); }
.pill.fail { background: #3a1717; color: #ffb4b4; }
.keybox { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 12px 0; }
.keybox code, pre.code {
  font: 12px/1.55 ui-monospace, Consolas, monospace;
  color: #d7dde8;
  word-break: break-all;
}
pre.code {
  background: #0d0f13;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  overflow: auto;
}
.row-btns { display: flex; gap: 8px; align-items: center; }
.tab-panel { display: none; }
.tab-panel.on { display: block; }
@media (max-width: 800px) {
  .stats { grid-template-columns: 1fr 1fr; }
  header, .tabs, main, .flashes { padding-left: 14px; padding-right: 14px; }
  .panel-head, .keybox, .account { flex-direction: column; align-items: stretch; }
}
