:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --ink: #1a1d21;
  --ink-soft: #5b6068;
  --line: #e2e5ea;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --ok: #15803d;
  --ok-bg: #ecfdf3;
  --warn: #b45309;
  --warn-bg: #fffbeb;
  --danger: #b91c1c;
  --danger-bg: #fef2f2;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Pretendard',
    'Malgun Gothic', 'Noto Sans KR', sans-serif;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.wrap--wide { max-width: 1100px; }

h1 { font-size: 1.35rem; margin: 0 0 4px; letter-spacing: -0.02em; }
h2 { font-size: 1.05rem; margin: 0 0 12px; letter-spacing: -0.01em; }
p { margin: 0 0 12px; }

.sub { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 20px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
}

input[type='text'],
input[type='password'],
input[type='number'],
input[type='datetime-local'],
input[type='file'],
textarea,
select {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  margin-bottom: 16px;
}

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

input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

button {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 12px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

button:hover:not(:disabled) { background: var(--accent-dark); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

button.ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
button.ghost:hover:not(:disabled) { background: #f1f3f6; }

button.danger { background: var(--danger); }

button.block { width: 100%; }

.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row > * { margin-bottom: 0; }

.msg {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.msg--ok { background: var(--ok-bg); color: var(--ok); }
.msg--warn { background: var(--warn-bg); color: var(--warn); }
.msg--error { background: var(--danger-bg); color: var(--danger); }

.hidden { display: none !important; }

.progress {
  height: 8px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}
.progress > i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.15s linear;
}

.done {
  text-align: center;
  padding: 28px 12px;
}
.done .mark { font-size: 2.6rem; line-height: 1; margin-bottom: 8px; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th, td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th { font-weight: 600; color: var(--ink-soft); font-size: 0.82rem; }
td.num { font-variant-numeric: tabular-nums; }

.table-scroll { overflow-x: auto; }

.list-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: #fafbfc; }
.list-item .meta { color: var(--ink-soft); font-size: 0.84rem; }

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}
.badge--open { background: var(--ok-bg); color: var(--ok); }
.badge--closed { background: var(--danger-bg); color: var(--danger); }

.qr { display: block; width: 220px; max-width: 100%; margin: 0 auto 8px; }
.qr-url {
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink-soft);
  word-break: break-all;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.topbar .who { font-size: 0.85rem; color: var(--ink-soft); }

.empty {
  text-align: center;
  color: var(--ink-soft);
  padding: 28px 12px;
  font-size: 0.9rem;
}
