/* RACHEL OS V2 — Phase 0 기본 스타일. 화면이 늘면 보강. */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #faf8f6;
  --ink: #2b2622;
  --muted: #8a8178;
  --line: #e7e1da;
  --accent: #b08968;
  --accent-dark: #8a6a4f;
  --white: #fff;
  --danger: #c0584f;
}
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

/* ── 로딩 ── */
.loading-screen {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 15px;
}

/* ── 로그인 ── */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card {
  width: 100%; max-width: 380px; background: var(--white); border: 1px solid var(--line);
  border-radius: 18px; padding: 32px 28px; box-shadow: 0 8px 30px rgba(0,0,0,.05);
}
.login-card h1 { font-size: 20px; font-weight: 700; text-align: center; margin-bottom: 4px; letter-spacing: .3px; }
.login-card .sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.role-row { display: flex; gap: 10px; margin-bottom: 18px; }
.role-btn {
  flex: 1; padding: 14px; border: 1.5px solid var(--line); background: var(--white);
  border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--ink); transition: .15s;
}
.role-btn.active { border-color: var(--accent); background: #f5efe8; color: var(--accent-dark); }
.pin-input {
  width: 100%; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px;
  font-size: 18px; text-align: center; letter-spacing: 6px; margin-bottom: 14px;
}
.pin-input:focus { outline: none; border-color: var(--accent); }
.login-btn {
  width: 100%; padding: 15px; background: var(--accent); color: var(--white);
  border: none; border-radius: 12px; font-size: 15px; font-weight: 700;
}
.login-btn:active { background: var(--accent-dark); }
.login-err { color: var(--danger); font-size: 13px; text-align: center; margin-top: 12px; min-height: 18px; }
.login-lang { display: flex; gap: 8px; justify-content: center; margin-top: 22px; }

/* ── 앱 레이아웃 ── */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; background: var(--white); border-right: 1px solid var(--line);
  padding: 20px 14px; display: flex; flex-direction: column; gap: 4px;
}
.brand { font-size: 17px; font-weight: 800; padding: 6px 10px 16px; letter-spacing: .5px; }
.nav-item {
  text-align: left; padding: 11px 12px; border: none; background: transparent;
  border-radius: 9px; font-size: 14px; color: var(--ink); transition: .12s;
}
.nav-item:hover { background: #f5efe8; }
.nav-item.active { background: var(--accent); color: var(--white); font-weight: 600; }
.sidebar-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.logout-btn {
  width: 100%; padding: 10px; border: 1px solid var(--line); background: var(--white);
  border-radius: 9px; font-size: 13px; color: var(--muted);
}

.main { flex: 1; padding: 26px 30px; overflow-y: auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.topbar .who { font-size: 14px; color: var(--muted); }
.topbar .who b { color: var(--ink); }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.placeholder-box {
  border: 1.5px dashed var(--line); border-radius: 14px; padding: 40px;
  text-align: center; color: var(--muted); font-size: 14px; background: var(--white);
}

/* ── 언어 토글 ── */
.lang-btn {
  padding: 6px 12px; border: 1px solid var(--line); background: var(--white);
  border-radius: 8px; font-size: 12px; color: var(--muted);
}
.lang-btn.active { border-color: var(--accent); color: var(--accent-dark); font-weight: 600; }
.lang-row { display: flex; gap: 6px; }

/* ── 디버그 패널 ── */
.debug-panel {
  margin-top: 24px; border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; background: var(--white); max-width: 360px;
}
.debug-title { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.debug-info { font-size: 12px; color: var(--muted); line-height: 1.7; margin-bottom: 12px; }
.debug-btn {
  padding: 9px 14px; background: var(--accent); color: var(--white);
  border: none; border-radius: 9px; font-size: 13px; font-weight: 600;
}
.debug-btn:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }
.debug-live { margin-top: 10px; font-size: 12px; color: var(--accent-dark); }

/* ── 모달 (prompt/alert 대체) ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(20,16,12,.4);
  display: flex; align-items: center; justify-content: center; z-index: 9999; padding: 24px;
}
.modal-box {
  background: var(--white); border-radius: 16px; padding: 24px; width: 100%; max-width: 340px;
  box-shadow: 0 10px 40px rgba(0,0,0,.2);
}
.modal-msg { font-size: 15px; line-height: 1.55; white-space: pre-line; margin-bottom: 18px; }
.modal-input {
  width: 100%; padding: 12px; border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 15px; margin-bottom: 18px;
}
.modal-input:focus { outline: none; border-color: var(--accent); }
.modal-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.modal-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.modal-field-label { font-size: 12px; color: var(--muted); }
.modal-field .modal-input { margin-bottom: 0; }
.modal-field-err { color: var(--danger); font-size: 12px; min-height: 16px; margin-bottom: 6px; }
.modal-btns { display: flex; gap: 10px; justify-content: flex-end; }
.co-panel-top { display: flex; gap: 8px; }
.modal-btn { padding: 10px 18px; border-radius: 10px; font-size: 14px; font-weight: 600; border: none; }
.modal-cancel { background: #f1ece6; color: var(--muted); }
.modal-ok { background: var(--accent); color: var(--white); }

/* ── 공통 버튼 ── */
.btn { padding: 10px 16px; border: none; border-radius: 10px; font-size: 14px; font-weight: 600; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:active { background: var(--accent-dark); }
.btn-soft { background: #f1ece6; color: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--muted); padding-left: 0; }
.btn-danger { background: #f7eceb; color: var(--danger); }
.btn-wide { width: 100%; margin-top: 8px; padding: 14px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── 툴바 / 목록 ── */
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 140px; }
.toolbar select.form-input { flex: 0 0 auto; width: auto; min-width: 150px; }
.list-count { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.card-list { display: flex; flex-direction: column; gap: 8px; }
.cust-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--white); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; cursor: pointer; transition: .12s;
}
.cust-row:hover { border-color: var(--accent); background: #fdfbf9; }
.cust-row-main { min-width: 0; }
.cust-name { font-size: 15px; font-weight: 600; }
.cust-meta { font-size: 12px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cust-row-side { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.tier-badge { font-size: 11px; padding: 4px 9px; border-radius: 20px; background: #f1ece6; color: var(--accent-dark); white-space: nowrap; }
.deposit-badge { font-size: 11px; padding: 4px 9px; border-radius: 20px; background: #eef4ee; color: #4a7a52; white-space: nowrap; }
.stars { color: var(--accent); font-size: 13px; letter-spacing: 1px; }
.stars-lg { font-size: 18px; }

/* ── 폼 ── */
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 22px; max-width: 760px; }
.form-section-title { font-size: 13px; font-weight: 700; color: var(--accent-dark); margin: 6px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 12px; color: var(--muted); }
.form-input {
  width: 100%; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 14px; background: #fff; color: var(--ink);
}
.form-input:focus { outline: none; border-color: var(--accent); }
textarea.form-input { resize: vertical; }

/* ── 상세 ── */
.detail-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.detail-actions { display: flex; gap: 8px; }
.detail-hero { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; margin-bottom: 14px; }
.detail-name { font-size: 22px; font-weight: 700; }
.detail-sub { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.stat-box { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.stat-label { font-size: 11px; color: var(--muted); }
.stat-value { font-size: 18px; font-weight: 700; margin-top: 4px; }
.info-section { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; margin-bottom: 14px; }
.info-title { font-size: 13px; font-weight: 700; color: var(--accent-dark); margin-bottom: 12px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.info-cell { display: flex; flex-direction: column; gap: 3px; }
.info-key { font-size: 11px; color: var(--muted); }
.info-val { font-size: 14px; }
.notes-text { font-size: 14px; line-height: 1.6; white-space: pre-line; }
.muted { color: var(--muted); font-size: 13px; }

/* ── 타임라인 ── */
.timeline { display: flex; flex-direction: column; gap: 8px; }
.tl-row { display: flex; align-items: center; gap: 12px; font-size: 13px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.tl-badge { font-size: 10px; font-weight: 700; padding: 3px 7px; border-radius: 6px; color: #fff; }
.tl-INV { background: #6b8e9e; } .tl-EX { background: #b08968; } .tl-RF { background: #c0584f; } .tl-PRE { background: #7a9a7e; }
.tl-id { font-weight: 600; } .tl-date { color: var(--muted); } .tl-amount { margin-left: auto; font-weight: 600; }

/* ── 상품 카드 갤러리 ── */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.prod-card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; transition: .12s; }
.prod-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.prod-thumb { aspect-ratio: 1/1; background: #f3eee8; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.prod-thumb img { width: 100%; height: 100%; object-fit: cover; }
.prod-thumb-empty { font-size: 32px; opacity: .4; }
.prod-card-body { padding: 12px; }
.prod-card-name { font-size: 14px; font-weight: 600; line-height: 1.3; }
.prod-card-code { font-size: 11px; color: var(--muted); margin-top: 2px; }
.prod-card-price { font-size: 15px; font-weight: 700; color: var(--accent-dark); margin-top: 6px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.hero-badge { font-size: 10px; font-weight: 700; padding: 3px 7px; border-radius: 6px; background: #f1ece6; color: var(--accent-dark); }
.hb-best_seller { background: #fbeede; color: #a06a2c; }
.hb-new { background: #e6f0ea; color: #4a7a52; }
.hb-high_margin { background: #fff3cd; color: #8a6d1a; }
.hb-final { background: #f7eceb; color: var(--danger); }

/* ── 상품 폼 추가 요소 ── */
.field-hint { font-size: 11px; color: var(--muted); margin-top: 2px; }
.wechat-box { background: #f7f3ee; border: 1px dashed var(--line); border-radius: 12px; padding: 14px; margin-bottom: 18px; display: flex; flex-direction: column; gap: 8px; }
.wechat-box .btn { align-self: flex-start; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 16px; cursor: pointer; }
.check-row input { width: 18px; height: 18px; }
.img-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 18px; }
.img-cell { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.img-cell img { width: 100%; height: 100%; object-fit: cover; }
.img-remove { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border: none; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 15px; line-height: 1; }
.variant-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.variant-row { display: flex; gap: 8px; align-items: center; }
.variant-row .form-input { flex: 1; }
.btn-sm { padding: 8px 12px; flex-shrink: 0; }
.variant-chip { background: #f1ece6; padding: 5px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; }

/* ── 상품 상세 갤러리 ── */
.detail-gallery { display: flex; gap: 10px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 4px; }
.detail-gallery img { height: 200px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.code-badge { font-size: 12px; padding: 4px 9px; border-radius: 6px; background: #eee8e1; color: var(--muted); font-family: monospace; }
.price-big { font-size: 20px; font-weight: 700; color: var(--accent-dark); }

/* ── 재고 ── */
.inv-row { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.inv-row-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.inv-name { font-size: 15px; font-weight: 600; }
.inv-code { font-size: 11px; color: var(--muted); margin-left: 8px; }
.inv-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.inv-stat { border-radius: 10px; padding: 10px; text-align: center; }
.inv-stat-g { background: #eef4ee; }
.inv-stat-p { background: #fbf1e6; }
.inv-stat-a { background: #f1ece6; }
.inv-stat-label { font-size: 10px; color: var(--muted); }
.inv-stat-val { font-size: 20px; font-weight: 700; margin-top: 2px; }
.inv-stat-p .inv-stat-val { color: #a06a2c; }
.inv-stat-a .inv-stat-val { color: var(--accent-dark); }

/* ── 직원 / 출퇴근 / 인수인계 ── */
.role-badge { font-size: 11px; padding: 4px 9px; border-radius: 20px; background: #f1ece6; color: var(--accent-dark); white-space: nowrap; }
.role-owner { background: #f3e6dd; color: #8a4f2c; }
.role-gm { background: #e6ecf3; color: #3c5a82; }
.role-staff { background: #eef0ec; color: #5a6b52; }
.status-badge { font-size: 11px; padding: 4px 9px; border-radius: 20px; white-space: nowrap; }
.status-active { background: #e6f0ea; color: #4a7a52; }
.status-inactive { background: #f0eceb; color: var(--muted); }
.att-today { font-size: 16px; font-weight: 600; margin: 8px 0 12px; }
.att-today span { margin-right: 4px; }
.ho-note { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; }
.ho-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.ho-from { font-weight: 600; font-size: 13px; }
.ho-for { font-size: 11px; color: var(--muted); }
.ho-msg { font-size: 14px; line-height: 1.5; white-space: pre-line; }

/* ── 시스템 설정 ── */
.code-editor { margin-bottom: 18px; }
.code-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.code-chip { display: inline-flex; align-items: center; gap: 6px; background: #f1ece6; color: var(--accent-dark); padding: 6px 6px 6px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; }
.code-x { border: none; background: rgba(0,0,0,.12); color: #fff; width: 18px; height: 18px; border-radius: 50%; font-size: 13px; line-height: 1; }
.req-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; }
.req-name { font-size: 14px; font-weight: 600; }
.req-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.req-actions { display: flex; gap: 6px; flex-shrink: 0; }
.audit-action { font-size: 10px; font-weight: 700; padding: 3px 7px; border-radius: 6px; color: #fff; text-transform: uppercase; }
.audit-create { background: #4a7a52; } .audit-update { background: #6b8e9e; }
.audit-delete { background: var(--danger); } .audit-approve { background: #b08968; } .audit-reject { background: #8a8178; }

/* ── 가격택 ── */
.pt-overlay { position: fixed; inset: 0; background: rgba(20,16,12,.45); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; z-index: 9998; padding: 24px; }
.price-tag { background: #fff; width: 280px; border-radius: 10px; padding: 28px 22px; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,.2); }
.pt-store { font-size: 13px; font-weight: 800; letter-spacing: 3px; color: var(--accent-dark); }
.pt-name { font-size: 20px; font-weight: 700; margin-top: 10px; line-height: 1.3; }
.pt-code { font-family: monospace; font-size: 12px; color: var(--muted); margin-top: 4px; }
.pt-price { font-size: 30px; font-weight: 800; margin: 14px 0; }
.pt-line { font-size: 13px; color: var(--ink); margin-top: 4px; }
.pt-hint { font-size: 11px; color: var(--accent-dark); margin-top: 14px; }
.pt-mark-row { margin-top: 10px; }
.pt-mark-label { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.pt-marks { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
/* 기본: 동그라미 없음(평범). 선택(marked)된 것만 동그라미 → 인쇄 시 해당 항목만 동그라미 */
.pt-mark { display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid transparent; font-size: 13px; font-weight: 600; color: var(--muted); line-height: 1; cursor: pointer; }
.pt-mark-size { width: 36px; height: 36px; border-radius: 50%; }
.pt-mark-color { min-width: 36px; height: 36px; padding: 0 16px; border-radius: 18px; text-transform: capitalize; }
.pt-mark.marked { border-color: var(--ink); color: var(--ink); font-weight: 700; }
.pt-qr { width: 130px; height: 130px; margin-top: 16px; }
.pt-actions { display: flex; gap: 10px; }

@media print {
  body * { visibility: hidden !important; }
  #pricetag-root, #pricetag-root * { visibility: visible !important; }
  #pricetag-root { position: absolute; inset: 0; }
  .pt-overlay { position: static; background: none; padding: 0; display: block; }
  .price-tag { box-shadow: none; margin: 0 auto; }
  .pt-actions, .pt-hint { display: none !important; }
}

/* ── 체크아웃 ── */
.co-cust-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.co-cust-name { font-size: 15px; font-weight: 600; }
.co-panel { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbf9f7; display: flex; flex-direction: column; gap: 8px; }
.co-results { display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow-y: auto; }
.co-result { text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 13px; }
.co-result:hover { border-color: var(--accent); }
.co-prod-block { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #fff; }
.co-prod-name { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.co-variant-list { display: flex; flex-wrap: wrap; gap: 6px; }
.co-variant { font-size: 12px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.co-variant:hover:not(:disabled) { border-color: var(--accent); }
.co-variant-out { opacity: .4; text-decoration: line-through; cursor: not-allowed; }
.co-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.co-item-info { flex: 1; min-width: 0; }
.co-item-name { font-size: 14px; font-weight: 600; }
.co-item-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.co-qty { width: 64px; text-align: center; flex-shrink: 0; }
.co-line-total { width: 92px; text-align: right; font-weight: 600; flex-shrink: 0; }
.co-static { font-size: 14px; padding: 11px 0; font-weight: 600; }
.co-pay-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.co-pay-row .form-input:first-child { flex: 1; }
.co-pay-row .form-input[type="number"] { width: 110px; }
.co-summary { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; margin: 8px 0; }
.co-sum-row { display: flex; justify-content: space-between; font-size: 14px; padding: 5px 0; }
.co-sum-big { font-size: 18px; font-weight: 700; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; }
.co-sum-row.co-bad .co-sum-val { color: var(--danger); font-weight: 700; }

/* ── 영수증 (인보이스 상세) ── */
.receipt { background: #fff; max-width: 360px; margin: 0 auto; border: 1px solid var(--line); border-radius: 12px; padding: 26px 24px; }
.rc-store { text-align: center; font-size: 22px; font-weight: 800; letter-spacing: 4px; }
.rc-storesub { text-align: center; font-size: 11px; color: var(--muted); margin-top: 2px; margin-bottom: 16px; }
.rc-meta { border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); padding: 12px 0; margin-bottom: 12px; }
.rc-row { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; }
.rc-k { color: var(--muted); } .rc-v { font-weight: 600; }
.rc-items { padding: 4px 0; }
.rc-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 7px 0; }
.rc-item-name { font-size: 14px; font-weight: 600; }
.rc-item-q { font-size: 12px; color: var(--muted); margin-top: 2px; }
.rc-item-t { font-size: 14px; font-weight: 600; white-space: nowrap; }
.rc-tot { border-top: 1px dashed var(--line); padding-top: 12px; margin-top: 6px; }
.rc-big { font-size: 19px; font-weight: 800; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; }
.rc-pay { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 10px; }
.rc-foot { text-align: center; font-size: 12px; color: var(--muted); margin-top: 18px; }

@media print {
  body * { visibility: hidden !important; }
  #receipt, #receipt * { visibility: visible !important; }
  #receipt { position: absolute; inset: 0; margin: 0 auto; border: none; box-shadow: none; }
}

/* ── 모바일 반응형 ── */
@media (max-width: 720px) {
  .app { flex-direction: column; }
  .sidebar {
    width: 100%; flex-direction: row; flex-wrap: wrap; border-right: none;
    border-bottom: 1px solid var(--line); padding: 12px; gap: 6px;
  }
  .brand { width: 100%; padding: 4px 6px 10px; }
  .nav-item { flex: 0 0 auto; padding: 8px 12px; font-size: 13px; }
  .sidebar-foot { margin: 0 0 0 auto; padding: 0; border: none; }
  .logout-btn { width: auto; padding: 8px 12px; }
  .main { padding: 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}
