/* ============================================================
   HACCHUKUN 목업 공통 스타일 — 일본 B2B 식자재 수발주 SaaS
   ============================================================ */
:root {
  --primary: #0e7a5f;
  --primary-dark: #0a5c48;
  --primary-light: #e6f4f0;
  --accent: #f59e0b;
  --accent-light: #fef3e2;
  --blue: #2563eb;
  --blue-light: #eff6ff;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --purple: #7c3aed;
  --purple-light: #f3e8ff;
  --bg: #f2f5f7;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Pretendard', 'Noto Sans KR', 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Malgun Gothic', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;   /* 금액/수량 자릿수 정렬 — 정산 표 가독성 */
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* ---------- 목업 상단 바 (프로토타입 내비) ---------- */
.proto-bar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 10px;
  background: #0f172a; color: #cbd5e1;
  padding: 7px 16px; font-size: 12px;
}
.proto-bar b { color: #5eead4; letter-spacing: .5px; }
.proto-bar a { color: #94a3b8; padding: 2px 8px; border-radius: 6px; }
.proto-bar a:hover { background: #1e293b; color: #fff; }
.proto-bar .spacer { flex: 1; }
.proto-bar .tag { background: #1e293b; color: #fbbf24; border-radius: 6px; padding: 2px 8px; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 10px; font-size: 14px; font-weight: 600;
  padding: 9px 16px; transition: .15s; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: #fff; border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-danger { background: #fff; border: 1px solid #fecaca; color: var(--danger); }
.btn-sm { padding: 5px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { padding: 13px 22px; font-size: 15px; border-radius: 12px; width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- 상태 칩 ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 3px 10px;
}
.chip-ordered   { background: var(--accent-light); color: #b45309; }
.chip-confirmed { background: var(--blue-light);   color: var(--blue); }
.chip-shipped   { background: var(--purple-light); color: var(--purple); }
.chip-delivered { background: var(--primary-light); color: var(--primary); }
.chip-settled   { background: #f1f5f9; color: var(--muted); }
.chip-canceled  { background: var(--danger-light); color: var(--danger); }
.chip-wait      { background: #f1f5f9; color: #94a3b8; border: 1px dashed #cbd5e1; }

/* ---------- 카드/공통 ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.right { text-align: right; }
.flex { display: flex; align-items: center; gap: 8px; }
.spacer { flex: 1; }

/* ---------- PC 레이아웃 (공급사) ---------- */
.pc-layout { display: flex; min-height: calc(100vh - 32px); }

.sidebar {
  width: 224px; flex-shrink: 0;
  background: #0d3d31; color: #cde9e0;
  display: flex; flex-direction: column;
  padding: 20px 12px;
}
.sidebar .logo {
  font-size: 20px; font-weight: 800; color: #fff; letter-spacing: 1px;
  padding: 4px 12px 2px;
}
.sidebar .logo span { color: #5eead4; }
.sidebar .logo-sub { font-size: 10.5px; color: #6fa899; padding: 0 12px 22px; letter-spacing: .3px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 500;
  color: #a7cec3; margin-bottom: 2px;
}
.sidebar nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar nav a.active { background: var(--primary); color: #fff; font-weight: 700; }
.sidebar nav .nav-sec { font-size: 10.5px; color: #6fa899; letter-spacing: 1px; padding: 16px 12px 6px; }
.sidebar .user-box {
  margin-top: auto; background: rgba(255,255,255,.06); border-radius: 12px;
  padding: 12px; font-size: 12px;
}
.sidebar .user-box b { display: block; color: #fff; font-size: 13px; }

.main { flex: 1; padding: 24px 28px; min-width: 0; }

.page-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 18px; }
.page-head h1 { font-size: 21px; font-weight: 800; }
.page-head .desc { color: var(--muted); font-size: 12.5px; padding-bottom: 2px; }

/* ---------- KPI ---------- */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 16px 18px; }
.kpi .k-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi .k-value { font-size: 26px; font-weight: 800; margin-top: 2px; }
.kpi .k-value small { font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi .k-diff { font-size: 11.5px; margin-top: 2px; font-weight: 600; }
.k-up { color: var(--primary); }
.k-warn { color: var(--accent); }
.k-down { color: var(--danger); }

/* ---------- 테이블 ---------- */
.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
table.grid th {
  text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 700;
  background: #f8fafc; padding: 10px 14px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.grid td { padding: 11px 14px; border-bottom: 1px solid #f1f5f9; white-space: nowrap; }
table.grid tr:hover td { background: #f8fafc; }
table.grid td.num, table.grid th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- 탭 ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 16px; }
.tabs button {
  padding: 12px 16px; font-size: 13.5px; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button.active { color: var(--primary); border-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------- 필터 바 ---------- */
.filter-bar { display: flex; align-items: center; gap: 8px; padding: 14px 16px; flex-wrap: wrap; }
.filter-bar input[type=date], .filter-bar input[type=month], .filter-bar select, .filter-bar input[type=text] {
  border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; background: #fff;
}

/* ---------- 모바일 (폰 프레임) ---------- */
.phone-stage {
  display: flex; justify-content: center; align-items: flex-start;
  gap: 40px; padding: 34px 16px 60px; flex-wrap: wrap;
}
.phone {
  width: 384px; background: #fff; border-radius: 34px;
  box-shadow: 0 0 0 9px #0f172a, 0 24px 60px rgba(15,23,42,.35);
  overflow: hidden; position: relative;
  display: flex; flex-direction: column;
  height: 780px;
}
.phone .m-screen { flex: 1; overflow-y: auto; background: var(--bg); display: flex; flex-direction: column; }
.phone-label { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 14px; font-weight: 600; }

.m-header {
  background: #fff; padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.m-header .m-title { font-size: 17px; font-weight: 800; }
.m-header .m-sub { font-size: 11.5px; color: var(--muted); }

.m-content { flex: 1; padding: 12px 14px 90px; }

.m-bottom-nav {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: #fff; border-top: 1px solid var(--line);
  display: flex;
  /* iOS 홈 인디케이터(safe-area)와 겹침 방지 — PWA 홈화면 추가 대응 */
  padding: 8px 0 calc(14px + env(safe-area-inset-bottom, 0px));
}
.m-bottom-nav a {
  flex: 1; text-align: center; font-size: 10.5px; color: #94a3b8; font-weight: 600;
}
.m-bottom-nav a .ico { display: block; font-size: 20px; margin-bottom: 1px; }
.m-bottom-nav a.active { color: var(--primary); }

/* 모바일 카테고리 칩 */
.cat-chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chips button {
  flex-shrink: 0; border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 999px; padding: 8px 15px; font-size: 13px; font-weight: 600;
}
.cat-chips button.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* 모바일 품목 행 */
.item-row {
  display: flex; align-items: center; gap: 11px;
  background: #fff; border-radius: 13px; padding: 11px 12px; margin-bottom: 8px;
  box-shadow: var(--shadow);
}
.item-thumb {
  width: 46px; height: 46px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  background: var(--primary-light);
}
.item-info { flex: 1; min-width: 0; }
.item-info .i-name { font-weight: 700; font-size: 13.5px; }
.item-info .i-meta { font-size: 11px; color: var(--muted); }
.item-info .i-price { font-size: 13px; font-weight: 700; color: var(--primary); }

/* 수량 버튼 — 바쁜 현장에서 엄지로 눌러야 하므로 크게 (최소 40px) */
.qty-ctrl { display: flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.qty-ctrl button { width: 40px; height: 40px; font-size: 19px; color: var(--muted); background: #f8fafc; }
.qty-ctrl button:hover { color: var(--primary); }
.qty-ctrl .q { width: 34px; text-align: center; font-weight: 800; font-size: 15px; }
.item-row.in-cart { border: 1.5px solid var(--primary); }
.item-row.in-cart .qty-ctrl .q { color: var(--primary); }

/* 헤더 알림 벨 (미확인 점 표시) */
.bell-btn { position: relative; background: none; border: none; font-size: 20px; cursor: pointer; padding: 4px 6px; }
.bell-btn .dot { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }

/* 발주내역 카드 : 취소/반려는 흐리게 */
.so-card.dim { opacity: .55; }

/* ---------- 발주내역 액션 행 : 전 카드 동일 지오메트리 ----------
 * [주 액션 1fr | 상세 76px] 2열 고정 — 카드마다 버튼 수가 달라 폭이 들쭉날쭉해지는 것 방지.
 * 카드가 세로 flex라 액션 행은 항상 하단에 붙어 그리드(2열) 배치에서도 줄이 맞는다. */
.so-card { display: flex; flex-direction: column; }
.so-actions {
  display: grid; grid-template-columns: 1fr 76px; gap: 6px;
  margin-top: auto; padding-top: 10px;
}
.so-actions .btn { padding: 10px 0; font-size: 13.5px; width: 100%; }
/* 점장 승인 카드 : 주 액션 슬롯 안에서 승인/반려 분할 */
.so-approve { display: grid; grid-template-columns: 1.7fr 1fr; gap: 6px; }
/* 재주문 : 식별색(앰버)은 유지하되 면적이 큰 만큼 소프트 톤으로 — 목록 전체가 주황 벽이 되지 않게 */
.btn-reorder { background: #fff8eb; border: 1.5px solid #f5c66d; color: #b45309; font-weight: 800; }
.btn-reorder:hover { background: #fef0d8; }
/* 주 액션이 없는 카드(마켓 견적 주문 등) : 자리 유지용 비활성 슬롯 */
.so-actions .slot-none {
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--line); border-radius: 10px;
  color: #b6c2d1; font-size: 12px; font-weight: 600;
}

/* ---------- 알림 배너 공통 — 화면마다 제각각이던 파스텔 배너 스타일 통일 ---------- */
.notice-bar {
  margin-bottom: 10px; border: 1px solid; border-radius: 11px;
  padding: 11px 13px; font-size: 13px; font-weight: 700; line-height: 1.55;
}
.notice-info   { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.notice-warn   { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }
.notice-danger { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.notice-muted  { background: #f8fafc; border-color: var(--line); color: var(--muted); font-weight: 600; }

/* 모바일 필터 드롭다운 — 칩 나열 대신 탭하면 선택 목록이 열리는 방식 */
.filter-select {
  flex: 1; width: 100%; min-width: 0;
  appearance: none; -webkit-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 13px center;
  border: 1px solid var(--line); border-radius: 11px;
  padding: 11px 34px 11px 13px; font-size: 13.5px; font-weight: 600; color: var(--text);
}
.filter-select:focus { border-color: var(--primary); outline: none; }

/* 사이드바 신규 수주 뱃지 */
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 19px; height: 19px; padding: 0 5px; margin-left: 4px;
  background: var(--accent, #f59e0b); color: #fff;
  border-radius: 999px; font-size: 11px; font-weight: 800; vertical-align: 1px;
}

/* ---------- 토스트 (비차단 알림) ---------- */
#toastWrap {
  position: fixed; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); left: 50%;
  transform: translateX(-50%); z-index: 9999;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: max-content; max-width: min(92vw, 480px); pointer-events: none;
}
.toast {
  background: rgba(15, 23, 42, .92); color: #f1f5f9;
  border-radius: 12px; padding: 11px 18px;
  font-size: 13px; font-weight: 600; line-height: 1.5; white-space: pre-line; text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
  animation: toast-in .25s ease-out;
  transition: opacity .3s, transform .3s;
}
.toast-error { background: rgba(153, 27, 27, .95); }
.toast.out { opacity: 0; transform: translateY(6px); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 모바일 하단 장바구니 바 */
.cart-bar {
  position: absolute; bottom: 64px; left: 12px; right: 12px; z-index: 20;
  background: var(--primary); color: #fff; border-radius: 14px;
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  box-shadow: 0 8px 24px rgba(14,122,95,.35);
  font-weight: 700; font-size: 14px;
}
.cart-bar .badge {
  background: #fff; color: var(--primary); border-radius: 999px;
  width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
  font-size: 12px;
}

/* 타임라인 (발주 상태) */
.status-flow { display: flex; align-items: center; gap: 0; margin: 6px 0 2px; }
.status-flow .st { display: flex; flex-direction: column; align-items: center; flex: 1; position: relative; }
.status-flow .dot {
  width: 22px; height: 22px; border-radius: 50%; background: #e2e8f0; color: #94a3b8;
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; z-index: 1;
}
.status-flow .st.on .dot { background: var(--primary); color: #fff; }
.status-flow .st .lb { font-size: 9.5px; color: var(--muted); margin-top: 3px; font-weight: 600; }
.status-flow .st.on .lb { color: var(--primary); }
.status-flow .st:not(:first-child)::before {
  content: ''; position: absolute; top: 11px; right: 50%; width: 100%; height: 2px; background: #e2e8f0;
}
.status-flow .st.on:not(:first-child)::before { background: var(--primary); }

/* ---------- 인보이스 미리보기 ---------- */
.invoice-paper {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 28px 30px; font-size: 12.5px; max-width: 620px;
}
.invoice-paper h2 { text-align: center; font-size: 17px; letter-spacing: 6px; margin-bottom: 18px; }
.invoice-paper table { width: 100%; border-collapse: collapse; }
.invoice-paper th, .invoice-paper td { border: 1px solid #cbd5e1; padding: 6px 9px; }
.invoice-paper th { background: #f1f5f9; font-size: 11px; }

/* ---------- 막대 차트 (CSS) ---------- */
.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding: 8px 4px 0; }
.bar-chart .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; }
.bar-chart .bar i {
  display: block; width: 70%; max-width: 34px; border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #34d399, var(--primary));
}
.bar-chart .bar.dim i { background: #e2e8f0; }
.bar-chart .bar b { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.bar-chart .bar .v { font-size: 10px; color: var(--text); font-weight: 700; }

/* ---------- 모달 ---------- */
.modal-back {
  display: none; position: fixed; inset: 0; background: rgba(15,23,42,.45);
  z-index: 200; align-items: center; justify-content: center; padding: 20px;
}
.modal-back.open { display: flex; }
.modal {
  background: #fff; border-radius: 16px; width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto; padding: 22px 24px;
}
.modal h3 { font-size: 16px; margin-bottom: 14px; }
.form-row { margin-bottom: 12px; }
.form-row label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

/* ---------- 반응형 ---------- */
@media (max-width: 900px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .sidebar { display: none; }
  .main { padding: 16px; }
}

/* ============================================================
   실서비스 화면용 추가 스타일 (템플릿 전용)
   ============================================================ */

/* 모바일 앱 컨테이너 (폰 프레임 없이 모바일 퍼스트) */
.m-app {
  max-width: 430px; margin: 0 auto; min-height: 100vh;
  background: var(--bg); position: relative;
  display: flex; flex-direction: column;
  box-shadow: 0 0 30px rgba(15,23,42,.08);
}
.m-app .m-content { flex: 1; padding: 12px 14px 150px; }
.m-app .m-bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px; z-index: 50;
}
.m-app .cart-bar {
  position: fixed; bottom: calc(66px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%);
  width: calc(100% - 24px); max-width: 406px; z-index: 50;
}

/* 수주 상세 라인 */
.so-dtl-box { background: #f8fafc; border-radius: 10px; padding: 8px 12px; margin-top: 8px; font-size: 12px; }
.so-dtl-box .ln { display: flex; gap: 6px; padding: 3px 0; border-bottom: 1px dashed #e2e8f0; }
.so-dtl-box .ln:last-child { border-bottom: none; }

/* 발주내역 카드 (모바일) */
.so-card { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 14px 15px; margin-bottom: 10px; }
.so-card .so-top { display: flex; align-items: center; gap: 8px; }
.so-card .so-no { font-size: 12px; color: var(--muted); }
.so-card .so-amt { font-weight: 800; font-size: 15px; }
.so-card .so-items { font-size: 12.5px; color: var(--muted); margin: 4px 0 2px; }

/* 기사 화면 */
.course-head { background: var(--primary); color: #fff; border-radius: 15px; padding: 15px 16px; margin-bottom: 12px; }
.course-head .ch-top { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; }
.course-head .ch-prog { font-size: 11.5px; opacity: .9; margin-top: 2px; }
.course-head .p-bar { height: 7px; background: rgba(255,255,255,.25); border-radius: 99px; margin-top: 9px; }
.course-head .p-bar i { display: block; height: 100%; background: #fff; border-radius: 99px; }
.stop-card { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 13px 14px; margin-bottom: 9px; position: relative; }
.stop-card .no { position: absolute; left: -1px; top: -1px; width: 26px; height: 26px; border-radius: 13px 0 12px 0;
  background: var(--primary); color: #fff; font-size: 12.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.stop-card.done .no { background: #94a3b8; }
.stop-card .s-name { font-weight: 800; font-size: 14px; padding-left: 22px; }
.stop-card .s-addr { font-size: 11.5px; color: var(--muted); padding-left: 22px; }
.stop-card .s-actions { display: flex; gap: 7px; margin-top: 10px; }
.stop-card .s-actions .btn { flex: 1; }

/* 장바구니/합계 카드 */
.sum-card { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 15px 16px; margin-top: 12px; }
.sum-card .row { display: flex; font-size: 13px; padding: 3px 0; }
.sum-card .row b:last-child { margin-left: auto; }
.sum-card .total { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 9px; font-size: 15px; }
.due-pick { display: flex; gap: 7px; margin-top: 8px; }
.due-pick button { flex: 1; border: 1.5px solid var(--line); border-radius: 11px; padding: 9px 2px; font-size: 12px; font-weight: 700; color: var(--muted); background: #fff; }
.due-pick button small { display: block; font-weight: 500; font-size: 10px; }
.due-pick button.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }

/* 스캔 박스 */
.scan-box { background: #0f172a; border-radius: 16px; min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #94a3b8; gap: 10px; margin-top: 14px; padding: 18px; }
.scan-frame { width: 190px; height: 110px; border: 2.5px solid #5eead4; border-radius: 12px; position: relative; }
.scan-frame::after { content: ''; position: absolute; left: 8px; right: 8px; top: 50%; height: 2px; background: #f43f5e; box-shadow: 0 0 10px #f43f5e; }

/* 섹션 타이틀 */
.sec-title { font-size: 12px; font-weight: 800; color: var(--muted); margin: 12px 2px 8px; display: flex; align-items: center; gap: 6px; }
.sec-title .right-link { margin-left: auto; font-size: 11px; color: var(--primary); font-weight: 700; cursor: pointer; }

/* ============================================================
   반응형 : 모바일 화면(.m-app)의 PC 호환
   - 기본(모바일): 기존 모바일 퍼스트 그대로
   - 태블릿/PC(768px~): 폭 확장 + 목록 2열 그리드 + 칩 줄바꿈
   ============================================================ */
@media (min-width: 768px) {
  .m-app {
    max-width: 560px;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
  .m-app .m-bottom-nav { max-width: 560px; }
  .m-app .cart-bar { max-width: 536px; }

  /* 목록형 화면(발주/발주내역)은 더 넓게 + 2열 */
  .m-app.m-wide { max-width: 920px; }
  .m-app.m-wide .m-bottom-nav { max-width: 920px; }
  .m-app.m-wide .cart-bar { max-width: 896px; }

  .m-wide .item-list {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start;
  }
  .m-wide .item-list .item-row { margin-bottom: 0; }
  .m-wide .item-list > p { grid-column: 1 / -1; }   /* 빈 목록 안내문은 전체 폭 */

  .m-wide .so-list {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    align-items: stretch;   /* 같은 줄 카드 높이 통일 — 액션 행이 하단 정렬됨 */
  }
  .m-wide .so-list .so-card { margin-bottom: 0; }
  .m-wide .so-list > p { grid-column: 1 / -1; }

  /* PC에서는 카테고리 칩을 가로 스크롤 대신 줄바꿈 */
  .m-wide .cat-chips { flex-wrap: wrap; overflow-x: visible; }
}

/* 품목 썸네일 사진 (사진 없으면 이모지 폴백) */
.item-thumb { overflow: hidden; }
.item-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; display: block; }
.grid .item-thumb-sm { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; vertical-align: middle; margin-right: 4px; }
