:root {
  --bg: #f4f6fa;
  --panel: #ffffff;
  --border: #e3e8ef;
  --text: #1f2937;
  --muted: #8a94a6;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --sidebar: #11182a;
  --sidebar-text: #c7cfdd;
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "Malgun Gothic", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
a { color: var(--primary); text-decoration: none; }

/* 레이아웃 */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 168px; background: var(--sidebar); color: var(--sidebar-text);
  display: flex; flex-direction: column; padding: 20px 0; flex-shrink: 0;
}
.brand { display: block; font-size: 18px; font-weight: 700; color: #fff; text-decoration: none; cursor: pointer; padding: 0 16px 20px; }
.brand:hover { opacity: .85; }
.brand span { color: #6ea8fe; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a {
  color: var(--sidebar-text); padding: 10px 16px; font-weight: 500; border-left: 3px solid transparent;
}
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar nav a.active { background: rgba(110,168,254,.14); color: #fff; border-left-color: #6ea8fe; }
.nav-badge { display: inline-block; min-width: 18px; padding: 0 5px; background: #e02424; color: #fff; border-radius: 20px; font-size: 11px; font-weight: 700; text-align: center; }
.sidebar-foot { padding: 0 22px 18px; margin-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-foot .user { color: #fff; font-weight: 600; margin-bottom: 10px; }
.sidebar-foot .role { font-size: 11px; background: #2b3550; padding: 2px 7px; border-radius: 20px; margin-left: 6px; font-weight: 500; }
.sidebar-foot .logout { display: block; text-align: center; margin-top: 12px; padding: 9px 12px; background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; font-size: 13px; font-weight: 600; }
.sidebar-foot .logout:hover { background: rgba(239,68,68,.85); border-color: transparent; }

.content { flex: 1; min-width: 0; padding: 24px 20px; max-width: 1480px; }
.ext-link-btn { position: absolute; top: 18px; right: 20px; z-index: 20; display: inline-flex; align-items: center; gap: 4px; background: #2563eb; color: #fff; padding: 9px 15px; border-radius: 8px; font-size: 13px; font-weight: 700; box-shadow: 0 2px 6px rgba(37,99,235,.35); }
.ext-link-btn:hover { background: #1d4fd7; }
h1 { font-size: 22px; margin: 0 0 20px; }
h1 small { color: var(--muted); font-weight: 400; font-size: 15px; }
h2 { font-size: 16px; margin: 0 0 14px; }
h2 small { color: var(--muted); font-weight: 400; font-size: 13px; }

/* 카드 */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.card-label { color: var(--muted); font-size: 13px; }
.card-num { font-size: 26px; font-weight: 700; margin-top: 6px; white-space: nowrap; }

.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

/* 막대 차트 */
.bar-row { display: flex; align-items: center; gap: 10px; margin: 7px 0; }
.bar-label { width: 90px; font-size: 13px; color: var(--muted); flex-shrink: 0; }
.bar { flex: 1; background: #eef1f6; border-radius: 6px; height: 16px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--primary); border-radius: 6px; }
.bar-fill.alt { background: #10b981; }
.bar-val { width: 40px; text-align: right; font-variant-numeric: tabular-nums; }

/* 테이블 */
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th { background: #f8fafc; font-size: 12px; color: var(--muted); font-weight: 600; position: sticky; top: 0; }
.table tbody tr:hover { background: #f8fbff; }
.table.leads td { font-size: 13px; }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); }

/* 배지 */
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; background: #eef1f6; color: #4b5563; }
.badge.dup { background: #fde2e2; color: #c0392b; }
.s-계약 { background: #def7ec; color: #057a55; }
.s-가망 { background: #e1effe; color: #1c64f2; }
.s-상담종료 { background: #eef1f6; color: #6b7280; }
.s-부재 { background: #fdf6b2; color: #8e6a00; }
.s-불량 { background: #fde2e2; color: #c0392b; }
.s-예약 { background: #e5edff; color: #5145cd; }

/* 필터 */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; align-items: center; }
.filters input, .filters select, .upload-form input {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; background: #fff;
}
.filters input[type=text] { min-width: 220px; }

/* 버튼 */
button, .btn-edit { cursor: pointer; }
.filters button, .bulk-bar button, .upload-form button, .modal-actions button, form > button, .panel button {
  background: var(--primary); color: #fff; border: none; padding: 9px 16px; border-radius: 8px; font-size: 13px; font-weight: 600;
}
.filters button:hover, .upload-form button:hover, .modal-actions button:hover { background: var(--primary-dark); }
.btn-ghost { background: #fff; border: 1px solid var(--border); color: var(--text); padding: 9px 14px; border-radius: 8px; font-weight: 500; }
.btn-edit { background: #eef2ff; color: var(--primary); border: 1px solid #dbe3ff; padding: 5px 12px; border-radius: 7px; font-size: 12px; font-weight: 600; }
.bulk-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 10px 14px; background: #fff; border: 1px solid var(--border); border-radius: 8px; }
.bulk-bar select { padding: 7px 10px; border: 1px solid var(--border); border-radius: 7px; }

/* 페이저 */
.pager { display: flex; gap: 4px; margin-top: 16px; flex-wrap: wrap; }
.pager a { padding: 6px 12px; border: 1px solid var(--border); border-radius: 7px; background: #fff; color: var(--text); }
.pager a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 모달 */
.modal { position: fixed; inset: 0; background: rgba(17,24,42,.45); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal.hidden { display: none; }
.modal-card { background: #fff; border-radius: 12px; padding: 24px; width: 420px; max-width: 92vw; }
.modal-card h3 { margin: 0 0 4px; }
.modal-meta { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.modal-card label, .login-card label { display: block; margin-bottom: 12px; font-size: 13px; font-weight: 600; color: #374151; }
.modal-card select, .modal-card textarea {
  width: 100%; margin-top: 6px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit;
}
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* 업체명 링크 + 이력 타임라인 */
.company-link { font-weight: 600; color: var(--text); cursor: pointer; }
.company-link:hover { color: var(--primary); }
.modal-wide { width: 520px; }
.timeline { max-height: 55vh; overflow-y: auto; margin-bottom: 8px; }
.timeline-item { border-left: 2px solid var(--border); padding: 0 0 14px 14px; position: relative; }
.timeline-item::before { content: ''; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.timeline-time { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 6px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.log-actions { display: flex; gap: 4px; }
.log-edit, .log-del { background: none; border: none; font-size: 12px; font-weight: 600; padding: 2px 4px; cursor: pointer; }
.log-edit { color: var(--primary); }
.log-del { color: #c0392b; }
.log-edit:hover, .log-del:hover { text-decoration: underline; }
.timeline-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 5px; }
.timeline-memo { font-size: 13px; background: #f8fafc; border: 1px solid var(--border); border-radius: 6px; padding: 7px 9px; white-space: pre-wrap; }

/* 토스트 */
.toast { position: fixed; bottom: 28px; right: 28px; background: #11182a; color: #fff; padding: 12px 20px; border-radius: 8px; z-index: 60; box-shadow: 0 6px 20px rgba(0,0,0,.2); }

/* 가장(impersonate) 배너 */
.impersonate-bar { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; padding: 10px 16px; border-radius: 8px; margin-bottom: 14px; display: flex; align-items: center; gap: 12px; }
.impersonate-bar a { margin-left: auto; font-weight: 600; }
.assignee-link { font-weight: 600; }
.assignee-link:hover { text-decoration: underline; }
.asg-edit { font-size: 11px; color: var(--muted); margin-left: 6px; border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; }
.asg-edit:hover { background: #f1f5f9; color: var(--text); }

/* flash */
.flash { padding: 11px 16px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; }
.flash-error { background: #fde2e2; color: #c0392b; }
.flash-info { background: #def7ec; color: #057a55; }

/* 로그인 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1e293b, #0f172a); }
.login-card { background: #fff; padding: 38px 34px; border-radius: 14px; width: 360px; max-width: 92vw; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.brand-lg { font-size: 26px; font-weight: 700; text-align: center; }
.brand-lg span { color: var(--primary); }
.login-sub { text-align: center; color: var(--muted); margin: 6px 0 22px; }
.login-card input { width: 100%; margin-top: 6px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; }
.login-card button { width: 100%; padding: 12px; margin-top: 8px; font-size: 15px; }
.upload-form { display: flex; gap: 10px; align-items: center; }

/* 인라인 종류·구분 선택 (목록 테이블) */
.inline-sel { padding: 4px 6px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; background: #fff; max-width: 92px; }
/* 계약 페이지 인라인 입력 */
.inline-date { padding: 4px 6px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; background: #fff; }
.inline-txt { padding: 5px 7px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; width: 120px; }
.inline-txt.sm { width: 64px; }
.inline-txt:focus, .inline-date:focus, .inline-sel:focus { outline: none; border-color: var(--primary); }
/* 검색 필터의 기간 묶음 */
.flt-range { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
/* 입금 버튼 / 입금일 칸 — 동일 폭 고정(클릭해도 크기 안 바뀜) */
.btn-dep { width: 88px; box-sizing: border-box; padding: 6px 4px; font-size: 12px; font-weight: 600; color: #fff; background: var(--primary); border: 1px solid var(--primary); border-radius: 6px; cursor: pointer; text-align: center; }
.btn-dep:hover { filter: brightness(.95); }
/* 입금완료 칸 = 초록 (가운데 날짜 + 오른쪽 달력) */
.dep-box { display: inline-flex; align-items: stretch; width: 88px; height: 28px; box-sizing: border-box;
  background: #0d9f6e; border: 1px solid #0b8c61; border-radius: 6px; overflow: hidden; vertical-align: middle; }
.dep-date { flex: 1; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 600; cursor: pointer; }
.dep-date:hover { background: rgba(0,0,0,.12); }
.dep-cal { width: 26px; border: 0; border-left: 1px solid rgba(255,255,255,.45); background: rgba(0,0,0,.1); color: #fff; cursor: pointer; font-size: 12px; padding: 0; }
.dep-cal:hover { background: rgba(0,0,0,.25); }
/* 날짜 선택용 숨김 input(버튼 위 투명 배치 → 달력이 칸 위치에 뜸) */
.dep-cell { position: relative; }
.dep-hidden { position: absolute; left: 0; top: 0; width: 88px; height: 30px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.dep-on::-webkit-calendar-picker-indicator { filter: invert(1); }
/* 제목줄 우측 저장 버튼 */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.page-head h1 { margin: 0; }
/* 연장 버튼 */
.btn-ext { padding: 5px 8px; font-size: 12px; font-weight: 600; color: var(--primary); background: #fff; border: 1px solid var(--primary); border-radius: 6px; cursor: pointer; }
.btn-ext:hover { background: #eff4ff; }
/* 종료 버튼 */
.btn-term { padding: 5px 8px; font-size: 12px; font-weight: 600; color: #c0392b; background: #fff; border: 1px solid #e6a9a2; border-radius: 6px; cursor: pointer; }
.btn-term:hover { background: #fdeceb; }
/* 중단 버튼 */
.btn-stop { padding: 5px 8px; font-size: 12px; font-weight: 600; color: #9a6700; background: #fff; border: 1px solid #e6cf8a; border-radius: 6px; cursor: pointer; }
.btn-stop:hover { background: #fdf6e3; }
/* DB관리 계약 버튼 */
.btn-contract { padding: 5px 10px; font-size: 12px; font-weight: 600; color: #fff; background: #0d9f6e; border: none; border-radius: 6px; cursor: pointer; }
.btn-contract:hover { filter: brightness(.95); }
/* 계약 필터: 한 줄 유지 — 줄바꿈 없이 계약일 옆에 검색·초기화·저장이 나란히 */
.filters-1line { flex-wrap: nowrap; overflow-x: auto; gap: 6px; }
.filters-1line > * { flex-shrink: 0; }
.filters-1line .btn-save { margin-left: 2px; }
/* 한 줄에 다 들어가도록 글자·여백·폭 축소 */
.filters-1line input, .filters-1line select, .filters-1line button, .filters-1line .btn-ghost { font-size: 11.5px; padding: 6px 7px; }
.filters-1line input[type=text] { min-width: 0; width: 168px; }
.filters-1line input[type=date] { width: 112px; padding: 4px 4px; }
.filters-1line .flt-range { font-size: 11.5px; gap: 3px; color: var(--muted); }
/* 저장 버튼 */
.btn-save { background: #0d9f6e; color: #fff; }
.btn-save.dirty { animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(13,159,110,.5); } 50% { box-shadow: 0 0 0 5px rgba(13,159,110,0); } }
/* 계약 테이블 컴팩트 (가로 스크롤 최소화) */
.contracts-table th, .contracts-table td { padding: 8px 6px; font-size: 13px; }
.contracts-table .inline-txt { width: 66px; padding: 5px 5px; font-size: 12.5px; }
.contracts-table .inline-txt.sm { width: 42px; }
.contracts-table .inline-date { width: 102px; padding: 4px 3px; font-size: 12.5px; }
.contracts-table .inline-sel { max-width: 58px; padding: 4px 3px; font-size: 12.5px; }
/* 장문 업체명·고객명 칸 폭 제한(말줄임) */
.contracts-table td.ell { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 이력 구분 배지 */
.badge.ev-ext { background: #e1effe; color: #1e429f; }
.badge.ev-term { background: #fde2e2; color: #9b1c1c; }
.badge.ev-susp { background: #fef3c7; color: #92400e; }
/* 캘린더 */
.cal-clock { font-size: 40px; font-weight: 700; letter-spacing: 2px; text-align: center; margin: 4px 0 18px; font-variant-numeric: tabular-nums; }
.cal-layout { display: grid; grid-template-columns: minmax(0, 760px) 1fr; gap: 24px; align-items: start; }
@media (max-width: 1040px) { .cal-layout { grid-template-columns: 1fr; } }
.cal-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cal-head #cal-title { font-size: 22px; font-weight: 700; }
.cal-nav { width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font-size: 20px; cursor: pointer; }
.cal-nav:hover { background: #f1f5f9; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 15px; color: var(--muted); font-weight: 600; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.cal-weekdays .sun { color: #e02424; }
.cal-weekdays .sat { color: #2563eb; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-top: 6px; }
.cal-cell { position: relative; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; border-radius: 10px; cursor: pointer; font-size: 17px; font-weight: 500; }
.cal-cell.empty { cursor: default; }
.cal-cell:not(.empty):hover { background: #eef2ff; }
.cal-cell.sun { color: #e02424; }
.cal-cell.sat { color: #2563eb; }
.cal-cell.today { outline: 2px solid #bcd0ff; }
.cal-cell.sel { background: var(--primary); color: #fff !important; }
.cal-dot { position: absolute; bottom: 9px; width: 7px; height: 7px; border-radius: 50%; background: #10b981; }
.cal-cell.sel .cal-dot { background: #fff; }
.cal-side h2 { margin-bottom: 12px; }
.cal-list { display: flex; flex-direction: column; gap: 8px; }
.cal-item { display: flex; gap: 12px; align-items: center; padding: 11px 14px; background: #fff; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.cal-item:hover { border-color: var(--primary); background: #f8fbff; }
.cal-item-time { font-size: 17px; font-weight: 700; color: var(--primary); min-width: 52px; }
.cal-item-main { font-size: 14px; }
/* 통화 예약 */
.rv-time-row { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; }
.rv-time-row select { width: auto; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; font-family: inherit; }
.phone-link { color: var(--text); font-weight: 500; }
.phone-link:hover { color: var(--primary); text-decoration: underline; }
.resv-tag { cursor: default; }
.resv-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.resv-item { padding: 12px 14px; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px; font-size: 15px; }
/* 메모장 */
.note-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.note-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; cursor: pointer; }
.note-card:hover { border-color: var(--primary); box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.note-title { font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.note-preview { font-size: 13px; color: #4b5563; white-space: pre-wrap; max-height: 60px; overflow: hidden; margin-bottom: 8px; }
.note-meta { font-size: 11px; }
/* 직원 관리 */
.staff-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.staff-add input, .staff-add select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; }
.staff-add input[name="name"] { width: 130px; }
.inline-form { display: inline; }
.inline-form select { padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; }
/* 인센 그레이드 행 */
.grade-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0; }
.grade-num { width: 120px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; text-align: right; font-size: 13px; }
/* 계약 탭 상태 클릭 필터 */
.state-pills { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.pill { padding: 6px 16px; border: 1px solid var(--border); border-radius: 20px; background: #fff; color: var(--text); font-size: 13px; font-weight: 600; }
.pill:hover { background: #f1f5f9; }
.pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }
/* 결산 / 계약 매출 */
.card-num .won { font-size: 15px; font-weight: 600; margin-left: 3px; color: var(--muted); }
/* (card-hl 강조 제거 — 모든 카드 동일하게) */
.contracts-table td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* 드롭다운 관리 페이지 */
.opt-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.opt-group h2 { margin-bottom: 12px; }
.opt-list { list-style: none; padding: 0; margin: 0 0 10px; }
.opt-list li { display: flex; align-items: center; gap: 5px; margin-bottom: 6px; }
.opt-row { display: flex; align-items: center; gap: 5px; flex: 1; min-width: 0; }
.opt-row input { flex: 1; min-width: 0; padding: 7px 9px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
.opt-add { display: flex; gap: 5px; padding-top: 10px; border-top: 1px dashed var(--border); }
.opt-add input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
.btn-mini { flex-shrink: 0; white-space: nowrap; padding: 7px 11px; font-size: 13px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text); cursor: pointer; }
.btn-approve { padding: 6px 14px; font-size: 13px; font-weight: 600; border: none; border-radius: 6px; background: #0d9f6e; color: #fff; cursor: pointer; }
.btn-approve:hover { filter: brightness(.95); }
.btn-mini:hover { background: #f1f5f9; }
.btn-del { color: #c0392b; border-color: #f3c6c2; }
.btn-del:hover { background: #fde2e2; }

/* ── 모바일 반응형 ─────────────────────────────────────────── */
.menu-toggle { display: none; }
.sidebar-backdrop { display: none; }
@media (max-width: 760px) {
  /* 햄버거 버튼 (모바일에서만) */
  .menu-toggle {
    display: flex; position: fixed; top: 10px; left: 10px; z-index: 60;
    width: 44px; height: 44px; align-items: center; justify-content: center;
    background: var(--sidebar); color: #fff; border: none; border-radius: 10px;
    font-size: 22px; line-height: 1; box-shadow: 0 2px 8px rgba(0,0,0,.25);
  }
  /* 사이드바: 평소 숨김 → 열면 슬라이드 인 */
  .sidebar {
    position: fixed; top: 0; left: 0; height: 100%; width: 240px; z-index: 70;
    transform: translateX(-100%); transition: transform .25s ease; overflow-y: auto;
  }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .sidebar-backdrop {
    display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 65;
  }
  /* 본문: 전체폭 + 위쪽에 햄버거 자리 확보 */
  .content { padding: 60px 12px 24px; max-width: 100%; }
  h1 { font-size: 19px; margin-bottom: 14px; }
  .panel { padding: 14px 14px; }
  /* 외부링크 버튼: 모바일에선 흐름 배치 */
  .ext-link-btn { position: static; display: inline-flex; margin: 0 0 12px; }
  /* 입력칸: iOS 확대 방지 + 폭 줄이기 */
  .filters input[type=text] { min-width: 0; width: 100%; }
  .filters input, .filters select { font-size: 16px; }
  input, select, textarea, button { max-width: 100%; }
}
