/* =========================================================================
 *  임대관리 프로그램 스타일
 *
 *  ▣ 단일 관제탑(Design Tokens) — 색·반경·그림자·층(z-index)은 오직 :root 에서만
 *    정의합니다. 아래 컴포넌트 규칙은 전부 var(--token) 만 참조하며, 색상 리터럴
 *    (#hex / rgba)을 직접 쓰지 않습니다. 따라서 전체 테마/톤을 바꾸려면 이 :root
 *    블록만 수정하면 모든 화면이 일괄로 바뀝니다. (!important 사용 금지 원칙)
 * ========================================================================= */
:root {
  /* ── 브랜드 / 포인트 ── */
  --primary: #2563eb;
  --primary-d: #1d4ed8;
  --primary-soft: rgba(37, 99, 235, .12);   /* 포커스 링 */

  /* ── 표면 / 텍스트 / 경계 ── */
  --bg: #f1f5f9;          /* 페이지 배경 */
  --panel: #ffffff;       /* 카드·패널·입력 배경 */
  --surface-2: #f8fafc;   /* 호버·줄무늬 배경 */
  --white: #ffffff;       /* 색 위 글자(버튼 등) */
  --ink: #0f172a;         /* 본문 글자 */
  --muted: #64748b;       /* 보조 글자 */
  --line: #e2e8f0;        /* 기본 경계선 */
  --line-strong: #cbd5e1; /* 진한 경계선 */

  /* ── 상태색(짙은색 / 배경틴트 / 글자틴트 / 점·막대) ── */
  --green: #16a34a; --green-bg: #dcfce7; --green-ink: #15803d; --green-dot: #86efac;
  --red: #dc2626;   --red-bg: #fee2e2;   --red-ink: #b91c1c;   --red-dot: #fca5a5;
  --red-bar: #f87171; --red-soft: #fff7f7;
  --amber: #d97706; --amber-bg: #fef3c7; --amber-ink: #b45309; --amber-dot: #fcd34d;
  --blue-bg: #dbeafe;
  --violet: #7c3aed; --violet-bg: #ede9fe;
  --indigo-bg: #e0e7ff; --indigo-ink: #4338ca; --indigo-dot: #a5b4fc;
  --gray-bg: #e2e8f0;

  /* ── 사이드바(다크) ── */
  --side-bg: #0f172a;
  --side-ink: #cbd5e1;
  --side-ink-strong: #ffffff;
  --side-muted: #64748b;
  --side-hover: #1e293b;
  --side-foot: #475569;
  --side-scroll: #334155;

  /* ── 기타 ── */
  --google: #4285f4;
  --overlay: rgba(15, 23, 42, .5);

  /* ── 문서/영수증(흰 종이 위 인쇄) ── */
  --doc-ink: #000000; --doc-sub: #555555; --doc-line: #888888;
  --doc-fill: #f1f1f1; --doc-stamp: #cc0000;

  /* ── 반경 / 그림자 / 층 ── */
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, .18);
  --z-nav: 90;
  --z-modal: 100;
  --z-toast: 200;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 레이아웃 ---------- */
#app { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
  width: 230px; flex-shrink: 0; background: var(--side-bg); color: var(--side-ink);
  display: flex; flex-direction: column; padding: 18px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 8px 10px 18px; }
.brand-logo { font-size: 28px; }
.brand-name { font-weight: 800; font-size: 17px; color: var(--side-ink-strong); }
.brand-sub { font-size: 11px; color: var(--side-muted); letter-spacing: .5px; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: var(--side-scroll); border-radius: 3px; }
.nav-group { font-size: 11px; font-weight: 700; color: var(--side-muted); letter-spacing: .5px;
  padding: 14px 13px 5px; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px;
  border: 0; background: transparent; color: var(--side-ink); cursor: pointer;
  border-radius: 10px; font-size: 14px; font-weight: 600; text-align: left;
  transition: .15s; width: 100%;
}
.nav-item:hover { background: var(--side-hover); color: var(--side-ink-strong); }
.nav-item.active { background: var(--primary); color: var(--white); }
.nav-ico { font-size: 17px; width: 22px; text-align: center; }
.side-foot { font-size: 11px; color: var(--side-foot); padding: 14px 12px 4px; line-height: 1.6; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 56px; background: var(--panel); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 0 20px; flex-shrink: 0;
}
.topbar-title { font-weight: 700; color: var(--muted); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.cloud-chip { font-size: 12px; font-weight: 700; color: var(--green); background: var(--green-bg); padding: 5px 10px; border-radius: var(--radius-pill); }
.cloud-chip.local { color: var(--muted); background: var(--gray-bg); }
.user-email { font-size: 12.5px; color: var(--muted); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 로그인 화면 */
.login-gate { width: 100%; min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: linear-gradient(135deg, var(--side-hover) 0%, var(--side-bg) 100%); }
.login-card { background: var(--panel); border-radius: 20px; padding: 44px 38px; width: 100%; max-width: 380px;
  text-align: center; box-shadow: var(--shadow-lg); }
.login-logo { font-size: 50px; margin-bottom: 10px; }
.login-card h1 { font-size: 22px; font-weight: 800; margin-bottom: 10px; }
.login-card .muted { line-height: 1.7; margin-bottom: 26px; }
.login-btn { width: 100%; justify-content: center; padding: 13px; font-size: 15px; }
.g-mark { display: inline-grid; place-items: center; width: 20px; height: 20px; background: var(--white);
  color: var(--google); border-radius: 50%; font-weight: 900; font-size: 13px; }
.login-status { margin-top: 16px; font-size: 12.5px; color: var(--muted); }
.hamburger { display: none; border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--ink); }
.view { flex: 1; overflow-y: auto; padding: 26px 30px 60px; }

/* ---------- 페이지 헤더 ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 23px; font-weight: 800; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 버튼 ---------- */
.btn {
  border: 1px solid transparent; border-radius: 10px; padding: 10px 16px;
  font-size: 14px; font-weight: 700; cursor: pointer; transition: .15s;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-d); }
