*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #7c3aed;
  --primary-light: #ede9fe;
  --surface: #ffffff;
  --bg: #f5f3ff;
  --border: #e5e7eb;
  --text: #111827;
  --text-muted: #6b7280;
  --danger: #ef4444;
  --success: #10b981;
  --radius: 14px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Noto Sans KR', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── 상단 바 ── */
.top-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.logo {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -.5px;
}
.tab-nav { display: flex; gap: 4px; }
.tab-btn {
  background: none;
  border: none;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
}
.tab-btn.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}

/* ── 탭 콘텐츠 ── */
.tab-content {
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}
.tab-content.hidden { display: none; }

.section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.section-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ── 폼 필드 ── */
.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.req { color: var(--danger); }

.field input,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: border-color .15s;
  outline: none;
  -webkit-appearance: none;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--primary);
}
.field textarea { resize: vertical; min-height: 80px; }

/* ── 버튼 ── */
.submit-btn {
  width: 100%;
  padding: 15px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity .15s;
}
.submit-btn:active { opacity: .85; }
.submit-btn:disabled { opacity: .5; cursor: not-allowed; }

.outline-btn {
  width: 100%;
  padding: 13px;
  background: none;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
  transition: background .15s;
}
.outline-btn:hover { background: var(--primary-light); }

/* ── 완료 카드 ── */
.done-card {
  text-align: center;
  padding: 40px 20px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.done-card.hidden { display: none; }
.done-icon { font-size: 56px; margin-bottom: 16px; }
.done-title { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.done-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; }
.done-sub strong { color: var(--primary); }
.done-desc { font-size: 14px; color: var(--text-muted); line-height: 1.7; margin-bottom: 24px; }

/* ── 조회 ── */
.lookup-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.lookup-bar input {
  flex: 1;
  padding: 13px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
.lookup-bar input:focus { border-color: var(--primary); }
.search-btn {
  padding: 13px 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

/* ── 조회 결과 카드 ── */
.result-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 12px;
  box-shadow: 0 1px 6px rgba(0,0,0,.07);
}
.rc-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 5px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
}
.rc-row:last-child { border-bottom: none; }
.rc-key { color: var(--text-muted); min-width: 80px; }
.rc-val { font-weight: 500; text-align: right; word-break: break-all; }
.rc-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}
.status-pending  { background: #fef3c7; color: #92400e; }
.status-confirmed{ background: #d1fae5; color: #065f46; }
.status-rejected { background: #fee2e2; color: #991b1b; }

.empty-result {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 15px;
}
