/* ============================================================
   ALG POS — pos.css
   ALG (알뜰공감) 테마 (딥그린 + 골드 포인트)
   주 컬러: #3182F6 (브랜드그린) / #1B64DA (딥그린) / #3182F6 (라이트)
   포인트: #f59e0b (골드) / #ef4444 (레드 강조)
   반응형: PC / 탭 / 모바일 자동 전환 + 강제 모드 토글
   ============================================================ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body.pos { overflow: hidden; }
body.pos {
  font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
  background: #f1f5f9;
  color: #0f172a;
  user-select: none;
  -webkit-user-select: none;
}

/* ===== 상단 헤더 ===== */
.header {
  height: 56px;
  background: linear-gradient(135deg, #1B64DA 0%, #3182F6 100%);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.header .logo-area { display: flex; align-items: center; gap: 10px; }
.header .logo {
  width: 40px; height: 36px;
  background: #fff; color: #3182F6;
  font-weight: 900; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  letter-spacing: 1px;
}
.header .brand { font-size: 18px; font-weight: 800; letter-spacing: 1px; }
.header .info {
  display: flex; gap: 24px;
  margin-left: 32px;
  font-size: 13px;
  flex: 1;
}
.header .info b { font-weight: 700; margin-left: 4px; }
.header .actions { display: flex; align-items: center; gap: 6px; }
.header .actions button,
.header .actions .link-btn {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  text-decoration: none;
  display: inline-block;
}
.header .actions button:hover,
.header .actions .link-btn:hover { background: rgba(255,255,255,0.25); }

/* === 화면 모드 토글 === */
.view-mode-toggle {
  display: flex;
  gap: 2px;
  background: rgba(0,0,0,0.15);
  border-radius: 6px;
  padding: 2px;
  margin-right: 4px;
}
.view-mode-toggle button {
  background: transparent !important;
  border: none !important;
  color: rgba(255,255,255,0.7) !important;
  padding: 4px 10px !important;
  border-radius: 4px !important;
  font-size: 11px !important;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.view-mode-toggle button.active {
  background: rgba(255,255,255,0.25) !important;
  color: #fff !important;
}
.view-mode-toggle button:hover { color: #fff !important; }

/* ===== 메인 영역 ===== */
/* ★ FIX v12: 하단 6×2 그리드 96px + 패딩 16px = 112px */
.main {
  display: flex;
  height: calc(100vh - 56px - 112px); overflow: hidden;
  gap: 8px;
  padding: 8px 8px 4px;
}

/* ===== 왼쪽 (카트 + 합계) — 화면의 50% (사장님 요청 2026-05-25) ===== */
.left {
  flex: 0 0 50%;       /* ★ 50% 비율 */
  min-height: 0;
  overflow-y: auto;
  min-width: 460px;    /* 최소 폭 — 모바일/탭 모드에서 깨짐 방지 */
  max-width: 1100px;   /* 최대 폭 — 27인치 이상에서도 너무 안 넓어짐 */
  display: flex;
  flex-direction: column;
  gap: 4px;            /* ★ v15: 카트 영역 최대화 — gap 8→4 축소 */
}
/* 모바일 모드는 50% 비율 아닌 좁은 폭 */
body.pos.mode-mobile .left { flex: 0 0 320px; min-width: 0; }

/* 카트 테이블 */
.cart {
  flex: 0 0 70%;      /* ★ 2026-07-12 사장님: 좌측 = 카트 70 / 하단 30 (70/30 고정) */
  min-height: 0;
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  font-size: 13px;
  display: block;
  overflow-y: auto;
}
.cart thead {
  background: #3182F6;
  color: #fff;
  position: sticky;
  top: 0;
  display: table;
  width: 100%;
  table-layout: fixed;
}
.cart thead th {
  padding: 8px 6px;
  font-weight: 700;
  font-size: 12px;
  text-align: center;
}
.cart thead th:nth-child(1) { width: 36px; }
.cart thead th:nth-child(2) { width: auto; }
.cart thead th:nth-child(3) { width: 80px; }
.cart thead th:nth-child(4) { width: 60px; }
.cart thead th:nth-child(5) { width: 64px; padding: 4px 4px; }   /* ★ 2026-09-09 X(선택취소) 열 + 헤더 [전체취소] */
.cart-clear-top { background: #ef4444; color: #fff; border: 0; border-radius: 6px; padding: 6px 8px; font-size: 12px; font-weight: 800; cursor: pointer; font-family: inherit; white-space: nowrap; }
.cart-clear-top:active { background: #dc2626; }

.cart tbody {
  display: table;
  width: 100%;
  table-layout: fixed;
}
.cart tbody tr {
  border-bottom: 1px solid #e2e8f0;
  cursor: pointer;
}
.cart tbody tr.selected { background: #fef3c7; }
.cart tbody tr:hover { background: #f8fafc; }
.cart tbody tr.selected:hover { background: #fde68a; }
.cart tbody td {
  padding: 7px 6px;
  text-align: center;
}
.cart tbody td:nth-child(1) { width: 36px; color: #64748b; }
.cart tbody td:nth-child(2) { width: auto; text-align: left; padding-left: 10px; font-weight: 600; }
.cart tbody td:nth-child(3) { width: 80px; text-align: right; padding-right: 10px; }
.cart tbody td:nth-child(4) { width: 60px; }
.cart tbody td:nth-child(5) { width: 64px; text-align: center; padding: 4px 2px; }
.cart-del { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid #e5e8eb; background: #fff; color: #dc2626; font-size: 24px; font-weight: 900; line-height: 1; cursor: pointer; font-family: inherit; }
.cart-del:active { background: #fee2e2; border-color: #dc2626; }
/* ★ 2026-09-09 사장님: 긴 상품명은 잘리지 말고 다음 줄로 */
.cart tbody td:nth-child(2) { white-space: normal !important; word-break: keep-all; overflow-wrap: anywhere; line-height: 1.25; }

/* 카트 액션 버튼들 */
.cart-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); /* 2026-07-12 작은 정사각 유지 */
  gap: 4px;
}
.cart-actions button {
  padding: 10px 0;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
}
.cart-actions button:hover { background: #f1f5f9; }
.cart-actions button.warn { background: #f59e0b; color: #fff; border-color: #f59e0b; }
.cart-actions button.warn:hover { background: #d97706; }
.cart-actions button.danger { background: #ef4444; color: #fff; border-color: #ef4444; }
.cart-actions button.danger:hover { background: #dc2626; }

/* 바코드 입력 */
.barcode-input input {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  border: 2px solid #3182F6;
  border-radius: 8px;
  background: #fff;
  font-weight: 600;
}
.barcode-input input:focus { outline: none; border-color: #3182F6; box-shadow: 0 0 0 3px rgba(49,130,246,0.15); }

/* 합계 박스 */
.totals {
  background: #fff;
  border-radius: 8px;
  padding: 8px 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.totals > div {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
  font-size: 11.5px;
}
.totals > div span { color: #64748b; }
.totals > div b { font-weight: 700; }
.totals > div.big {
  border-top: 2px solid #cbd5e1;
  padding-top: 8px;
  margin-top: 4px;
  font-size: 18px;
}
.totals > div.big span { color: #0f172a; font-weight: 700; }

/* 회원 정보 */
.member-info {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
}
.member-info > div {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}
.member-info > div span { color: #78350f; }
.member-info > div b { color: #0f172a; font-weight: 700; }

/* ===== 오른쪽 (카테고리 + 단축키) ===== */
.right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fff;
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  overflow: hidden;
  min-width: 0;
}
.category-tabs, .sub-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.category-tabs button, .sub-tabs button {
  padding: 8px 14px;
  background: #e2e8f0;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  font-size: 13px;
}
.category-tabs button:hover, .sub-tabs button:hover { background: #cbd5e1; }
.category-tabs button.active {
  background: #3182F6;
  color: #fff;
}
.sub-tabs button.active {
  background: #f59e0b;
  color: #fff;
}
.sub-tabs { padding-left: 4px; min-height: 36px; }

/* 단축키 그리드 */
.shortcut-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(92px, auto); /* ★ 2026-07-12 바둑판 + 내용잘림 방지 */
  align-content: start;
  gap: 6px;
  overflow-y: auto;
  padding: 4px;
}
.shortcut-grid button {
  padding: 8px 6px;
  background: linear-gradient(180deg, #fff 0%, #f1f5f9 100%);
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  transition: all 0.1s;
  text-align: center;
  line-height: 1.2;
}
.shortcut-grid button:hover {
  background: #fef3c7;
  border-color: #f59e0b;
  transform: translateY(-1px);
}
.shortcut-grid button:active {
  transform: translateY(0);
  background: #fde68a;
}
.shortcut-grid button .label {
  font-size: 13px;
  color: #0f172a;
  font-weight: 700;
  word-break: keep-all;
}
.shortcut-grid button .price {
  font-size: 12px;
  color: #ef4444;
  font-weight: 800;
}

/* 색상 카테고리별 단축키 */
.shortcut-grid button.color-blue { background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%); border-color: #60a5fa; }
.shortcut-grid button.color-green { background: linear-gradient(180deg, #d1fae5 0%, #a7f3d0 100%); border-color: #34d399; }
.shortcut-grid button.color-yellow { background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%); border-color: #fbbf24; }
.shortcut-grid button.color-pink { background: linear-gradient(180deg, #fce7f3 0%, #fbcfe8 100%); border-color: #f472b6; }
.shortcut-grid button.color-orange { background: linear-gradient(180deg, #ffedd5 0%, #fed7aa 100%); border-color: #fb923c; }
.shortcut-grid button.color-purple { background: linear-gradient(180deg, #ede9fe 0%, #ddd6fe 100%); border-color: #a78bfa; }

/* ===== 하단 메뉴 ===== */
.bottom-menu {
  height: 64px;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 4px;
  padding: 8px;
  align-items: center;
}
.bottom-menu button {
  flex: 1;
  height: 48px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}
.bottom-menu button:hover { background: #e2e8f0; }
.bottom-menu button.primary {
  background: linear-gradient(135deg, #3182F6 0%, #3182F6 100%);
  color: #fff;
  border: none;
  flex: 1.5;
  font-size: 15px;
}
.bottom-menu button.primary:hover {
  background: linear-gradient(135deg, #1B64DA 0%, #3182F6 100%);
}

/* ════════════════════════════════════════════════════════════
   ★ patch_v9.3: 피드백 6×2 그리드 — 그룹별 색상 + 판매보류 배지
   ════════════════════════════════════════════════════════════ */
.bottom-menu-grid {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 4px;
  height: auto;
  min-height: 96px;
  padding: 4px 8px 6px;
}
.bottom-menu-grid button {
  height: auto;
  min-height: 46px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 0;
  font-size: 12px;
  line-height: 1.2;
  position: relative;
}
.bottom-menu-grid button .icon {
  font-size: 16px;
  display: block;
  margin-bottom: 2px;
}

/* 역할별 색상 그룹화 — 시각적 분류 */
.bottom-menu-grid button[data-role="member"] {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1e40af;
}
.bottom-menu-grid button[data-role="member"]:hover { background: #dbeafe; }

.bottom-menu-grid button[data-role="hold"] {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
  font-weight: 900;
}
.bottom-menu-grid button[data-role="hold"]:hover { background: #fde68a; }

.bottom-menu-grid button[data-role="discount"] {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
  font-weight: 900;
}
.bottom-menu-grid button[data-role="discount"]:hover { background: #fecaca; }

.bottom-menu-grid button[data-role="receipt"] {
  background: #f3e8ff;
  border-color: #c4b5fd;
  color: #5b21b6;
}
.bottom-menu-grid button[data-role="receipt"]:hover { background: #e9d5ff; }

.bottom-menu-grid button[data-role="pay-sub"] {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #334155;
}

.bottom-menu-grid button[data-role="pay-main"] {
  background: linear-gradient(135deg, #3182F6 0%, #3182F6 100%);
  color: #fff;
  border: none;
  font-weight: 900;
  font-size: 13px;
  box-shadow: 0 2px 6px rgba(22, 163, 115, 0.3);
}
.bottom-menu-grid button[data-role="pay-main"]:hover {
  background: linear-gradient(135deg, #1B64DA 0%, #3182F6 100%);
  transform: translateY(-1px);
}
.bottom-menu-grid button[data-role="pay-main"] .icon { font-size: 18px; }

/* 판매보류 배지 */
.hold-badge {
  position: absolute;
  top: 4px; right: 6px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 9px;
  min-width: 18px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(239,68,68,0.4);
  animation: holdBadgePulse 2s infinite;
}
@keyframes holdBadgePulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
  50%     { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
}

/* ★ patch_v9.5 + v11 (2026-05-25): 자동 분류 그리드 — 27인치까지 전체 폭 활용
   - ★ FIX: .auto-cols 가 부모 .shortcut-grid(7컬럼) 의 1칸만 차지하던 버그 → grid-column 1/-1 로 전체 spanning
   - 컬럼 폭 auto-fit (최소 220px) → 큰 화면에서도 시원하게 깔림
   - 타일 폭/높이/폰트 확대 */
.shortcut-grid .auto-cols {
  grid-column: 1 / -1;       /* ★ 부모 그리드의 모든 컬럼 span → 전체 폭 사용 */
  grid-row: 1 / -1;          /* 행 전체도 차지 */
  display: grid;
  /* ★ patch_v14 (2026-05-25 사장님): 4각형 박스 축소 — 컬럼 폭 220→150 */
  /* ★ 2026-07-12: 그룹 밴드 전체폭 세로 스택(사장님 바둑판) — 옆배치(240px)는 타일 44px로 붕괴 */
  grid-template-columns: 1fr;
  grid-auto-rows: max-content;
  gap: 6px;
  padding: 5px;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  align-content: start;
}
.shortcut-grid .auto-col {
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  min-width: 0;
}
.shortcut-grid .auto-col-head {
  padding: 8px 10px;          /* v14: 11→8 축소 */
  background: #fff;
  color: #191F28;
  border-bottom: 1px solid #E5E8EB;
  font-weight: 900;
  font-size: 13px;            /* v14: 15→13 축소 */
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.3px;
}
.shortcut-grid .auto-col-head .cnt {
  background: #F2F4F6;
  color: #8B95A1;
  padding: 2px 9px;
  border-radius: 10px;
  font-size: 11px;
  margin-left: 6px;
  font-weight: 800;
}
.shortcut-grid .auto-col-items {
  /* ★ 2026-05-29 사장 명시: 바둑판식 작게 — flex-column → grid 3-4열 */
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
  padding: 4px;
  overflow-y: auto;
  flex: 1;
  align-content: start;
}
.shortcut-grid .auto-col-items button {
  min-height: 44px;
  background: #fff;
  border: 1.5px solid #cbd5e1;
  border-radius: 5px;
  cursor: pointer;
  padding: 3px 2px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1px;
  transition: transform .12s, box-shadow .12s, border-color .12s;
  aspect-ratio: 1 / 1;          /* 정사각형 — 바둑판 */
  min-width: 0;                 /* grid 안에서 ellipsis 동작 */
}
.shortcut-grid .auto-col-items button:active {
  transform: scale(0.97);
}
.shortcut-grid .auto-col-items button .label {
  font-size: 9.5px;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: keep-all;
  letter-spacing: -0.3px;
  width: 100%;
}
.shortcut-grid .auto-col-items button .price {
  font-size: 11px;
  font-weight: 900;
  color: #dc2626;
  letter-spacing: -0.3px;
  margin-top: 1px;
}
.shortcut-grid .auto-col-items button:hover {
  background: #fef9c3;
  border-color: #f59e0b;
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}

/* 모바일 모드 — 화면 좁을 때 컬럼 폭 축소 */
body.pos.mode-mobile .shortcut-grid .auto-cols {
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 5px;
}
body.pos.mode-mobile .shortcut-grid .auto-col-head { font-size: 13px; padding: 8px; }
body.pos.mode-mobile .shortcut-grid .auto-col-items button { min-height: 56px; }
body.pos.mode-mobile .shortcut-grid .auto-col-items button .label { font-size: 12.5px; }
body.pos.mode-mobile .shortcut-grid .auto-col-items button .price { font-size: 12.5px; }

/* 탭 모드 */
body.pos.mode-tablet .shortcut-grid .auto-cols {
  grid-template-columns: 1fr;
}
body.pos.mode-tablet .shortcut-grid .auto-col-head { font-size: 14px; }
body.pos.mode-tablet .shortcut-grid .auto-col-items button { min-height: 60px; }

/* ════════════════════════════════════════════════════════════

/* ════════════════════════════════════════════════════════════
   ★ patch_v12 (2026-05-25): 터치 수량 편집 — 카트 수량 셀 클릭 시 키패드 모달
   ════════════════════════════════════════════════════════════ */
.cart tbody td.qty-cell {
  cursor: pointer;
  position: relative;
  user-select: none;
  -webkit-tap-highlight-color: rgba(13,110,79,0.2);
  transition: background 0.15s;
  font-weight: 800;
  color: #3182F6;
  text-align: center;   /* ★ 2026-07-27 수량 중앙정렬 (사장님) */
}
.cart tbody td.qty-cell:hover { background: #d1fae5; }
/* ★ 2026-07-27 사장님: 수량칸 연필 ✎ 제거 — 숫자 탭(openQtyPad)으로 편집은 그대로 */
.cart tbody td.qty-cell::after { content: none; }

/* ═══ 수량 키패드 모달 ═══ */
#qtyPadBg {
  display: none; position: fixed; inset: 0; background: rgba(15,23,42,0.55);
  z-index: 99000; align-items: center; justify-content: center;
}
#qtyPadBg.open { display: flex; }
#qtyPadBox {
  background: #fff; border-radius: 16px; width: 360px; max-width: 92vw;
  padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}
#qtyPadBox h3 {
  margin: 0 0 6px; color: #1B64DA; font-size: 18px; font-weight: 900;
}
#qtyPadBox .qp-prod {
  font-size: 13px; color: #64748b; margin-bottom: 14px;
  background: #f1f5f9; padding: 8px 12px; border-radius: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#qtyPadBox .qp-display {
  text-align: center; font-size: 42px; font-weight: 900; color: #dc2626;
  background: #fef9c3; border: 2px solid #fde047; border-radius: 12px;
  padding: 12px; margin-bottom: 16px; letter-spacing: 4px;
  font-variant-numeric: tabular-nums;
}
#qtyPadBox .qp-pad {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
#qtyPadBox .qp-pad button {
  height: 60px; font-size: 24px; font-weight: 900;
  background: #f8fafc; border: 1.5px solid #cbd5e1; border-radius: 10px;
  cursor: pointer; color: #1e293b; font-family: inherit;
  transition: transform 0.08s, background 0.15s;
}
#qtyPadBox .qp-pad button:hover { background: #e2e8f0; }
#qtyPadBox .qp-pad button:active { transform: scale(0.95); background: #cbd5e1; }
#qtyPadBox .qp-pad button.qp-clear { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }
#qtyPadBox .qp-pad button.qp-clear:hover { background: #fecaca; }
#qtyPadBox .qp-pad button.qp-back { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
#qtyPadBox .qp-pad button.qp-back:hover { background: #fde68a; }
#qtyPadBox .qp-actions {
  display: flex; gap: 8px; margin-top: 16px;
}
#qtyPadBox .qp-actions button {
  flex: 1; height: 52px; font-size: 17px; font-weight: 900;
  border: none; border-radius: 10px; cursor: pointer; font-family: inherit;
  transition: filter 0.15s;
}
#qtyPadBox .qp-actions .qp-cancel { background: #e2e8f0; color: #475569; }
#qtyPadBox .qp-actions .qp-cancel:hover { filter: brightness(0.95); }
#qtyPadBox .qp-actions .qp-ok {
  background: linear-gradient(135deg, #3182F6, #3182F6); color: #fff;
}
#qtyPadBox .qp-actions .qp-ok:hover { filter: brightness(1.08); }

/* ★ patch_v9.4: 할인 들여쓰기 행 + [X] 버튼 */
.cart tr.discount-row {
  background: #fef9c3 !important;
  cursor: default;
}
.cart tr.discount-row:hover { background: #fef9c3 !important; }
.cart tr.discount-row td { padding: 4px 6px !important; font-size: 12px; border-bottom: 1px solid #e2e8f0; }
button.del-x {
  display: inline-block;
  margin-left: 6px;
  background: #fff;
  border: 1px solid #dc2626;
  color: #dc2626;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  vertical-align: middle;
}
button.del-x:hover { background: #dc2626; color: #fff; }

/* 반응형: 좁은 화면 (5×2 자동 전환) */
@media (max-width: 900px) {
  .bottom-menu-grid {
    grid-template-columns: repeat(5, 1fr);
  }
  /* "회원정보수정" 버튼 숨김 (회원조회 후 서브로 진입) */
  .bottom-menu-grid button[onclick*="openMemberEdit"] { display:none; }
}
@media (max-width: 600px) {
  .bottom-menu-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
  }
  .bottom-menu-grid button { font-size: 11px; min-height: 42px; }
  .bottom-menu-grid button .icon { font-size: 14px; }
}

/* ============================================================
   반응형 — 자동 (사용자가 모드 강제 안 했을 때)
   .mode-pc / .mode-tablet / .mode-mobile 클래스가 없을 때만 적용
   ============================================================ */

/* 1280px 이하 — 자동 탭 모드 */
@media (max-width: 1280px) {
  body.pos:not(.mode-pc):not(.mode-tablet):not(.mode-mobile) .left { flex: 0 0 380px; }
  body.pos:not(.mode-pc):not(.mode-tablet):not(.mode-mobile) .shortcut-grid { grid-template-columns: repeat(5, 1fr); }
  body.pos:not(.mode-pc):not(.mode-tablet):not(.mode-mobile) .header .info { gap: 16px; font-size: 12px; }
  body.pos:not(.mode-pc):not(.mode-tablet):not(.mode-mobile) .bottom-menu button { font-size: 11px; padding: 0 4px; }
}

/* 768px 이하 — 자동 모바일 모드 */
@media (max-width: 768px) {
  body.pos:not(.mode-pc):not(.mode-tablet):not(.mode-mobile) .header .info { display: none; }
  body.pos:not(.mode-pc):not(.mode-tablet):not(.mode-mobile) .main { flex-direction: column; height: calc(100vh - 56px - 112px); }
  body.pos:not(.mode-pc):not(.mode-tablet):not(.mode-mobile) .left { flex: 0 0 auto; max-height: 50vh; }
  body.pos:not(.mode-pc):not(.mode-tablet):not(.mode-mobile) .right { flex: 1 1 auto; }
  body.pos:not(.mode-pc):not(.mode-tablet):not(.mode-mobile) .shortcut-grid { grid-template-columns: repeat(3, 1fr); }
  body.pos:not(.mode-pc):not(.mode-tablet):not(.mode-mobile) .bottom-menu { flex-wrap: wrap; height: auto; padding: 4px; }
  body.pos:not(.mode-pc):not(.mode-tablet):not(.mode-mobile) .bottom-menu button { flex: 1 1 calc(33% - 4px); height: 40px; font-size: 11px; }
}

/* ============================================================
   강제 모드 — 사용자가 토글 클릭한 경우
   ============================================================ */

/* PC 강제 */
body.pos.mode-pc .main { flex-direction: row; height: calc(100vh - 56px - 112px); }
body.pos.mode-pc .left { flex: 0 0 480px; max-height: none; }
body.pos.mode-pc .right { flex: 1; }
body.pos.mode-pc .shortcut-grid { grid-template-columns: repeat(7, 1fr); grid-auto-rows: minmax(80px, 1fr); }
body.pos.mode-pc .bottom-menu { flex-wrap: nowrap; height: 64px; padding: 8px; }
body.pos.mode-pc .bottom-menu button { flex: 1; height: 48px; font-size: 13px; }
body.pos.mode-pc .bottom-menu button.primary { flex: 1.5; font-size: 15px; }
body.pos.mode-pc .header .info { display: flex; }
body.pos.mode-pc .member-info { display: grid; }

/* 태블릿 강제 */
body.pos.mode-tablet .main { flex-direction: row; height: calc(100vh - 56px - 112px); padding: 6px; gap: 6px; }
body.pos.mode-tablet .left { flex: 0 0 380px; max-height: none; }
body.pos.mode-tablet .right { flex: 1; }
body.pos.mode-tablet .shortcut-grid { grid-template-columns: repeat(5, 1fr); grid-auto-rows: minmax(70px, 1fr); }
body.pos.mode-tablet .shortcut-grid button { font-size: 12px; }
body.pos.mode-tablet .shortcut-grid button .label { font-size: 12px; }
body.pos.mode-tablet .bottom-menu { flex-wrap: wrap; height: auto; padding: 4px; }
body.pos.mode-tablet .bottom-menu button { flex: 1 1 calc(20% - 4px); height: 44px; font-size: 11px; }
body.pos.mode-tablet .bottom-menu button.primary { flex: 1 1 calc(33% - 4px); font-size: 13px; }
body.pos.mode-tablet .header .info { font-size: 12px; gap: 12px; }
body.pos.mode-tablet .header .info span:first-child { display: none; }
body.pos.mode-tablet .cart-actions button { font-size: 12px; padding: 8px 0; }
body.pos.mode-tablet .totals { padding: 8px 12px; }
body.pos.mode-tablet .totals > div { font-size: 13px; }
body.pos.mode-tablet .totals > div.big { font-size: 16px; }

/* 모바일 강제 */
body.pos.mode-mobile { font-size: 13px; }
body.pos.mode-mobile .header { height: 48px; padding: 0 8px; }
body.pos.mode-mobile .header .logo { width: 32px; height: 28px; font-size: 11px; }
body.pos.mode-mobile .header .brand { font-size: 14px; }
body.pos.mode-mobile .header .info { display: none; }
body.pos.mode-mobile .header .actions button,
body.pos.mode-mobile .header .actions .link-btn { padding: 4px 8px; font-size: 11px; }
body.pos.mode-mobile .view-mode-toggle button { padding: 3px 6px !important; font-size: 10px !important; }
body.pos.mode-mobile .main { flex-direction: column; height: calc(100vh - 48px - 130px); padding: 4px; gap: 4px; }
body.pos.mode-mobile .left { flex: none; max-height: 50vh; gap: 4px; }
body.pos.mode-mobile .right { flex: 1; min-height: 200px; padding: 4px; }
body.pos.mode-mobile .cart { font-size: 11px; }
body.pos.mode-mobile .cart thead th { padding: 6px 4px; font-size: 11px; }
body.pos.mode-mobile .cart tbody td { padding: 5px 4px; }
body.pos.mode-mobile .cart-actions { grid-template-columns: repeat(3, 1fr); gap: 3px; }
body.pos.mode-mobile .cart-actions button { padding: 8px 0; font-size: 12px; }
body.pos.mode-mobile .barcode-input input { padding: 8px 10px; font-size: 13px; }
body.pos.mode-mobile .totals { padding: 8px 10px; }
body.pos.mode-mobile .totals > div { font-size: 12px; padding: 2px 0; }
body.pos.mode-mobile .totals > div.big { font-size: 15px; }
body.pos.mode-mobile .member-info { display: none; }  /* 모바일은 회원정보 숨김 */
body.pos.mode-mobile .category-tabs button,
body.pos.mode-mobile .sub-tabs button { padding: 5px 10px; font-size: 11px; }
body.pos.mode-mobile .shortcut-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 65px; gap: 4px; }
body.pos.mode-mobile .shortcut-grid button { padding: 4px 2px; font-size: 11px; }
body.pos.mode-mobile .shortcut-grid button .label { font-size: 11px; line-height: 1.1; }
body.pos.mode-mobile .shortcut-grid button .price { font-size: 10px; }
body.pos.mode-mobile .bottom-menu { flex-wrap: wrap; height: auto; padding: 3px; gap: 3px; }
body.pos.mode-mobile .bottom-menu button { flex: 1 1 calc(33.33% - 3px); height: 36px; font-size: 11px; padding: 0 4px; }
body.pos.mode-mobile .bottom-menu button.primary { flex: 1 1 calc(50% - 3px); font-size: 12px; }

/* 모달 — 모든 모드 적용 */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 12px;
}
.modal {
  background: #fff;
  border-radius: 12px;
  padding: 0;
  min-width: 400px;
  max-width: 95vw;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
@media (max-width: 480px) {
  .modal { min-width: 0; width: 100%; }
  body.pos.mode-mobile .modal { min-width: 0; width: 100%; }
}
.modal-header {
  background: #3182F6;
  color: #fff;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h2 { margin: 0; font-size: 18px; }
.modal-header .close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  width: 32px; height: 32px;
  border-radius: 6px;
  font-size: 20px;
  cursor: pointer;
}
.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  background: #f8fafc;
  flex-wrap: wrap;
}
.modal-footer button {
  padding: 10px 20px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  font-weight: 700;
  background: #fff;
}
.modal-footer button.primary {
  background: #3182F6;
  color: #fff;
  border-color: #3182F6;
}
.modal-footer button.danger {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}

/* 결제 모달 — 키패드 */
.pay-modal .pay-amount {
  background: #f1f5f9;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}
.pay-modal .pay-amount .row {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  margin: 4px 0;
}
.pay-modal .pay-amount .row.big {
  font-size: 22px;
  font-weight: 800;
  color: #ef4444;
  border-top: 1px solid #cbd5e1;
  padding-top: 8px;
  margin-top: 8px;
}
/* SIZE-DOWN 2026-09-24: 루원 1번 크롬 67% 가 원인이었음 → 100% 복귀 후 아래 값 ÷1.2 두 번(사장님 '더 줄여도 됨') */
/* ★ PT-UX 2026-09-23 사장님: 지갑 결제(포인트+알페이) 창 글씨·칸이 작아 캐셔가 잘못 누른다 → 금액 행·입력칸 약 2배.
   pos-cargaman.css 가 .form-row input 을 !important 로 14px 고정하므로 여기도 !important(선택자 더 구체적이라 이긴다) */
.pay-modal .pt-body { min-width: 400px; }
body.mode-mobile .pay-modal .pt-body { min-width: 0; }
.pay-modal .pt-body .pay-amount .row { font-size: 16px; margin: 6px 0; }
.pay-modal .pt-body .form-row label { font-size: 14px !important; }
.pay-modal .pt-body .form-row input { font-size: 18px !important; height: 42px; padding: 6px 10px !important; font-weight: 800; }
.pay-modal .pt-due { background: #fef3c7; border: 1px solid #f59e0b; border-radius: 8px; padding: 9px 11px; margin: 6px 0; font-size: 16px; font-weight: 800; color: #92400e; }
.pay-modal .pt-methods { display: flex; gap: 8px; margin: 8px 0; }
.pay-modal .pt-methods[hidden] { display: none; }   /* display:flex 가 hidden 속성을 이기므로 명시 */
.pay-modal .pt-methods button { flex: 1; min-height: 46px; font-size: 16px; font-weight: 800; border: 2px solid #E5E8EB; border-radius: 8px; background: #fff; color: #333D4B; cursor: pointer; font-family: inherit; }
.pay-modal .pt-methods button.on { background: #3182F6; border-color: #3182F6; color: #fff; }
.pay-modal .keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.pay-modal .keypad button {
  padding: 18px 0;
  font-size: 22px;
  font-weight: 700;
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
}
.pay-modal .keypad button.special { background: #f1f5f9; }
.pay-modal .keypad button:hover { background: #e2e8f0; }
.pay-modal .quick-amount {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.pay-modal .quick-amount button {
  padding: 12px 0;
  background: #dcfce7;
  border: 1px solid #86efac;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
}
.pay-modal .quick-amount button:hover { background: #bbf7d0; }
.pay-modal .input-display {
  text-align: right;
  padding: 14px 16px;
  background: #fff;
  border: 2px solid #3182F6;
  border-radius: 8px;
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 12px;
  min-height: 52px;
}

/* 회원 검색 모달 */
.member-modal .search-row {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.member-modal .search-row input {
  flex: 1;
  padding: 12px;
  font-size: 16px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}
.member-modal .search-row button {
  padding: 12px 20px;
  background: #3182F6;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
}
.member-modal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.member-modal table th {
  background: #f1f5f9;
  padding: 8px;
  text-align: left;
  border-bottom: 2px solid #cbd5e1;
}
.member-modal table td {
  padding: 8px;
  border-bottom: 1px solid #e2e8f0;
  cursor: pointer;
}
.member-modal table tr:hover { background: #fef3c7; }

/* 알림 토스트 */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  animation: toastIn 0.2s ease-out;
}
.toast.success { background: #16a34a; }
.toast.error { background: #dc2626; }
.toast.warn { background: #f59e0b; }
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* 폼 입력 공통 */
.form-row { margin-bottom: 12px; }
.form-row label {
  display: block;
  font-size: 13px;
  color: #475569;
  margin-bottom: 4px;
  font-weight: 700;
}
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
}
.form-row input:focus, .form-row select:focus { outline: none; border-color: #3182F6; }

/* ============================================================
   Admin 화면 반응형 (대시보드, 단축키관리, 일매출/마감, 직원, 매장설정)
   ============================================================ */

/* 자동 반응형 — 모드 강제 안 했을 때 */
@media (max-width: 1024px) {
  body:not(.mode-pc):not(.mode-tablet):not(.mode-mobile) .admin-header .nav { gap: 2px; }
  body:not(.mode-pc):not(.mode-tablet):not(.mode-mobile) .admin-header .nav a { padding: 6px 8px; font-size: 12px; }
}
@media (max-width: 768px) {
  body:not(.mode-pc):not(.mode-tablet):not(.mode-mobile) .admin-header { height: auto; flex-wrap: wrap; padding: 8px; }
  body:not(.mode-pc):not(.mode-tablet):not(.mode-mobile) .admin-header .nav { order: 3; flex-basis: 100%; overflow-x: auto; padding: 4px 0; }
  body:not(.mode-pc):not(.mode-tablet):not(.mode-mobile) .admin-header .nav a { padding: 5px 8px; font-size: 11px; white-space: nowrap; }
  body:not(.mode-pc):not(.mode-tablet):not(.mode-mobile) .admin-body { padding: 8px; }
  body:not(.mode-pc):not(.mode-tablet):not(.mode-mobile) .summary-grid { grid-template-columns: 1fr 1fr; }
  body:not(.mode-pc):not(.mode-tablet):not(.mode-mobile) .panels { grid-template-columns: 1fr; }
  body:not(.mode-pc):not(.mode-tablet):not(.mode-mobile) .stats { grid-template-columns: 1fr 1fr; }
}

/* === 강제 PC === */
body.mode-pc .admin-header { height: 56px; flex-wrap: nowrap; }
body.mode-pc .admin-header .nav { gap: 4px; }
body.mode-pc .admin-header .nav a { padding: 8px 14px; font-size: 14px; }
body.mode-pc .admin-body { padding: 24px; max-width: 1400px; }
body.mode-pc .summary-grid { grid-template-columns: repeat(4, 1fr); }
body.mode-pc .panels { grid-template-columns: 1fr 1fr; }
body.mode-pc .stats { grid-template-columns: repeat(4, 1fr); }
body.mode-pc .admin-cards { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* === 강제 탭 === */
body.mode-tablet .admin-header { height: auto; flex-wrap: wrap; padding: 6px 12px; min-height: 50px; }
body.mode-tablet .admin-header .brand { font-size: 16px; }
body.mode-tablet .admin-header .nav { gap: 2px; flex: 1; flex-wrap: wrap; }
body.mode-tablet .admin-header .nav a { padding: 6px 10px; font-size: 12px; }
body.mode-tablet .admin-header .actions a { padding: 5px 10px; font-size: 12px; }
body.mode-tablet .admin-body { padding: 12px; }
body.mode-tablet .summary-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
body.mode-tablet .summary-box { padding: 14px; }
body.mode-tablet .summary-box.big { grid-column: span 2; }
body.mode-tablet .summary-box .val { font-size: 22px; }
body.mode-tablet .summary-box.big .val { font-size: 28px; }
body.mode-tablet .panels { grid-template-columns: 1fr; gap: 10px; }
body.mode-tablet .stats { grid-template-columns: repeat(4, 1fr); }
body.mode-tablet .grid-table { font-size: 12px; }
body.mode-tablet .grid-table th, body.mode-tablet .grid-table td { padding: 6px 8px; }
body.mode-tablet .toolbar { flex-wrap: wrap; gap: 6px; }

/* === 강제 모바일 === */
body.mode-mobile .admin-header { height: auto; flex-wrap: wrap; padding: 6px 8px; min-height: 44px; }
body.mode-mobile .admin-header .brand { font-size: 13px; flex-basis: 100%; text-align: center; margin-bottom: 4px; }
body.mode-mobile .admin-header .nav { order: 3; flex-basis: 100%; overflow-x: auto; gap: 2px; padding: 2px 0; }
body.mode-mobile .admin-header .nav a { padding: 5px 8px; font-size: 11px; white-space: nowrap; }
body.mode-mobile .admin-header .actions { margin-left: auto; }
body.mode-mobile .admin-header .actions a { padding: 4px 10px; font-size: 11px; }
body.mode-mobile .admin-body { padding: 8px; }
body.mode-mobile .admin-body h2 { font-size: 16px; }
body.mode-mobile .summary-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
body.mode-mobile .summary-box { padding: 10px; }
body.mode-mobile .summary-box .val { font-size: 17px; }
body.mode-mobile .summary-box.big { grid-column: span 2; }
body.mode-mobile .summary-box.big .val { font-size: 22px; }
body.mode-mobile .panels { grid-template-columns: 1fr; gap: 6px; }
body.mode-mobile .panel { padding: 10px; }
body.mode-mobile .panel h3 { font-size: 14px; }
body.mode-mobile .stats { grid-template-columns: 1fr 1fr; gap: 6px; }
body.mode-mobile .stats .stat-box { padding: 8px; }
body.mode-mobile .stats .stat-box .val { font-size: 16px; }
body.mode-mobile .grid-table { font-size: 11px; display: block; overflow-x: auto; white-space: nowrap; }
body.mode-mobile .grid-table th, body.mode-mobile .grid-table td { padding: 4px 6px; }
body.mode-mobile .grid-table input, body.mode-mobile .grid-table select { font-size: 11px; padding: 3px 5px; }
body.mode-mobile .grid-table .actions button { padding: 3px 6px; font-size: 10px; margin-right: 2px; }
body.mode-mobile .toolbar { flex-wrap: wrap; padding: 6px; gap: 4px; }
body.mode-mobile .toolbar input, body.mode-mobile .toolbar select { font-size: 11px; padding: 5px 8px; flex: 1 1 100px; }
body.mode-mobile .toolbar button { padding: 5px 10px; font-size: 11px; }
body.mode-mobile .admin-cards { grid-template-columns: 1fr; gap: 8px; }
body.mode-mobile .admin-card { padding: 14px; }
body.mode-mobile .admin-card .ico { font-size: 24px; }
body.mode-mobile .admin-card h3 { font-size: 15px; }
body.mode-mobile .admin-card p { font-size: 12px; }
body.mode-mobile .save-bar { padding: 10px; }
body.mode-mobile .save-bar button { padding: 10px 16px; font-size: 13px; }

/* ============================================================
   모달 반응형 강화 (모든 모드)
   ============================================================ */

/* 자동 — 480px 이하 */
@media (max-width: 480px) {
  .modal { min-width: 0 !important; width: 100%; max-width: 100%; max-height: 95vh; }
  .modal-overlay { padding: 6px; }
  .modal-header { padding: 10px 14px; }
  .modal-header h2 { font-size: 15px; }
  .modal-body { padding: 14px; }
  .modal-footer { padding: 10px; gap: 6px; }
  .modal-footer button { padding: 8px 14px; font-size: 12px; flex: 1 1 auto; }
}

/* 강제 모바일 — 모달 풀폭 */
body.mode-mobile .modal { min-width: 0 !important; width: 100%; max-width: 100%; max-height: 95vh; }
body.mode-mobile .modal-overlay { padding: 6px; align-items: flex-end; }
body.mode-mobile .modal { border-radius: 12px 12px 0 0; }
body.mode-mobile .modal-header { padding: 10px 14px; }
body.mode-mobile .modal-header h2 { font-size: 15px; }
body.mode-mobile .modal-body { padding: 14px; }
body.mode-mobile .modal-footer { padding: 10px; gap: 6px; }
body.mode-mobile .modal-footer button { padding: 8px 12px; font-size: 12px; flex: 1 1 auto; }

/* 결제 모달 — 모바일 키패드 축소 */
body.mode-mobile .pay-modal .pay-amount { padding: 12px; margin-bottom: 12px; }
body.mode-mobile .pay-modal .pay-amount .row { font-size: 13px; }
body.mode-mobile .pay-modal .pay-amount .row.big { font-size: 18px; }
body.mode-mobile .pay-modal .keypad { gap: 4px; }
body.mode-mobile .pay-modal .keypad button { padding: 14px 0; font-size: 18px; }
body.mode-mobile .pay-modal .quick-amount { grid-template-columns: repeat(2, 1fr); gap: 4px; }
body.mode-mobile .pay-modal .quick-amount button { padding: 8px 0; font-size: 12px; }
body.mode-mobile .pay-modal .input-display { font-size: 18px; padding: 10px 12px; min-height: 42px; }

/* 회원검색 모달 — 모바일 */
body.mode-mobile .member-modal .search-row input { font-size: 13px; padding: 8px; }
body.mode-mobile .member-modal .search-row button { padding: 8px 14px; font-size: 12px; }
body.mode-mobile .member-modal table { font-size: 11px; display: block; overflow-x: auto; }
body.mode-mobile .member-modal table th, body.mode-mobile .member-modal table td { padding: 5px 6px; white-space: nowrap; }

/* 폼 행 — 모바일 */
body.mode-mobile .form-row label { font-size: 12px; }
body.mode-mobile .form-row input, body.mode-mobile .form-row select, body.mode-mobile .form-row textarea { font-size: 13px; padding: 8px 10px; }
body.mode-mobile .form-row .hint { font-size: 11px; }

/* 미리보기 박스 — 모바일 */
body.mode-mobile .preview { font-size: 11px; padding: 10px; }


/* ★ 2026-07-12 하단 30% 컴팩트 — 회원정보 */
.member-info { padding: 6px 12px !important; gap: 4px !important; }
.member-info > div { font-size: 11px !important; }
.member-info > div b { font-size: 12.5px !important; }


/* ★ 2026-07-12 헤더 드롭다운 전역 최상위 — 헤더에 z-index 금지(스태킹 함정), 메뉴는 열릴 때 fixed 승격(pos_patches.js) */
.header { position: relative; }
#posLangMenu, #posVoiceMenu { z-index: 2147483000 !important; }


/* ★ 2026-07-12 상단 탭줄 수리 — 우측 flex가 탭을 눌러 알약이 잘림 + 빈 서브탭이 헛공간 차지 */
.category-tabs, .sub-tabs { flex-shrink: 0 !important; }
.sub-tabs:empty { display: none !important; }

/* ═══════════ 2026-07-20 영수증 조회 개편 + 터치 스크롤 (사장님) ═══════════
   "스크롤바를 터치해야만 내려간다 — 태블릿처럼 쓰는 터치 포스인데 불편하다"
   → 스크롤 컨테이너에 touch-action: pan-y 를 명시. 미지정 시 브라우저/드라이버 조합에 따라
     드래그가 스크롤로 안 붙고 스크롤바 조작만 먹는다. 스크롤바 자체도 손가락 폭으로 넓힌다. */
.modal-body, .rcpt-scroll, .cart-items, .product-grid {
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.modal-body::-webkit-scrollbar, .rcpt-scroll::-webkit-scrollbar { width: 14px; }
.modal-body::-webkit-scrollbar-thumb, .rcpt-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1; border-radius: 8px; border: 3px solid transparent; background-clip: content-box;
}
.modal-body::-webkit-scrollbar-thumb:active, .rcpt-scroll::-webkit-scrollbar-thumb:active { background: #94a3b8; background-clip: content-box; }

/* ── 필터바 ── */
.rcpt-filter { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.rcpt-quick { display: flex; gap: 6px; }
.rcpt-quick button {
  flex: 1; min-height: 44px; padding: 0 10px; border: 1px solid #E5E8EB; background: #fff;
  border-radius: 8px; font-weight: 700; font-size: .95rem; color: #333D4B; cursor: pointer;
}
.rcpt-quick button:active { background: #f1f5f9; }
.rcpt-range { display: flex; align-items: center; gap: 8px; }
.rcpt-range input { flex: 1; min-height: 44px; padding: 0 10px; border: 1px solid #E5E8EB; border-radius: 8px; font-size: .95rem; }
.rcpt-range span { color: #94a3b8; }
.rcpt-search { display: flex; gap: 6px; }
.rcpt-search input { flex: 1; min-height: 44px; padding: 0 12px; border: 1px solid #E5E8EB; border-radius: 8px; font-size: .95rem; }
.rcpt-search button { min-height: 44px; padding: 0 16px; border: 1px solid #E5E8EB; background: #fff; border-radius: 8px; font-weight: 800; cursor: pointer; }
.rcpt-search button.primary { background: #22c55e; color: #fff; border-color: #22c55e; }

/* ── 목록 ── */
.rcpt-scroll { max-height: 46vh; overflow-y: auto; border: 1px solid #E5E8EB; border-radius: 8px; }
.rcpt-table { width: 100%; font-size: .88rem; border-collapse: collapse; }
.rcpt-table thead th {
  position: sticky; top: 0; z-index: 1; background: #f1f5f9;
  padding: 10px 6px; font-size: .8rem; color: #64748b; text-align: left; white-space: nowrap;
}
.rcpt-table td { padding: 8px 6px; border-bottom: 1px solid #eef2f6; vertical-align: middle; }
.rcpt-table tbody tr:active { background: #f8fafc; }
.rcpt-table .mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.rcpt-table .small { font-size: .78rem; color: #64748b; }
.rcpt-actions { white-space: nowrap; text-align: right; }
.rcpt-actions .rb {
  min-height: 38px; padding: 0 12px; margin-left: 4px; border-radius: 6px;
  border: 1px solid #E5E8EB; background: #fff; color: #333D4B; font-weight: 700; font-size: .82rem; cursor: pointer;
}
.rcpt-actions .rb:active { transform: translateY(1px); }
.rcpt-actions .rb.kakao   { background: #FEE500; color: #191600; border-color: #FEE500; font-weight: 800; }
.rcpt-actions .rb.retro   { background: #22c55e; color: #fff; border-color: #22c55e; font-weight: 800; }
.rcpt-actions .rb.danger  { background: #dc2626; color: #fff; border-color: #dc2626; }
.rcpt-actions .rb.danger-o{ background: #fff; color: #dc2626; border-color: #dc2626; }
.rcpt-actions .rb-note { margin-left: 6px; color: #94a3b8; font-size: .78rem; }

/* ── 페이저 ── */
.rcpt-total { margin-top: 10px; font-size: .82rem; color: #64748b; text-align: center; }
.rcpt-pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
.rcpt-pager .pg {
  min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid #E5E8EB;
  background: #fff; border-radius: 8px; font-weight: 700; font-size: .95rem; color: #333D4B; cursor: pointer;
}
.rcpt-pager .pg.wide { padding: 0 16px; }
.rcpt-pager .pg.on { background: #22c55e; color: #fff; border-color: #22c55e; }
.rcpt-pager .pg:disabled { opacity: .45; cursor: default; }
.rcpt-pager .pg-gap { min-width: 24px; line-height: 44px; color: #94a3b8; text-align: center; }

/* ════════════════════════════════════════════════════════════════
   ★ EXCHANGE 2026-09-24 교환 — 반품 품목 고르기 풀페이지(#exPage)·판매 화면 배너(#exBanner)·결제내역 배지
   POS 팔레트 = 블랙/화이트 + 알공 주황 #F2753D (파랑 금지). 터치 타깃 48px 이상.
   z-index 900 = 결제내역 페이지(#rcptPage)와 같은 층 — 모달(.modal-overlay 999)은 위에 뜬다.
   ════════════════════════════════════════════════════════════════ */
.ex-page { position: fixed; inset: 0; z-index: 901; background: #f8fafc; display: flex; flex-direction: column; font-family: inherit; }
.ex-head { display: flex; align-items: center; gap: 12px; padding: 12px 20px; background: #fff; border-bottom: 1px solid #e5e8eb; }
.ex-back { min-height: 48px; padding: 0 18px; background: #fff; color: #191f28; border: 1.5px solid #e5e8eb; border-radius: 9999px; font-weight: 800; font-size: 16px; cursor: pointer; font-family: inherit; }
.ex-title { display: inline-flex; align-items: center; gap: 6px; font-size: 20px; font-weight: 900; color: #191f28; }
.ex-sub { font-size: 14px; font-weight: 700; color: #6b7684; }
.ex-body { flex: 1; display: flex; min-height: 0; }
.ex-list { flex: 1; overflow-y: auto; padding: 22px 28px; min-height: 0; }
.ex-side { width: 380px; flex: 0 0 380px; background: #fff; border-left: 1px solid #e5e8eb; padding: 22px 22px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.ex-cap { font-size: 14px; font-weight: 900; color: #8b95a1; letter-spacing: .5px; margin-bottom: 10px; }
.ex-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 10px; background: #fff; border: 1px solid #e5e8eb; border-radius: 14px; }
.ex-row-main { flex: 1; min-width: 0; }
.ex-row-name { font-size: 18px; font-weight: 800; color: #191f28; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-row-meta { margin-top: 3px; font-size: 14px; font-weight: 700; color: #6b7684; }
.ex-step { display: flex; align-items: center; gap: 6px; }
.ex-step button { width: 56px; height: 56px; border: 1.5px solid #d1d6db; border-radius: 12px; background: #fff; color: #191f28; font-size: 26px; font-weight: 800; cursor: pointer; font-family: inherit; }
.ex-step button:active { background: #fff3ec; border-color: #F2753D; }
.ex-step b { min-width: 44px; text-align: center; font-size: 24px; font-weight: 900; color: #191f28; font-variant-numeric: tabular-nums; }
.ex-segs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: -4px; }
.ex-seg { min-height: 52px; border: 1.5px solid #d1d6db; border-radius: 12px; background: #fff; color: #333d4b; font-size: 16px; font-weight: 800; cursor: pointer; font-family: inherit; }
.ex-seg.on { background: #191f28; border-color: #191f28; color: #fff; }
.ex-check { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; border: 1.5px solid #e5e8eb; border-radius: 12px; cursor: pointer; font-size: 16px; font-weight: 800; color: #191f28; }
.ex-check input { width: 24px; height: 24px; margin: 0; accent-color: #F2753D; flex: 0 0 auto; }
.ex-credit { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0 6px; border-top: 2px solid #f2f4f6; }
.ex-credit span { font-size: 16px; font-weight: 800; color: #4e5968; }
.ex-credit b { font-size: 30px; font-weight: 900; color: #F2753D; font-variant-numeric: tabular-nums; }
.ex-err { min-height: 0; font-size: 14px; font-weight: 800; color: #dc2626; line-height: 1.5; }
.ex-err:empty { display: none; }
.ex-go { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 60px; border: 0; border-radius: 9999px; background: #F2753D; color: #fff; font-size: 20px; font-weight: 900; cursor: pointer; font-family: inherit; }
.ex-go:disabled { background: #e5e8eb; color: #8b95a1; cursor: default; }
.ex-note { font-size: 14px; font-weight: 600; color: #6b7684; line-height: 1.6; }
/* 판매 화면 배너 — 카트 위 */
.ex-banner { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; padding: 8px 10px 8px 14px; background: #fff3ec; border: 2px solid #F2753D; border-radius: 12px; }
.ex-banner-tag { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; padding: 4px 10px; border-radius: 9999px; background: #F2753D; color: #fff; font-size: 16px; font-weight: 900; }
.ex-banner-txt { flex: 1; min-width: 0; font-size: 16px; font-weight: 700; color: #191f28; }
.ex-banner-txt b { font-weight: 900; font-variant-numeric: tabular-nums; }
.ex-banner-txt .ex-neg { color: #dc2626; }
.ex-banner-x { flex: 0 0 auto; min-height: 48px; padding: 0 16px; border: 1.5px solid #191f28; border-radius: 9999px; background: #fff; color: #191f28; font-size: 16px; font-weight: 800; cursor: pointer; font-family: inherit; }
/* 차액 0원 교환 완료 창 */
.ex-even { min-width: 380px; }
.ex-even-row { display: flex; justify-content: space-between; padding: 10px 0; font-size: 16px; font-weight: 700; color: #333d4b; border-bottom: 1px solid #f2f4f6; }
.ex-even-row.big { font-size: 20px; font-weight: 900; color: #191f28; border-bottom: 0; }
.modal-footer button.ex-go-sm { min-height: 48px; background: #F2753D; border-color: #F2753D; color: #fff; font-weight: 900; }
.modal-footer button.ex-go-sm:disabled { background: #e5e8eb; border-color: #e5e8eb; color: #8b95a1; }
/* 결제내역 — [교환] 버튼·배지 */
.rp-ex-btn { min-height: 48px; padding: 12px 18px; border-radius: 10px; background: #fff; color: #F2753D; border: 1.5px solid #F2753D; font-weight: 800; font-size: 14px; cursor: pointer; font-family: inherit; }
.rp-ex-tag { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 9999px; background: #F2753D; color: #fff; font-size: 12px; font-weight: 900; vertical-align: 1px; }
.rp-ex-amt { color: #F2753D; }
/* 결제하기 페이지 제목 — 교환이면 차액 */
.ex-pay-due { color: #F2753D; }
.ex-pay-sub { margin-left: 8px; font-size: 18px; font-weight: 800; color: #6b7684; }
/* ★ ZOOM-GUARD 2026-09-24 : 크롬 배율이 100%가 아닐 때 상단 경고 띠 (main.js) */
.pos-zoom-warn { position: fixed; top: 0; left: 0; right: 0; z-index: 100000; padding: 10px 16px; background: #F2753D; color: #fff; font-size: 18px; font-weight: 800; text-align: center; pointer-events: none; }
