:root{
  --bg:#f5f7fb;
  --card:#ffffff;
  --text:#1f2937;
  --muted:#6b7280;
  --line:#e5e7eb;
  --primary:#ff6b6b;
  --primary2:#ff9f43;
  --danger:#ef4444;
  --shadow: 0 10px 30px rgba(0,0,0,.06);
  --radius: 14px;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans KR",sans-serif;
  background:var(--bg);
  color:var(--text);
}

.header{
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color: #fff;
  box-shadow: var(--shadow);
}

.header__inner{
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.brand__title{ font-size: 20px; font-weight: 800; }
.brand__sub{ font-size: 12px; opacity: .9; margin-top: 2px; }

.header__actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.container{
  max-width: 980px;
  margin: 18px auto 40px;
  padding: 0 16px;
}

.card{
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
}

.tabs{
  display:flex;
  gap:8px;
  padding: 6px;
  border:1px solid var(--line);
  border-radius: 999px;
  background:#fff;
  overflow:auto;
}

.tab{
  border:0;
  padding:10px 14px;
  border-radius:999px;
  background: transparent;
  cursor:pointer;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}
.tab--active{
  background: #111827;
  color:#fff;
}

.panel{ display:none; margin-top: 14px; }
.panel--active{ display:block; }

.grid2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 860px){
  .grid2{ grid-template-columns: 1fr; }
}

.box{
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.h2{
  margin: 0 0 10px;
  font-size: 16px;
}

.formRow{ display:flex; flex-direction:column; gap:6px; margin-bottom: 10px; }
.formRow--2{ display:grid; grid-template-columns: 1fr 1fr; gap:10px; }
.formRow--full{ grid-column: 1 / -1; }
label{ font-size: 12px; color: var(--muted); font-weight: 700; }

input, textarea, select{
  border:1px solid var(--line);
  border-radius: 10px;
  padding:10px;
  font-size: 14px;
  outline:none;
}
textarea{ resize: vertical; }

.formGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 860px){
  .formGrid{ grid-template-columns: 1fr; }
}

.inline{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}
.inline input{ flex:1; min-width: 160px; }

.row{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.row--space{ justify-content:space-between; }
.divider{
  height:1px;
  background: var(--line);
  margin: 12px 0;
}

.btn{
  border:0;
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--primary);
  color:#fff;
  cursor:pointer;
  font-weight: 800;
}
.btn:hover{ filter: brightness(.95); }

.btn--ghost{
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  color:#fff;
}
.btn--danger{
  background: var(--danger);
}

.fileLabel{ display:inline-flex; align-items:center; }
#importFile{ display:none; }

.hint{ font-size: 12px; color: var(--muted); }
.small{ font-size: 12px; color: var(--muted); }

.list{ display:flex; flex-direction:column; gap:8px; }

.item{
  border:1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  display:flex;
  gap:10px;
  align-items:flex-start;
  justify-content:space-between;
}

.item__left{ flex:1; }
.item__title{ font-weight: 900; }
.item__meta{ font-size: 12px; color: var(--muted); margin-top: 2px; display:flex; gap:10px; flex-wrap:wrap; }

.item__actions{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}
.badge{
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 999px;
  background: #111827;
  color:#fff;
  font-weight: 800;
}
.badge--muted{
  background: #eef2ff;
  color:#3730a3;
}
.badge--done{
  background:#dcfce7;
  color:#166534;
}

.pill{
  display:inline-flex;
  align-items:center;
  padding: 8px 10px;
  border-radius: 999px;
  border:1px solid var(--line);
  background:#fff;
  font-weight: 800;
  font-size: 12px;
}

.summary{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.mapBox{
  border-radius: 12px;
  overflow:hidden;
  border:1px solid var(--line);
}
.mapBox iframe{
  width:100%;
  height: 420px;
  border:0;
}

.footerNote{
  margin-top: 14px;
  padding: 0 4px;
}

/* 저장 인디케이터 */
#saveIndicator{
  font-size: 11px;
  min-height: 14px;
  opacity: 1;
  transition: opacity .4s;
}
#saveIndicator.fade{
  opacity: 0;
}

/* 로딩 오버레이 */
#loadingOverlay{
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
#loadingOverlay.hidden{
  display: none;
}
.loadingBox{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
}
.loadingSpinner{
  width: 36px;
  height: 36px;
  border: 4px solid var(--line);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin{
  to{ transform: rotate(360deg); }
}