/* 업무 화면 공통 (견적 · 고객 · 행사 · 대시보드) */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.grid > .span2 { grid-column: span 2; }
.grid > .span4 { grid-column: 1 / -1; }
.grid input, .grid select, .grid textarea { width: 100%; }
.grow { flex: 1 1 160px; min-width: 0; }
.right { text-align: right; }
.filters { gap: 8px !important; }
.filters input, .filters select { width: 100%; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink); font-weight: 400; }
.row.head { align-items: center; }
.row.head h1 { margin-right: 4px; }
.pick { display: flex; flex-wrap: wrap; gap: 6px; }
.pick:empty { display: none; }
.pick button { padding: 5px 10px; font-size: 13px; background: var(--tint); }
.list button .tag { margin-right: 6px; }
h3 { font-size: 13.5px; font-weight: 650; margin: 0; }

/* 숫자 타일 */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.tiles > div, .tiles > a { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: #FBFCFD; min-width: 0; text-decoration: none; color: inherit; }
.tiles b { display: block; font-size: 20px; font-weight: 650; letter-spacing: -.3px; line-height: 1.4; }
.tiles .muted { font-size: 12.5px; display: block; }
.tiles .bad { border-color: #E9C3A6; background: #FFFAF6; }
.tiles .bad b { color: var(--warn); }

/* 일정 */
.days { gap: 18px !important; }
.day { border: 1px solid var(--line); border-radius: var(--radius); background: #FBFCFD; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.day h3 { display: flex; gap: 10px; align-items: baseline; }
.day .hint { padding: 4px 2px; }
.item { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; }
.item.dragging { opacity: .45; }
.item.over { border-color: var(--blue); box-shadow: 0 -2px 0 var(--blue); }
.item .grip { cursor: grab; color: var(--faint); padding: 6px 2px; letter-spacing: -2px; user-select: none; }
.item .time { display: flex; flex-direction: column; gap: 2px; width: 104px; font-size: 12.5px; }
.item .time input { padding: 5px 6px; font-size: 13px; width: 100%; }
.item .what { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.item .what .row { gap: 6px; flex-wrap: nowrap; }
.item .what input, .item .what select { padding: 5px 8px; font-size: 13.5px; }
.item .what .memo { font-size: 12.5px; color: var(--sub); width: 100%; }
.item .mini { width: 84px; font-size: 11.5px; gap: 3px; }
.item .mini input { padding: 5px 6px; font-size: 13px; width: 100%; }
.item .acts { display: flex; gap: 4px; padding-top: 16px; }
.item .acts button { padding: 4px 8px; font-size: 12.5px; }
.add { display: flex; flex-direction: column; gap: 6px; }
.add .row { gap: 6px; }
.add input[type=number] { width: 76px; }
.add input, .add select, .add button { padding: 6px 9px; font-size: 13.5px; }

/* 원가 · 표 안 입력 */
table.costs td { padding: 6px 8px; vertical-align: middle; }
table.costs td input:not(.w-num):not(.w-s) { width: 100%; min-width: 120px; }
.w-num { width: 116px; }
.w-s { width: 72px; }
td.right, th.right { text-align: right; }
table.plain td, table.plain th { padding: 8px 12px; }
tr.click { cursor: pointer; }
tr.dim td { color: var(--faint); }

/* 내부 화면 탭 */
.subtabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 8px; }
.subtabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 10px 12px; color: var(--sub); font-size: 13.5px; margin-bottom: -1px; }
.subtabs button:hover { background: none; color: var(--ink); }
.subtabs button.on { color: var(--navy); font-weight: 650; border-bottom-color: var(--navy); }

/* 메모 기록 */
.notes { display: flex; flex-direction: column; gap: 8px; }
.note { border: 1px solid var(--line); border-radius: 6px; padding: 9px 12px; background: #FBFCFD; white-space: pre-wrap; }
.note.pinned { border-color: #C9D5EA; background: var(--blue-bg); }
.note .meta { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--sub); margin-top: 4px; white-space: normal; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.facts dt { color: var(--sub); font-size: 12.5px; }
dl.facts dd { margin: 0; }

/* 고객용 견적 (/q/토큰) · 행사지시서: 종이처럼 */
.sheet { max-width: 820px; margin: 0 auto; background: #fff; min-height: 100vh; padding: 0 0 48px; }
.sheet > header { background: var(--navy); color: #fff; padding: 26px 28px 22px; }
.sheet > header .agency { font-size: 13px; color: #C5D0E3; }
.sheet > header h1 { font-size: 23px; margin-top: 6px; }
.sheet > header p { color: #DCE4F2; margin-top: 6px; font-size: 14px; }
.sheet section { padding: 22px 28px 0; }
.sheet h2 { font-size: 15px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 2px solid var(--navy); }
.sheet .price { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.sheet .price div { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.sheet .price b { display: block; font-size: 18px; }
.sheet .dayhead { font-weight: 650; margin: 16px 0 6px; color: var(--navy); }
.sheet .line { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.sheet .line .t { width: 96px; flex: none; color: var(--sub); font-size: 13px; padding-top: 1px; }
.sheet .line .b { flex: 1; min-width: 0; }
.sheet .line .b small { display: block; color: var(--sub); font-size: 12.5px; }
.sheet .line img { width: 120px; height: 80px; object-fit: cover; border-radius: 6px; flex: none; }
.sheet pre.text { margin: 0; font: inherit; white-space: pre-wrap; color: var(--ink); }
.sheet footer { padding: 26px 28px 0; color: var(--sub); font-size: 13px; }
.sheet .tools { padding: 14px 28px 0; display: flex; gap: 8px; }

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .sheet section, .sheet > header, .sheet footer, .sheet .tools { padding-left: 18px; padding-right: 18px; }
  .sheet .line img { width: 84px; height: 60px; }
}
@media print {
  body { background: #fff; }
  .topbar, .side, .tools, .noprint { display: none !important; }
  .sheet { max-width: none; }
  .sheet > header { background: none; color: #000; border-bottom: 2px solid #000; padding-left: 0; padding-right: 0; }
  .sheet > header .agency, .sheet > header p { color: #333; }
  .sheet section, .sheet footer { padding-left: 0; padding-right: 0; }
  .panel { box-shadow: none; }
}

/* 행사 화면 보강: 엑셀로 받기 링크 · 여권번호 보기 · 엑셀에서 붙여넣기 · 열람 기록 */
a.dl { font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; }
a.dl:hover { text-decoration: underline; }
.reveal { font-family: ui-monospace, Consolas, monospace; font-size: 13px; font-weight: 650; letter-spacing: .5px; white-space: nowrap; align-self: center; user-select: all; }
.paste form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.paste textarea { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; white-space: pre; overflow-x: auto; tab-size: 14; }
.loglist { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--sub); }

/* ─────────────────────────────────────────────
   실시간 행사 일정 (모듈 8): /live.html (OP) · /g/토큰 (가이드) · /t/토큰 (고객)
   ───────────────────────────────────────────── */
/* OP 화면 */
.live-link { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.live-link input { flex: 1 1 300px; min-width: 0; font-size: 12.5px; color: var(--sub); background: #FAFBFC; }
.live-log { list-style: none; margin: 0; padding: 0; }
.live-log li { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.live-log li:last-child { border-bottom: 0; }
.live-log li .muted { flex: none; font-size: 12.5px; }
.item[class*="live-"] .time { width: 132px; }
.item.live-done { background: #F7FAF8; border-color: #CFE3D6; }
.item.live-skipped { background: #FAFAFB; }
.item.live-skipped .what input.grow { color: var(--faint); text-decoration: line-through; }

/* 가이드 · 고객 화면 (휴대폰) */
.mobile > header .langs { display: flex; gap: 6px; margin-top: 14px; }
.mobile > header .langs button { padding: 8px 14px; font-size: 14px; background: transparent; color: #C5D0E3; border-color: #41557E; }
.mobile > header .langs button.on { background: #fff; color: var(--navy); border-color: #fff; font-weight: 650; }
.mobile main h2 { font-size: 15px; margin-bottom: 8px; }
.live-days { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.live-days button { flex: none; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 76px; padding: 9px 12px; font-size: 15px; line-height: 1.3; }
.live-days button small { font-size: 11.5px; font-weight: 400; color: var(--sub); }
.live-days button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.live-days button.on small { color: #C5D0E3; }
.live-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: -12px; }
.live-bar > i { display: block; height: 100%; background: var(--ok); transition: width .2s; }
.live-card { border: 1px solid var(--line-strong); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: #fff; margin-top: -8px; }
.live-card.now { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-bg); }
.live-card.done { background: #F7FAF8; border-color: #CFE3D6; }
.live-card.skipped { background: #FAFAFB; }
.live-card .when { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: 14px; color: var(--sub); }
.live-card .when b { color: var(--ink); font-size: 15px; }
.live-card .ttl { font-size: 18px; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.live-card.done .ttl { color: var(--sub); }
.live-card.skipped .ttl { color: var(--faint); text-decoration: line-through; }
.live-card .sub { font-size: 13.5px; color: var(--sub); overflow-wrap: anywhere; }
.live-card .btns, .live-card .tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.live-card .btns { margin-top: 4px; }
.live-card .tools { border-top: 1px dashed var(--line-strong); padding-top: 10px; }
.live-card .wide { grid-column: 1 / -1; }
.live-card .tools .row { flex-wrap: nowrap; align-items: stretch; }
.live-card .tools .row input { flex: 1; min-width: 0; }
.live-card button { min-height: 48px; white-space: normal; }
.live-notice { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 18px; }
.live-notice h2 { margin-bottom: 0 !important; }
.live-info { white-space: pre-line; font-size: 15px; overflow-wrap: anywhere; }
.live-state { font-size: 12px; color: var(--faint); text-align: center; }
.live-banner { position: sticky; top: 0; z-index: 4; background: var(--warn-bg); color: #7A3208; border-bottom: 1px solid #E9C3A6; padding: 12px 20px; display: flex; flex-direction: column; gap: 6px; }
.live-banner b { font-size: 15.5px; }
.live-banner ul { margin: 0; padding-left: 18px; font-size: 14px; }
.live-banner button { align-self: flex-start; padding: 8px 16px; font-size: 14px; margin-top: 2px; }
.live-dayhead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 650; font-size: 15px; color: var(--navy); margin-top: 14px; padding-bottom: 6px; border-bottom: 2px solid var(--navy); scroll-margin-top: 8px; }
.live-dayhead .tag { margin-left: 6px; }
.live-line { display: flex; gap: 8px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.live-line .mark { width: 18px; flex: none; color: var(--ok); font-weight: 700; }
.live-line .t { width: 46px; flex: none; color: var(--sub); font-size: 14px; padding-top: 1px; }
.live-line .b { flex: 1; min-width: 0; font-size: 15.5px; overflow-wrap: anywhere; }
.live-line .b small { display: block; color: var(--sub); font-size: 13px; }
.live-line.done .ttl { color: var(--sub); }
.live-line.skipped .ttl { color: var(--faint); text-decoration: line-through; }
.live-line.now { background: var(--blue-bg); border-radius: 8px; border-bottom-color: transparent; margin: 0 -10px; padding: 12px 10px; }
.live-line.now .ttl { font-weight: 650; }

/* ─────────────────────────────────────────────
   출력 양식 개인화 (로고 · 담당자) + 내 장소
   고객용 견적 · 행사지시서 · 고객 실시간 일정이 같은 머리 · 꼬리를 쓴다 (common.js 의 docBrand / docManager / docFooter)
   ───────────────────────────────────────────── */
.doc-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.doc-logo { flex: none; width: auto; height: auto; max-width: 168px; max-height: 46px; object-fit: contain; background: #fff; border-radius: 6px; padding: 4px 7px; }
.mobile > header .doc-logo { max-width: 132px; max-height: 38px; }
.mobile > header .doc-brand { margin-bottom: 6px; }
.sheet > header .doc-manager { font-size: 13px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .22); }
.sheet footer { border-top: 1px solid var(--line); margin: 26px 28px 0; padding: 14px 0 0; }
.sheet footer p + p { margin-top: 3px; }
.sheet footer .pre { white-space: pre-line; }

/* 설정: 로고 올리기 · 문서 표시 설정 */
.logo-pick { flex-direction: row !important; flex-wrap: wrap; align-items: center; gap: 16px !important; border-bottom: 1px solid var(--line); }
.logo-box { flex: none; width: 190px; height: 76px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: #FBFCFD; font-size: 12.5px; }
.logo-preview { max-width: 168px; max-height: 60px; width: auto; height: auto; object-fit: contain; }
.logo-side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.logo-side .muted { font-size: 12.5px; }
label.filebtn { flex-direction: row; align-items: center; cursor: pointer; border: 1px solid var(--line-strong); border-radius: 6px; padding: 7px 12px; font-size: 13.5px; font-weight: 500; color: var(--ink); background: var(--surface); }
label.filebtn:hover { background: var(--tint); }
label.filebtn input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
label.filebtn:focus-within { outline: 2px solid var(--blue); outline-offset: 1px; }
.docflags { align-items: center; gap: 8px 18px; }

/* 견적: 내 장소로 저장 · 내 장소 관리 */
.add label.check { font-size: 12.5px; color: var(--sub); white-space: nowrap; align-self: center; }
.side-note { gap: 4px !important; }
.side-note .muted { font-size: 12.5px; }
.grid > p.hint { margin: 0; font-size: 12.5px; align-self: end; }

@media (max-width: 520px) {
  .sheet footer { margin-left: 18px; margin-right: 18px; }
  .doc-logo { max-width: 120px; max-height: 38px; }
}
@media print {
  /* 로고는 그림이라 배경 인쇄를 꺼도 찍힌다. 흰 바탕 여백만 걷어 낸다. */
  .doc-logo { padding: 0; border-radius: 0; max-height: 52px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sheet > header .doc-manager { border-top: 0; padding-top: 0; margin-top: 6px; color: #333; }
  .sheet footer { margin-left: 0; margin-right: 0; border-top-color: #999; }
}

/* ── 카카오 알림톡 설정 (해피콜 › 문자 연결 패널) ── */
.kakao { border-top: 1px solid var(--line); }
.kakao-row { display: flex; flex-direction: column; gap: 6px; border-top: 1px dashed var(--line-strong); padding-top: 12px; }
.kakao-head { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; justify-content: space-between; }
.kakao-head .tag { margin-right: 0; }
.kakao-head button { padding: 4px 10px; font-size: 12.5px; }
.kakao-row textarea { font-size: 12.5px; background: var(--tint); color: var(--ink); resize: none; overflow-wrap: anywhere; }
.kakao-on { flex-direction: row; align-items: center; gap: 6px; }
.side .body .kakao-on input { width: 15px; }

/* ── 여권 사진으로 채우기 (passport-ocr.js): 버튼 · 진행 안내 · 읽은 내용 확인 상자 ── */
.pp-scan { display: inline-flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.pp-scan .pp-status:empty { display: none; }
.pp-scan .pp-status { font-size: 12.5px; }
td .pp-scan { flex-wrap: nowrap; }
td .pp-scan button { font-size: 12.5px; padding: 5px 8px; white-space: nowrap; }
td .pp-scan .pp-status { max-width: 220px; white-space: normal; }
.pp-add { align-items: center; }
.pp-add > .muted, .pp-fill .row > .muted { font-size: 12.5px; }
.pp-fill { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.pp-fill .row { align-items: center; }
.pp-confirm { border-color: var(--navy); background: #fff; }
.pp-confirm label { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--sub); }
.pp-confirm label .tag { align-self: flex-start; margin-left: 0; }
label.doubt input, label.doubt select { border-color: var(--warn); background: var(--warn-bg); }

/* ── 캐리어 태그 (tags.html): 주문 금액 · 태그 번호 ── */
.stack { display: flex; flex-direction: column; gap: 18px; }
.tag-sum { display: flex; flex-wrap: wrap; gap: 12px; }
.tag-sum > div { flex: 1 1 200px; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: #FBFCFD; min-width: 0; }
.tag-sum b { display: block; font-size: 20px; font-weight: 650; letter-spacing: -.3px; line-height: 1.4; }
.tag-sum .muted { font-size: 12.5px; display: block; }
.tag-sum .total { border-color: #C9D5EA; background: var(--blue-bg); }
.tag-sum .total b { color: var(--navy); }
.tag-logo { max-height: 30px; }
.tag-each > summary { margin-bottom: 2px; }
.tag-each[open] > * + * { margin-top: 14px; }
.tag-each textarea { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.tag-group h3 { margin-bottom: 6px; }
.tag-group h3 .muted { font-weight: 400; }
.tag-codes { max-height: 220px; overflow-y: auto; }
.tag-codes button { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; letter-spacing: .5px; padding: 3px 8px; }

/* ── 대시보드 달력 (dashboard.js): 월 격자 · 행사 막대 · 그날의 행사 ── */
.cal-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-nav h2 { font-size: 16px; min-width: 104px; text-align: center; }
.cal-head, .cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head { border-bottom: 1px solid var(--line); background: #FAFBFC; font-size: 12.5px; font-weight: 500; color: var(--sub); }
.cal-head span { padding: 6px 8px; }
.cal-head .wkend { color: var(--faint); }
.cal-week { grid-template-rows: 28px repeat(3, 22px) 20px; border-bottom: 1px solid var(--line); }
.cal-day {
  grid-row: 1 / -1; min-width: 0; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: var(--surface); padding: 4px 6px 2px;
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; text-align: left; font-weight: 400; user-select: none;
}
.cal-day:nth-child(7) { border-right: 0; }
.cal-day:hover { background: #FAFBFD; border-color: var(--line); }
.cal-day .num { font-size: 12.5px; line-height: 20px; min-width: 20px; padding: 0 4px; border-radius: 10px; text-align: center; color: var(--ink); }
.cal-day.wkend { background: #FCFCFD; }
.cal-day.wkend .num { color: var(--faint); }
.cal-day.out { background: var(--bg); }
.cal-day.out .num { color: #B4BCC9; }
.cal-day.today .num { background: var(--navy); color: #fff; font-weight: 650; }
.cal-day.open { background: var(--blue-bg); }
.cal-day.sel { box-shadow: inset 0 0 0 2px var(--blue); }
.cal-day:focus-visible { box-shadow: inset 0 0 0 2px var(--blue), inset 0 0 0 4px rgba(31, 58, 104, .2); }
.cal-day .more { font-size: 11.5px; line-height: 16px; color: var(--sub); padding: 0 2px; border-radius: 3px; }
.cal-day .more:hover { color: var(--navy); text-decoration: underline; }
.cal-day .dots { display: none; }
.cal-bar {
  z-index: 1; align-self: center; min-width: 0; height: 19px; margin: 0 3px; padding: 0 6px; border-radius: 4px; border: 1px solid transparent;
  display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 17px; text-decoration: none; overflow: hidden; white-space: nowrap;
}
.cal-bar:hover { filter: brightness(.94); }
.cal-bar .nm { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.cal-bar .px { flex: none; opacity: .8; }
.cal-bar.cont-l { margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; border-left-width: 0; }
.cal-bar.cont-r { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; border-right-width: 0; }
/* 상태별 색: 모객 중(테두리만) · 출발 확정(남색) · 여행 중(초록) · 종료(회색) · 취소(점선, 흐리게) */
.cal-bar.st-recruiting, .cal-legend i.st-recruiting, .dots i.st-recruiting { background: #fff; border-color: #8FA3C4; color: var(--navy); }
.cal-bar.st-confirmed, .cal-legend i.st-confirmed, .dots i.st-confirmed { background: var(--blue); border-color: var(--blue); color: #fff; }
.cal-bar.st-departed, .cal-legend i.st-departed, .dots i.st-departed { background: var(--ok); border-color: var(--ok); color: #fff; }
.cal-bar.st-completed, .cal-legend i.st-completed, .dots i.st-completed { background: #E3E7ED; border-color: #E3E7ED; color: var(--sub); }
.cal-bar.st-canceled, .cal-legend i.st-canceled, .dots i.st-canceled { background: #fff; border-color: var(--line-strong); border-style: dashed; color: var(--faint); }
.cal-bar.st-canceled .nm { text-decoration: line-through; }
.cal-bar .flag, .cal-legend .flag { flex: none; width: 6px; height: 6px; border-radius: 50%; background: #E8862E; box-shadow: 0 0 0 1px #fff; }
.cal-foot { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: space-between; align-items: center; padding: 10px 14px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--sub); }
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cal-legend :where(i[class^=st-]) { width: 16px; height: 10px; border-radius: 3px; border: 1px solid transparent; }
.cal-foot .hint { font-size: 12.5px; }
.cal-grid > .msg { margin: 14px; }
.cal-group { display: flex; flex-direction: column; gap: 6px; }
.cal-group h3 { color: var(--sub); font-size: 12.5px; }
.cal-item { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px; background: #FBFCFD; text-decoration: none; color: inherit; min-width: 0; }
.cal-item:hover { border-color: #AEB8C6; background: var(--tint); }
.cal-item b { font-weight: 650; overflow-wrap: anywhere; }
.cal-item .muted { font-size: 12.5px; }
.cal-item .meta { display: flex; flex-wrap: wrap; gap: 4px 2px; align-items: center; }
.cal-item.st-canceled b { color: var(--faint); text-decoration: line-through; }
@media (max-width: 1040px) {
  .cal-wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  /* 좁은 화면: 막대 대신 점 + 건수. 날짜를 누르면 아래에 그날의 행사가 열린다. */
  .cal-week { grid-template-rows: auto; }
  .cal-bar, .cal-day .more, .cal-foot .hint { display: none; }
  .cal-day { min-height: 54px; padding: 4px 1px; align-items: center; justify-content: flex-start; gap: 4px; }
  .cal-day .dots { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px; }
  :where(.cal-day .dots) i { width: 6px; height: 6px; border-radius: 50%; border: 1px solid transparent; }
  .cal-day .dots em { font-style: normal; font-size: 11px; line-height: 12px; color: var(--sub); margin-left: 1px; }
  .cal-head span { padding: 6px 0; text-align: center; }
  .cal-nav h2 { min-width: 88px; }
}
td.cal-ttl { min-width: 180px; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  /* 숫자 타일은 두 줄씩: 달력이 첫 화면에서 멀어지지 않게 */
  .dash-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dash-tiles > a { padding: 9px 10px; }
  .dash-tiles b { font-size: 17px; overflow-wrap: anywhere; }
}

/* ── 사진 드라이브 (drive.html · 내 장소의 사진 칸 · 고르기 창): 사용량 막대 · 올리기 · 사진 격자 ── */
.drive-msg { white-space: pre-line; }
.drive-usage { display: flex; flex-direction: column; gap: 6px; }
.drive-usage .row { align-items: baseline; }
.drive-usage b { font-size: 17px; font-weight: 650; }
.drive-usage p { margin: 0; }
.meter { height: 8px; border-radius: 4px; background: var(--tint); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--blue); border-radius: 4px; min-width: 2px; }
.meter.warn > span { background: #C77A1E; }
.meter.full > span { background: var(--warn); }
.drive-rule { margin: 0; font-size: 13.5px; font-weight: 500; color: var(--navy); }
.drive-drop { border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: #FBFCFD; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; }
.drive-drop.over { border-color: var(--blue); background: var(--blue-bg); }
.drive-drop p { margin: 0; }
.drive-drop .muted { font-size: 12.5px; }
.drive-upfolder { flex-direction: row; align-items: center; gap: 8px; }
.drive-upfolder input { width: 200px; }
.drive-progress { display: flex; gap: 10px; align-items: center; }
.drive-progress:empty { display: none; }
.drive-progress progress { width: 220px; }
.drive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.drive-grid > .empty { grid-column: 1 / -1; }
.drive-card { display: flex; flex-direction: column; gap: 3px; padding: 6px; text-align: left; font-weight: 400; white-space: normal; min-width: 0; }
.drive-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 5px; background: var(--tint); display: block; }
.drive-card .cap { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drive-card .muted { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
dialog.drive-dialog { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 0; width: min(880px, calc(100vw - 24px)); max-height: calc(100vh - 32px); color: var(--ink); box-shadow: 0 12px 40px rgba(20, 39, 74, .25); }
dialog.drive-dialog::backdrop { background: rgba(20, 39, 74, .45); }
.drive-dialog > header { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.drive-dialog > header h2 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.drive-dialog > .row { padding: 12px 16px 0; }
.drive-dialog > .drive-grid { padding: 12px 16px 16px; }
.drive-detail { display: flex; flex-wrap: wrap; gap: 16px; padding: 16px; align-items: flex-start; }
.drive-detail img.big { flex: 1 1 380px; min-width: 0; max-width: 100%; max-height: 62vh; object-fit: contain; background: var(--tint); border-radius: 6px; }
.drive-detail form { flex: 1 1 260px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.drive-detail form input { width: 100%; }
.drive-detail form p { margin: 0; }
.place-photo { display: flex; flex-direction: column; gap: 6px; }
.place-photo .lbl { font-size: 12.5px; font-weight: 500; color: var(--sub); }
.place-photo > .row { align-items: center; gap: 14px; }
.photo-frame { flex: none; width: 180px; height: 120px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: #FBFCFD; overflow: hidden; text-align: center; padding: 0 6px; }
.photo-frame img { width: 180px; height: 120px; object-fit: cover; margin: 0 -6px; max-width: none; }
.photo-btns { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.photo-btns .muted { font-size: 12.5px; }
.place-photo .msg { margin: 0; }
@media print {
  /* 고객용 견적의 장소 사진: 종이에서 크기를 고정하고, 사진이 든 줄이 쪽 사이에서 잘리지 않게 */
  .sheet .line { break-inside: avoid; page-break-inside: avoid; }
  .sheet .line img { width: 30mm; height: 20mm; max-width: 30mm; object-fit: cover; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* 이용 요금: 상태 띠(모든 화면) · 설정의 요금 표 */
.bill-banner { padding: 8px 18px; background: #eef4ff; border-bottom: 1px solid #d5e2fb; font-size: 14px; }
.bill-banner.warn { background: #fff4e0; border-bottom-color: #f1d9a8; }
.bill-banner a { font-weight: 600; }
table.bill { border-collapse: collapse; min-width: 320px; margin-bottom: 12px; }
table.bill td { padding: 4px 18px 4px 0; }
table.bill td.num { text-align: right; padding-right: 0; }
table.bill tr.sum td { border-top: 1px solid #dfe3ec; font-weight: 700; padding-top: 8px; }
.bill-pay { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; margin-bottom: 12px; background: #fff8e8; border: 1px solid #f1d9a8; border-radius: 8px; }
table.bill-list { border-collapse: collapse; margin-top: 14px; }
table.bill-list th, table.bill-list td { text-align: left; padding: 6px 18px 6px 0; border-bottom: 1px solid #eef0f5; font-size: 14px; }
@media print { .bill-banner { display: none; } }

/* 행사 > 예약 · 명단: 일행별 탭 + 전체 표 */
.party-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.party-tabs button { padding: 6px 12px; border-radius: 999px; font-size: 13.5px; }
.party-tabs button.on { background: #16213d; color: #fff; border-color: #16213d; }
.party-tabs button.due:not(.on) { border-color: #e2b25a; }
.party-tabs button.off:not(.on) { color: #99a; text-decoration: line-through; }
table.party-all tbody tr { cursor: pointer; }
table.party-all tbody tr:hover { background: #f4f6fa; }

/* 해피콜 왼쪽: 솔라피 연결 · 알림톡 문구는 접어 두고 필요한 것만 펼친다 */
details.fold > summary { padding: 12px 16px; cursor: pointer; font-size: 14px; color: #445; }
details.kakao-row > summary { cursor: pointer; list-style: revert; }
details.kakao-row > summary.kakao-head { display: list-item; }
details.kakao-row > summary.kakao-head .tag { float: right; }
details.kakao-row[open] > summary { margin-bottom: 8px; }

details.kakao-row { display: block; }
details.kakao-row > * + * { margin-top: 6px; }
details.kakao-row > textarea, details.kakao-row > input { width: 100%; box-sizing: border-box; }

/* 견적 기본 정보: 줄 단위 · 숫자 칸은 작게 · 항공편 */
label.wide { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
label.wide input { width: 100%; }
.qrow { align-items: flex-end; gap: 10px 14px; margin-bottom: 12px; }
.qrow > label { display: flex; flex-direction: column; gap: 4px; }
.qrow > label.grow { flex: 1 1 180px; min-width: 140px; }
.qrow > label.grow input { width: 100%; }
.qrow .unit { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.qrow .unit input.w-s { width: 58px; }
.qrow input[type=time] { width: 128px; }
.qrow input[type=date] { width: 150px; }
.qrow label.check { flex-direction: row; align-items: center; gap: 6px; padding-bottom: 8px; white-space: nowrap; }
.qrow .leg { width: 52px; padding-bottom: 9px; }
.flights { border-top: 1px dashed var(--line-strong); padding-top: 12px; margin-bottom: 4px; }
.flights > p { margin: 0 0 10px; }
/* 일정 줄: 시각 칸이 잘리지 않게 ('오전 09:00') */
.item .time { width: 132px; }
.item .mini-gap { width: 178px; }
@media (max-width: 720px) { .item .mini-gap { display: none; } }

/* ── 화면 정리 (12-04): 목록 칸 넓게 · 한 줄 요약 · 요약 칸 꽉 채우기 · 휴대폰 ── */
.side { flex-basis: 340px; max-width: 380px; }
.list button .muted, .list button .one-line { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list button .one-line { font-weight: 500; }
.list button br { display: none; }
.tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
table.rows tbody tr { cursor: pointer; }
table.rows tbody tr:hover { background: #f4f6fa; }
.back-list { display: none; }
.steps { display: flex; flex-direction: column; gap: 10px; }
.step { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; }
.step .no { flex: none; width: 28px; height: 28px; border-radius: 50%; background: #16213d; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.step.done { background: #f7faf7; }
.step.done .no { background: #2e7d4f; }
.step > div { flex: 1; min-width: 0; }
.step p { margin: 2px 0 0; font-size: 13px; }
.step a.btn { flex: none; padding: 8px 14px; border-radius: 6px; background: #16213d; color: #fff; text-decoration: none; font-weight: 600; font-size: 13.5px; }
@media (max-width: 720px) {
  .side { flex-basis: auto; max-width: none; width: 100%; }
  html.has-detail .page > .side { display: none; }
  html.has-detail .back-list { display: inline-flex; align-self: flex-start; padding: 6px 12px; font-size: 13.5px; }
  .page > .main { flex-basis: 100%; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tiles b { font-size: 17px; }
  .only-wide { display: none; }
  table.party-all th:nth-child(2), table.party-all td:nth-child(2), table.party-all th:nth-child(8), table.party-all td:nth-child(8) { display: none; }
  table.party-all td:first-child span { display: block; }
  .step { flex-wrap: wrap; }
  .topbar { overflow-x: auto; flex-wrap: nowrap; white-space: nowrap; }
}
.tiles b { font-size: 18px; white-space: nowrap; }
@media (min-width: 721px) { html.list-in-main .page > .side .list { display: none; } }
@media (max-width: 720px) {
  table.party-all td:first-child span { display: none; }
  table.party-all th:nth-child(7), table.party-all td:nth-child(7) { display: none; }
  table.party-all td, table.party-all th { padding-left: 6px; padding-right: 6px; white-space: nowrap; }
}

/* 화면 좌우 여백: 넓은 화면에서 내용이 가장자리에 붙지 않게 */
@media (min-width: 721px) {
  .page { padding: 26px 40px 56px; max-width: 1640px; margin: 0 auto; }
  .topbar { padding: 0 max(40px, calc((100% - 1640px) / 2 + 40px)); }
}
/* 6칸 격자: 예약 입력 · 명단 줄 · 펼친 칸 · 추가 줄이 모두 같은 세로줄에 맞는다 (엑셀처럼) */
.g6 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px 12px; align-items: end; }
.g6 > .c2 { grid-column: span 2; }
.g6 > .c3 { grid-column: span 3; }
.g6 > .from1 { grid-column-start: 1; }
.g6.form label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--sub); min-width: 0; }
.g6.form input, .g6.form select, .g6.form button { width: 100%; min-width: 0; }
.g6.form .row { flex-wrap: nowrap; gap: 6px; }
.g6.form .row input { flex: 1; }
.g6.form .row button { width: auto; flex: none; }
/* 명단: 한 줄 요약 + 눌러서 펼치기 */
.tv-head { align-items: baseline; margin-top: 6px; }
.tvs { border-top: 1px solid var(--line); }
.tvs .g6 { align-items: center; }
.tv-th { padding: 7px 0; font-size: 12.5px; color: var(--sub); border-bottom: 1px solid var(--line); }
.tvs .tv { padding: 9px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.tvs .tv:hover { background: #F5F7FA; }
.tvs .tv.open { background: #EEF2F8; border-bottom-color: transparent; }
.tvs .tv > div { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-last { display: flex; justify-content: space-between; gap: 8px; }
.tv-edit { background: #F7F9FC; padding: 12px 0 14px; border-bottom: 1px solid var(--line); }
.tv-acts { margin-top: 12px; align-items: center; }
.tvs .empty { margin: 0; padding: 14px 0; }
@media (max-width: 720px) {
  .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g6 > .c3 { grid-column: span 2; }
  .g6 > .from1 { grid-column-start: auto; }
  .tv-th { display: none; }
  .tvs .tv > div { white-space: normal; }
}
button.link { border: 0; background: none; padding: 2px 4px; color: var(--blue); font-size: 13px; cursor: pointer; }
button.link:hover { text-decoration: underline; }
button.danger { color: #B42318; border-color: #F0C4BF; background: #fff; }
/* 시각 칸: 숫자만 쳐서 넣는다 */
input.time-in { width: 68px !important; min-width: 0 !important; text-align: center; font-variant-numeric: tabular-nums; }
input.time-in.bad { border-color: #D92D20; background: #FEF3F2; }
.item .time { width: 92px; }
/* 견적 요금: 1인 요금이 먼저, 그 아래 총 금액 */
.fares { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.fares label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: #FBFCFD; min-width: 0; }
.fares .won { display: flex; align-items: center; gap: 6px; font-weight: 500; color: var(--sub); }
.fares .won input { flex: 1; min-width: 0; font-size: 17px; font-weight: 650; text-align: right; }
.fares .muted { font-size: 12.5px; font-weight: 400; }
.fare-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-top: 12px; padding: 12px 14px; border-radius: var(--radius); background: #EEF2F8; }
.fare-total b { font-size: 20px; font-weight: 700; letter-spacing: -.3px; }
.fare-margin { margin-top: 12px; align-items: center; gap: 8px 10px; }
.g6.form input, .g6.form select, .g6.form button { height: 36px; box-sizing: border-box; }
.g6.form label > .row { align-items: stretch; }
@media (min-width: 721px) {
  .tiles.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tiles.six > div { padding: 10px 12px; }
  .tiles.six b { font-size: 16px; }
  .tiles.four, .fares { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* 저장 · 등록 · 추가 · 기록 단추는 오른쪽 끝 */
.row.acts { justify-content: flex-end; }
.g6 > .c4 { grid-column: span 4; }
.g6 > .c5 { grid-column: span 5; }
.g6 > .end { grid-column: 6; }
.row.call { flex-wrap: nowrap; align-items: center; }
.row.call .grow { flex: 1; min-width: 80px; }
/* 상태 고르는 칸에 색을 입힌다 (아래에 같은 말을 한 번 더 쓰지 않는다) */
select.st { font-weight: 600; }
select.st.ok { background-color: var(--ok-bg); color: var(--ok); border-color: transparent; }
select.st.warn { background-color: var(--warn-bg); color: var(--warn); border-color: transparent; }
select.st.blue { background-color: var(--blue-bg); color: var(--blue); border-color: transparent; }
select.st option { background: #fff; color: var(--ink); font-weight: 400; }
/* 둘 중 하나 고르기 (정렬) */
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; margin-left: 10px; }
.seg button { border: 0; border-radius: 0; padding: 4px 10px; font-size: 12.5px; background: #fff; color: var(--sub); }
.seg button.on { background: var(--navy); color: #fff; }
/* 설정 탭 */
.set-tabs { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 8px; }
table.sup td input { min-width: 90px; }
@media (max-width: 720px) {
  .g6 > .c4, .g6 > .c5 { grid-column: span 2; }
  .g6 > .end { grid-column: 2; }
  .row.call { flex-wrap: wrap; }
}
/* 안내 느낌표: 마우스를 올리면 설명 */
.info { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; background: var(--warn-bg); color: var(--warn); font-size: 11px; font-weight: 700; cursor: help; }
.cal > header .seg { margin-left: auto; margin-right: 14px; }
.cal-day .more { color: var(--blue); font-weight: 600; }
