/* 큐버솔루션 영업실적관리 — 디자인 시안(큐버솔루션-업무관리-디자인.html) 기준 */
:root {
  --nav: #101b32; --nav-hover: #243552; --blue: #2459ea; --blue-dark: #1e49c8; --ink: #14213a; --muted: #52617a;
  --line: #e1e7f1; --bg: #f4f7fb; --white: #fff; --orange: #b54b12; --orange-bg: #fff0e3; --blue-bg: #ebf1ff;
  --pin-blue: #2459ea; --pin-orange: #d46024; --danger: #a13717;
  --shadow: 0 12px 32px #13294b0c; --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font: 14px/1.55 Geist, 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  letter-spacing: -.016em; -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue-dark); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #7da1ff; outline-offset: 3px; }
button:disabled { cursor: default; opacity: .55; }
svg[data-icon], .ic { width: 20px; height: 20px; vertical-align: middle; flex: none; stroke: currentColor; stroke-width: 1.75; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.hidden, [hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(27px, 3vw, 38px); line-height: 1.2; letter-spacing: -.055em; font-weight: 800; }
h2 { font-size: 20px; letter-spacing: -.045em; }
h3 { font-size: 15px; }
small, .muted { color: var(--muted); }
.numeral { font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; gap: 10px; }
.spread { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }

/* 버튼 */
.btn {
  min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line);
  border-radius: 9px; background: #fff; color: var(--ink); padding: 0 14px; font-weight: 700; white-space: nowrap; text-decoration: none;
}
.btn:hover { background: #f3f6fb; }
.btn.primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn.primary:hover { background: var(--blue-dark); }
.btn.danger { color: var(--danger); border-color: #f3d3c6; }
.btn.danger:hover { background: #fff5f0; }
.btn.icon { width: 42px; padding: 0; }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: 12px; }
.btn.block { width: 100%; }
.btn svg { width: 17px; height: 17px; }
.link { background: none; border: 0; padding: 2px 4px; color: #234dcc; font-weight: 800; }

.badge { display: inline-block; padding: 4px 9px; border-radius: 6px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.badge.done { color: #1e48b5; background: var(--blue-bg); }
.badge.pre { color: var(--orange); background: var(--orange-bg); }
.tag { font-size: 11px; color: #43546e; background: #f0f3f8; padding: 3px 7px; border-radius: 5px; white-space: nowrap; }
.surface { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* 브랜드 */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -.045em; color: inherit; min-width: 0; }
.brand-icon { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 10px; background: #3164f4; color: #fff; flex: none; overflow: hidden; }
.brand-icon img { width: 100%; height: 100%; object-fit: contain; }
.brand-icon:has(img) { background: #fff; border: 1px solid var(--line); }   /* 아이콘 이미지는 흰 배경 위에 그대로 */
.brand-icon svg { width: 22px; height: 22px; }
.brand-icon.sm { width: 30px; height: 30px; border-radius: 8px; display: none; }
.brand-icon.sm svg { width: 18px; height: 18px; }
.brand-text { display: grid; line-height: 1.35; overflow: hidden; }
.brand-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-text small { font-size: 10px; color: #9dadca; font-weight: 600; letter-spacing: .03em; }

/* ── 레이아웃 ── */
.layout { min-height: 100dvh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.content { min-width: 0; }
.sidebar { height: 100dvh; position: sticky; top: 0; background: var(--nav); color: #d3dcef; padding: 27px 16px 17px; display: flex; flex-direction: column; gap: 31px; }
.sidebar .brand { padding: 0 7px; color: #fff; }
.nav { display: grid; gap: 5px; }
.nav button { min-height: 46px; display: flex; align-items: center; gap: 12px; text-align: left; padding: 0 12px; color: #c4cee1; border: 0; background: transparent; border-radius: 9px; font-weight: 700; }
.nav button:hover { background: var(--nav-hover); }
.nav button[aria-current=page] { background: #253d75; color: #fff; }
.nav button[aria-current=page] svg { color: #a4beff; }
.sidebar-footer { margin-top: auto; display: grid; gap: 11px; }
.profile { border-top: 1px solid #ffffff24; padding: 16px 5px 0; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #dbe6ff; color: #254ac1; font-weight: 800; flex: none; }
.profile strong { color: #fff; }
.profile small { color: #a4b2cb; }
.topbar { min-height: 67px; background: #fff; border-bottom: 1px solid var(--line); padding: 10px clamp(18px, 3vw, 40px); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.topbar strong { font-size: 13px; }
.topbar .muted { font-size: 12px; }
.topbar-title { min-width: 0; }
.mobile-nav { display: none; }
.main { max-width: 1590px; margin: auto; padding: 28px clamp(18px, 3vw, 40px) 32px; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 23px; }
.hero p { margin-top: 8px; color: var(--muted); }

/* 지표 */
/* 지표 줄은 아래 목록·지도(.split)와 같은 열 구성: 첫 박스=목록 폭, 확정·예비 묶음=지도 폭 */
.metrics { display: grid; grid-template-columns: minmax(325px, .88fr) minmax(340px, 1.12fr); gap: 16px; margin-bottom: 23px; }
.metrics-sub { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; min-width: 0; }
.metric { padding: 16px 18px; min-width: 0; }
.metric.primary-metric { background: #eaf0ff; border-color: #d8e4ff; }
.metric-title { color: #435470; font-size: 12px; font-weight: 700; }
.metric-icon { width: 34px; height: 34px; background: #eff3fa; border-radius: 9px; display: grid; place-items: center; color: #425777; }
.primary-metric .metric-icon { background: #d9e5ff; color: var(--blue-dark); }
.metric-icon.orange { color: var(--orange); background: var(--orange-bg); }
.metric-icon svg { width: 17px; height: 17px; }
.metric-value { display: block; margin-top: 6px; font-size: clamp(21px, 2.5vw, 31px); font-weight: 800; line-height: 1.25; letter-spacing: -.045em; }
.metric-value span { font-size: .55em; margin-left: 4px; }

/* 목록 + 지도 */
.split { display: grid; grid-template-columns: minmax(325px, .88fr) minmax(340px, 1.12fr); gap: 16px; align-items: start; }
.panel { overflow: hidden; min-width: 0; }
.panel-head { min-height: 59px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.panel-head svg { width: 19px; height: 19px; }
.count { font-size: 12px; font-weight: 700; color: var(--blue-dark); background: var(--blue-bg); border-radius: 12px; padding: 2px 8px; }
.panel-controls { padding: 12px 15px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.search { position: relative; display: block; min-width: 0; }
.search svg { position: absolute; top: 11px; left: 11px; color: #64748d; width: 16px; height: 16px; }
.search input { padding-left: 34px; width: 100%; background: #f8faff; }
.field, .search input { min-height: 40px; border: 1px solid #dce3ee; border-radius: 8px; color: var(--ink); padding-right: 10px; }
.field { padding-left: 10px; background: #fff; }   /* 라벨 밖 입력칸(키워드 추가 등)도 같은 안쪽 여백 */
.filter-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.filter-row:empty { display: none; }
.filter { border: 1px solid var(--line); background: #fff; border-radius: 7px; min-height: 29px; padding: 3px 8px; color: #52617a; font-size: 11px; font-weight: 700; }
.filter[aria-pressed=true] { background: #edf2ff; border-color: #b8caff; color: #2049b4; }
.filter .cnt { color: #8a97ad; font-weight: 600; margin-left: 2px; }
.filters-label { font-size: 11px; font-weight: 700; margin-right: 2px; color: var(--muted); }
#cardList { max-height: 620px; overflow-y: auto; }
.record { border: 0; border-bottom: 1px solid #e8edf4; background: #fff; text-align: left; width: 100%; padding: 13px 15px; display: flex; gap: 12px; color: inherit; }
.record:last-child { border-bottom: 0; }
.record:hover, .record.active { background: #f2f6ff; }
.record.active { box-shadow: inset 3px 0 var(--blue); }
.record .rec-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.record strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.record .id { color: #536682; font-size: 10px; font-weight: 700; letter-spacing: .025em; }
.record .address { color: var(--muted); font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.record .tags { margin-top: 3px; gap: 5px; }
.record .thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: contain; flex: none; background: #e9edf3; align-self: center; }
.amount { font-size: 13px; font-weight: 800; white-space: nowrap; }
.empty { padding: 38px 16px; text-align: center; color: var(--muted); }
.list-sum { padding: 10px 15px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.list-sum:empty { display: none; }
.legend { font-size: 11px; color: var(--muted); font-weight: 700; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--pin-blue); margin-right: 4px; }
.legend i.orange { background: #eb7830; }
.map-wrap { position: relative; }
.map { height: 492px; position: relative; background: #e9edf3; }
.map-tools { position: absolute; right: 12px; top: 12px; z-index: 3; display: grid; gap: 5px; }
.map-tools .btn { box-shadow: 0 2px 8px #1727401c; font-size: 12px; }
.map-empty { display: flex; height: 100%; align-items: center; justify-content: center; text-align: center; color: var(--muted); padding: 20px; line-height: 1.7; }
.mobile-view { display: none; }

/* 지도 정보창 */
.iw { min-width: 190px; max-width: 250px; font: 13px/1.5 Geist, 'Noto Sans KR', sans-serif; color: var(--ink); }
.iw strong { font-size: 14px; }
.iw small { display: block; margin-top: 4px; }
.iw .btn { margin-top: 10px; width: 100%; min-height: 32px; font-size: 12px; }

/* ── 로그인 / 회원가입 ── */
.auth { min-height: 100dvh; display: grid; grid-template-columns: 1.08fr 1fr; background: #fff; }
.auth-brand { background: #111d39; color: #fff; display: flex; flex-direction: column; justify-content: center; align-items: center; min-width: 0; position: relative; overflow: hidden; padding: 45px; }
.auth-brand::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 72% 45%, #274fc28c, transparent 65%), repeating-linear-gradient(0deg, transparent 0 49px, #adbdff10 50px), repeating-linear-gradient(90deg, transparent 0 49px, #adbdff10 50px);
}
.auth-visual { position: relative; width: min(100%, 510px); }
.auth-visual .brand { color: #fff; }
.auth-visual h1 { font-size: clamp(32px, 4vw, 56px); margin: 35px 0 12px; line-height: 1.15; }
.auth-visual p { color: #c2cde6; font-size: 15px; }
.auth-map { position: relative; height: 255px; margin-top: 32px; border-radius: 17px; overflow: hidden; border: 1px solid #758ac6; background: #e9edf3; box-shadow: 0 20px 60px #080e23aa; }
.auth-map img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }   /* 서울 지도 캡처(핀 5개) */
.auth-form { padding: 34px; display: grid; place-items: center; }
.auth-inner { width: min(100%, 390px); }
.auth-inner > .js-brand { margin-bottom: 30px; }
.auth-inner .brand-text small { color: #52617a; }
.auth-inner form { display: grid; gap: 14px; }
.auth-inner form .btn { margin-top: 3px; }
.auth-desc { color: var(--muted); margin: -5px 0 10px !important; }
.auth-switch { margin-top: 6px; text-align: center; color: var(--muted); font-size: 13px; }
.input-label { display: grid; gap: 5px; font-size: 12px; font-weight: 800; min-width: 0; }
.input-label .field, .input-label select, .input-label textarea { width: 100%; padding-left: 10px; font-weight: 500; background: #fff; }
.input-label textarea { resize: vertical; padding-top: 9px; min-height: 96px; }
.hint { font-size: 11px; font-weight: 500; color: var(--muted); }
.form-error { color: var(--danger); font-weight: 700; font-size: 12px; min-height: 0; }
.form-error:empty { display: none; }

/* ── 창(다이얼로그) ── */
.modal { position: fixed; inset: 0; z-index: 50; background: #0b17358c; display: flex; align-items: center; justify-content: center; padding: 12px; }
.dialog {
  width: min(565px, 100%); max-height: calc(100dvh - 24px); background: #fff; border: 1px solid var(--line); border-radius: 17px;
  box-shadow: 0 25px 100px #0515394a; display: flex; flex-direction: column; overflow: hidden;
}
.dialog.wide { width: min(860px, 100%); }
.dialog-head { padding: 15px 19px; border-bottom: 1px solid var(--line); background: #fff; flex: none; }
.dialog-head h2 { font-size: 18px; }
.dialog-body { padding: 18px 19px; display: grid; gap: 16px; overflow-y: auto; flex: 1; align-content: start; }
.dialog-actions { padding: 13px 19px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: #fff; flex: none; flex-wrap: wrap; }
.dialog-actions:empty { display: none; }
.dialog-actions .spacer { flex: 1; }

.detail-title { display: grid; gap: 5px; }
.detail-title .id { font-size: 12px; color: var(--muted); }
.detail-title h3 { font-size: 23px; letter-spacing: -.045em; line-height: 1.3; }
.detail-desc { white-space: pre-wrap; line-height: 1.75; font-size: 15px; }
.form-grid, .detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.detail-grid { margin: 0; }
.detail-grid div, .memo, .upload { background: #f7f9fd; border: 1px solid #e6ebf4; border-radius: 10px; padding: 10px 12px; min-width: 0; }
.detail-grid dt { font-size: 11px; font-weight: 700; color: var(--muted); }
.detail-grid dd { margin: 3px 0 0; overflow-wrap: anywhere; font-weight: 700; }
.full { grid-column: 1 / -1; }
.memo, .upload { display: grid; gap: 8px; }
.memo > strong, .upload > strong { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.memo > strong svg, .upload > strong svg { width: 16px; height: 16px; }
.memo p { font-size: 13px; white-space: pre-wrap; }
.memo .pin-row { display: flex; gap: 8px; }
.memo .pin-row input { width: 120px; padding: 0 10px; letter-spacing: 4px; }
.section-label { font-size: 12px; font-weight: 800; color: var(--muted); margin-bottom: -6px; }

/* 상태 스위치 */
.sw { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; user-select: none; cursor: pointer; }
.sw input { display: none; }
.sw .track { width: 38px; height: 22px; border-radius: 11px; background: #eb7830; position: relative; transition: .15s; flex: none; }
.sw .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .15s; box-shadow: 0 1px 2px #0003; }
.sw input:checked + .track { background: var(--blue); }
.sw input:checked + .track::after { left: 19px; }
.sw .lbl { color: var(--orange); }
.sw.done .lbl { color: #1e48b5; }

/* 미디어 */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border-radius: 10px; cursor: zoom-in; background: #e9edf3; display: block; }
.gallery.one { grid-template-columns: 1fr; }
.gallery.one img { aspect-ratio: auto; max-height: 55vh; object-fit: contain; background: #101b32; }
.videos { display: grid; gap: 8px; }
.videos video { width: 100%; max-height: 30vh; border-radius: 10px; background: #000; }
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.file-list li { display: flex; align-items: center; gap: 8px; font-size: 13px; background: #fff; border: 1px solid #e6ebf4; border-radius: 8px; padding: 6px 8px; }
.file-list li .fn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list li .fs-size { color: var(--muted); font-size: 12px; flex: none; }
.file-list:empty { display: none; }
.progress { height: 6px; background: #e1e7f1; border-radius: 3px; overflow: hidden; }
.progress div { height: 100%; width: 0; background: var(--blue); transition: width .2s; }

/* 등록·수정 폼 */
.form { display: grid; gap: 16px; }
.coord { font-size: 11px; color: var(--muted); font-weight: 500; }
.inline { display: flex; gap: 8px; align-items: center; }
.inline .field { flex: 1; min-width: 0; }
.kw-box { display: flex; flex-wrap: wrap; gap: 6px; }
.kw-box label.filter { cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.kw-box label.filter input { display: none; }
.kw-box label.filter:has(input:checked) { background: #edf2ff; border-color: #b8caff; color: #2049b4; }
.kw-box label.filter.new { border-style: dashed; }
.kw-box .x { border: 0; background: none; padding: 0 0 0 4px; color: #8a97ad; font-size: 12px; }

/* 위치 선택 */
.pick-body { gap: 10px; }
.pick-results { list-style: none; margin: 0; padding: 4px; display: grid; gap: 2px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.pick-results li { display: flex; align-items: flex-start; gap: 8px; padding: 7px 9px; border-radius: 7px; cursor: pointer; }
.pick-results li:hover { background: #f2f6ff; }
.pick-results li.on { background: var(--blue-bg); }
.pick-results li.muted { cursor: default; }
.pick-results li svg { width: 16px; height: 16px; margin-top: 2px; color: var(--blue-dark); }
.pick-results li span { display: grid; min-width: 0; }
.pick-results li strong { font-size: 13px; }
.pick-results li small { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-map { height: min(46vh, 420px); min-height: 280px; border-radius: 10px; overflow: hidden; }

/* 설정 페이지 */
.settings-wrap { display: flex; flex-wrap: wrap; gap: 16px; align-items: stretch; }
.settings-wrap > .surface { flex: 0 1 calc(50% - 8px); min-width: 0; display: flex; flex-direction: column; }
.settings-wrap .surface form, .settings-wrap .surface .set-body { padding: 19px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.settings-wrap .surface form > div:last-child:has(> .btn) { margin-top: auto; }   /* 버튼은 박스 아래쪽에 정렬 */
.icon-preview { gap: 14px; }
.brand-icon.lg { width: 64px; height: 64px; border-radius: 14px; }
.brand-icon.lg svg { width: 34px; height: 34px; }
@media (max-width: 1000px) { .settings-wrap > .surface { flex-basis: 100%; } }

/* 사진 크게 보기 */
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(5, 10, 25, .94); display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 100%; max-height: 88vh; object-fit: contain; }
.lb-close { position: absolute; top: max(10px, env(safe-area-inset-top)); right: 12px; font-size: 26px; background: none; border: 0; color: #fff; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); font-size: 46px; background: none; border: 0; color: #fff; padding: 10px 16px; opacity: .8; }
.lb-nav.prev { left: 0; } .lb-nav.next { right: 0; }
.lb-cap { position: absolute; bottom: max(14px, env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; color: #c2cde6; font-size: 13px; }

.message { position: fixed; z-index: 99; bottom: 20px; left: 50%; transform: translateX(-50%); background: #13233d; color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow); max-width: calc(100% - 32px); width: max-content; }

/* ── 반응형 ── */
@media (max-width: 1090px) {
  .split, .metrics { grid-template-columns: minmax(275px, .95fr) minmax(280px, 1.05fr); }
  .main { padding-left: 17px; padding-right: 17px; }
  .map { height: 470px; }
}
@media (max-width: 810px) {
  .layout { display: block; }
  .sidebar { display: none; }
  .brand-icon.sm { display: grid; }
  .mobile-nav { display: flex; background: #fff; border-bottom: 1px solid var(--line); padding: 4px 11px; gap: 2px; position: sticky; top: 0; z-index: 10; }
  .mobile-nav button { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 43px; background: #fff; border: 0; border-radius: 9px; color: var(--muted); font-size: 12px; font-weight: 700; padding: 0 6px; gap: 5px; }
  .mobile-nav svg { width: 16px; height: 16px; }
  .mobile-nav button[aria-current=page] { background: var(--blue-bg); color: var(--blue-dark); }
  .topbar { min-height: 56px; padding: 8px 14px; padding-top: max(8px, env(safe-area-inset-top)); }
  .topbar strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .main { padding-top: 21px; }
  .split { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1.4fr 2fr; gap: 14px; }
  .mobile-view { display: flex; gap: 4px; background: #e8edf7; border-radius: 9px; padding: 4px; margin-bottom: 12px; }
  .mobile-view button { flex: 1; min-height: 34px; background: transparent; border: 0; border-radius: 6px; color: var(--muted); font-weight: 700; }
  .mobile-view button[aria-pressed=true] { background: #fff; color: var(--blue-dark); box-shadow: 0 1px 3px #13294b16; }
  .split[data-view=list] .map-panel, .split[data-view=map] .list-panel { display: none; }
  #cardList { max-height: none; }
  .map { height: clamp(350px, 60vh, 560px); }
  .auth-brand { padding: 30px; }
  .auth-map { height: 210px; }
}
@media (max-width: 580px) {
  .main { padding: 18px 12px 24px; }
  .hero { align-items: flex-start; margin-bottom: 16px; }
  .hero p { font-size: 11px; margin-top: 5px; }
  .hero .btn { min-height: 36px; padding: 0 10px; font-size: 12px; gap: 4px; }
  .hero .btn svg { width: 14px; height: 14px; }
  .metrics, .metrics-sub { gap: 6px; }
  .metrics { margin-bottom: 14px; }
  .metric { padding: 8px; border-radius: 10px; }
  .metric-title { font-size: 10px; }
  .metric-icon { display: none; }
  .metric-value { font-size: 17px; margin-top: 5px; }
  .metric-value span { margin-left: 2px; }
  .panel-head { padding: 9px 12px; min-height: 47px; }
  .panel-head h2 { font-size: 17px; }
  .panel-controls, .record { padding-left: 12px; padding-right: 12px; }
  .auth { display: block; }
  .auth-brand { display: none; }
  .auth-form { min-height: 100dvh; padding: 23px; }
  .form-grid, .detail-grid { gap: 9px; }
  .modal { padding: 0; align-items: stretch; }
  .dialog, .dialog.wide { max-height: none; height: 100dvh; border-radius: 0; border: 0; }
  .dialog-head { padding: 10px 13px; padding-top: max(10px, env(safe-area-inset-top)); }
  .dialog-body { padding: 13px; }
  .dialog-actions { padding: 10px 13px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .dialog-actions .btn { font-size: 12px; padding: 0 10px; }
  .hide-sm { display: none; }
}
@media (max-width: 420px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* PC: 실적 목록 박스(최대 크기)와 지도 박스를 같은 높이로 — 목록은 안에서 스크롤, 지도는 남은 높이를 채움 */
@media (min-width: 811px) {
  .split { align-items: stretch; }
  .split > .panel { height: 830px; display: flex; flex-direction: column; }
  .list-panel #cardList { flex: 1; min-height: 0; max-height: none; }
  .map-panel .map-wrap { flex: 1; min-height: 0; }
  .map-panel .map { height: 100%; }
}

/* 파일 선택 버튼: 기본 브라우저 버튼 대신 시안 버튼 모양 */
input[type=file] { font-size: 12px; color: var(--muted); max-width: 100%; }
input[type=file]::file-selector-button {
  min-height: 38px; margin-right: 10px; padding: 0 14px; border: 1px solid #b8caff; border-radius: 9px;
  background: var(--blue-bg); color: var(--blue-dark); font: 700 13px Geist, 'Noto Sans KR', sans-serif; cursor: pointer; transition: background .15s;
}
input[type=file]::file-selector-button:hover { background: #dce6ff; }
.inline > .btn { min-height: 40px; }   /* 입력칸 옆 버튼(추가·지도에서 선택)은 입력칸 높이에 맞춤 */
.memo .pin-row input::placeholder { letter-spacing: normal; }   /* 안내 문구는 글자 간격 그대로, 입력한 숫자만 벌어지게 */
@media (max-width: 810px) {
  /* 모바일: 입력 글자 16px — 아이폰에서 입력칸을 누를 때 화면이 확대되는 현상 방지 */
  .field, .search input, select.field, textarea.field { font-size: 16px; }
}

/* 지도에서 지점 선택 → 실적/고객 등록 선택 */
.pick-choice { display: grid; gap: 14px; }
.pick-where { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #f6f8fc; }
.pick-where svg { width: 20px; height: 20px; flex: none; color: #16a34a; fill: none; stroke: currentColor; stroke-width: 2; margin-top: 2px; }
.pick-where div { display: grid; gap: 3px; min-width: 0; }
.pick-where small { color: var(--muted); font-size: 11px; }
.pick-choice > p { margin: 0; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { display: grid; justify-items: center; gap: 6px; padding: 18px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font: inherit; color: inherit; transition: border-color .15s, background .15s; }
.choice:hover, .choice:focus-visible { border-color: #3164f4; background: #f3f6ff; outline: none; }
.choice svg { width: 28px; height: 28px; fill: none; stroke: #3164f4; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.choice[data-choose="customer"] svg { stroke: #d46024; }
.choice strong { font-size: 15px; }
.choice small { color: var(--muted); font-size: 11px; }
