* { box-sizing: border-box; }
    body { margin:0; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color:#1f2937; background:#f3f4f6; }
    .layout { display:grid; grid-template-columns:360px 1fr; min-height:100vh; }
    aside { background:#fff; border-right:1px solid #e5e7eb; padding:18px; overflow-y:auto; max-height:100vh; }
    h1 { font-size:20px; margin:0 0 12px; }
    .desc { font-size:13px; color:#6b7280; line-height:1.45; margin-bottom:16px; }
    label { display:block; font-size:13px; font-weight:700; margin:14px 0 6px; }
    input, select, button { width:100%; border:1px solid #d1d5db; border-radius:10px; padding:10px; font-size:14px; background:#fff; }
    select[multiple] { min-height:86px; padding:6px; }
    button { cursor:pointer; background:#111827; color:#fff; border:none; font-weight:700; margin-top:10px; }
    button.secondary { background:#e5e7eb; color:#111827; }
    button:disabled { opacity:.55; cursor:not-allowed; }
    .hint { font-size:12px; color:#6b7280; margin-top:4px; line-height:1.35; }
    .viewerWrap { display:grid; grid-template-columns: minmax(0, 1fr) 38%; height:100vh; }
    .mapWrap { position:relative; width:100%; height:100%; overflow:hidden; }
    #map { width:100%; height:100%; }
    #markerCanvas { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; z-index:3; }
    #memoCanvas { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; z-index:4; }
    .memo-on #memoCanvas { pointer-events:auto; cursor:crosshair; }
    .roadviewWrap { position:relative; border-left:1px solid #d1d5db; background:#111827; }
    #roadview { width:100%; height:100%; }
    #roadviewEmpty { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; padding:20px; color:#fff; text-align:center; line-height:1.5; background:linear-gradient(135deg,#111827,#374151); z-index:2; }
    .roadviewTitle { position:absolute; left:10px; top:10px; right:10px; z-index:3; background:rgba(17,24,39,.78); color:#fff; border-radius:10px; padding:8px 10px; font-size:12px; line-height:1.35; pointer-events:none; }
    .stat { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:14px 0; }
    .card { background:#f9fafb; border:1px solid #e5e7eb; border-radius:12px; padding:10px; }
    .card b { display:block; font-size:18px; }
    .card span { font-size:12px; color:#6b7280; }
    .list { margin-top:14px; max-height:300px; overflow:auto; border:1px solid #e5e7eb; border-radius:12px; }
    .item { padding:10px; border-bottom:1px solid #e5e7eb; font-size:13px; cursor:pointer; }
    .item:hover { background:#f9fafb; }
    .item:last-child { border-bottom:none; }
    .badge { display:inline-block; padding:2px 7px; border-radius:999px; background:#eef2ff; margin-right:5px; font-size:12px; }
    .notice { background:#fffbeb; border:1px solid #fcd34d; color:#92400e; border-radius:12px; padding:10px; font-size:13px; line-height:1.45; }
    .error { background:#fef2f2; color:#991b1b; border:1px solid #fecaca; border-radius:12px; padding:10px; font-size:13px; margin-top:10px; white-space:pre-wrap; }
    .group-list { max-height:220px; overflow:auto; margin-top:8px; border-top:1px solid #e5e7eb; }
    .group-row { padding:7px 0; border-bottom:1px solid #e5e7eb; }
    .group-row:last-child { border-bottom:none; }
    @media (max-width:900px) { .layout { grid-template-columns:1fr; } aside { max-height:none; } .viewerWrap { grid-template-columns:1fr; grid-template-rows:62vh 38vh; height:100vh; } .roadviewWrap { border-left:none; border-top:1px solid #d1d5db; } }


/* 고객정보 카드 */
.customer-info-card {
  position: relative;
  min-width: 250px;
  max-width: 380px;
  padding: 12px 14px 12px;
  background: #ffffff;
  color: #111827;
  border: 1px solid rgba(17,24,39,.14);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
  font-size: 13px;
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: anywhere;
  z-index: 999999;
}
.customer-info-card .close-btn {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-size: 16px;
  line-height: 22px;
  padding: 0;
  margin: 0;
  cursor: pointer;
}
.customer-info-card .close-btn:hover {
  background: #e5e7eb;
}
.customer-info-card .contract-no {
  display: block;
  margin-right: 28px;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 900;
  color: #111827;
}
.customer-info-card .info-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 8px;
  padding: 3px 0;
  border-bottom: 1px dashed #e5e7eb;
}
.customer-info-card .info-row:last-child {
  border-bottom: 0;
}
.customer-info-card .info-label {
  color: #6b7280;
  font-weight: 800;
}
.customer-info-card .info-value {
  color: #111827;
  font-weight: 650;
}
.customer-info-card .address {
  margin-top: 8px;
  padding: 8px;
  border-radius: 10px;
  background: #f9fafb;
  color: #374151;
  font-size: 12px;
  line-height: 1.45;
}


/* 지도 위 최상단 고객정보 플로팅 패널 */
.floating-info-panel {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 9999999;
  pointer-events: auto;
  transform: translate(-50%, calc(-100% - 18px));
  max-width: min(420px, calc(100% - 24px));
}
.floating-info-panel.hidden {
  display: none;
}
.floating-info-panel .customer-info-card {
  min-width: 260px;
  max-width: 400px;
  background: #ffffff;
  border: 1px solid rgba(17,24,39,.16);
  box-shadow: 0 14px 34px rgba(0,0,0,.36);
}
.floating-info-panel::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 10px solid #ffffff;
  filter: drop-shadow(0 3px 2px rgba(0,0,0,.18));
}

.floating-info-panel.below-marker {
  transform: translate(-50%, 18px);
}
.floating-info-panel.below-marker::after {
  top: -9px;
  bottom: auto;
  border-top: 0;
  border-bottom: 10px solid #ffffff;
}


.upload-box {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 10px;
  background: #f9fafb;
  margin-top: 6px;
}
.upload-box input {
  margin-top: 8px;
}
.admin-upload {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.personal-upload {
  background: #f9fafb;
}