.btn-ghost { background: var(--panel); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--line-strong); }
.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover { filter: brightness(.93); }
.btn-mini { padding: 6px 11px; font-size: 12.5px; border-radius: var(--radius-sm); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.icon-btn {
  border: 0; background: transparent; cursor: pointer; font-size: 15px;
  width: 32px; height: 32px; border-radius: var(--radius-sm); transition: .15s;
}
.icon-btn:hover { background: var(--bg); }

/* ---------- KPI 카드 ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.kpi { background: var(--panel); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.kpi-top { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.kpi-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; }
.bg-blue { background: var(--blue-bg); } .bg-green { background: var(--green-bg); }
.bg-violet { background: var(--violet-bg); } .bg-amber { background: var(--amber-bg); }
.kpi-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi-val { font-size: 26px; font-weight: 800; }
.kpi-val small { font-size: 15px; color: var(--muted); font-weight: 600; }
.kpi-foot { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

/* ---------- 패널 / 표 ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.panel { background: var(--panel); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.panel-head h2 { font-size: 16px; font-weight: 700; }
.muted { color: var(--muted); }

.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12.5px; padding: 9px 10px; border-bottom: 2px solid var(--line); }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tfoot td { border-top: 2px solid var(--line); border-bottom: none; background: var(--surface-2); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.card-tbl { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-tbl th { padding-top: 14px; padding-left: 16px; padding-right: 16px; }
.card-tbl td { padding-left: 16px; padding-right: 16px; }
.row-actions { white-space: nowrap; text-align: right; }
.row-overdue { background: var(--red-soft); }
.pos { color: var(--green); font-weight: 700; }
.neg { color: var(--red); font-weight: 700; }
.mini-empty { text-align: center; color: var(--muted); padding: 26px; }

/* ---------- 배지 ---------- */
.badge { display: inline-block; padding: 3px 9px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-danger { background: var(--red-bg); color: var(--red); }
.badge-warn { background: var(--amber-bg); color: var(--amber); }
.badge-gray { background: var(--gray-bg); color: var(--muted); }
.badge-blue { background: var(--blue-bg); color: var(--primary); }
.badge-btn { border: 0; cursor: pointer; font-family: inherit; transition: .12s; }
.badge-btn:hover { filter: brightness(.95); transform: translateY(-1px); }

/* ---------- 카드 그리드 ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card { background: var(--panel); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.card-head h3 { font-size: 16px; font-weight: 700; }
.card p { color: var(--ink); margin-top: 6px; }
.card-stats { display: flex; gap: 16px; margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.card-stats b { color: var(--ink); }
.memo { margin-top: 10px; padding: 9px 11px; background: var(--bg); border-radius: var(--radius-sm); font-size: 13px; color: var(--muted); }

/* ---------- 검색 / 툴바 ---------- */
.toolbar { margin-bottom: 16px; }
.search { width: 100%; max-width: 360px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; background: var(--panel); }
.search:focus { outline: none; border-color: var(--primary); }

/* ---------- 월/연 네비게이션 ---------- */
.month-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.month-title { font-size: 18px; font-weight: 800; min-width: 120px; text-align: center; }

/* ---------- 합계 바 ---------- */
.sum-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 14px; }
.sum { background: var(--panel); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.sum span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.sum b { font-size: 19px; }
.sum-green b { color: var(--green); }
.sum-red b { color: var(--red); }
.sum-amber b { color: var(--amber); }

/* ---------- 진행바 ---------- */
.progress { height: 9px; background: var(--line); border-radius: var(--radius-pill); overflow: hidden; margin-bottom: 18px; }
.progress-bar { height: 100%; background: var(--green); border-radius: var(--radius-pill); transition: width .4s; }

/* ---------- 차트 ---------- */
.chart { display: flex; align-items: flex-end; gap: 8px; height: 200px; padding: 10px 4px 0; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.bars { display: flex; gap: 3px; align-items: flex-end; height: 100%; width: 100%; justify-content: center; }
.bar { width: 42%; max-width: 18px; border-radius: 4px 4px 0 0; min-height: 2px; transition: height .3s; }
.bar-in { background: var(--primary); }
.bar-out { background: var(--red-bar); }
.chart-x { font-size: 11px; color: var(--muted); margin-top: 6px; }
.chart-legend { display: flex; gap: 16px; justify-content: center; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.lg::before { content: ''; display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.lg-in::before { background: var(--primary); }
.lg-out::before { background: var(--red-bar); }

/* ---------- 설정 통계 ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 12px; }
.stat { text-align: center; background: var(--bg); border-radius: 10px; padding: 14px; }
.stat b { display: block; font-size: 24px; font-weight: 800; }
.stat span { font-size: 12.5px; color: var(--muted); }
.danger-panel { border: 1px solid var(--red-bg); }

/* ---------- 빈 상태 ---------- */
.empty { text-align: center; padding: 60px 20px; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); }
.empty-icon { font-size: 46px; margin-bottom: 14px; }
.empty h3 { font-size: 18px; margin-bottom: 7px; }
.empty p { color: var(--muted); margin-bottom: 18px; }
.empty .btn { margin: 0 4px; }

/* ---------- 모달 ---------- */
.modal-backdrop { position: fixed; inset: 0; background: var(--overlay); display: grid; place-items: center; z-index: var(--z-modal); padding: 20px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--panel); border-radius: var(--radius-lg); width: 100%; max-width: 540px; box-shadow: var(--shadow-lg); max-height: 90vh; display: flex; flex-direction: column; animation: pop .18s; }
.modal-sm { max-width: 400px; }
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 17px; font-weight: 700; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 9px; }
.confirm-body { text-align: center; padding: 28px 22px 8px; }
.confirm-icon { font-size: 38px; margin-bottom: 10px; }
.confirm-body p { font-size: 15px; }

/* ---------- 폼 ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row.full { grid-column: 1 / -1; }
.form-row label { font-size: 13px; font-weight: 600; color: var(--ink); }
.req { color: var(--red); margin-left: 3px; }
.field { padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; font-family: inherit; background: var(--panel); width: 100%; }
.field:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
textarea.field { resize: vertical; }
.field-hint { font-size: 11.5px; color: var(--muted); }
.money-field { position: relative; }
.money-field .suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; }
.money-input { padding-right: 30px; text-align: right; }

/* ---------- 토스트 ---------- */
#toast-wrap { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: var(--z-toast); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { padding: 12px 20px; border-radius: 10px; color: var(--white); font-weight: 600; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(12px); transition: .3s; font-size: 13.5px; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast-ok { background: var(--ink); }
.toast-warn { background: var(--red); }

/* ---------- 반응형 ---------- */
@media (max-width: 980px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: var(--z-nav); transform: translateX(-100%); transition: .25s; }
  body.nav-open .sidebar { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .hamburger { display: block; }
  .view { padding: 18px 16px 50px; }
  .form-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr; }
}

/* ---------- 대시보드(렌트플로우 스타일) ---------- */
.date-hero { margin-bottom: 20px; }
.date-hero h1 { font-size: 26px; font-weight: 800; }
.date-hero .sub { color: var(--muted); margin-top: 4px; }
.sec-title { font-size: 15px; font-weight: 800; margin: 6px 2px 12px; display: flex; align-items: center; gap: 7px; }
.sec-title::before { content: ''; width: 4px; height: 15px; background: var(--primary); border-radius: 2px; }

.status-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--panel); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
  border-left: 4px solid var(--line); cursor: pointer; transition: .15s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-card.accent-blue { border-left-color: var(--primary); }
