:root {
  --bg: #f7f7f5;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #8a8a8e;
  --line: #e8e8e6;
  --accent: #2f6fed;
  --plus: #1a9e5c;
  --minus: #d9534f;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

/* 가입 · 로그인 */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth form { width: 100%; max-width: 360px; background: var(--card); padding: 32px 28px; border-radius: var(--radius); }
.auth h1 { margin: 0 0 4px; font-size: 22px; }
.auth p.sub { margin: 0 0 24px; color: var(--muted); }
.auth .switch { margin-top: 16px; text-align: center; color: var(--muted); font-size: 14px; }
.auth .switch a { color: var(--accent); }

label { display: block; margin-bottom: 14px; font-size: 13px; color: var(--muted); }
input, select, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
.btn {
  display: inline-block; padding: 10px 16px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; cursor: pointer; text-align: center;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.full { width: 100%; }
.btn.go { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.btn.big { display: block; width: 100%; padding: 15px; border-radius: 14px; font-size: 17px; font-weight: 700; margin-top: 10px; }
.btn.dashed { border: 2px dashed var(--line); color: var(--accent); background: none; }
.btn:disabled { opacity: .5; cursor: default; }
.link { display: block; margin: 12px auto 0; border: none; background: none; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 14px; }
.btn.small { padding: 6px 10px; font-size: 13px; }
.error { color: var(--minus); font-size: 14px; min-height: 20px; margin: 0 0 8px; }

/* 위쪽 막대: 로고 · 메뉴 · 도구 */
.bar { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.bar-in {
  max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 56px;
  display: flex; align-items: center; gap: 28px;
}
.co { display: flex; align-items: center; gap: 2px; white-space: nowrap; }
.co-name { font-weight: 800; font-size: 18px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.co-pick { border: none; background: none; color: var(--muted); width: 26px; height: 30px; display: grid; place-items: center; border-radius: 6px; cursor: pointer; }
.co-pick:hover { background: var(--bg); color: var(--text); }
.menu { display: flex; gap: 4px; flex: 1; }
.menu a { padding: 8px 12px; border-radius: 8px; color: #48484a; white-space: nowrap; }
.menu a:hover { background: var(--bg); }
.menu a.on { color: var(--text); font-weight: 700; background: var(--bg); }
.tools { display: flex; align-items: center; gap: 2px; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--bg); color: #48484a; margin-right: 8px; white-space: nowrap; }
.badge.owner { background: #e8f0fe; color: var(--accent); }
.icon {
  width: 36px; height: 36px; display: grid; place-items: center; border: none; background: none;
  border-radius: 8px; color: #48484a; cursor: pointer;
}
.icon:hover, .icon.on { background: var(--bg); color: var(--text); }
.pop {
  position: absolute; right: 24px; top: 52px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 20px; color: var(--muted); font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

.icon { position: relative; }
.icon[data-tip]::after {
  content: attr(data-tip); position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--text); color: #fff; font-size: 12px; padding: 4px 8px; border-radius: 6px; white-space: nowrap;
  pointer-events: none; opacity: 0; transition: opacity .12s; z-index: 30;
}
@media (hover: hover) { .icon[data-tip]:hover::after { opacity: 1; } }
.icon.wide[data-tip]::after { display: none; }
.icon.wide { width: auto; display: flex; gap: 6px; padding: 0 10px; font-size: 14px; }
.icon.phone { display: none; }
.menu-pop { padding: 6px; min-width: 160px; }
.more-list { min-width: 0; width: max-content; max-width: calc(100vw - 24px); }
.more-list button { white-space: nowrap; }
.menu-pop a, .menu-pop button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: none; background: none;
  border-radius: 8px; color: var(--text); font-size: 15px; cursor: pointer; text-align: left;
}
.menu-pop a:hover, .menu-pop button:hover { background: var(--bg); }

.main { max-width: 1200px; margin: 0 auto; padding: 28px 24px 48px; }
.title { margin: 0 0 20px; font-size: 22px; }

/* 새 창 띄우기 (레이어) */
#layers { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
.layer {
  position: absolute; width: 620px; height: 520px; min-width: 360px; min-height: 260px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0,0,0,.18); display: flex; flex-direction: column; overflow: hidden;
  resize: both; pointer-events: auto;
}
.layer-head {
  display: flex; align-items: center; gap: 2px; padding: 6px 6px 6px 14px; background: var(--card);
  border-bottom: 1px solid var(--line); cursor: move; user-select: none;
}
.layer-title { flex: 1; font-weight: 700; font-size: 14px; }
.layer-head button {
  width: 30px; height: 30px; display: grid; place-items: center; border: none; background: none;
  border-radius: 6px; color: #48484a; cursor: pointer;
}
.layer-head button:hover { background: var(--bg); }
.layer-head svg { width: 16px; height: 16px; }
.layer iframe { flex: 1; width: 100%; border: none; }
#layers.moving iframe { pointer-events: none; }
.layer.snap {
  left: 50% !important; top: 57px !important; width: 50% !important; height: calc(100vh - 57px) !important;
  border-radius: 0; resize: none; box-shadow: none; border-width: 0 0 0 1px;
}
.layer.snap .layer-head { cursor: default; }
body.snapped .main { margin-right: 50%; max-width: none; }
.dock { position: absolute; left: 16px; bottom: 16px; display: flex; gap: 8px; pointer-events: auto; }
.dock-tab {
  display: flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line);
  border-radius: 99px; background: var(--card); box-shadow: 0 4px 16px rgba(0,0,0,.08); cursor: pointer; font-size: 14px;
}
.dock-tab svg { width: 16px; height: 16px; }
@media (max-width: 760px) { #layers { display: none; } body.snapped .main { margin-right: 0; } }

.pane-bar {
  display: flex; gap: 2px; padding: 8px 12px; background: var(--card); border-bottom: 1px solid var(--line);
  overflow-x: auto; position: sticky; top: 0; z-index: 5;
}
.pane-bar a { padding: 6px 10px; border-radius: 8px; color: #48484a; font-size: 14px; white-space: nowrap; }
.pane-bar a.on { background: var(--bg); color: var(--text); font-weight: 700; }
.main.pane { padding: 20px 16px 32px; }
.main.pane .money { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.main.pane .money .num { font-size: 20px; }
.main.pane .slots { grid-template-columns: 1fr 1fr; }


/* 첫 세팅 · 로그인 · 가입: 가운데 카드 */
.inapp { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 16px; background: #fff7d6; border-bottom: 1px solid #f0e2a0; text-align: center; font-size: 15px; }
.inapp b { font-size: 16px; }
.inapp .btn { margin-top: 4px; min-width: 200px; }
.inapp-steps { font-size: 15px; }
.wiz { min-height: 100vh; padding: 56px 16px 40px; display: flex; flex-direction: column; align-items: center; }
.wiz-logo { color: var(--accent); font-weight: 800; font-size: 22px; margin-bottom: 18px; }
.dots { display: flex; gap: 8px; margin-bottom: 22px; }
.dots i { width: 10px; height: 10px; border-radius: 99px; background: #d9d9d6; }
.dots i.done { background: #a9c1f6; }
.dots i.on { width: 28px; background: var(--accent); }
.wiz-card { width: 100%; max-width: 600px; background: var(--card); border-radius: 20px; padding: 36px 36px 28px; }
.wiz-card h1 { text-align: center; margin: 0 0 6px; font-size: 24px; }
.wiz-card .sub { text-align: center; color: var(--muted); margin: 0 0 24px; }
.wiz-below { margin-top: 16px; color: var(--muted); font-size: 14px; }
.wiz-below a { color: var(--accent); }
.wiz-nav { display: flex; align-items: center; justify-content: center; gap: 28px; }
.wiz-nav .link { margin: 0; padding: 10px 4px; }
.wiz-nav #prev { color: var(--text); font-size: 16px; font-weight: 700; text-decoration: none; }
.key { width: 96px; height: 96px; margin: 0 auto 24px; display: grid; place-items: center; font-size: 48px; background: #eef3fe; border-radius: 26px; }
.done-mark { width: 96px; height: 96px; margin: 4px auto 22px; display: grid; place-items: center; background: #e8f6ee; color: var(--plus); border-radius: 99px; }
.hint.center, .center { text-align: center; margin: 12px 0 0; }
h3.mini { font-size: 15px; margin: 22px 0 10px; text-align: left; }
.wiz-card h3.mini { text-align: center; }

/* 글자 칸: 이름 왼쪽, 칸 오른쪽, 한 줄에 하나 */
.f { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 12px; margin: 0 0 14px; color: #48484a; font-size: 15px; }
.f input, .f select { margin: 0; padding: 11px 13px; }
.f .two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-size: 15px; margin: 0 14px 0 0; }
.check input { width: auto; margin: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 0; margin: 8px 0; }
.form .r, .r { text-align: right; }

/* 고르기 */
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { padding: 10px 18px; border: 1px solid var(--line); background: #fff; border-radius: 10px; font-size: 15px; cursor: pointer; }
.seg button { color: #5c5c60; }
/* 고른 칸: 파란 바탕 + 흰 굵은 글씨 + ✓ (어두운 화면에서도 잘 보이게) */
.seg button.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 800; box-shadow: 0 2px 8px rgba(47, 111, 237, .35); }
.seg button.on::before { content: '✓ '; }
#tax, #form { justify-content: center; }
#tax button, #form button { min-width: 90px; }
.seg button:disabled { opacity: .35; cursor: default; }
.tiles { display: grid; gap: 10px; }
.tiles.two { grid-template-columns: 1fr 1fr; }
.tiles.three { grid-template-columns: repeat(3, 1fr); }
.tiles.four { grid-template-columns: repeat(4, 1fr); }
.tile { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 20px 10px; text-align: center; font-size: 16px; font-weight: 700; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tile i { font-style: normal; font-size: 34px; }
.tile.small { padding: 18px 10px; }
.tile.plus { border: 2px dashed #c4c8d0; background: transparent; color: #9a9aa0; font-size: 26px; font-weight: 400; box-shadow: none; }
.mslot { position: relative; display: grid; }
.mslot .mtools { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; }
.mslot.edit .tile { padding-top: 46px; }
.mslot .mtools button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 12px; cursor: pointer; }
.mall-own { display: flex; gap: 8px; margin-top: 14px; }
.mall-own input { flex: 1; min-width: 0; }
.tile.on { position: relative; border: 2px solid var(--accent); background: #e9f0ff; color: var(--accent); font-weight: 800; box-shadow: 0 2px 10px rgba(47, 111, 237, .25); }
.tile.on::after { content: '✓'; position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 800; display: grid; place-items: center; }
.tile.brand { cursor: default; border-style: dashed; border-width: 2px; }
.tile.brand.filled { border-style: solid; border-width: 1px; border-color: #bfe5cf; background: #f3faf6; }
.tile.brand .pv { width: 100%; height: 110px; display: grid; place-items: center; border-radius: 10px; }
.tile.brand .pv img { max-width: 90%; max-height: 100px; object-fit: contain; }
.tile.brand .acts { font-weight: 400; font-size: 13px; color: var(--muted); }
.tile.brand .acts button { border: none; background: none; color: #48484a; cursor: pointer; padding: 4px; font-size: 13px; }
.tile.brand .acts button:hover { color: var(--accent); }
.logo-text { font-size: 22px; }
.chk { background-color: #fff; background-image: linear-gradient(45deg, #eee 25%, transparent 25%), linear-gradient(-45deg, #eee 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #eee 75%), linear-gradient(-45deg, transparent 75%, #eee 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0; }

/* 사업자등록증 */
.cert-box { height: 220px; border-radius: 14px; overflow: hidden; background: linear-gradient(160deg, #8d7c66, #5f5242); display: grid; place-items: center; }
.cert-box img { max-width: 100%; max-height: 220px; }
.cert-paper { width: 300px; height: 170px; background: #fbfaf6; transform: rotate(-2deg); padding: 22px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.cert-paper b { text-align: center; letter-spacing: 2px; }
.cert-paper span { color: #8a8a8e; font-size: 13px; line-height: 1.9; }
.cert-thumb { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; color: var(--accent); font-size: 14px; }
.cert-thumb img { width: 84px; height: 56px; object-fit: cover; border-radius: 8px; }
.scan-btn { display: flex; width: 100%; align-items: center; gap: 10px; border: 1.5px dashed var(--accent); color: var(--accent); background: #f5f8ff; border-radius: 12px; padding: 14px 18px; font-weight: 700; font-size: 16px; margin-bottom: 18px; cursor: pointer; }
.scan-btn small { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: auto; }

/* 초대 */
.irow { display: grid; grid-template-columns: 1fr 120px 36px; gap: 8px; align-items: center; margin-bottom: 8px; }
.irow input, .irow select { margin: 0; padding: 11px 13px; }
.irow .x { border: none; background: none; color: var(--muted); cursor: pointer; height: 36px; }
.sent { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; }
.sent-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.sent-row:last-child { border-bottom: none; }
.inv { background: var(--bg); border-radius: 12px; padding: 14px; margin-bottom: 16px; }
.inv .btn.go { margin-top: 6px; }

/* 홈 */
.money { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.money .card { background: var(--card); border-radius: var(--radius); padding: 20px 22px; }
.money .label { color: var(--muted); font-size: 14px; }
.money .num { font-size: 28px; font-weight: 800; margin-top: 4px; }
.money .num.in { color: var(--accent); }
.money .num.out { color: #48484a; }
.chart-panel h3 { margin-bottom: 8px; }
.chart { width: 100%; height: auto; display: block; }
.chart rect { fill: #cfdcfb; }
.chart rect.now { fill: var(--accent); }
.chart text { font-size: 11px; fill: var(--muted); text-anchor: middle; }
.chart text.now { fill: var(--accent); font-weight: 700; }
.home-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.htile { background: var(--card); border-radius: 16px; height: 130px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 17px; }
.htile i { font-style: normal; font-size: 36px; }
.htile:hover { box-shadow: inset 0 0 0 2px var(--accent); }
.home-tiles.big { margin-top: 12px; }
.home-tiles.big .htile { height: 190px; font-size: 20px; }
.home-tiles.big .htile i { font-size: 48px; }

/* 목록 */
.head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.head .title { margin: 0; }
.subnav { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; flex-wrap: wrap; }
.subnav a { min-width: 110px; padding: 12px 24px; text-align: center; font-size: 19px; font-weight: 800; color: #3c3c42; background: #fff; border: 2px solid #c4c8d0; border-radius: 12px; text-decoration: none; }
.subnav a.on { color: #fff; background: var(--accent); border-color: var(--accent); box-shadow: 0 3px 10px rgba(47, 111, 237, .35); }
.subnav .sub-x { margin-left: auto; min-width: 0; padding: 10px 14px; font-size: 15px; font-weight: 700; color: var(--accent); background: #eef3fd; border: 0; border-radius: 10px; cursor: pointer; }
.head .btn.go { margin-left: auto; padding: 10px 18px; }
.panel { background: var(--card); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; }
.panel.flush { padding: 8px 16px; }
.panel h3 { margin: 0 0 16px; font-size: 16px; }
.hint { color: var(--muted); font-size: 14px; }
.hint.flat { margin: 0 0 12px; display: block; }
.soon { text-align: center; color: var(--muted); padding: 60px 20px; }
table { width: 100%; border-collapse: collapse; }
td, th { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); font-size: 15px; }
th { color: var(--muted); font-weight: 400; font-size: 14px; }
tr:last-child td { border-bottom: none; }
td.r, th.r { text-align: right; }
.no { width: 60px; color: var(--muted); }
.empty { color: var(--muted); text-align: center; padding: 40px 8px; }
.off, tr.off td { color: var(--muted); }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--bg); color: #48484a; white-space: nowrap; font-weight: 400; }
.tag.here { background: #fff3d6; color: #9a6b00; }
.pager { display: flex; justify-content: center; gap: 4px; padding: 12px 0 6px; }
.pager button { min-width: 34px; height: 34px; border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; }
.pager button.on { background: var(--text); color: #fff; border-color: var(--text); }
.error { color: var(--minus); font-size: 14px; min-height: 0; margin: 8px 0 0; }
.error:empty { display: none; }
.offer { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); background: var(--text); color: #fff; padding: 12px 20px; border-radius: 12px; z-index: 80; font-size: 15px; box-shadow: 0 8px 24px rgba(0,0,0,.2); }

/* 사업자 고르기 */
.co-pop { left: max(24px, calc(50% - 600px + 24px)); right: auto; padding: 6px; min-width: 220px; color: var(--text); }
.co-pop button { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 11px 12px; border: none; background: none; border-radius: 8px; font-size: 15px; cursor: pointer; text-align: left; }
.co-pop button:hover { background: var(--bg); }
.co-pop button.on { font-weight: 700; color: var(--accent); }
.co-pop button.add { color: var(--accent); }
.co-pop hr { border: none; border-top: 1px solid var(--line); margin: 4px 6px; }

/* 설정 */
.set { display: grid; grid-template-columns: 210px 1fr; gap: 20px; align-items: start; }
.snav { background: #fff; border-radius: 14px; padding: 8px; position: sticky; top: 76px; }
.snav a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; font-size: 15px; color: #48484a; }
.snav a i { font-style: normal; font-size: 18px; width: 22px; text-align: center; }
.snav a.on { background: #eef3fe; color: var(--accent); font-weight: 700; }
.snav-more { display: none; }
.snav a:last-of-type { margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; }
.save-bar { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.big-save { padding: 13px 34px; font-size: 16px; border-radius: 12px; }
.saved { color: var(--plus); font-weight: 700; }
/* 켜고 끄기: 폰 '어두운 화면'이 색을 바꿔도 잘 보이게, 바탕 · 동그라미를 그림으로 그려요(그림은 색이 안 바뀌어요). */
.switch { width: 50px; height: 30px; border-radius: 99px; border: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 30' preserveAspectRatio='none'%3E%3Crect width='50' height='30' rx='15' fill='%23b9bac2'/%3E%3C/svg%3E") center / 100% 100% no-repeat; position: relative; cursor: pointer; flex: none; transition: background .15s, border-color .15s; box-sizing: border-box; }
.switch i { position: absolute; left: 4px; top: 4px; width: 22px; height: 22px; border-radius: 99px; box-sizing: border-box; border: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='11' fill='%23ffffff'/%3E%3C/svg%3E") center / 100% no-repeat; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch.on { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 30' preserveAspectRatio='none'%3E%3Crect width='50' height='30' rx='15' fill='%232f80ff'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.switch.on i { left: 24px; }
.trow, .mrow { display: flex; align-items: center; gap: 14px; padding: 16px 6px; border-bottom: 1px solid var(--line); }
.trow:last-of-type { border-bottom: none; }
.trow i, .mrow i { font-style: normal; font-size: 22px; width: 28px; text-align: center; }
.trow span { flex: 1; display: flex; flex-direction: column; }
.trow small { color: var(--muted); }
.mrow { background: #fff; }
.mrow b { flex: none; font-size: 16px; }
.mrow small { color: var(--muted); flex: 1; }
.mrow .switch { margin-left: auto; }
.mrow.sub { padding-left: 46px; }
.mrow.off b, .mrow.off i { opacity: .45; }
.mrow.drag { opacity: .4; }
.grip { color: #c7c7cc; cursor: grab; letter-spacing: -2px; }
.staff-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 10px; }
.staff-head .hint { margin: 0; }
.scroll-x { overflow-x: auto; }
.perm th { text-align: center; font-size: 13px; line-height: 1.35; padding: 10px 4px; }
.perm th:first-child { text-align: left; }
.perm td { padding: 10px 4px; }
.perm td.c { text-align: center; }
.perm td.bz { font-size: 13px; color: #48484a; }
.perm .who { border: none; background: none; font-weight: 700; font-size: 15px; cursor: pointer; padding: 0; text-decoration: underline dotted #c7c7cc; text-underline-offset: 4px; }
.perm .badge { margin-left: 4px; }
.ck { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid #d1d1d6; background: #fff; color: #fff; font-size: 13px; font-weight: 800; line-height: 1; cursor: pointer; display: inline-grid; place-items: center; font-style: normal; }
.ck.blue { background: var(--accent); border-color: var(--accent); }
.ck.yellow { background: #e0a400; border-color: #e0a400; }
.ck.gray { background: #c7c7cc; border-color: #c7c7cc; cursor: default; }
.ck:disabled, .own:disabled { cursor: default; }
.own { font-size: 12px; padding: 3px 8px; border-radius: 99px; background: var(--bg); border: none; font-weight: 700; cursor: pointer; }
.legend { display: flex; gap: 18px; margin: 14px 0 6px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .ck { width: 16px; height: 16px; font-size: 10px; }
.edit-row td { background: var(--bg); padding: 16px; }
.staff-form { max-width: 560px; }
.badge.admin { background: #f1eafe; color: #7a43d6; }
.badge.accountant { background: #e6f6ec; color: var(--plus); }

/* 폰: 같은 모양, 메뉴는 회사 이름 아래 한 줄 */
@media (max-width: 760px) {
  .bar-in { height: auto; padding: 8px 12px 0; flex-wrap: wrap; gap: 0; }
  .co { flex: 1; }
  .co-name { font-size: 17px; max-width: 170px; }
  .badge { margin-right: 2px; }
  .icon.pc { display: none; }
  .icon.phone { display: grid; }
  .icon { width: 34px; height: 34px; }
  .menu { order: 3; width: 100%; flex: none; justify-content: space-between; padding: 4px 0 6px; }
  .menu a { padding: 8px 8px; }
  .pop { right: 12px; top: 48px; }
  .co-pop { left: 12px; }
  .main { padding: 20px 16px 40px; }
  .wiz { padding-top: 28px; }
  .wiz-card { padding: 28px 18px 22px; border-radius: 18px; }
  .f { grid-template-columns: 72px 1fr; gap: 10px; }
  .f > span:first-child { word-break: keep-all; line-height: 1.3; }
  .wiz-card .f { grid-template-columns: 64px 1fr; }
  .money { grid-template-columns: 1fr; gap: 8px; }
  .money .card { padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; }
  .money .label { font-size: 15px; }
  .money .num { font-size: 22px; margin: 0; }
  .home-tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .htile { height: 110px; }
  .home-tiles.big .htile { height: 150px; }
  .set { grid-template-columns: 1fr; }
  /* 폰: 옆으로 넘기지 않고 한 번에 다 보이게 (3칸씩) */
  .snav { position: static; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px; }
  .snav a { gap: 5px; padding: 9px 6px; font-size: 13.5px; justify-content: center; border: 1px solid var(--line); line-height: 1.2; word-break: keep-all; min-height: 44px; }
  .snav a i { width: auto; font-size: 17px; }
  .snav:not(.open) a.more { display: none; }
  .snav-more { display: block; grid-column: 1 / -1; border: none; background: none; color: var(--accent); font-weight: 700; font-size: 15px; padding: 8px; cursor: pointer; }
  .snav a.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
  .snav a:last-of-type { margin: 0; border-top: 1px solid var(--line); border-radius: 10px; }
  .snav a.on:last-of-type { border-color: var(--accent); }
  .tiles.three { grid-template-columns: 1fr 1fr 1fr; }
  .tiles.four { grid-template-columns: 1fr 1fr; }
  .tile i { font-size: 28px; }
  .tile { font-size: 14px; padding: 16px 6px; }
  .pc-only { display: none; }
  table.list .ph-sub { display: block; margin-top: 3px; color: var(--muted); font-size: 13.5px; white-space: nowrap; }
}

/* 2단계: 거래처 · 재고 · 상품 */
.search { position: relative; display: flex; align-items: center; margin: 0; flex: 0 1 300px; color: var(--muted); }
.search svg { position: absolute; left: 12px; }
.search input { margin: 0; padding: 10px 12px 10px 38px; border-radius: 10px; }
.head-r { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.head-r .btn, .head .btn.go { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 10px 16px; border-radius: 10px; }
.head-r .btn.on { background: var(--text); border-color: var(--text); color: #fff; }
.crumb { color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.crumb a:hover { color: var(--accent); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.two-col .panel { margin: 0; padding: 26px 28px; }
.sep { border: none; border-top: 1px solid var(--line); margin: 18px 0; }
.f.top { align-items: start; }
.f.top > span:first-child { padding-top: 10px; }
.f textarea { margin: 0; resize: vertical; }
.grow { flex: 1; }
.save-bar { margin-top: 20px; }
.save-bar .btn { display: inline-flex; align-items: center; gap: 6px; padding: 12px 20px; border-radius: 12px; }
table.click tbody tr[data-id] { cursor: pointer; }
table.click tbody tr[data-id]:hover td { background: #fafafa; }

.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.ph { height: 96px; border: 1.5px dashed var(--accent); background: #f5f8ff; color: var(--accent); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; font-weight: 700; overflow: hidden; position: relative; }
.ph i { font-style: normal; display: grid; }
.ph.filled { border-style: solid; border-color: var(--line); background: #fff; color: var(--text); }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.ph.filled span { position: relative; background: rgba(255,255,255,.9); padding: 2px 10px; border-radius: 99px; font-size: 13px; }
.opt { padding: 16px 6px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.opt .seg button { padding: 9px 14px; }
.here-only { margin: 18px 6px 0; }

.slist td { vertical-align: middle; }
.slist th.r, .slist td.r { text-align: right; width: 90px; }
.slist th.st, .slist td.st { width: 1%; white-space: nowrap; padding-left: 14px; } /* 총 재고 · 상태는 오른쪽 단추 옆으로, 상품명이 넓게 */
.slist tr[data-id] { cursor: pointer; }
.slist tr.low td { background: #fdf3f2; }
.slist tr.open td, .slist tr.exp td { background: #f5f8ff; }
.slist tr.open td { border-bottom: none; }
.slist .chev { display: inline-block; width: 18px; color: var(--muted); }
.slist th.whc, .slist td.whc { width: 96px; color: var(--muted); }
.slist td.acts { width: 1%; white-space: nowrap; text-align: right; }
.slist td.acts > * { vertical-align: middle; margin-left: 6px; }
.slist td.acts .ia.box { width: 36px; height: 36px; }
.slist .sub-m { display: none; }
.whc-chip { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--bg); color: #48484a; white-space: nowrap; }
.qty { font-size: 19px; font-weight: 800; }
.qty.low { color: var(--minus); }
.slist td.r small { color: var(--muted); margin-left: 2px; font-size: 13px; }
.qty-in { width: 96px; margin: 0 0 0 auto; text-align: right; padding: 8px 10px; font-size: 16px; font-weight: 700; }
.chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--bg); color: #48484a; white-space: nowrap; }
.chip.red { background: #fde5e3; color: var(--minus); }
.chip.blue { background: #e8f0fe; color: var(--accent); font-weight: 400; }
.chip.yellow { background: #fff3d6; color: #9a6b00; }
.exp-in { display: flex; align-items: center; gap: 10px; padding: 4px 0 8px 18px; flex-wrap: wrap; }
.wboxes { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.exp-in .wboxes { margin: 0; }
.wbox { min-width: 104px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: center; display: flex; flex-direction: column; }
.wbox small { color: var(--muted); font-size: 13px; }
.wbox b { font-size: 20px; }
.wbox.total { background: var(--text); color: #fff; border-color: var(--text); }
.wbox.total small { color: #c7c7cc; }
.op { font-style: normal; color: var(--muted); font-size: 18px; }
.btn.line { border-color: var(--accent); color: var(--accent); display: inline-flex; align-items: center; gap: 4px; }
.mode-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #fff8e6; border: 1px solid #f3dca0; border-radius: var(--radius); padding: 12px 16px; margin-bottom: 12px; }
.mode-bar select { width: auto; margin: 0; padding: 8px 10px; }
.mode-bar .hint { margin: 0; }
.foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 8px 6px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.foot .pager { padding: 0; }

.kind-seg button:disabled { opacity: 1; }
.kind-seg button:disabled:not(.on) { display: none; }
.warn { background: #fff8e6; border: 1px solid #f3dca0; color: #7a5600; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; }
.warn-text { display: block; color: #c27a00; font-size: 14px; margin-top: 8px; }
.name2 { display: grid; grid-template-columns: 1fr 120px; gap: 8px; }
.price { display: flex; align-items: center; gap: 12px; }
.price input { flex: 1; }
.price .check { margin: 0; white-space: nowrap; }
input.r { text-align: right; }
.under { text-align: right; color: var(--muted); font-size: 14px; margin: -6px 0 12px; min-height: 4px; }
.under b { color: var(--text); }
.preview { background: #eef3fe; border-radius: 12px; padding: 14px 18px; margin: 6px 0 0; display: flex; flex-direction: column; }
.preview small { color: var(--accent); font-size: 13px; }
.preview b { font-size: 18px; }
details.more { margin-top: 8px; }
details.more summary { cursor: pointer; color: var(--muted); margin-bottom: 14px; }
details.more summary small { font-size: 13px; }
.inline { display: flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--muted); }
.inline input { width: 100px; margin: 0; }
.link-btn { border: none; background: none; color: var(--accent); font-weight: 700; cursor: pointer; padding: 0 4px; }

.side-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.side-head h3 { margin: 0; }
.side-head small { color: var(--muted); }
.part { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 10px 12px 16px; margin-bottom: 10px; }
.pn { display: flex; flex-direction: column; min-width: 0; }
.pn small, .pcard small, .found small { color: var(--muted); font-size: 13px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stepper button { width: 34px; height: 36px; border: none; background: var(--bg); cursor: pointer; font-size: 16px; }
.stepper b { min-width: 34px; text-align: center; }
.part .x { border: none; background: none; color: var(--muted); cursor: pointer; display: grid; padding: 4px; }
.btn.dashed.wide { display: block; width: 100%; padding: 16px; border-radius: 12px; font-weight: 700; border-color: #c9d8fb; }
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.cards3 > div { background: var(--bg); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; }
.cards3 small { color: var(--muted); font-size: 13px; }
.cards3 b { font-size: 24px; margin: 2px 0; }
.plus { color: var(--plus); }
.minus { color: var(--minus); }
.finder { border: 1px solid var(--accent); border-radius: 12px; padding: 10px; display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.finder .search { flex: none; }
.finder #fr { grid-column: 1 / -1; max-height: 320px; overflow-y: auto; }
.found { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 10px; text-align: left; border: none; background: none; border-radius: 10px; padding: 10px; cursor: pointer; }
.found span { display: flex; flex-direction: column; }
.found:hover { background: #f5f8ff; }
.found i { font-style: normal; color: var(--accent); font-weight: 700; white-space: nowrap; font-size: 14px; }
.found.in i { color: var(--plus); }
.pcard { display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 8px; }
.pcard span:first-child { display: flex; flex-direction: column; }
#hist h4 { margin: 18px 0 6px; font-size: 14px; color: var(--muted); font-weight: 400; }
.hrow { display: grid; grid-template-columns: 60px 1fr auto; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.hrow span:first-child { color: var(--muted); }

.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: grid; place-items: center; z-index: 70; padding: 16px; }
.modal { background: var(--card); border-radius: 18px; width: 100%; max-width: 460px; padding: 18px 24px 24px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 18px; }
.m-name { font-weight: 700; margin: 0 0 16px; }

.wrow { display: grid; grid-template-columns: 28px 1fr auto auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.wrow i { font-style: normal; font-size: 20px; text-align: center; }
.wrow input { margin: 0; }
.wrow.add { grid-template-columns: 28px 1fr auto; border-bottom: none; color: var(--accent); }
.rules td, .rules th, .pre td, .pre th { padding: 10px 6px; }
.rule-box { background: var(--bg); border-radius: 12px; padding: 18px; margin-bottom: 16px; }
.pre { background: #fff; border-radius: 10px; margin: 6px 0 12px; }

@media (max-width: 760px) {
  .head { gap: 10px; }
  .search { flex: 1 1 100%; order: 5; }
  .head-r { margin-left: 0; width: 100%; flex-wrap: nowrap; }
  .head-r > .btn { flex: 1 1 0; min-width: 0; min-height: 46px; justify-content: center; padding: 9px 8px; font-size: 14px; white-space: nowrap; }
  .head-r > .btn[hidden], .head-r > .wide-only { display: none; }
  .head-r > #page-more { flex: 0 0 46px; padding: 0; }
  .two-col { grid-template-columns: 1fr; gap: 12px; }
  .two-col .panel { padding: 20px 16px; }
  .slist th.st, .slist td.st, .slist .whc, .slist .see { display: none; }
  .slist .sub-m { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
  .slist td.nm { line-height: 1.35; }
  .slist th.r, .slist td.r { width: 90px; }
  .slist .no { display: none; }
  .slist td { padding: 12px 4px; }
  .exp-in { padding-left: 0; }
  .wbox { min-width: 64px; padding: 6px 8px; }
  .wbox b { font-size: 17px; }
  .wboxes, .exp-in { gap: 6px; }
  .cards3 { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .cards3 > div { padding: 10px; }
  .cards3 b { font-size: 18px; }
  .part { grid-template-columns: auto auto 1fr; padding: 12px; }
  .part .pn { grid-column: 1 / -1; }
  .part .x { justify-self: end; }
  .name2 { grid-template-columns: 1fr 90px; }
  .price { flex-wrap: wrap; gap: 6px; }
  .save-bar { flex-wrap: wrap; }
  .wrow { grid-template-columns: 28px 1fr auto; }
  .wrow [data-del] { grid-column: 2 / -1; justify-self: end; }
}

/* 거래명세서: A4 한 장에 2부 */
.print-bar { display: flex; align-items: center; gap: 10px; max-width: 210mm; margin: 16px auto; padding: 0 8px; }
.print-area { display: flex; justify-content: center; padding-bottom: 40px; }
.a4 { width: 210mm; height: 297mm; background: #fff; padding: 10mm 11mm; box-shadow: 0 4px 24px rgba(0,0,0,.08); display: flex; flex-direction: column; color: #000; font-size: 9.5pt; line-height: 1.3; }
.stmt { flex: 1; display: flex; flex-direction: column; position: relative; }
.stmt-copy { position: absolute; top: -2mm; left: 0; font-size: 7.5pt; color: #666; }
.cut { text-align: center; color: #999; border-top: 1px dashed #aaa; height: 0; margin: 6mm 0; line-height: 0; font-size: 10pt; }
.stmt-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; margin: 2mm 0 2mm; font-size: 8.5pt; }
.stmt-head span:last-child { text-align: right; }
.stmt-head h1 { margin: 0; font-size: 18pt; letter-spacing: .5mm; }
.stmt-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 2mm; }
.stmt-party th.v { width: 6mm; line-height: 1.25; white-space: normal; word-break: keep-all; font-size: 8.5pt; }
.stmt-party td { height: 6.2mm; font-size: 8.5pt; }
.stmt-party th { font-size: 8.5pt; padding: 0.5mm 1mm; }
.stmt-party .regno { font-weight: 800; font-size: 10pt; letter-spacing: .3mm; }
.stmt-party .ceo { position: relative; }
.stmt-party .ceo img { position: absolute; right: 0; top: 50%; transform: translateY(-50%); height: 13mm; opacity: .9; }
.stmt-bal { margin-top: 1.5mm; }
.stmt-bal td { text-align: right; width: 16%; }
.stmt table { border-collapse: collapse; width: 100%; }
.stmt th, .stmt td { border: 1px solid #000; padding: 1mm 1.5mm; font-size: 9pt; color: #000; }
.stmt tr:last-child td { border-bottom: 1px solid #000; }
.stmt th { font-weight: 700; background: #f2f2f2; text-align: center; white-space: nowrap; }
.stmt-amount { display: flex; justify-content: space-between; border: 2px solid #000; padding: 1.5mm 4mm; margin: 2mm 0; font-weight: 800; font-size: 11pt; }
.stmt-lines { flex: 1; }
.stmt-lines th small { display: block; font-weight: 400; font-size: 7pt; }
.stmt-lines td { height: 5.6mm; padding: .5mm 1.5mm; border-top-color: #bbb; border-bottom-color: #bbb; }
.stmt-lines td.c { text-align: center; }
.stmt td.r { text-align: right; }
.stmt-foot { margin-top: -1px; }
.stmt-foot td { text-align: right; font-weight: 700; }
.stmt-foot td.sign { width: 12mm; color: #777; font-weight: 400; }
@media print {
  @page { size: A4; margin: 0; }
  .print-bar { display: none !important; }
  .print-area { padding: 0; }
  .a4 { box-shadow: none; }
  .stmt th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (max-width: 760px) { .print-area { overflow-x: auto; justify-content: flex-start; } }

@media print {
  .bar, .home-tiles, #offer, .snav, .save-bar { display: none; }
  body { background: #fff; }
}
.btn, .sent-row b { white-space: nowrap; }
.perm { min-width: 700px; }
@media (max-width: 760px) { .staff-head .hint { display: none; } .sent-row { flex-wrap: wrap; } }
/* 로그인: 지문·얼굴 버튼과 휴대폰 칸 사이 여백 */
#pw:not([hidden]) { margin-top: 18px; }
.wiz-card .btn.big + .f, .wiz-card .btn.big + label { margin-top: 18px; }
.sheet-pick { width: 100%; justify-content: center; padding: 14px; margin: 6px 0 8px; }

/* 주소 찾기 + 상세주소 */
.addr-box { display: grid; gap: 8px; min-width: 0; }
.addr-row { display: flex; gap: 8px; min-width: 0; }
.addr-row input { flex: 1; min-width: 0; }
.addr-find { flex-shrink: 0; white-space: nowrap; color: var(--accent); font-weight: 700; padding: 10px 12px; }
.f.addr input { margin: 0; padding: 11px 13px; }
.postcode { height: min(470px, 68vh); width: 100%; }
/* 사업자등록증에서 읽은 칸: 노랗게 */
input.read { background: #fff8d6; border-color: #f0c400; }
.read-note { margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; background: #fff8d6; color: #7a5d00; font-size: 14px; font-weight: 600; }
.read-note.none { background: #f2f2f0; color: #6b6b70; }
.read-wait .modal { width: auto; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 30px 40px; }
.spin { width: 36px; height: 36px; border: 4px solid #e3e9f8; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 760px) { .addr-find { padding: 10px; } .addr-find .lg { display: none; } }

/* 홈 화면에 추가 */
.app-offer img { width: 28px; height: 28px; border-radius: 7px; vertical-align: middle; margin-right: 4px; }
.app-steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; counter-reset: s; }
.app-steps li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 16px; }
.app-steps li i { font-style: normal; width: 36px; height: 36px; border-radius: 10px; background: #f0f4ff; display: grid; place-items: center; font-size: 20px; flex-shrink: 0; }
.app-offer { flex-wrap: nowrap; padding-top: 12px; padding-bottom: 12px; } .app-offer > span:last-child { flex-shrink: 0; }

/* 설정 > 서버 */
.meter { height: 18px; background: #eef1f5; border-radius: 9px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 9px; }
.meter.warn i { background: var(--minus); }
.meter-num { margin: 10px 0 0; font-size: 16px; }
.next-pay { font-size: 18px; margin: 4px 0 14px; }
.day-pick { display: flex; align-items: center; gap: 8px; }
.day-pick input { width: 5em; }

/* 칸 밑 작은 설명: 입력칸 줄에 맞춰요 */
.f-hint { margin: -8px 0 14px 142px; font-size: 13px; }
@media (max-width: 760px) { .f-hint { margin-left: 82px; } }
.stmt-bal.now { width: 34%; margin-left: auto; } .stmt-bal.now td { width: auto; }
.tile small { font-weight: 400; font-size: 12.5px; color: var(--muted); line-height: 1.35; }

/* 폰 추가 QR · 지문 안 될 때 안내 */
.phone-add { text-align: center; }
.phone-add .qr { width: 220px; height: 220px; margin: 4px auto 14px; }
.phone-add .qr svg { width: 100%; height: 100%; }
.phone-add ol { text-align: left; margin: 0 auto 8px; padding-left: 22px; max-width: 280px; line-height: 1.8; font-size: 15px; }
.pk-help { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; padding: 14px; background: #f2f6ff; border-radius: 12px; font-size: 14px; text-align: center; line-height: 1.6; }

/* 비밀번호 세기: 약함 · 보통 · 강함 */
.pw-box { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.pw-meter { display: flex; align-items: center; gap: 4px; }
.pw-meter i { flex: 1; height: 6px; border-radius: 99px; background: #e4e4e1; }
.pw-meter b { min-width: 34px; text-align: right; font-size: 13px; color: var(--muted); }
.pw-meter[data-lv="1"] i:nth-child(1) { background: var(--minus); }
.pw-meter[data-lv="1"] b { color: var(--minus); }
.pw-meter[data-lv="2"] i:nth-child(-n+2) { background: #f0a500; }
.pw-meter[data-lv="2"] b { color: #c98a00; }
.pw-meter[data-lv="3"] i { background: var(--plus); }
.pw-meter[data-lv="3"] b { color: var(--plus); }
.pw-rules { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }
.pw-rules em { font-style: normal; color: #b5b5b2; }
.pw-rules em.ok { color: var(--plus); font-weight: 600; }

/* 엑셀 가져오기 */
.imp { display: flex; flex-direction: column; gap: 12px; }
.imp.center { align-items: center; text-align: center; }
/* 다 했어요 창: 체크 · 제목 · 숫자 · 안내 · 단추를 가깝게 모아요 */
.imp.center { gap: 4px; padding: 4px 0 2px; }
.imp.center .done-mark { width: 64px; height: 64px; margin: 0 auto 8px; }
.imp.center h3 { margin: 0; font-size: 19px; }
.imp.center > p { margin: 0; }
.imp.center > p.hint { margin-top: 2px; }
.imp.center .imp-acts { margin-top: 16px; flex-wrap: wrap; }
.imp-q { margin: 6px 0 0; font-weight: 700; font-size: 15px; }
.imp .seg button { flex: 1; }
.imp-file { margin: 0; font-size: 15px; word-break: break-all; }
.imp .sub { margin: 0; color: var(--muted); }
.imp select.set { border-color: var(--accent); background: #f4f8ff; }
.imp-nums { display: flex; gap: 10px; }
.imp-nums div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 8px; border: 1px solid var(--line); border-radius: 14px; }
.imp-nums b { font-size: 30px; }
.imp-nums b.in { color: var(--accent); }
.imp-nums b.out { color: var(--minus); }
.imp-nums span { color: var(--muted); font-size: 14px; }
.pimp-list { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.pimp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pimp-table th { position: sticky; top: 0; background: var(--card); text-align: left; font-weight: 700; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.pimp-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.pimp-table .r { text-align: right; white-space: nowrap; }
.pimp-table .was { color: var(--muted); text-decoration: line-through; }
/* 저장 전에 고치기: 줄마다 체크 · 이름 · 단가 */
.pimp-table.edit td { vertical-align: middle; }
.pimp-table .ck-c { width: 40px; text-align: center; }
.pimp-table .ck-c input { width: 22px; height: 22px; accent-color: var(--accent); }
.pimp-table .nm-c { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pimp-table .nin { flex: 1; min-width: 140px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.pimp-table .pin { width: 92px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; text-align: right; font-weight: 700; font-size: 14px; }
.pimp-table .nin:focus, .pimp-table .pin:focus { border-color: var(--accent); outline: none; }
.pimp-table .pin-wrap { display: inline-flex; align-items: center; gap: 6px; }
.pimp-table tr.off td { opacity: .4; }
.pimp-table tr.off .ck-c { opacity: 1; }
.bulk-btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--accent); color: var(--accent); font-weight: 700; }
.bulk-btn small { color: var(--muted); font-weight: 400; }
.bulk-rep { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bulk-rep input { flex: 1; min-width: 120px; }
@media (max-width: 760px) {
  .pimp-table thead { display: none; }
  .pimp-table tr { display: block; padding: 8px 12px; border-bottom: 1px solid var(--line); }
  .pimp-table td { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border: none; }
  .pimp-table td:first-child { font-weight: 700; flex-wrap: wrap; justify-content: flex-start; }
  .pimp-table td.r::before { content: attr(data-l); color: var(--muted); }
  .pimp-table.edit tr { display: grid; grid-template-columns: 36px 1fr; column-gap: 8px; }
  .pimp-table.edit td.ck-c { grid-row: span 4; width: auto; align-items: flex-start; padding-top: 8px; }
  .pimp-table.edit td.r { align-items: center; }
}
.add-prod .tile small { font-size: 13px; font-weight: 500; color: var(--muted); }
.oimp-items { display: flex; flex-direction: column; gap: 8px; max-height: 44vh; overflow: auto; }
.oimp-item { border: 1px solid var(--line); border-left: 4px solid #f5a623; border-radius: 12px; padding: 10px 12px; display: grid; gap: 8px; }
.oimp-item.ok { border-left-color: var(--plus); }
.oi-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.oi-name b { font-size: 15px; }
.oi-name small { color: var(--muted); }
.oi-name em { margin-left: auto; font-style: normal; font-weight: 700; }
.chip.new { background: #e8f0ff; color: #1d4fc4; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.check-row input { width: 20px; height: 20px; }
.imp-acts { display: flex; gap: 8px; justify-content: center; }
/* 단가 엑셀 칸 맞추기: 엑셀을 그대로 보여 주고 칸 위 단추로 골라요 */
.modal.wide.xwide { max-width: 940px; }
.imp-go { position: sticky; bottom: -24px; margin: 0 -24px -24px; padding: 12px 24px 24px; background: var(--card); box-shadow: 0 -6px 12px -8px rgba(0,0,0,.18); z-index: 2; }
.imp-go .btn { width: 100%; }
.maker-col { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.grp-ex { margin: 0; font-size: 15px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sheet-view { overflow: auto; border: 1px solid var(--line); border-radius: 12px; max-height: 52vh; }
.sheet-tbl { border-collapse: collapse; font-size: 14px; min-width: 100%; }
.sheet-tbl th, .sheet-tbl td { padding: 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: nowrap; text-align: left; }
.sheet-tbl thead tr.pills th { padding: 6px; }
.sheet-tbl thead tr.heads th { font-weight: 400; color: var(--muted); font-size: 13px; }
.sheet-tbl td.off { color: var(--muted); }
.sheet-tbl tr.bands th { font-size: 14px; font-weight: 700; text-align: center; border-top: 4px solid transparent; }
.sheet-tbl .b0 { background: #eef5ff; } .sheet-tbl tr.bands th.b0 { border-top-color: #2f80ff; color: #1d5fd0; }
.sheet-tbl .b1 { background: #fff3e2; } .sheet-tbl tr.bands th.b1 { border-top-color: #f08c00; color: #b25f00; }
.sheet-tbl .b2 { background: #eaf8ee; } .sheet-tbl tr.bands th.b2 { border-top-color: #1f9d55; color: #157040; }
.col-pill { width: 100%; min-width: 96px; padding: 8px 10px; border-radius: 10px; border: 1.5px dashed #b9bac2; background: var(--card); color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; }
.col-pill.on { border: 1.5px solid #2f80ff; background: #2f80ff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10'%3E%3Crect width='10' height='10' fill='%232f80ff'/%3E%3C/svg%3E") center / 100% 100%; color: #fff; font-weight: 700; }
.fld-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.fld-pick .btn { padding: 14px 8px; justify-content: center; }
.fld-pick .none { grid-column: 1 / -1; }
.imp .spin { margin: 30px auto; }

/* 홈 '내 화면' 칸 */
.home-head { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 12px; }
.home-head h3 { margin: 0; font-size: 17px; }
#home-slots .hint { margin: -4px 0 12px; }
.htile { position: relative; border: none; cursor: pointer; color: inherit; font: inherit; }
.htile.plus { background: transparent; border: 2px dashed #d9d9d6; color: #a5a5a2; font-size: 40px; font-weight: 300; }
.htile.plus:hover { border-color: var(--accent); color: var(--accent); box-shadow: none; }
.home-tiles.editing .htile:not(.plus) { box-shadow: inset 0 0 0 2px var(--accent); cursor: grab; }
.htools { position: absolute; left: 8px; right: 8px; top: 8px; display: flex; justify-content: space-between; }
.htile.edit { padding-top: 36px; }
.htile.edit i { font-size: 28px; }
.htools button { width: 34px; height: 34px; border-radius: 99px; border: 1px solid var(--line); background: #fff; font-size: 14px; cursor: pointer; }
.htools [data-del] { color: var(--minus); }
.htile.memo { background: #fff6b8; align-items: flex-start; justify-content: flex-start; padding: 16px; text-align: left; }
.memo-text { white-space: pre-wrap; font-size: 15px; line-height: 1.45; overflow: hidden; max-height: 100%; word-break: break-all; }
.htile.memo.edit { padding-top: 50px; }
.pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 10px; }
.pick-grid .btn { display: flex; align-items: center; gap: 8px; justify-content: flex-start; padding: 12px; font-size: 15px; }
.pick-grid i { font-style: normal; font-size: 20px; }
.btn.wide { width: 100%; }
.memo-edit { width: 100%; font: inherit; font-size: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fffbe0; resize: vertical; margin-bottom: 10px; }

/* 직원 권한: 폰은 사람마다 카드, 권한은 한 줄에 하나 (왼쪽 이름 · 오른쪽 체크) */
.scards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.scard .staff-form { max-width: 100%; }
.scard { border: 1px solid var(--line); border-radius: 14px; padding: 4px 14px 6px; }
.scard.off { opacity: .55; }
.scard .sc-h { display: flex; align-items: center; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.scard .who { border: none; background: none; font-weight: 800; font-size: 17px; padding: 0; cursor: pointer; color: inherit; }
.sc-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 46px; border-bottom: 1px solid var(--line); font-size: 15px; }
.sc-row:last-child { border-bottom: none; }
.sc-row .ck { width: 30px; height: 30px; font-size: 17px; border-radius: 8px; }
.sc-row small { color: var(--muted); text-align: right; }
.scard .edit-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.sent-row .acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
@media (max-width: 760px) {
  .sent-row { flex-direction: column; align-items: stretch; }
  .sent-row .acts { justify-content: stretch; }
  .sent-row .acts .btn { flex: 1; text-align: center; }
}
.bank-pick { display: flex; gap: 8px; flex: 1; min-width: 0; }
.bank-pick select, .bank-pick input { flex: 1; min-width: 0; }
/* 은행 고르기: 은행 앱처럼 동그라미 + 짧은 이름 */
.bdot { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-style: normal; font-size: 10px; font-weight: 700; line-height: 1; flex: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: geometricPrecision; }
.bdot.big { width: 60px; height: 60px; font-size: 16px; }
.bdot.long { font-size: 9px; }
.bdot.big.long { font-size: 15px; }
.bank-btn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 10px 14px; font-size: 16px; cursor: pointer; text-align: left; color: inherit; min-height: 48px; }
.bank-btn b { font-weight: 600; flex: 1; }
.bank-btn .bph { color: var(--muted); font-weight: 400; }
.bank-btn .chev { color: var(--muted); }
/* 은행 이름은 동그라미 안에만. 고른 은행은 파란 테 + ✓ */
.bank-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 6px; max-height: 62vh; overflow-y: auto; padding: 6px 2px; justify-items: center; }
.bank-grid button { position: relative; padding: 3px; border: 3px solid transparent; background: none; border-radius: 50%; cursor: pointer; }
@media (hover: hover) { .bank-grid button:hover { border-color: var(--line); } }
.bank-grid button.on { border-color: var(--accent); }
.bank-grid button.on::after { content: '✓'; position: absolute; right: -2px; top: -2px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--card); }
@media (max-width: 760px) {
  .modal-bg.sheet { place-items: end center; padding: 0; }
  .modal-bg.sheet .modal { border-radius: 20px 20px 0 0; max-width: none; padding-bottom: calc(24px + env(safe-area-inset-bottom)); max-height: 94vh; max-height: 94dvh; }
  .modal-bg.sheet .imp-go { padding-bottom: calc(24px + env(safe-area-inset-bottom)); margin-bottom: calc(-24px - env(safe-area-inset-bottom)); bottom: calc(-24px - env(safe-area-inset-bottom)); }
}
/* 사업자 간 거래 */
.link-row .link-note { color: var(--accent); font-size: 14px; line-height: 1.5; }
.link-row .sw-line b, .link-row .link-note b { font-weight: 700; }
.tag.link-tag { background: #eef3fe; color: var(--accent); }

/* 판매 · 매입 안 탭: 폰에서는 칸을 똑같이 나눠요 */
@media (max-width: 760px) {
  .subnav a { flex: 1 1 0; min-width: 0; padding: 12px 6px; font-size: 18px; }
  .subnav .sub-x { flex: 1 1 100%; text-align: center; }
}

/* 견적 결제 버튼 · 배송 사진 칸 설명 */
.pay-pick { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.pay-pick input:not([type=hidden]) { max-width: 320px; }
.f .f-sub { display: block; margin-top: 3px; font-size: 12px; font-weight: 400; color: var(--muted); line-height: 1.35; }
.ship #ship-m { flex: 1; min-width: 0; flex-wrap: wrap; }
.ship #ship-m button, #pay button { white-space: nowrap; }

/* 사진 스캔: 타일 안에 다 들어가게 (폰에서 그림 · 글이 밖으로 안 나가게) */
.scan-tiles .htile { padding: 12px 8px; overflow: hidden; text-align: center; }
.scan-tiles .htile small { color: var(--muted); font-size: 15px; white-space: nowrap; }
.scan-tiles .htile.drop { box-shadow: inset 0 0 0 3px var(--accent); }
/* 보낸 사진: 찍고 → 판매 고르기 → 문자 */
.ship-scan h3 { margin: 18px 0 8px; }
.ship-scan #q { width: 100%; font-size: 17px; padding: 12px; margin-bottom: 10px; }
.ship-ph.big .sp { width: 96px; height: 96px; }
.pick-list { display: grid; gap: 8px; }
.pick-row { display: grid; gap: 4px; text-align: left; background: var(--card); border: none; border-radius: 14px; padding: 14px 16px; cursor: pointer; color: inherit; font: inherit; }
.pick-row:hover { box-shadow: inset 0 0 0 2px var(--accent); }
.pick-row .pr-top { display: flex; justify-content: space-between; gap: 10px; font-size: 18px; }
.pick-row .pr-top em { font-style: normal; font-weight: 700; white-space: nowrap; }
.pick-row .pr-sub { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ship-done { display: grid; gap: 12px; max-width: 520px; }
.ship-done .done-msg { font-size: 18px; margin: 4px 0; }
.sms-send { display: grid; gap: 10px; }
.sms-send .sms-to { margin: 0; font-size: 16px; }
.sms-send .sms-msg { background: var(--bg, #f4f4f2); border-radius: 14px; padding: 12px 14px; font-size: 15px; line-height: 1.5; word-break: break-all; }
.sms-send .sms-msg span { color: var(--accent); }
.sms-send .btn.big { text-align: center; text-decoration: none; }
@media (max-width: 720px) {
  .scan-tiles .htile i { font-size: 40px; }
  .scan-tiles .htile b { font-size: 19px; }
  .ship-ph.big .sp { width: 84px; height: 84px; }
}
/* 하나뿐인 올리기 창: 테두리 상자 세 개 + 가는 선 그림 + 짧은 이름 */
.up-sheet { display: grid; gap: 12px; }
.up-sheet.three { grid-template-columns: repeat(3, 1fr); }
.up-sheet.two { grid-template-columns: 1fr 1fr; }
.up-sheet button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; height: 104px; background: transparent; border: 1.5px solid var(--line); border-radius: 16px; color: inherit; font: inherit; font-size: 17px; font-weight: 600; cursor: pointer; }
.up-sheet button:active, .up-sheet button:hover { border-color: var(--accent); }
.scan-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.scan-top .btn { margin-left: auto; }
.scan-help p { margin: 0 0 14px; line-height: 1.6; font-size: 16px; }
/* 가는 선 그림 (홈 · 사진 스캔 타일, 고르기 창) */
.htile i.ln { display: flex; color: var(--accent); }
.htile i.ln svg { stroke-width: 1.5; }
.home-tiles:not(.big) .htile i.ln svg { width: 36px; height: 36px; }
.pick-grid i.ln { display: inline-flex; vertical-align: middle; margin-right: 6px; color: var(--accent); }
@media (max-width: 720px) { .home-tiles.big .htile i.ln svg { width: 40px; height: 40px; } }
/* 문서 · 거래처 · 상품 화면 왼쪽 위 [← 목록] */
.back-list { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 12px; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); color: inherit; font-size: 15px; font-weight: 600; text-decoration: none; }
.back-list:hover { border-color: var(--accent); color: var(--accent); }
@media print { .back-list { display: none; } }
/* 문서 머리: [← 목록] + 제목 한 줄, 아래 같은 크기 버튼 한 줄 */
.dhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.dhead .back-list { margin: 0; }
.dhead .title { margin: 0; }
.act-row { display: grid; gap: 10px; margin-bottom: 16px; }
.act-row.n3 { grid-template-columns: repeat(3, 1fr); }
.act-row.n1 { grid-template-columns: minmax(0, 260px); }
.act-row .seg { display: contents; }
.act-row button, .act-row .btn { height: 52px; padding: 0 10px; border-radius: 12px; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; justify-content: center; }
@media (max-width: 720px) {
  .act-row { gap: 6px; }
  .act-row button, .act-row .btn { height: 56px; font-size: 13.5px; white-space: normal; line-height: 1.25; padding: 0 6px; }
  .act-row.n1 { grid-template-columns: 1fr; }
}
.chart-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.chart-head .link-btn { color: var(--accent); background: none; border: 0; cursor: pointer; padding: 0; text-decoration: underline; font-weight: 600; font-size: 14px; }
.chart-head h3 { margin: 0; }
.year-pick { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 10px; height: 36px; }
.year-pick button { width: 34px; height: 100%; border: 0; background: none; font-size: 18px; color: var(--muted); cursor: pointer; }
.year-pick button:disabled { opacity: .3; cursor: default; }
.year-pick b { font-size: 15px; }
.mchart { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; height: 230px; padding: 0 8px; }
.mbar { display: flex; flex-direction: column; align-items: center; border: 0; background: none; padding: 0; cursor: pointer; min-width: 0; font: inherit; -webkit-tap-highlight-color: transparent; }
.mbar .amt { position: absolute; left: 50%; transform: translateX(-50%); font-size: 13px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.mbar .col { flex: 1; width: 60%; max-width: 56px; display: flex; align-items: flex-end; position: relative; margin-top: 22px; }
.mbar .col i { display: block; width: 100%; border-radius: 4px 4px 0 0; background-color: #cfdcfb; }
.mbar.on .col i { background-color: #2f80ff; }
.mbar .lbl { height: 24px; line-height: 24px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.mbar.on .lbl { color: var(--accent); font-weight: 700; }
@media (hover: hover) { .mbar:not(.on):hover .col i { background-color: #b4c8f8; } }
@media (max-width: 760px) { .mchart { gap: 2px; padding: 0; height: 210px; } .mbar .amt { font-size: 11px; } .mbar .lbl { font-size: 11px; } .mbar .col { width: 70%; } }
/* 새 버전 알림: 글과 버튼을 가운데 한 줄로 */
.toast.newver { display: flex; align-items: center; justify-content: center; gap: 14px; white-space: nowrap; }
.toast.newver button { margin-left: 0 !important; }

/* 상품 한 번에 넣기 (엑셀처럼) */
.ps-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.ps-bar .ps-sp { flex: 1; }
.ps-bar .btn { display: inline-flex; gap: 6px; align-items: center; }
.ps-vat { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px 4px 12px; }
.ps-wrap { overflow-x: auto; }
.ps-tbl { border-collapse: collapse; width: 100%; min-width: 600px; }
.ps-tbl th, .ps-tbl td { border: 1px solid #e3e5e8; padding: 0; height: 40px; }
.ps-tbl th { background: #f2f4f7; font-size: 14px; font-weight: 700; text-align: left; padding: 0 6px 0 8px; line-height: 40px; vertical-align: middle; white-space: nowrap; cursor: grab; user-select: none; }
.ps-tbl th .g { color: #a5a9b0; vertical-align: -2px; margin-right: 4px; }
.ps-tbl th .lb { cursor: text; }
.ps-tbl th .pn { float: right; color: #a5a9b0; width: 28px; height: 28px; margin-top: 6px; display: inline-grid; place-items: center; padding: 0; }
.ps-tbl th .pn:hover { color: var(--accent); }
.ps-tbl th.add { color: var(--accent); background: #fff; border-style: dashed; cursor: pointer; width: 110px; }
.ps-tbl th.add svg { vertical-align: -3px; }
.ps-tbl th.drag { background: #e8f0ff; color: var(--accent); }
.ps-tbl th.dz-l { box-shadow: inset 3px 0 0 var(--accent); }
.ps-tbl th.dz-r { box-shadow: inset -3px 0 0 var(--accent); }
.ps-tbl th.edit { background: #fff; outline: 2px solid var(--accent); outline-offset: -2px; }
.ps-tbl .th-in { margin: 0; border: none; padding: 6px 2px; font-weight: 700; background: none; }
.ps-tbl th.n, .ps-tbl td.n { width: 38px; text-align: center; color: #a5a9b0; background: #f7f8fa; font-size: 13px; font-weight: 400; cursor: default; }
.ps-in { margin: 0; border: none; border-radius: 0; height: 40px; padding: 0 10px; background: transparent; }
.ps-in.r { text-align: right; }
.ps-in:focus { outline: 2px solid var(--accent); outline-offset: -2px; background: #f5f8ff; }
.ps-tbl td.acts { width: 72px; text-align: center; white-space: nowrap; border-left: none; }
.ps-tbl td.acts .icon { color: #a5a9b0; width: 30px; height: 30px; display: inline-grid; place-items: center; padding: 0; vertical-align: middle; }
.ps-tbl td.acts .icon:hover { color: var(--accent); }
.ps-card { background: #fff; border: 1px solid #ececea; border-radius: 14px; padding: 8px 14px 6px; margin-bottom: 10px; }
.ps-card:focus-within { border: 2px solid var(--accent); padding: 7px 13px 5px; }
.ps-top { display: flex; justify-content: space-between; align-items: center; color: #a5a9b0; font-size: 13px; }
.ps-top .icon { color: var(--accent); display: inline-grid; width: 34px; height: 34px; }
.ps-top .icon[data-del] { color: #a5a9b0; }
.ps-rw { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; color: var(--text); font-size: 15px; }
.ps-rw .lb { width: 70px; flex: none; color: var(--muted); font-size: 15px; cursor: text; }
.ps-rw .lb .th-in { margin: 0; padding: 6px 6px; width: 100%; font-size: 15px; }
.ps-rw .g { flex: none; width: 24px; margin-right: -6px; color: #b4b8bf; display: grid; place-items: center; height: 44px; cursor: grab; touch-action: none; }
.ps-rw.drag { background: #e8f0ff; border-radius: 10px; box-shadow: 0 6px 16px rgba(47,111,237,.25); position: relative; z-index: 1; }
/* 폰: 왼쪽 이름 · 오른쪽 칸 (칸은 테두리로 보이게) */
.ps-rw .ps-in { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 16px; }
.ps-rw .ps-in:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.ps-card .ps-top { margin-bottom: 8px; }
.ps-add { display: flex; width: 100%; justify-content: center; gap: 6px; align-items: center; border: 1.5px dashed #c4c8d0; background: none; border-radius: 12px; padding: 13px; color: #5c5c60; cursor: pointer; }
.ps-cols .ci { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid #f0f1f3; background: #fff; touch-action: none; }
.ps-cols .ci input[type=checkbox] { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); flex: none; }
.ps-cols .ci .nm { flex: 1; font-weight: 600; color: var(--text); font-size: 15px; }
.ps-cols .ci .nm input { margin: 0; padding: 6px 8px; }
.ps-cols .ci.off .nm { color: #a5a9b0; }
.ps-cols .ci .pn, .ps-cols .ci [data-rm] { display: grid; place-items: center; align-items: center; color: var(--accent); }
.ps-cols .ci [data-rm] { color: #a5a9b0; }
.ps-cols .ci .g { color: #a5a9b0; cursor: grab; width: 36px; height: 36px; display: grid; place-items: center; touch-action: none; }
.ps-cols .ci.drag { background: #e8f0ff; border-radius: 10px; box-shadow: 0 6px 16px rgba(47,111,237,.25); position: relative; z-index: 1; }
.ps-new { display: flex; gap: 6px; align-items: center; margin-top: 12px; border: none; background: none; color: var(--accent); font-weight: 800; cursor: pointer; padding: 6px 0; }
@media (max-width: 760px) {
  .ps-bar #paste { display: none; }
  .ps-bar .ps-sp { display: none; }
  .ps-head { flex-wrap: nowrap; }
  .ps-head .head-r { width: auto; margin-left: auto; }
  .ps-head .head-r > .btn { flex: none; padding: 9px 22px; }
}
.ps-add.pc { width: auto; margin-top: 10px; padding: 10px 18px; }
.ps-one { display: none !important; }
@media (max-width: 760px) { .ps-one { display: inline-flex !important; } }

/* 목록 왼쪽 체크칸 (선택 삭제) */
th.pk, td.pk { width: 36px; padding-left: 12px !important; padding-right: 0 !important; text-align: left; cursor: default; }
th.pk input, td.pk input { width: 18px; height: 18px; margin: 0; vertical-align: middle; accent-color: var(--accent); cursor: pointer; }
tr.po-on td { background: #eef3ff; }

/* PC: 파일 끌어다 놓기 */
.drop-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 150px; margin: 12px 0 4px; border: 2px dashed #9db8f5; border-radius: 16px; background: #f5f8ff; color: var(--accent); font-size: 16px; transition: background .12s, border-color .12s; }
.drop-box b { color: #2a4fa8; }
.drop-box.drop-on { background: #e3ecff; border-color: var(--accent); border-style: solid; }
.dropzone:not(:has(.drop-box)) { outline: 2px dashed transparent; outline-offset: 4px; }
.dropzone.drop-on { outline: 2px dashed var(--accent); outline-offset: 4px; background: #f2f6ff; }
.btn.big > svg { vertical-align: -4px; margin-right: 4px; }
.move-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.move-btns .btn { display: inline-flex; align-items: center; gap: 6px; }
table.list td.tel { white-space: nowrap; }
.ph-sub { display: none; }
th.pk input:disabled, td.pk input:disabled { opacity: .35; cursor: not-allowed; }
/* 영수증에서 읽어 채운 칸: 맞는지 봐 달라고 노란 테두리 */
input.auto, .seg.auto { box-shadow: 0 0 0 2px #f5b301; border-radius: 10px; }
.spin.small { display: inline-block; width: 14px; height: 14px; border-width: 2px; vertical-align: -2px; margin-right: 4px; }
/* 몰 상품명 연결: "= 우리 상품 맞아요?" */
.oimp-ask { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; background: var(--card); }
.oimp-ask.ok { border-color: #bfe3c8; background: #f3fbf5; }
.oa-mall { font-size: 13px; color: var(--muted); }
.oa-name { font-weight: 700; margin: 2px 0 8px; word-break: keep-all; }
.oa-name small { font-weight: 400; color: var(--muted); }
.oa-q { margin-bottom: 10px; } .oa-q b { color: var(--accent); } .oa-q.none { color: var(--muted); font-size: 14px; }
.oa-btns { display: flex; gap: 8px; } .oa-btns .btn { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.oa-pick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .oa-pick select { flex: 1 1 200px; margin: 0; }
.chip-btn { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 7px 12px; font: inherit; font-size: 14px; cursor: pointer; color: inherit; }
.oa-done { display: flex; align-items: center; gap: 6px; color: #1f8a3b; } .oa-done b { color: var(--text); }
.oa-done .link { margin-left: auto; white-space: nowrap; }
.oimp-auto { margin: 6px 0 12px; } .oimp-auto summary { cursor: pointer; color: #1f8a3b; font-weight: 600; display: flex; align-items: center; gap: 6px; padding: 8px 0; }
#oimp-allok { margin: 0 0 10px; }
.ps-file { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 2px dashed #c9d6f5; background: #f5f8ff; color: #4a68c4; border-radius: 14px; padding: 12px 16px; margin-bottom: 12px; }
.ps-file .btn { margin: 0; }
.ps-file.drop-on, #ps.drop-on { border-color: var(--accent); background: #eaf1ff; }
@media (max-width: 760px) { .ps-file { border: none; background: none; padding: 0; } .ps-file > svg { display: none; } .ps-file .btn { width: 100%; justify-content: center; } }
/* 접는 고르기 칸 (판매 경로 · 결제 · 배송) */
.fold-btn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 10px 14px; font: inherit; font-size: 16px; cursor: pointer; text-align: left; color: inherit; min-height: 48px; width: 100%; }
.fold-btn b { font-weight: 600; flex: 1; }
.fold-btn .bph { color: var(--muted); font-weight: 400; }
.fold-btn .chev { color: var(--muted); }
.pay-pick .fold-btn { max-width: none; }
.fold-list { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 8px; }
.fold-list button { border: 1px solid var(--line); background: var(--card); color: inherit; border-radius: 12px; padding: 14px 16px; font: inherit; font-size: 17px; text-align: left; cursor: pointer; }
.fold-list button.on { border-color: var(--accent); color: var(--accent); font-weight: 700; }
/* 발주서 이름 · 견적서 이름: 접어 두고 펼쳐서 칸 고르기 */
details.nm { border: 1px solid var(--line, #e5e5e5); border-radius: 12px; margin: 8px 0 0; background: var(--card, #fff); }
details.nm summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; }
details.nm summary::-webkit-details-marker { display: none; }
details.nm summary span { color: var(--muted, #8e8e93); font-size: 14px; flex: none; width: 84px; }
details.nm summary b { flex: 1; font-size: 15px; min-width: 0; overflow-wrap: anywhere; }
details.nm summary i { font-style: normal; color: var(--accent); transition: transform .15s; }
details.nm[open] summary i { transform: rotate(180deg); }
.nm-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 14px; }
.nm-chips button { border: 1px solid var(--line, #d9d9dc); border-radius: 99px; padding: 8px 14px; font-size: 15px; background: transparent; color: inherit; }
.nm-chips button.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
#pob .nm-chips { padding: 0; }
.nm-lab { color: var(--muted, #8e8e93); font-size: 14px; margin: 14px 0 8px; }

/* 거래처 사업자 상태 (국세청) */
.biz-st b::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: currentColor; }
.biz-st.open b { color: #1f9d55; }
.biz-st.paused b { color: #e08600; }
.biz-st.closed b { color: #e03131; }
.biz-st.none b { color: var(--muted); }
.biz-st b.plain::before { display: none; }
.biz-st b.plain { color: inherit; }
.tag.closed { background: #fdecec; color: #c92a2a; }
