/* GoOrNot 모바일 관리자 — 앱 Design System v1 토큰(constants/theme.ts Palette, spacing, radius)과 같은 값. */
:root {
  --primary: #168aad;
  --primary-soft: #e6f7fb;
  --hot: #ff6b45;
  --hot-soft: #fff0eb;
  --sup: #2f80ed;
  --sup-soft: #eaf2fd;
  --surface: #f7f9fc;
  --text: #11181c;
  --text-secondary: #687076;
  --border: #e2e8f0;
  --error: #dc2626;
  --success: #15803d;
  --white: #ffffff;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --radius-md: 12px;
  --radius-full: 999px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}

body {
  padding-bottom: env(safe-area-inset-bottom);
}

[hidden] {
  display: none !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: calc(env(safe-area-inset-top) + 12px) var(--space-md) 12px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.topbar h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: var(--space-md);
}

h2 {
  margin: var(--space-sm) 0 var(--space-md);
  font-size: 17px;
}

label,
.field-label {
  display: block;
  margin-bottom: var(--space-xs);
  font-size: 14px;
  font-weight: 700;
}

.hint {
  margin: var(--space-xs) 0 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.error-text {
  margin: var(--space-sm) 0 0;
  color: var(--error);
  font-size: 14px;
}

.field {
  margin-bottom: var(--space-md);
}

input[type='text'],
input[type='email'],
input[type='password'],
input[type='search'],
input[type='datetime-local'],
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--text);
  font: inherit;
}

input:focus,
textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

input[readonly] {
  background: var(--surface);
  color: var(--text-secondary);
}

button {
  font: inherit;
  cursor: pointer;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: 48px;
  padding: 0 var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--text);
  font-weight: 700;
}

.button.primary {
  width: 100%;
  border-color: var(--primary);
  background: var(--primary);
  color: var(--white);
}

.button.danger {
  border-color: var(--error);
  color: var(--error);
}

.button.full {
  width: 100%;
}

.button:disabled {
  opacity: 0.5;
  cursor: default;
}

.link-button {
  min-height: 40px;
  padding: 0 var(--space-xs);
  border: 0;
  background: none;
  color: var(--primary);
  font-weight: 700;
}

.row-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.row-actions .button {
  flex: 1;
  min-height: 40px;
  padding: 0 var(--space-sm);
  font-size: 14px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* 상태 badge — 앱 지도 marker/카드 chip과 같은 색 */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.badge.hot {
  background: var(--hot);
}

.badge.sup {
  background: var(--sup);
}

.badge.muted {
  background: var(--border);
  color: var(--text-secondary);
}

.list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}

.list-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.list-item.inactive .place-name {
  color: var(--text-secondary);
}

.list-head {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.place-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-meta {
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: var(--space-lg) 0 var(--space-sm);
}

.section-bar h2 {
  margin: 0;
}

/* 등록 방식 / 상태 / 종료시간 선택(radio) */
.choice-group {
  display: flex;
  gap: var(--space-sm);
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-group.vertical {
  flex-direction: column;
}

.choice {
  position: relative;
  flex: 1;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--space-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-weight: 700;
  text-align: center;
}

.choice input:focus-visible + span {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.choice input:checked + span {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.choice.hot input:checked + span {
  border-color: var(--hot);
  background: var(--hot-soft);
  color: var(--hot);
}

.choice.sup input:checked + span {
  border-color: var(--sup);
  background: var(--sup-soft);
  color: var(--sup);
}

.method-buttons {
  display: grid;
  gap: var(--space-sm);
}

.method-buttons .button {
  flex-direction: column;
  min-height: 72px;
  text-align: center;
}

.method-buttons small {
  color: var(--text-secondary);
  font-weight: 400;
}

.map {
  width: 100%;
  height: 52vh;
  min-height: 280px;
  margin-bottom: var(--space-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.map.small {
  height: 200px;
  min-height: 0;
}

.coords {
  color: var(--text-secondary);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.result-item {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  text-align: left;
}

.result-item strong {
  display: block;
}

.result-item span {
  color: var(--text-secondary);
  font-size: 13px;
}

.notice {
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: 14px;
}

.notice.error {
  background: #fdecec;
  color: var(--error);
}

.notice.success {
  background: #e9f7ee;
  color: var(--success);
}

.toast {
  position: fixed;
  right: var(--space-md);
  bottom: calc(env(safe-area-inset-bottom) + var(--space-md));
  left: var(--space-md);
  z-index: 2000;
  max-width: 528px;
  margin: 0 auto;
  padding: 12px var(--space-md);
  border-radius: var(--radius-md);
  background: var(--text);
  color: var(--white);
  font-size: 14px;
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: var(--space-md);
  background: rgba(17, 24, 28, 0.4);
}

.dialog {
  width: 100%;
  max-width: 528px;
  margin-bottom: env(safe-area-inset-bottom);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  background: var(--white);
}

.dialog p {
  margin: 0 0 var(--space-md);
}

.pin-label {
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--white);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