.stat-card.accent-red { border-left-color: var(--red); }
.stat-card.accent-amber { border-left-color: var(--amber); }
.stat-card.accent-green { border-left-color: var(--green); }
.sc-label { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.sc-main { font-size: 28px; font-weight: 800; line-height: 1.1; }
.sc-main small { font-size: 15px; color: var(--muted); font-weight: 600; margin: 0 1px; }
.sc-sub { font-size: 13px; color: var(--muted); margin-top: 6px; }

.top5-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 18px; }
.rank-list { list-style: none; }
.rank-list li { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.rank-list li:last-child { border-bottom: 0; }
.rank-list li.none { justify-content: center; color: var(--muted); padding: 24px; }
.rank { width: 22px; height: 22px; border-radius: 6px; background: var(--bg); color: var(--muted);
  display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.rank-list li:nth-child(1) .rank { background: var(--amber-bg); color: var(--amber-ink); }
.rank-list li:nth-child(2) .rank { background: var(--indigo-bg); color: var(--indigo-ink); }
.t-name { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-val { font-weight: 700; font-variant-numeric: tabular-nums; }

/* 내 정보(정의 목록) */
.def-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 30px; }
.def-row { display: flex; gap: 12px; padding: 13px 2px; border-bottom: 1px solid var(--line); }
.def-l { width: 130px; color: var(--muted); font-weight: 600; font-size: 13px; flex-shrink: 0; }
.def-v { font-weight: 600; }

@media (max-width: 980px) {
  .status-cards { grid-template-columns: repeat(2, 1fr); }
  .top5-grid { grid-template-columns: 1fr; }
  .def-grid { grid-template-columns: 1fr; }
}

/* ---------- 계약 상세 ---------- */
.detail-block { margin-top: 18px; }
.detail-block h4 { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.def-v a { color: var(--primary); font-weight: 700; text-decoration: none; }
.amt-extra { font-size: 11px; color: var(--muted); font-weight: 400; }

/* ---------- 캘린더 ---------- */
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align: center; font-weight: 700; font-size: 12.5px; color: var(--muted); padding: 6px 0; }
.cal-dow.sun { color: var(--red); }
.cal-dow.sat { color: var(--primary); }
.cal-cell { min-height: 94px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px; overflow: hidden; cursor: pointer; transition: .12s; }
.cal-cell:hover { border-color: var(--primary); }
.cal-cell.empty { background: transparent; border: 0; cursor: default; }
.cal-cell.today { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.cal-num { font-size: 12.5px; font-weight: 700; margin-bottom: 4px; }
.cal-chip { font-size: 10.5px; padding: 2px 5px; border-radius: 5px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-chip.c-due { background: var(--red-bg); color: var(--red-ink); }
.cal-chip.c-paid { background: var(--green-bg); color: var(--green-ink); }
.cal-chip.c-exp { background: var(--amber-bg); color: var(--amber-ink); }
.cal-chip.c-ev { background: var(--indigo-bg); color: var(--indigo-ink); }
.cal-legend { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.lg-dot { width: 11px; height: 11px; border-radius: 3px; display: inline-block; margin-right: -6px; vertical-align: -1px; }
.lg-dot.c-due { background: var(--red-dot); }
.lg-dot.c-paid { background: var(--green-dot); }
.lg-dot.c-exp { background: var(--amber-dot); }
.lg-dot.c-ev { background: var(--indigo-dot); }
@media (max-width: 760px) {
  .cal-cell { min-height: 64px; }
  .cal-chip { font-size: 9px; }
}

/* ---------- 영수증(인쇄 전용) ---------- */
.print-area { display: none; }
.receipt { color: var(--doc-ink); max-width: 540px; margin: 0 auto; padding: 24px; }
.receipt h1 { text-align: center; font-size: 24px; letter-spacing: 8px; margin-bottom: 4px; }
.rc-sub { text-align: center; color: var(--doc-sub); margin-bottom: 18px; }
.rc-meta, .rc-items { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.rc-meta th, .rc-meta td, .rc-items th, .rc-items td { border: 1px solid var(--doc-line); padding: 8px 10px; font-size: 13px; text-align: left; }
.rc-meta th { background: var(--doc-fill); width: 84px; }
.rc-items tfoot th { background: var(--doc-fill); font-size: 15px; }
.rc-note { text-align: center; margin: 26px 0; font-size: 15px; }
.rc-sign { text-align: right; line-height: 1.9; }
.rc-owner { font-size: 17px; font-weight: 700; }
.rc-stamp { color: var(--doc-stamp); }
.rc-small { font-size: 12px; color: var(--doc-sub); }

/* ---------- 인쇄 ----------
 * !important 없이 특이성/소스순서로 제어:
 *  - 일반 인쇄: 본문만 정리, 사이드바·툴바 숨김
 *  - body.printing(영수증): 앱 전체 숨기고 .print-area 만 표시
 *    (body.printing #app = 특이성 1,1,0 > #app 1,0,0 / body.printing .print-area = 0,2,0 > .print-area 0,1,0)
 */
@media print {
  .sidebar, .topbar, .page-actions, .month-bar { display: none; }
  .view { overflow: visible; padding: 0; }
  .panel, .sum, .card-tbl { box-shadow: none; border: 1px solid var(--line); }
  #app { display: block; height: auto; }
  body.printing #app, body.printing #modal-root, body.printing #toast-wrap { display: none; }
  body.printing .print-area { display: block; }
}
