* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, "Malgun Gothic", sans-serif; color: #222; background: #f5f6f8; }
a { color: #1565c0; text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar { display: flex; align-items: center; gap: 18px; padding: 10px 18px; background: #1f2937; color: #fff; }
.topbar .brand { color: #fff; font-weight: 700; }
.topbar nav { display: flex; gap: 14px; }
.topbar nav a { color: #cbd5e1; }
.topbar .me { margin-left: auto; font-size: 13px; color: #cbd5e1; }
.topbar .me a { color: #93c5fd; }

.container { max-width: 1080px; margin: 22px auto; padding: 0 18px; }
h1 { font-size: 22px; } h1 small { color: #888; font-size: 14px; }

.filters { display: flex; gap: 8px; align-items: center; margin: 14px 0; flex-wrap: wrap; }
.filters select, .filters input, .place-form input, .place-form select, .place-form textarea {
  padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 14px;
}
button, .btn { padding: 8px 14px; border: 0; border-radius: 6px; background: #1565c0; color: #fff;
  cursor: pointer; font-size: 14px; }
button:hover, .btn:hover { background: #0d47a1; text-decoration: none; }
.btn-cancel { background: #64748b; color: #fff; padding: 8px 14px; border-radius: 6px; }

.grid { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; }
.grid th, .grid td { padding: 10px 12px; border-bottom: 1px solid #eef0f3; text-align: left; font-size: 14px; }
.grid th { background: #f8fafc; }
.grid .empty { text-align: center; color: #999; padding: 30px; }
.inline-del { display: inline; }
.link-danger { background: none; color: #c62828; padding: 0 0 0 6px; }
.link-danger:hover { background: none; text-decoration: underline; }

.pager { display: flex; gap: 6px; margin: 16px 0; flex-wrap: wrap; }
.pager a { padding: 6px 10px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; }
.pager a.on { background: #1565c0; color: #fff; border-color: #1565c0; }

.place-form .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.place-form label { display: block; margin: 10px 0; font-size: 13px; color: #555; }
.place-form input, .place-form select, .place-form textarea { width: 100%; margin-top: 4px; }
.place-form .coord { display: flex; gap: 12px; }
.place-form .actions { margin-top: 16px; display: flex; gap: 10px; align-items: center; }
.pick-map { height: 420px; border-radius: 8px; }
.hint { font-size: 13px; color: #777; }

.upload-box, .preview-summary { background: #fff; padding: 16px; border-radius: 8px; margin: 14px 0; }
.notice { padding: 12px 14px; border-radius: 6px; margin: 12px 0; }
.notice.ok { background: #e8f5e9; color: #2e7d32; }
.notice.error, .error { background: #fdecea; color: #c62828; }
.err { color: #c62828; }
code { background: #eef2f7; padding: 2px 5px; border-radius: 4px; }

.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { background: #fff; padding: 30px; border-radius: 12px; width: 320px; box-shadow: 0 8px 30px rgba(0,0,0,.08); }
.login-card h1 { margin: 0 0 18px; font-size: 20px; text-align: center; }
.login-card label { display: block; font-size: 13px; color: #555; margin-bottom: 12px; }
.login-card input { width: 100%; margin-top: 4px; padding: 10px; border: 1px solid #cbd5e1; border-radius: 6px; }
.login-card button { width: 100%; margin-top: 8px; padding: 11px; }

/* 대시보드 요약 카드 */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 16px 0; }
.stat-card { background: #fff; border-radius: 10px; padding: 16px 18px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.stat-label { display: block; font-size: 13px; color: #6b7280; }
.stat-value { display: block; margin-top: 6px; font-size: 24px; font-weight: 700; color: #111827; }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.dash-panel { background: #fff; border-radius: 10px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.dash-panel h2 { margin: 0 0 12px; font-size: 16px; }

/* 인라인 액션 폼(상태변경/포인트조정) */
.inline-act { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.inline-act input, .inline-act select { padding: 6px 8px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; }
.inline-act input[type=number] { width: 90px; }
.inline-act button { padding: 6px 10px; font-size: 13px; }
.inline-act .link { background: none; color: #1565c0; padding: 0; }
.point-adjust input[type=text] { width: 110px; }

.fields-narrow { max-width: 520px; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: middle; border: 1px solid rgba(0,0,0,.1); }

@media (max-width: 720px) {
  .place-form .form-grid { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
}
