/* 셀러브레인 — 토스 느낌의 화면: 회색 바탕 위 흰 카드, 굵은 제목, 파란 주 버튼, 회색으로 채운 입력칸, 아래 탭 */
:root {
  --bg: #f2f4f6; --card: #ffffff; --ink: #191f28; --ink2: #4e5968; --ink3: #8b95a1; --line: #e5e8eb;
  --fill: #f2f4f6; --fill-strong: #e5e8eb;
  --blue: #3182f6; --blue-press: #1b64da; --blue-soft: #e8f3ff; --blue-soft-ink: #1b64da;
  --green: #03b26c; --green-soft: #e5f8ef; --orange-ink: #c26e00; --orange-soft: #fff3e0;
  --red: #f04452; --red-soft: #ffeeee;
  --radius: 20px; --tabbar: 58px;
  --fz: 1;  /* 글씨 크기 배율: 보통 1 · 크게 1.12 · 아주 크게 1.25 (html[data-fs], 이 브라우저에 기억) */
  --fs-12: calc(12px * var(--fz)); --fs-13: calc(13px * var(--fz)); --fs-15: calc(15px * var(--fz)); --fs-17: calc(17px * var(--fz)); --fs-20: calc(20px * var(--fz)); --fs-22: calc(22px * var(--fz)); --fs-28: calc(28px * var(--fz));  /* 글자 크기 7단계 (12는 배지·아래 탭만) */
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101013; --card: #1c1c21; --ink: #f2f3f5; --ink2: #b0b4ba; --ink3: #7e838b; --line: #2b2b33;
    --fill: #2b2b33; --fill-strong: #3a3a44;
    --blue-press: #5b9cf8; --blue-soft: #1a2638; --blue-soft-ink: #8bbcff;
    --green: #2ccf8a; --green-soft: #12291d; --orange-ink: #ffb84d; --orange-soft: #33260f;
    --red: #ff6b76; --red-soft: #351a1e;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: var(--fs-17); -webkit-text-size-adjust: 100%; }
html[data-fs="lg"] { --fz: 1.12; }
html[data-fs="xl"] { --fz: 1.25; }
body {
  margin: 0; background: var(--bg); color: var(--ink); line-height: 1.5; letter-spacing: -0.01em;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Malgun Gothic", "Noto Sans KR", sans-serif;
  -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: anywhere;
}
a { color: var(--blue); text-decoration: none; }
button { font-family: inherit; }

/* ---------- 상단 막대 · 아래 탭 ---------- */
.appbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 52px; padding: 0 20px; background: var(--bg);      /* 불투명: 85% 반투명이면 스크롤할 때 아래 글자가 아이콘 사이로 비침 (11-22 순찰 P27) */
}
.appbar .brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: var(--fs-15); color: var(--ink); }
.appbar .brand .mark { width: 24px; height: 24px; border-radius: 8px; background: var(--blue); display: grid; place-items: center; }
.appbar .brand .mark svg { width: 17px; height: 17px; color: #fff; }
.appbar .brand small { font-weight: 500; color: var(--ink3); font-size: var(--fs-13); }
.topnav { display: none; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex;
  height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--card) 92%, transparent); border-top: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--ink3); font-size: var(--fs-12); font-weight: 600;
}
.tabbar a svg { width: 25px; height: 25px; }
.tabbar a.on { color: var(--ink); }
body.has-tabs main { padding-bottom: calc(var(--tabbar) + 28px + env(safe-area-inset-bottom)); }
@media (min-width: 768px) {
  .tabbar { display: none; }
  body.has-tabs main { padding-bottom: 56px; }
  .topnav { display: flex; gap: 2px; margin-right: auto; margin-left: 20px; }
  .topnav a { padding: 4px 12px; border-radius: 8px; color: var(--ink3); font-weight: 600; font-size: var(--fs-15); }
  .topnav a:hover { color: var(--ink); }
  .topnav a.on { color: var(--ink); background: var(--fill-strong); }
  .appbar { padding: 0 28px; }
}

.demo-bar { margin: 4px 0 0; padding: 8px 16px; border-radius: 12px; background: var(--blue-soft);
  color: var(--blue-soft-ink); font-size: var(--fs-13); font-weight: 600; text-align: center; }
.demo-bar a { font-weight: 700; text-decoration: underline; }
main { max-width: 600px; margin: 0 auto; padding: 4px 16px 56px; }
/* 좁은 PC·태블릿(640~1023px): 사이드바가 숨으니 본문은 창을 채운다 (2026-11-09 사용자: 창을 줄이면 좌우 여백이 너무 많음, 600px 에 묶여 있었음) */
@media (min-width: 640px) and (max-width: 1023px) { main { max-width: none; padding-left: 24px; padding-right: 24px; } }
.page-title { font-size: var(--fs-22); font-weight: 700; letter-spacing: -0.03em; line-height: 1.35; margin: 12px 4px 20px; }
.page-sub { color: var(--ink2); margin: -12px 4px 20px; font-size: var(--fs-15); }

/* ---------- 카드 ---------- */
.card { background: var(--card); border-radius: var(--radius); padding: 20px 20px; margin-bottom: 12px; }
.card h2 { font-size: var(--fs-17); font-weight: 700; margin: 0 0 12px; letter-spacing: -0.02em; }
.card .h-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.card .h-row h2 { margin: 0; }
.muted { color: var(--ink3); }
.sub { color: var(--ink2); }
.small { font-size: var(--fs-13); }
.big-num { font-size: var(--fs-28); font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; }
.eyebrow { color: var(--ink3); font-size: var(--fs-13); font-weight: 600; margin: 0 0 4px; }

/* ---------- 목록 행 ---------- */
.list { margin: 0 -8px; }
.list .item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px;
  padding: 8px 8px; border-radius: 12px; color: var(--ink); width: 100%; background: none; border: 0; text-align: left; font: inherit;
}
.list a.item, .list button.item { cursor: pointer; transition: background .12s; }
.list a.item:hover, .list button.item:hover { background: var(--fill); }
.list .item .k { color: var(--ink2); font-size: var(--fs-15); }
.list .item .v { font-weight: 600; text-align: right; }
.list .item .t { font-weight: 600; font-size: var(--fs-15); }
.list .item .d { color: var(--ink3); font-size: var(--fs-13); margin-top: 1px; }
.list .item .chev { color: var(--ink3); flex: 0 0 auto; width: 18px; height: 18px; }
.list .item .chev svg { width: 100%; height: 100%; display: block; }
.list .ico {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--blue-soft); color: var(--blue-soft-ink);
}
.list .ico svg { width: 20px; height: 20px; }
.list .ico.green { background: var(--green-soft); color: var(--green); }
.list .ico.orange { background: var(--orange-soft); color: var(--orange-ink); }
.list .ico.gray { background: var(--fill); color: var(--ink2); }
.list .ico { width: 38px; height: 38px; }
.list .ico svg { width: 22px; height: 22px; }
.list .grow { flex: 1; min-width: 0; }
.divider { height: 1px; background: var(--line); margin: 4px 0; }

/* ---------- 숫자 묶음 ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; }
.stat { background: var(--fill); border-radius: 16px; padding: 12px 12px; }
.stat b { display: block; font-size: var(--fs-20); font-weight: 700; letter-spacing: -0.02em; }
.stat span { color: var(--ink2); font-size: var(--fs-13); font-weight: 500; }
.stat.hl b { color: var(--blue); }
.stat.zero b { color: var(--ink3); }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 44px;
  padding: 0 16px; border: 0; border-radius: 12px; background: var(--blue); color: #fff;
  font-size: var(--fs-15); font-weight: 600; cursor: pointer; transition: background .15s, transform .1s; white-space: nowrap;
}
.btn:hover { background: var(--blue-press); }
.btn:active { transform: scale(.97); }
.btn.soft { background: var(--blue-soft); color: var(--blue-soft-ink); }
.btn.gray { background: var(--fill); color: var(--ink); }
.btn.gray:hover { background: var(--fill-strong); }
.btn.text { background: transparent; color: var(--ink3); height: 36px; padding: 0 8px; font-size: var(--fs-13); }
.btn.text:hover { color: var(--ink); background: var(--fill); }
.btn:disabled { background: var(--fill-strong); color: var(--ink3); cursor: not-allowed; transform: none; }
.btn svg { width: 18px; height: 18px; }
.btn:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible, .item:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 2px;
}
.stack { display: grid; gap: 8px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row > * { flex: 1 1 180px; }

.bottom-cta {
  position: sticky; bottom: 0; margin: 0 -20px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, transparent, var(--card) 24px);
}

/* ---------- 입력 ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; color: var(--ink2); font-size: var(--fs-13); font-weight: 600; margin: 0 0 4px; }
.field .hint { color: var(--ink3); font-size: var(--fs-13); margin: 4px 0 0 2px; }
input:not([type]), input[type=text], input[type=password], input[type=email], input[type=tel], select {
  width: 100%; height: 52px; padding: 0 16px; font-size: var(--fs-17); font-family: inherit; color: var(--ink);
  background: var(--fill); border: 1.5px solid transparent; border-radius: 12px; transition: border-color .15s, background .15s;
  -webkit-appearance: none; appearance: none;
}
input::placeholder { color: var(--ink3); }
input:focus, select:focus { outline: none; border-color: var(--blue); background-color: var(--card); }
input[type=file] { width: 100%; font-size: var(--fs-13); color: var(--ink2); }
input[type=file]::file-selector-button {
  border: 0; border-radius: 12px; padding: 8px 12px; margin-right: 8px; background: var(--blue-soft);
  color: var(--blue-soft-ink); font-weight: 600; font-family: inherit; cursor: pointer;
}
.filepick { display: flex; align-items: center; gap: 8px; cursor: pointer; min-width: 0; }
.filepick input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.filepick .fname { color: var(--ink3); font-size: var(--fs-13); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filepick:focus-within .btn { outline: 2px solid var(--blue); outline-offset: 2px; }
input.code { font-size: var(--fs-22); font-weight: 700; letter-spacing: .3em; text-align: center; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; font-size: var(--fs-15); cursor: pointer; padding: 4px 0; }
.check input { width: 20px; height: 20px; accent-color: var(--blue); flex: 0 0 auto; margin: 0; }

/* ---------- 자동 동기화: 스위치 · 시각 · 요일 ---------- */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.switch-row .t { display: block; font-weight: 600; }
.switch-row .d { display: block; color: var(--ink3); font-size: var(--fs-13); margin-top: 2px; }
.switch { position: relative; flex: 0 0 auto; width: 50px; height: 30px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 15px; background: var(--fill-strong); transition: background .2s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
input.timebox { width: 100%; height: 52px; padding: 0 16px; font-size: var(--fs-17); font-family: inherit; color: var(--ink);
  background: var(--fill); border: 1.5px solid transparent; border-radius: 12px; -webkit-appearance: none; appearance: none; }
input.timebox:focus { outline: none; border-color: var(--blue); background: var(--card); }
select { background-image: linear-gradient(45deg, transparent 50%, var(--ink3) 50%), linear-gradient(135deg, var(--ink3) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }

/* ---------- 알림 띠 · 칩 ---------- */
.banner { display: flex; gap: 8px; align-items: flex-start; border-radius: 16px; padding: 12px 16px; margin-bottom: 12px; font-size: var(--fs-15); font-weight: 600; }
.banner svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 2px; }
.banner.info { background: var(--blue-soft); color: var(--blue-soft-ink); }
.banner.ok { background: var(--green-soft); color: var(--green); }
.banner.warn { background: var(--orange-soft); color: var(--orange-ink); }
.banner.bad { background: var(--red-soft); color: var(--red); }
.banner .small { font-weight: 500; opacity: .9; display: block; margin-top: 2px; }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 8px; font-size: var(--fs-13); font-weight: 600; white-space: nowrap; }
.chip.ok { background: var(--green-soft); color: var(--green); }
.chip.warn { background: var(--orange-soft); color: var(--orange-ink); }
.chip.bad { background: var(--red-soft); color: var(--red); }
.chip.info { background: var(--blue-soft); color: var(--blue-soft-ink); }
.chip.gray { background: var(--fill); color: var(--ink2); }

/* ---------- 바뀐 상품 표 ---------- */
table.changes td { vertical-align: middle; }
table.changes .pname { font-weight: 600; color: var(--ink); }
table.changes .up { color: var(--red); font-weight: 700; }
table.changes .down { color: var(--blue); font-weight: 700; }
@media (max-width: 767px) {            /* 휴대폰: 표 대신 상품마다 한 덩어리 */
  table.changes thead { display: none; }
  table.changes, table.changes tbody, table.changes tr, table.changes td { display: block; width: 100%; }
  table.changes tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  table.changes tr:last-child { border-bottom: 0; }
  table.changes td { border: 0; padding: 3px 0; text-align: left !important; white-space: normal !important; overflow-wrap: normal; word-break: keep-all; }
  table.changes td[data-label] { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: var(--fs-15); }
  table.changes td[data-label]::before { content: attr(data-label); color: var(--ink3); font-size: var(--fs-13); width: 56px; flex: 0 0 auto; }
  table.changes .pname { font-size: var(--fs-15); }
  table.changes td.same { display: none; }          /* 휴대폰에서는 바뀐 항목만 */
}

/* ---------- 진행 ---------- */
.progress { height: 6px; background: var(--fill); border-radius: 3px; overflow: hidden; margin: 16px 0 4px; }
.progress > div { height: 100%; width: 0; background: var(--blue); border-radius: 3px; transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.steps { list-style: none; padding: 0; margin: 4px 0 0; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 8px 0; color: var(--ink3); font-size: var(--fs-15); font-weight: 500; }
.steps li .dot { width: 20px; height: 20px; border-radius: 50%; background: var(--fill); flex: 0 0 auto; display: grid; place-items: center; }
.steps li .dot svg { width: 13px; height: 13px; display: none; color: #fff; }
.steps li.done { color: var(--ink2); }
.steps li.done .dot { background: var(--blue); }
.steps li.done .dot svg { display: block; }
.steps li.now { color: var(--ink); font-weight: 700; }
.steps li.now .dot { background: var(--card); box-shadow: inset 0 0 0 5px var(--blue); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .steps li.now .dot { animation: none; } .progress > div, .btn { transition: none; } }

pre.log {
  background: var(--fill); border-radius: 12px; padding: 12px; margin: 8px 0 0; font-size: var(--fs-13); line-height: 1.6;
  white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow-y: auto; color: var(--ink2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
details > summary { cursor: pointer; list-style: none; font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; }
details > summary::-webkit-details-marker { display: none; }
/* 접기 표시: 다른 화면과 같은 꺾쇠(아래로), 펼치면 위로 */
details > summary::after { content: ""; width: 20px; height: 20px; flex: 0 0 auto; margin-left: auto; background: var(--ink3); transition: transform .2s;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E") center / 20px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E") center / 20px no-repeat; }
details[open] > summary::after { transform: rotate(180deg); }
details .inner { padding-top: 8px; }

.table-wrap { overflow-x: auto; margin: 0 -4px; }
table { border-collapse: collapse; width: 100%; font-size: var(--fs-13); }
.runs-table table { font-size: var(--fs-15); }
.runs-table tbody tr:hover td { background: var(--fill); }
.runs-table th:nth-child(n+3):nth-child(-n+7) { text-align: right; }
th, td { border-bottom: 1px solid var(--line); padding: 8px 8px; text-align: left; vertical-align: top; }
th { color: var(--ink3); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

/* ---------- 로그인 · 가입 ---------- */
body.auth-body { background: var(--card); }
.auth { max-width: 420px; margin: 0 auto; padding: 24px 20px 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.auth .logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: var(--fs-15); margin-bottom: 40px; color: var(--ink); }
.auth .logo .mark { width: 28px; height: 28px; border-radius: 8px; background: var(--blue); display: grid; place-items: center; }
.auth .logo .mark svg { width: 19px; height: 19px; color: #fff; }
.auth h1 { font-size: var(--fs-22); font-weight: 700; line-height: 1.4; letter-spacing: -0.03em; margin: 0 0 8px; }
.auth .lead { color: var(--ink2); margin: 0 0 32px; font-size: var(--fs-15); }
.auth .grow { flex: 1; }
.auth .foot { text-align: center; color: var(--ink3); font-size: var(--fs-13); padding: 12px 0 24px; }
.auth .foot a { font-weight: 600; }
.section-label { font-size: var(--fs-13); font-weight: 700; color: var(--ink3); margin: 28px 2px 12px; }
@media (min-width: 768px) {
  body.auth-body { background: var(--bg); }
  .auth { min-height: auto; margin: 6vh auto; padding: 36px 32px 8px; background: var(--card); border-radius: 20px; }
  .bottom-cta { position: static; margin: 0; padding: 8px 0 0; background: none; }
}

/* ---------- PC: 넓게, 두 단 ---------- */
.cols { display: block; }
.runs-table { display: none; }
.cols > * { min-width: 0; }
@media (min-width: 1024px) {
  main { max-width: 1120px; padding: 8px 32px 56px; }
  main.shell { max-width: 1440px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
  main.shell > .activity { position: sticky; top: 68px; margin-top: 20px; max-height: calc(100vh - 92px); overflow-y: auto; }
  .appbar { padding: 0 max(32px, calc((100vw - 1440px) / 2 + 32px)); }
  .page-title { font-size: var(--fs-28); margin: 20px 4px 24px; }

  .card { padding: 24px 28px; }
  .stats { grid-template-columns: repeat(5, 1fr); }
  .runs-table { display: block; }
  .runs-list { display: none; }
}
/* 화면 안 두 단: 데스크톱 기본 (사이드바 빼고 본문이 800px 넘으면) */
@media (min-width: 1200px) {
  .cols { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
  .cols.even { grid-template-columns: 1fr 1fr; }
  .cols > aside { position: sticky; top: 68px; }
}

/* 실행 결과: 단계마다 한 줄 */
.res-notes { list-style: none; margin: -4px 0 16px; padding: 0; display: grid; gap: 4px; }
.res-notes li { display: flex; gap: 12px; align-items: baseline; color: var(--ink2); line-height: 1.5; }
.res-notes li b { flex: 0 0 auto; min-width: 72px; color: var(--ink); font-weight: 600; }
.res-notes li span { flex: 1; }
.mini-bar { display: block; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; margin: 4px 0 2px; }
.mini-bar i { display: block; height: 100%; background: var(--blue, #3182f6); transition: width .6s; }

/* 모든 화면 오른쪽: 처리 현황 */
.activity { padding: 16px 16px 8px; }
@media (max-width: 1023px) { main.shell > .activity { margin-top: 24px; } }
.act-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.act-head h2 { margin: 0; font-size: var(--fs-17); }
.act-list { list-style: none; margin: 0 -8px; padding: 0; }
.act-list li a { display: flex; gap: 8px; padding: 8px 8px; border-radius: 12px; color: inherit; text-decoration: none; }
.act-list li a:hover { background: var(--fill); }
.act-list li a:active, .act-list li a.cur, .side-list.act-list a:active, .side-list.act-list a.cur { background: var(--fill-strong); }
.act-title { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: var(--fs-15); font-weight: 700; color: var(--ink2); }
.act-list li + li { border-top: 1px solid var(--line); }
.act-ic { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 12px; background: var(--fill); display: grid; place-items: center; color: var(--ink2); }
.act-ic svg { width: 17px; height: 17px; }
.act-list li.live .act-ic { background: var(--blue-soft); color: var(--blue); }
.act-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.act-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.act-top b { font-size: var(--fs-13); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-d { font-size: var(--fs-13); color: var(--ink2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.act-t { font-size: var(--fs-13); color: var(--ink3); }

.mini-bar.busy i { width: 35%; animation: bar-slide 1.4s ease-in-out infinite; }
@keyframes bar-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(290%); } }
@media (prefers-reduced-motion: reduce) { .mini-bar.busy i { animation: none; width: 100%; opacity: .5; } }

/* 휴대폰: 도는 작업을 맨 위 토스트로 */
.act-toast { display: none; }
@media (max-width: 1023px) {
  .act-toast {
    display: flex; gap: 8px; align-items: center; position: fixed; z-index: 9; top: 58px; left: 12px; right: 12px;
    padding: 8px 12px; border-radius: 16px; color: inherit; text-decoration: none;
    background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .18); border: 1px solid var(--line);
  }
  .act-toast .act-ic { background: var(--blue-soft); color: var(--blue); }
  /* (2026-11-08) 진행 알림은 휴대폰에서 오른쪽 칸과 함께 숨어 있어 본문을 내리지 않는다. 대신 위 시계 단추에 점 (.hist-btn.live) */
}
.act-pct { font-size: var(--fs-13); font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; }
.act-d.one { -webkit-line-clamp: 1; }

.auth-box { margin-top: 12px; }
.auth-code { display: flex; gap: 8px; }
.auth-code input { flex: 1; min-width: 0; font-size: var(--fs-17); letter-spacing: .2em; font-variant-numeric: tabular-nums; }

.steps-plain { margin: 0 0 8px; padding-left: 16px; color: var(--ink2); line-height: 1.6; }
.topic-box { display: flex; align-items: center; gap: 8px; background: var(--fill); border-radius: 12px; padding: 8px 12px; }
.topic-box code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: var(--fs-13); }

/* 개인정보처리방침·이용약관 */
.legal { max-width: 760px; margin: 0 auto; padding: 32px 20px 64px; line-height: 1.7; }
.legal .logo a { display: inline-flex; align-items: center; gap: 8px; color: inherit; font-weight: 700; text-decoration: none; }
.legal .logo .mark { width: 28px; height: 28px; border-radius: 8px; background: var(--blue); display: grid; place-items: center; }
.legal .logo .mark svg { width: 19px; height: 19px; color: #fff; }
.legal h1 { font-size: var(--fs-28); margin: 20px 0 16px; }
.legal h2 { font-size: var(--fs-17); margin: 28px 0 8px; }
.legal p, .legal li { color: var(--ink2); }
.legal ul, .legal ol { padding-left: 20px; }
.legal-table { width: 100%; border-collapse: collapse; font-size: var(--fs-15); }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 8px 8px; border-bottom: 1px solid var(--line); }

.btn.danger { background: var(--red-soft); color: var(--red); }

/* ---------- 운영자 화면 ---------- */
.admin-head { margin-bottom: 8px; }
.subnav, .seg { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.subnav a, .seg a { padding: 8px 12px; border-radius: 12px; color: var(--ink2); text-decoration: none; white-space: nowrap; font-weight: 600; font-size: var(--fs-15); }
.subnav a.on, .seg a.on { background: var(--card); color: var(--ink); }
.subnav { margin: 0 0 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-bottom: 12px; }
.kpi { background: var(--card); border-radius: var(--radius); padding: 16px 20px; text-decoration: none; color: inherit; display: grid; gap: 4px; }
.kpi b { font-size: var(--fs-28); font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--ink2); font-size: var(--fs-13); }
.kpi.hl b { color: var(--blue); } .kpi.warn b { color: var(--orange-ink); } .kpi.bad b { color: var(--red); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 140px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.bar i { display: flex; flex-direction: column; justify-content: flex-end; width: 100%; max-width: 28px; background: var(--blue); border-radius: 8px 6px 2px 2px; min-height: 2px; overflow: hidden; }
.bar i em { display: block; background: var(--red); width: 100%; }
.bar > a { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; width: 100%; height: 100%; color: inherit; text-decoration: none; }   /* 홈 막대: 링크가 막대 칸 전체 (짧은 막대도 누르기 쉽게) */
.bar span { font-size: var(--fs-13); color: var(--ink3); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters input { flex: 1 1 260px; min-width: 0; }
.filters select { flex: 0 0 auto; width: auto; }
.filters .btn { height: 52px; }
.admin-table td, .admin-table th { vertical-align: top; }
.admin-table tbody tr:hover td { background: var(--fill); }
.pager { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 12px; }
.pager a { min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: var(--ink2); text-decoration: none; }
.pager a.on { background: var(--blue); color: #fff; }
.member-row { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.member-row:first-of-type { border-top: 0; }
.member-row .grow { flex: 1 1 220px; min-width: 0; }
.row-actions { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.inline-form { display: flex; gap: 4px; }
.inline-form input { width: 200px; }
textarea { width: 100%; box-sizing: border-box; font: inherit; color: inherit; background: var(--fill); border: 0; border-radius: 12px; padding: 12px; resize: vertical; }

@media (min-width: 1024px) { main.shell.wide { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 홈: 주문·클레임 대시보드 ---------- */
.dash { margin-bottom: 20px; }
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 4px 12px; }
.dash-head h2 { margin: 0; font-size: var(--fs-17); }
.dash-head .btn svg { width: 16px; height: 16px; margin-right: 4px; }
.dash-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
@media (min-width: 720px) { .dash-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.tile { background: var(--card); border-radius: var(--radius); padding: 16px 16px; display: grid; gap: 4px; color: inherit; text-decoration: none; min-width: 0; }
.tile span { color: var(--ink2); font-size: var(--fs-13); font-weight: 600; }
.tile b { font-size: var(--fs-28); font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.tile b.sm { font-size: var(--fs-20); padding: 4px 0 2px; }
.tile em { font-style: normal; color: var(--ink3); font-size: var(--fs-13); line-height: 1.4; }
.tile.hl b { color: var(--blue); } .tile.bad b { color: var(--red); } .tile.warn b { color: var(--orange-ink); }
.dash-grid { display: grid; gap: 12px; }
.dash-grid .card { margin: 0; }
.rank { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.rank:first-of-type { border-top: 0; }
.rank .n { width: 22px; height: 22px; border-radius: 8px; background: var(--fill); display: grid; place-items: center; font-size: var(--fs-12); font-weight: 700; color: var(--ink2); flex: 0 0 auto; }
.rank .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-15); }
.rank b { font-size: var(--fs-15); font-variant-numeric: tabular-nums; }

.dash-warns { display: grid; gap: 8px; margin-bottom: 12px; }
.warn-item { display: flex; gap: 8px; align-items: flex-start; padding: 12px 16px; border-radius: 16px; background: var(--orange-soft); color: var(--orange-ink); font-size: var(--fs-15); }
.warn-item.bad { background: var(--red-soft); color: var(--red); }
.warn-item svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; }
.warn-item b { display: block; margin-bottom: 1px; }
.warn-item span { color: var(--ink2); } .warn-item span b { color: inherit; }
.warn-item.bad span b { color: var(--red); } .warn-item span b { color: var(--orange-ink); }

.refresh-box { display: grid; gap: 4px; justify-items: stretch; min-width: 140px; }
.refresh-box .mini-bar { margin: 0; }
.refresh-msg { margin: -4px 4px 8px; color: var(--ink2); }

.acct { padding: 12px 0; border-top: 1px solid var(--line); }
.acct:first-of-type { border-top: 0; }
.acct-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 4px; }

/* 진행 막대 겸 버튼: --p 만큼 왼쪽부터 진하게 */
.prog-btn { font-variant-numeric: tabular-nums; transition: background .4s; }   /* 폭은 글자 맞춤. 진행 중엔 JS 가 누른 순간 폭을 최소로 고정 */
.prog-btn.busy, .prog-btn.busy:disabled { opacity: 1; cursor: default; color: var(--blue-soft-ink);
  background: linear-gradient(90deg, color-mix(in srgb, var(--blue) 38%, var(--blue-soft)) var(--p, 0%), var(--blue-soft) var(--p, 0%)); }

/* 동기화 메뉴 */
.sync-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.sync-head h2 { margin: 0; }
.sync-sched { margin: 4px 0 4px; }
.sched-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; margin-top: 8px; }
.sched-row .field { margin: 0; }
.sched-row .btn { height: 52px; }
@media (max-width: 520px) { .sched-row { grid-template-columns: 1fr 1fr; } .sched-row .btn { grid-column: 1 / -1; } }


/* ---------- TDS 맞춤 (2026-11-04, 앱인토스 UX 가이드·컴포넌트 문서) ----------
   Top: 제목 22(PC 28) bold grey800 · 부제 17 medium grey700 · 위아래 24
   ListRow: 상하 12 · 좌우 24(좁은 화면 20) · 들여쓴 구분선
   Badge: weak 스타일, 색은 blue·teal·green·red·yellow·elephant
   Button: fill(주요) / weak(보조), 보내는 동안 점 3개 로딩
   아이콘: 화면에서 24~40px */
:root { --grey800: #333d4b; --yellow-ink: #b87100; --yellow-soft: #fff7d6; --teal: #0bab9b; --teal-soft: #e3f8f5; --elephant-soft: #eef1f4; --elephant-ink: #4e5968; }
@media (prefers-color-scheme: dark) { :root { --grey800: #e4e6ea; --yellow-ink: #ffcb47; --yellow-soft: #33290f; --teal: #3cd6c4; --teal-soft: #10302c; --elephant-soft: #2b2f37; --elephant-ink: #b0b4ba; } }
.page-title { font-size: var(--fs-22); font-weight: 700; color: var(--grey800); line-height: 1.4; letter-spacing: -0.02em; margin: 24px 4px 24px; }
.page-sub { font-size: var(--fs-17); font-weight: 500; color: var(--ink2); margin: -16px 4px 24px; }
@media (min-width: 1024px) { .page-title { font-size: var(--fs-28); margin: 24px 4px 24px; } }
.card { padding: 24px 20px; }
@media (min-width: 720px) { .card { padding: 24px; } }
.card h2 { font-size: var(--fs-17); font-weight: 700; color: var(--grey800); }
.list .item { min-height: 56px; padding: 12px 8px; }
.list .item + .item, .list + .list .item { box-shadow: inset 0 1px 0 var(--line); }
.list .item .t { font-size: var(--fs-15); } .list .item .k { font-size: var(--fs-15); } .list .item .d { font-size: var(--fs-13); }
.list .ico svg { width: 24px; height: 24px; }
.act-ic { width: 40px; height: 40px; border-radius: 12px; }
.act-ic svg { width: 24px; height: 24px; }
/* Badge (weak) */
.chip { height: 24px; padding: 0 8px; border-radius: 8px; font-size: var(--fs-13); font-weight: 600; }
.chip.info { background: var(--blue-soft); color: var(--blue-soft-ink); }
.chip.ok { background: var(--green-soft); color: var(--green); }
.chip.warn { background: var(--yellow-soft); color: var(--yellow-ink); }
.chip.bad { background: var(--red-soft); color: var(--red); }
.chip.gray { background: var(--elephant-soft); color: var(--elephant-ink); }
.chip.teal { background: var(--teal-soft); color: var(--teal); }
.banner.warn, .warn-item { background: var(--yellow-soft); }
.banner.warn, .warn-item, .warn-item span b { color: var(--yellow-ink); }
/* Button: fill = 주요, weak(soft) = 보조, dark·danger */
.btn { height: 48px; border-radius: 16px; font-size: var(--fs-15); font-weight: 600; }
.btn.big { height: 56px; width: 100%; border-radius: 16px; font-size: var(--fs-17); }
.btn.sm { height: 36px; border-radius: 12px; font-size: var(--fs-13); padding: 0 12px; }
.btn.dark { background: var(--grey800); color: var(--card); }
.btn.danger { background: var(--red); color: #fff; }
.btn.danger.weak, .btn.weak.danger { background: var(--red-soft); color: var(--red); }
.btn.loading { color: transparent !important; pointer-events: none; position: relative; }
.btn.loading svg { visibility: hidden; }
.btn.loading::after { content: ''; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%;
  background: currentColor; color: #fff; box-shadow: -12px 0 0 rgba(255,255,255,.55), 12px 0 0 rgba(255,255,255,.55); animation: btn-dots 1s infinite linear; }
.btn.soft.loading::after, .btn.gray.loading::after, .btn.text.loading::after { color: var(--blue); box-shadow: -12px 0 0 var(--blue-soft-ink), 12px 0 0 var(--blue-soft-ink); }
@keyframes btn-dots { 0% { opacity: .35; } 50% { opacity: 1; } 100% { opacity: .35; } }
/* 다이얼로그: 왼쪽 닫기, 오른쪽 다음 행동 */
.dlg { border: 0; border-radius: 20px; padding: 24px 20px 16px; width: min(360px, calc(100vw - 40px)); background: var(--card); color: var(--ink); }
.dlg::backdrop { background: rgba(0, 0, 0, .45); }
.dlg-msg { margin: 0 0 20px; font-size: var(--fs-17); font-weight: 600; line-height: 1.5; white-space: pre-line; }
.dlg-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dlg-btns .btn { width: 100%; }
.sync-sched .hint { font-size: var(--fs-13); color: var(--ink3); margin: 8px 2px 0; }
@media (max-width: 560px) { .sync-head { flex-direction: column; align-items: stretch; } .sync-head form, .sync-head .btn { width: 100%; } }

/* ---------- 한 화면 한 열 기준 (2026-11-04: 칸 너비·간격을 토스처럼 하나로) ----------
   2단은 어디서나 같은 비율(넓은 열 : 좁은 열 = 1.65 : 1), 간격 12px.
   칸 높이는 내용만큼 (같은 줄 칸을 늘려 빈 공간을 만들지 않음) */
:root { --gap: 12px; }
.card { margin-bottom: var(--gap); }
.dash-grid { display: grid; gap: var(--gap); align-items: start; }
.dash-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-content: start; min-width: 0; }
.dash-col > .card { margin: 0; }
.dash-tiles { gap: var(--gap); margin-bottom: var(--gap); }
.dash-warns { margin-bottom: var(--gap); }
@media (min-width: 1200px) {
  .dash-grid, .cols { grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); gap: var(--gap); }
  .dash { margin-bottom: var(--gap); }
}
@media (min-width: 1024px) { main.shell { gap: var(--gap); } }
.cols > .dash-col > .card { margin: 0; }
/* 처리 현황 칸: 스크롤은 되고 막대는 숨김 */
main.shell > .activity { scrollbar-width: none; }
main.shell > .activity::-webkit-scrollbar { display: none; }
.cols > aside.dash-col { position: static; }

/* =========================================================================
   토스증권 홈 따라하기 (2026-11-04): 위 막대 · 본문 · 오른쪽 패널(관심 TOP10 모양) · 아이콘 막대 · 아래 띠
   ========================================================================= */
:root { --side-bg: #fbfcfd; --board: #ffffff; --up: #f04452; --down-blue: #3182f6; --top-h: 56px; --tick-h: 40px; }
@media (prefers-color-scheme: dark) { :root { --bg: #17171c; --card: #202027; --side-bg: #1b1b21; --board: #202027; --line: #2c2c35; --fill: #2c2c35; } }
@media (min-width: 1024px) {
  body.has-tabs { background: var(--bg); }
  .topbar { position: sticky; top: 0; z-index: 20; height: var(--top-h); padding: 0 16px; display: flex; align-items: center; gap: 24px;
    background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(180%) blur(16px); }
  .topbar .brand { font-size: var(--fs-17); }
  .topbar .brand small { display: none; }
  .topbar .topnav { display: flex; gap: 4px; margin: 0; }
  .topbar .topnav a { padding: 4px 12px; border-radius: 8px; font-size: var(--fs-15); font-weight: 500; color: var(--ink2); background: none; }
  .topbar .topnav a.on { color: var(--ink); font-weight: 700; background: none; }
  .topbar .topnav a:hover { background: var(--fill); }
  .top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
  .top-company { font-size: var(--fs-13); color: var(--ink3); padding: 4px 12px; background: var(--fill); border-radius: 12px; }
  .top-cta { height: 36px; }
  .app { display: grid; grid-template-columns: minmax(0, 1fr) var(--side-w, 320px) 64px; align-items: start; min-height: calc(100vh - var(--top-h)); }
  .app.wide { grid-template-columns: minmax(0, 1fr); }
  .app.side-off { grid-template-columns: minmax(0, 1fr) 0 64px; }
  .app.side-off .side { visibility: hidden; border: 0; }
  main.content { max-width: none; margin: 0; padding: 4px 12px calc(var(--tick-h) + 24px) 12px; min-width: 0; }
  .side { position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h) - var(--tick-h)); overflow-y: auto; background: var(--side-bg);
    border-left: 1px solid var(--line); padding: 20px 16px; scrollbar-width: none; }
  .side::-webkit-scrollbar { display: none; }
  .rail { position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h) - var(--tick-h)); border-left: 1px solid var(--line);
    background: var(--side-bg); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 0; }
  .rail-btn { width: 52px; border: 0; background: none; color: var(--ink3); display: grid; justify-items: center; gap: 2px; padding: 8px 0;
    border-radius: 12px; cursor: pointer; font: inherit; font-size: var(--fs-13); }
  .rail-btn svg { width: 24px; height: 24px; }
  .rail-btn.on { color: var(--ink); } .rail-btn.on svg { color: var(--ink); }
  .rail-btn.on::before { content: ''; } 
  .rail-btn:hover { background: var(--fill); }
  .rail-low { margin-top: auto; }                 /* 처리 예정·이력은 아래로 (11-11 사장님) */
  .rail-fold { margin-top: 8px; } .rail-fold svg { width: 20px; height: 20px; transform: rotate(0deg); }
  .app.side-off .rail-fold svg { transform: rotate(180deg); }
  .ticker { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; height: var(--tick-h); display: flex; align-items: center; gap: 20px;
    padding: 0 20px; background: var(--bg); border-top: 1px solid var(--line); font-size: var(--fs-13); white-space: nowrap; overflow: hidden; }
  .ticker .tk-title { font-weight: 700; padding-right: 16px; border-right: 1px solid var(--line); }
  .ticker .tk em { font-style: normal; color: var(--ink2); margin-right: 4px; } .ticker .tk b { font-weight: 600; font-variant-numeric: tabular-nums; }
  .ticker .tk.muted { margin-left: auto; color: var(--ink3); }
  main.shell > .activity { display: none; }
}
@media (max-width: 1023px) {
  .rail, .ticker, .top-company, .top-cta { display: none; }
  /* 휴대폰·태블릿: 화면마다 아래에 처리 이력을 붙이지 않는다. 위 시계 단추 → 실행 기록 (2026-11-06 사용자) */
  .side { display: none; }
}
.top-right .hist-btn { display: none; } .hist-btn svg { width: 22px; height: 22px; }
@media (max-width: 1023px) { .top-right .hist-btn { display: grid; } }
/* 위쪽 알림 띠 (토스증권 '사칭 유의 안내' 모양) */
.notice-strip { display: flex; justify-content: center; padding: 8px 16px 4px; }
.notice-strip a { display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 16px; color: var(--ink); font-size: var(--fs-15); }
.notice-strip .ns-ic { width: 32px; height: 32px; border-radius: 12px; background: var(--red-soft); color: var(--red); display: grid; place-items: center; }
.notice-strip .ns-ic svg { width: 20px; height: 20px; }
.notice-strip .ns-btn { padding: 4px 8px; border-radius: 8px; background: var(--fill); font-size: var(--fs-13); font-weight: 600; }
/* 오른쪽 패널 줄 (관심 주식 TOP 10 모양): 동그란 아이콘 40 · 이름 · 오른쪽 값과 변화 */
.side-head h2 { font-size: var(--fs-15); font-weight: 700; margin: 0; color: var(--grey800); }
.side-head p { font-size: var(--fs-13); color: var(--ink3); margin: 2px 0 12px; }
.side-list { list-style: none; margin: 0 -8px; padding: 0; }
.side-list li { position: relative; }
.side-list li + li { border-top: 0; }
.side-list a, .side-list .sl-row { display: flex; align-items: center; gap: 12px; padding: 8px 8px; border-radius: 12px; color: inherit; text-decoration: none; }
.side-list a:hover { background: var(--fill); }
.sl-ic { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); color: var(--ink2); }
.sl-ic svg { width: 22px; height: 22px; }
.sl-ic.on, .act-list li.live .sl-ic { background: var(--blue-soft); color: var(--blue); }
.sl-ic.k-쇼핑몰 { background: var(--teal-soft); color: var(--teal); } .sl-ic.k-샵플링 { background: var(--blue-soft); color: var(--blue); }
.sl-ic.k-되돌리기 { background: var(--yellow-soft); color: var(--yellow-ink); } .sl-ic.k-동기화 { background: var(--green-soft); color: var(--green); }
.sl-name { flex: 1; min-width: 0; display: grid; }
.sl-name b { font-size: var(--fs-15); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-name em { font-style: normal; font-size: var(--fs-13); color: var(--ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-right { flex: 0 0 auto; display: grid; justify-items: end; text-align: right; }
.sl-right b { font-size: var(--fs-15); font-weight: 600; font-variant-numeric: tabular-nums; }
.sl-right em { font-style: normal; font-size: var(--fs-13); color: var(--ink3); font-variant-numeric: tabular-nums; }
.sl-bar { position: absolute; left: 60px; right: 8px; bottom: 2px; height: 3px; border-radius: 2px; background: var(--fill); overflow: hidden; }
.sl-bar i { display: block; height: 100%; background: var(--blue); }
.up { color: var(--up); } .down { color: var(--red); } .up-blue { color: var(--blue); } .warn-t { color: var(--yellow-ink); }
.side-list b.muted { color: var(--ink3); font-weight: 500; }

/* ---------- 홈 판 (토스증권 홈의 큰 둥근 판) ---------- */
.board { background: var(--board); border: 1px solid var(--line); border-radius: 20px; padding: 20px; margin-bottom: var(--gap); }
.board .card { background: transparent; padding: 0; border-radius: 0; }
.board-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.board-status { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: var(--fs-15); }
.bs-item { display: inline-flex; align-items: center; gap: 4px; }
.bs-item b { font-weight: 600; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink3); display: inline-block; flex: 0 0 auto; }
.dot.on { background: var(--green); }
.board-empty { margin: 8px 0; color: var(--ink2); }
.board-main { display: grid; gap: 16px; }
@media (min-width: 1100px) { .board-main { grid-template-columns: minmax(0, 1fr) 280px; } }
.idx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .idx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.idx { display: flex; align-items: center; gap: 12px; padding: 12px 12px; min-width: 0; }
.idx + .idx { border-left: 1px solid var(--line); }
@media (min-width: 720px) { .idx:nth-child(3n+1) { border-left: 0; } .idx:nth-child(n+4) { border-top: 1px solid var(--line); } }
@media (max-width: 719px) { .idx:nth-child(2n+1) { border-left: 0; } .idx:nth-child(n+3) { border-top: 1px solid var(--line); } .idx .spark { display: none; } }
.idx-text { display: grid; min-width: 0; }
.idx-label { font-size: var(--fs-13); color: var(--ink2); }
.idx-val { font-size: var(--fs-20); font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.idx-val small { font-size: var(--fs-15); font-weight: 600; margin-left: 1px; }
.idx-val.blue { color: var(--blue); } .idx-val.red { color: var(--red); } .idx-val.yellow { color: var(--yellow-ink); }
.idx-delta { font-size: var(--fs-13); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink3); }
.idx-delta em { font-style: normal; font-weight: 400; color: var(--ink3); }
.idx-delta.up { color: var(--up); } .idx-delta.dn { color: var(--blue); }
.idx-sub { font-size: var(--fs-13); color: var(--ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spark { width: 96px; height: 44px; flex: 0 0 auto; }
.spark polyline { fill: none; stroke-width: 1.6; stroke-linejoin: round; }
.spark.up polyline { stroke: var(--up); } .spark.dn polyline { stroke: var(--blue); }
.spark .base { stroke: var(--ink3); stroke-width: .6; stroke-dasharray: 2 2; opacity: .6; }
.agenda { background: var(--fill); border-radius: 16px; padding: 16px; align-self: start; }
.ag-head { display: flex; justify-content: space-between; align-items: center; color: var(--ink); }
.ag-head svg { width: 18px; height: 18px; color: var(--ink3); }
.ag-desc { font-size: var(--fs-13); color: var(--ink2); margin: 8px 0 12px; line-height: 1.5; }
.ag-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: var(--fs-15); }
.ag-list li { display: flex; align-items: center; gap: 8px; }
.ag-list em { font-style: normal; color: var(--ink3); min-width: 74px; font-size: var(--fs-13); }
.ag-list b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-split { display: grid; gap: 20px; padding: 0; }
@media (min-width: 1100px) { .board-split { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); } .bd-right { border-left: 1px solid var(--line); } }
.bd-left, .bd-right { padding: 20px; min-width: 0; }
.bd-tabs { display: flex; gap: 16px; border-bottom: 1px solid var(--line); margin: -4px 0 8px; overflow-x: auto; scrollbar-width: none; }
.bd-tabs button { border: 0; background: none; font: inherit; font-size: var(--fs-15); font-weight: 600; color: var(--ink3); padding: 8px 0 12px; cursor: pointer; white-space: nowrap; box-shadow: none; }
.bd-tabs button.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.rank-table { width: 100%; border-collapse: collapse; font-size: var(--fs-15); }
.rank-table th { font-size: var(--fs-13); font-weight: 500; color: var(--ink3); text-align: left; padding: 8px 4px; }
.rank-table td { padding: 12px 4px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.rank-table .r { text-align: right; } .rank-table .rk { color: var(--ink3); width: 36px; }
.rank-table td.nm { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-table tbody tr:hover td { background: var(--fill); }
.bd-chart-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.bd-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.bd-mini span { display: block; font-size: var(--fs-13); color: var(--ink3); } .bd-mini b { font-size: var(--fs-15); font-variant-numeric: tabular-nums; }
.board-title { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 16px; }
.board-title h2 { margin: 0; font-size: var(--fs-20); font-weight: 700; color: var(--grey800); }
.board-title p { margin: 2px 0 0; color: var(--ink2); font-size: var(--fs-15); }
.board .cols > .dash-col > .card { background: var(--fill); padding: 20px; border-radius: 16px; }
@media (max-width: 1023px) { .board { border-radius: var(--radius); } }
/* 토스증권처럼: 밝은 화면은 흰 바탕 + 옅은 테두리 칸 */
@media (prefers-color-scheme: light), (prefers-color-scheme: no-preference) {
  body.has-tabs { --bg: #ffffff; background: #ffffff; }
  body.has-tabs .card { border: 1px solid var(--line); }
  body.has-tabs .board .card { border: 0; }
  body.has-tabs .tile, body.has-tabs .kpi { border: 1px solid var(--line); }
}
@media (prefers-color-scheme: dark) { body.has-tabs .card { border: 1px solid var(--line); } body.has-tabs .board .card { border: 0; } }
.rank-table td, .rank-table th { white-space: nowrap; }
@media (max-width: 719px) {
  .board { padding: 16px; }
  .board-split { padding: 0; } .bd-left, .bd-right { padding: 16px; }
  .board-top { flex-direction: column; align-items: stretch; }
  .board-top form, .board-top .btn { width: 100%; }
  .rank-table .opt { display: none; }
  .rank-table td.nm { max-width: 180px; }
  .idx { padding: 12px 8px; }
  .idx-sub { white-space: normal; }
}
/* 홈 '할 일 · 다음 실행' 칸: 숫자 띠와 높이를 맞추고 두 묶음으로 */
.agenda { align-self: stretch; display: flex; flex-direction: column; }
.agenda .ag-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.agenda .ag-head b { font-size: var(--fs-15); }
.agenda .ag-sub { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.todo { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 8px; }
.todo li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.todo li span { display: grid; min-width: 0; }
.todo li b { font-size: var(--fs-15); font-weight: 600; }
.todo li em { font-style: normal; font-size: var(--fs-13); color: var(--ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo li strong { font-size: var(--fs-15); font-variant-numeric: tabular-nums; }
.todo li.bad strong { color: var(--red); } .todo li.warn strong { color: var(--yellow-ink); }
.todo li.ok b { color: var(--ink2); font-weight: 500; }
.agenda .ag-list { margin-top: 8px; gap: 8px; }
.agenda .ag-list li { justify-content: space-between; }
.agenda .ag-list li b { flex: 1; font-weight: 500; font-size: var(--fs-15); }
.agenda .ag-list li em { min-width: 0; text-align: right; }
/* 판 제목 옆에 한 줄 설명 (제목 오른쪽이 비지 않게) */
.board-title .bt-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.board-title .bt-line p { margin: 0; }
/* 홈 '할 일' 판 (주문 판 밖, 맨 위) */
.todo-board { padding: 16px 20px; }
.todo-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.todo-head h2 { margin: 0; font-size: var(--fs-17); font-weight: 700; color: var(--grey800); }
.todo-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px 24px; }
@media (min-width: 720px) { .todo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1300px) { .todo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.todo-grid li { display: flex; align-items: center; gap: 8px; padding: 8px 0; min-width: 0; }
.td-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: var(--yellow-ink); }
.todo-grid li.bad .td-dot { background: var(--red); }
.td-text { flex: 1; min-width: 0; display: grid; }
.td-text b { font-size: var(--fs-15); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-text em { font-style: normal; font-size: var(--fs-13); color: var(--ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-grid strong { font-size: var(--fs-15); font-variant-numeric: tabular-nums; }
.todo-grid li.bad strong { color: var(--red); } .todo-grid li.warn strong { color: var(--yellow-ink); }
.todo-none { margin: 0; color: var(--ink2); font-size: var(--fs-15); }
/* 주문 판: 숫자 띠가 판 전체 너비, 넓으면 6개 한 줄 */
.board-main { grid-template-columns: minmax(0, 1fr) !important; }
@media (min-width: 1500px) {
  .idx-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .idx:nth-child(n) { border-top: 0 !important; border-left: 1px solid var(--line) !important; }
  .idx:first-child { border-left: 0 !important; }
  .idx { flex-direction: column; align-items: flex-start; }
  .idx .spark { order: 2; width: 100%; height: 36px; }
}
/* 로고 오른쪽 업체명 (사업자등록번호) — 버튼 모양 없이 글자로 */
.brand-company { font-size: var(--fs-13); color: var(--ink3); margin-left: -12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }
@media (max-width: 1023px) { .appbar .brand-company { margin-left: 4px; max-width: 46vw; } }
@media (max-width: 1023px) { .appbar .brand-company { flex: 1; } }
/* 처리 이력: 출처 배지 (비셀러·도매매·주문) */
.src { font-style: normal; font-size: var(--fs-12); font-weight: 600; padding: 1px 4px; border-radius: 8px; margin-right: 4px; vertical-align: 1px;
  background: var(--elephant-soft); color: var(--elephant-ink); }
.src-비셀러 { background: var(--blue-soft); color: var(--blue-soft-ink); }
.src-도매매 { background: var(--teal-soft); color: var(--teal); }
.src-주문 { background: var(--green-soft); color: var(--green); }
/* 주문 현황 */
.order-tabs a { border: 0; background: none; font-size: var(--fs-15); font-weight: 600; color: var(--ink3); padding: 8px 0 12px; white-space: nowrap; text-decoration: none; }
.order-tabs a.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.order-tabs a em { font-style: normal; font-weight: 500; color: var(--ink3); margin-left: 2px; }
.order-tabs a.late { color: var(--red); } .order-tabs a.late.on { box-shadow: inset 0 -2px 0 var(--red); }
.order-tabs a.zero { color: var(--ink4, var(--ink3)); opacity: .55; font-weight: 500; } .order-tabs a.zero.on { opacity: 1; }
.order-tabs .tab-sep { flex: 0 0 1px; align-self: center; height: 16px; background: var(--line); margin: 0 4px 4px; }
.order-search { margin: 12px 0 4px; }
.order-table td { vertical-align: top; }
.order-table td.nm { white-space: normal; max-width: 420px; }
.order-table tr.is-late td { background: color-mix(in srgb, var(--red-soft) 55%, transparent); }
.todo-grid li a { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; flex: 1; min-width: 0; }
.todo-grid li a:hover b { text-decoration: underline; }
/* 테마 단추 (오른쪽 위) */
.theme-btn { width: 36px; height: 36px; border: 0; border-radius: 12px; background: none; color: var(--ink2); display: grid; place-items: center; cursor: pointer; }
.theme-btn:hover { background: var(--fill); color: var(--ink); }
.fs-btn { width: 36px; height: 36px; border: 0; border-radius: 12px; background: none; color: var(--ink2); cursor: pointer; font-weight: 700; font-size: 15px; line-height: 1; }
.fs-btn:hover { background: var(--fill); color: var(--ink); }
.fs-btn small { font-size: 11px; font-weight: 700; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--fill); flex-wrap: wrap; }
.seg label { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 9px; cursor: pointer; color: var(--ink2); font-weight: 600; font-size: var(--fs-15); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.theme-btn span { display: none; } .theme-btn svg { width: 22px; height: 22px; }
.theme-btn[data-mode="auto"] span[data-m="auto"], .theme-btn[data-mode="light"] span[data-m="light"], .theme-btn[data-mode="dark"] span[data-m="dark"],
.theme-btn:not([data-mode]) span[data-m="auto"] { display: grid; }
@media (max-width: 1023px) { .top-right { display: flex; align-items: center; gap: 4px; margin-left: auto; } }
/* 화면 머리: 제목 옆에 한 줄 설명 (모든 화면 같게) */
.page-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 24px 4px 20px; }
.page-head .page-title { margin: 0; }
.page-head .page-sub { margin: 0; font-size: var(--fs-15); font-weight: 500; color: var(--ink3); }
.runs-tabs { margin: 0 4px 12px; }
/* 실행 결과의 처리 기록: 단계별 접기 */
.logsteps { list-style: none; margin: 0; padding: 0; }
.logsteps li + li { border-top: 1px solid var(--line); }
.logsteps summary { display: flex; align-items: center; gap: 12px; padding: 12px 0; min-height: 0; font-weight: 400; }
.ls-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); flex: 0 0 auto; }
.ls-dot svg { width: 16px; height: 16px; }
.logsteps li.bad .ls-dot { background: var(--red-soft); color: var(--red); }
.ls-text { display: grid; min-width: 0; flex: 1; }
.ls-text b { font-size: var(--fs-15); font-weight: 600; }
.ls-text em { font-style: normal; font-size: var(--fs-13); color: var(--ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logsteps pre.log { margin: 0 0 12px 40px; }
/* 반영 화면: 쇼핑몰 전송 줄 (오른쪽 패널 줄과 같은 모양) */
.send-row { margin: 0 -8px; }
.send-row + .send-row { border-top: 1px solid var(--line); }
.send-row .item { gap: 12px; }
.send-row .sl-ic { width: 40px; height: 40px; }
/* 운영자 숫자 칸: 홈 숫자 띠처럼 한 판에 칸막이 */
.kpis { background: var(--board); border: 1px solid var(--line); border-radius: 20px; gap: 0; padding: 8px; }
.kpi { background: none; border-radius: 12px; padding: 12px 16px; }
.kpi + .kpi { box-shadow: inset 1px 0 0 var(--line); }
.kpi:hover { background: var(--fill); }
.kpi b { font-size: var(--fs-22); }
body.has-tabs .kpis .kpi { border: 0; }

/* 주문 현황: PC는 샵플링 주문처리의 모든 칸, 휴대폰은 목록 줄 → 누르면 자세히 */
.order-table .sub { display: block; }
.order-table td { font-size: var(--fs-13); line-height: 1.5; }
.order-table td b { font-weight: 600; color: var(--ink); }
.order-table .warn-t { font-style: normal; color: var(--orange-ink); font-weight: 600; }
.order-table td.nm { min-width: 220px; }
.order-search { display: flex; gap: 8px; align-items: center; }
.order-search select { flex: 0 0 auto; width: auto; max-width: 40%; }
.order-search input { flex: 1; min-width: 0; }
.order-rows { display: none; list-style: none; margin: 4px 0 0; padding: 0; }
@media (max-width: 640px) {
  .board .order-wide { display: none; }
  .order-rows { display: block; }
  .order-rows li { border-bottom: 1px solid var(--line); }
  .order-rows li:last-child { border-bottom: 0; }
  .order-rows summary { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 16px 0; list-style: none; cursor: pointer; }
  .order-rows summary::-webkit-details-marker { display: none; }
  .order-rows summary::after { display: none; }
  .order-rows li.is-late { background: color-mix(in srgb, var(--red-soft) 55%, transparent); margin: 0 -12px; padding: 0 12px; border-radius: 12px; }
  .order-rows .or-main { min-width: 0; flex: 1; }
  .order-rows .or-nm { display: block; font-size: var(--fs-15); font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .order-rows .or-sub { display: block; font-size: var(--fs-13); color: var(--ink3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .order-rows .or-side { flex: 0 0 auto; text-align: right; }
  .order-rows .or-side b { display: block; font-size: var(--fs-15); font-weight: 600; }
  .order-rows .or-st { display: block; font-size: var(--fs-13); color: var(--ink3); margin-top: 2px; }
  .order-rows .or-st.ok { color: var(--green); } .order-rows .or-st.bad { color: var(--red); }
  .order-rows .or-empty { color: var(--ink3); padding: 16px 0; text-align: center; }
  .or-detail { display: grid; grid-template-columns: 84px 1fr; gap: 8px 12px; margin: 0 0 16px; padding: 16px; background: var(--fill); border-radius: 12px; font-size: var(--fs-13); }
  .or-detail dt { color: var(--ink3); }
  .or-detail dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
  .order-tabs { margin-right: -16px; padding-right: 16px; }
  .order-search { flex-wrap: wrap; }
  .order-search select { max-width: none; width: 100%; }
  .order-search .gm-btn { flex: none; white-space: nowrap; }      /* 검색창·찾기·정렬·거르기를 한 줄에 (검색어는 짧음) */

  .order-search .gm-btn.on { background: var(--blue-soft); color: var(--blue-soft-ink); }
}

/* ---------- 디자인 P1 (2026-11-04): 토스트 · 떠 있는 탭바 · 휴대폰 머리 · 아이콘 24 ---------- */
.toast {
  position: fixed; z-index: 50; left: 50%; bottom: calc(var(--tabbar) + 28px + env(safe-area-inset-bottom));
  transform: translate(-50%, 16px); opacity: 0; transition: opacity .25s, transform .25s;
  display: flex; gap: 8px; align-items: center; max-width: min(440px, calc(100vw - 32px));
  padding: 12px 20px; border-radius: 16px; background: var(--grey800, #333d4b); color: #fff;
  font-size: var(--fs-15); font-weight: 600; box-shadow: 0 8px 28px rgba(0, 0, 0, .2);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.btn.off { opacity: .45; }
.np-sum span { display: block; }
.toast svg { width: 24px; height: 24px; flex: 0 0 auto; color: var(--green); }
@media (min-width: 768px) { .toast { bottom: 40px; } }
@media (prefers-color-scheme: dark) { .toast { background: #3a3a44; } }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

@media (max-width: 767px) {
  /* 탭바는 화면 맨 아래에 붙인다. 띄운 모양은 사파리의 떠 있는 주소창과 겹쳐 붕 떠 보였음 (2026-11-04 사용자 지적) */
  .appbar .brand-company, .top-right > form[action="/logout"] { display: none; }
}
.tabbar a svg, .sl-ic svg, .theme-btn svg { width: 24px; height: 24px; }

/* ---------- 디자인 P1: 체크박스 · 고르기(세그먼트) · 파일 상자 ---------- */
.check input { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--fill-strong);
  background: var(--card) center / 14px no-repeat; cursor: pointer; transition: background-color .15s, border-color .15s; }
.check input:checked { border-color: var(--blue); background-color: var(--blue);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.check input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.segpick { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--fill); border-radius: 12px; padding: 4px; }
.segpick label { cursor: pointer; display: block; margin: 0; position: relative; }
.segpick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segpick span { display: grid; place-items: center; height: 44px; border-radius: 8px; font-size: var(--fs-15); font-weight: 600; color: var(--ink3); transition: background .15s, color .15s; }
.segpick input:checked + span { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.segpick input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: -2px; }
.filepick { flex-direction: column; justify-content: center; gap: 4px; min-height: 112px; padding: 16px; border: 1.5px dashed var(--fill-strong);
  border-radius: 16px; background: var(--fill); text-align: center; transition: border-color .15s, background .15s; }
.filepick:hover, .filepick:focus-within { border-color: var(--blue); background: var(--blue-soft); }
.filepick .fp-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--blue); }
.filepick .fp-ic svg { width: 24px; height: 24px; }
.filepick .fname { color: var(--ink); font-size: var(--fs-15); font-weight: 600; max-width: 100%; }
.filepick .fp-sub { color: var(--ink3); font-size: var(--fs-13); }
.filepick.has { border-style: solid; border-color: var(--blue); background: var(--blue-soft); }
.filepick:focus-within .btn { outline: 0; }
.backlink { display: inline-flex; align-items: center; gap: 2px; height: 36px; margin: 8px 0 -12px -4px; padding: 0 8px 0 4px; border-radius: 12px;
  color: var(--ink2); font-size: var(--fs-15); font-weight: 600; }
.backlink svg { width: 24px; height: 24px; transform: rotate(180deg); }
.backlink:hover { background: var(--fill); color: var(--ink); }
.backlink + .act-title { margin-top: 16px; } /* 뒤로 가기는 맨 위, 작업 이름은 그 아래 (2026-11-06) */
/* 작은 도우미 클래스 (태그 안 style 대신, 그래서 !important). m-0 다음에 오는 mt/mb가 이김 */
.m-0 { margin: 0 !important; } .d-b { display: block !important; } .ta-r { text-align: right !important; } .w-full { width: 100% !important; } .nowrap { white-space: nowrap !important; }
.pointer { cursor: pointer !important; } .num { font-variant-numeric: tabular-nums !important; } .ml-4 { margin-left: 4px !important; }
.mt-4 { margin-top: 4px !important; } .mt-8 { margin-top: 8px !important; } .mt-12 { margin-top: 12px !important; } .mt-20 { margin-top: 20px !important; }
.mb-8 { margin-bottom: 8px !important; } .mb-12 { margin-bottom: 12px !important; } .pull-up { margin: -8px 0 12px !important; }
.form-group { font-size: var(--fs-17); font-weight: 700; color: var(--ink); margin: 32px 2px 12px; }
details.more summary { color: var(--ink3); cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 4px; }
details.more summary::-webkit-details-marker { display: none; }
.filters input[name=q] { padding-left: 44px; background: var(--fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%238b95a1'%3E%3Cpath d='M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z'/%3E%3C/svg%3E") 16px 50% / 20px no-repeat; }
.switch-form .switch-row { padding: 16px 0; }
.switch-form + .switch-form .switch-row { border-top: 1px solid var(--line); }
/* 샵플링 창 기록 */
.log-sec summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: var(--fs-15); }

.log-sec summary .t { flex: 1; min-width: 0; }
.log-pre { margin: 12px 0 0; padding: 12px 16px; max-height: 60vh; overflow: auto; background: var(--fill); border-radius: 12px;
  font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; tab-size: 4; color: var(--ink2); }

/* 최근 실행 표: 휴대폰에서 시각이 글자 단위로 끊기지 않게, 구분 칸은 숨김 */
.run-mini td:first-child { white-space: nowrap; }
@media (max-width: 559px) { .run-mini th:nth-child(2), .run-mini td:nth-child(2) { display: none; } }
/* 동기화 방향: 비셀러 → 샵플링 → 쇼핑몰 */
.flow { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 2px 4px; font-size: var(--fs-13); font-weight: 600; color: var(--ink2); }
.flow span { padding: 1px 8px; border-radius: 999px; background: var(--fill); white-space: nowrap; }
.flow i { font-style: normal; color: var(--ink3); }
.sync-head h2 + .flow, .bt-line h2 + .flow { margin: 4px 0 0; }
.sync-head h2 { display: block; }
.sl-name .flow { display: flex; margin: 2px 0; font-size: var(--fs-13); }
.sl-name .flow span { padding: 0 6px; }

/* 오른쪽 사이드바 폭 조절: 왼쪽 경계를 끌기 (260~600px, 두 번 누르면 처음 폭) */
.side-grip { display: none; }
@media (min-width: 1024px) {
  /* 사이드바는 스크롤되므로 손잡이는 화면에 고정해 사이드바 왼쪽 경계에 맞춘다 */
  .side-grip { display: block; position: fixed; top: var(--top-h); bottom: var(--tick-h); right: calc(64px + var(--side-w, 320px) - 4px);
    width: 8px; cursor: col-resize; z-index: 15; touch-action: none; }
  .side-grip::after { content: ''; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px; background: transparent; transition: background .15s; }
  .side-grip:hover::after, .resizing .side-grip::after { background: var(--blue); }
  .app.side-off .side-grip { display: none; }
  .resizing, .resizing * { cursor: col-resize !important; user-select: none !important; }
}
/* 처리 이력·실행 예약: 제목과 설명은 두 줄까지 (… 로 잘리지 않게) */
.sl-name b, .sl-name em { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.sl-name b { line-height: 1.35; }
/* 홈은 지표만: 실행은 동기화 메뉴로 가는 글자 링크 */
.board-more { display: inline-flex; align-items: center; gap: 2px; font-size: var(--fs-13); font-weight: 600; color: var(--ink3); white-space: nowrap; }
.board-more svg { width: 16px; height: 16px; }
.board-more:hover { color: var(--ink); }
.bes-tools { margin-top: 12px; }

/* 동기화: 목록 → 상세 (2026-11-04 토스 검토) */
.sync-list { padding: 8px; }
.sync-row { display: flex; align-items: center; gap: 12px; padding: 16px 12px; border-radius: 16px; color: inherit; }
.sync-row + .sync-row { border-top: 1px solid var(--line); border-radius: 0 0 16px 16px; }
.sync-row:hover { background: var(--fill); }
.sr-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.sr-body b { font-size: var(--fs-17); font-weight: 700; }
.sr-body em { font-style: normal; font-size: var(--fs-13); color: var(--ink2); }
.sr-right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.sr-right .chev { width: 20px; height: 20px; color: var(--ink3); }
.sync-title { align-items: center; margin-bottom: 4px; }
.page-desc { margin: 0 4px 20px; color: var(--ink2); font-size: var(--fs-15); }
.run-note { margin: 12px 4px 0; color: var(--ink2); font-size: var(--fs-13); }
.sched-row.two { grid-template-columns: 1fr 1fr; }
.sched-row.three { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 520px) { .sched-row.three { grid-template-columns: 1fr 1fr; } .sched-row.three .field:last-child { grid-column: 1 / -1; } }
@media (max-width: 520px) { .sched-row.two { grid-template-columns: 1fr 1fr; } }
.run-list .item .t { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.sr-body .flow { flex-wrap: nowrap; }
@media (max-width: 520px) {
  .sr-right .chip { display: none; }
  .sr-body .flow { font-size: var(--fs-12); flex-wrap: wrap; } .sr-body .flow span { padding: 0 6px; }
}

/* 데스크톱 두 단 (2026-11-04 사용자 요청: 가로가 넓은데 세로 스크롤이 많음)
   .cols.even 은 반반, .masonry 는 카드를 두 단에 위에서부터 채움 (순서: 왼쪽 단 → 오른쪽 단) */
@media (min-width: 1200px) {
  .cols.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .masonry { column-count: 2; column-gap: var(--gap, 16px); }
  .masonry > * { break-inside: avoid; display: block; width: 100%; }
  .masonry > .card { margin: 0 0 var(--gap, 16px); }
}

/* 새 상품 (도매매 → 샵플링 → 쇼핑몰) */
.np-q { display: grid; grid-template-columns: 150px 1fr auto; gap: 8px; }
.np-q .btn { height: 52px; }
.np-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.np-opts .field { margin: 0; }
@media (max-width: 640px) { .np-q { grid-template-columns: 1fr auto; } .np-q select { grid-column: 1 / -1; } .np-opts { grid-template-columns: 1fr 1fr; } }
.np-top { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.np-top > #pick-none { margin-left: auto; }   /* 좁은 창에서 꺾이면 오른쪽 끝에 (왼쪽에 외따로 남던 것) */
.np-bar { position: sticky; bottom: 0; z-index: 8; margin: 12px 0 0; }
body.has-tabs .np-bar { bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); }
@media (min-width: 768px) { body.has-tabs .np-bar { bottom: var(--tick-h, 0); } }
.np-bar-in { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 12px 16px; box-shadow: 0 -6px 24px rgba(0, 0, 0, .08);
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.np-bar-in .btn.big { width: auto; padding: 0 24px; }
.np-acts { display: flex; gap: 8px; }
.np-sum { display: grid; } .np-sum b { font-size: var(--fs-17); }
.np-pick { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.np-pick select { height: 44px; }
.np-malls { display: flex; flex-wrap: wrap; gap: 4px; }
.np-mall { cursor: pointer; } .np-mall input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.np-mall span { display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border-radius: 999px; background: var(--fill); color: var(--ink3); font-size: var(--fs-13); font-weight: 600; }
.np-mall input:checked + span { background: var(--blue-soft); color: var(--blue-soft-ink); }
@media (max-width: 640px) { .np-bar-in { grid-template-columns: 1fr; gap: 8px; } .np-bar-in .btn.big { width: 100%; height: 48px; } .np-acts .btn.big { flex: 1; width: auto; padding: 0 12px; } .np-sum span { font-size: var(--fs-12); } }
.np-steps { margin: 12px 0 0; padding-left: 20px; color: var(--ink3); }
.np-steps li { padding: 4px 0; } .np-steps li.done { color: var(--ink); } .np-steps li.now { color: var(--blue); font-weight: 600; }
.np-steps em { font-style: normal; color: var(--ink3); font-size: var(--fs-12); }
.np-src { display: flex; gap: 4px; margin: 0 4px 12px; }
.np-src a { padding: 8px 16px; border-radius: 999px; background: var(--fill); color: var(--ink2); font-weight: 600; font-size: var(--fs-15); }
.np-src a.on { background: var(--ink); color: var(--card); }
.np-counts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.np-count { display: grid; justify-items: start; gap: 0; padding: 8px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; font-family: inherit; color: var(--ink2); }
.np-count b { font-size: var(--fs-17); color: var(--ink); } .np-count span { font-size: var(--fs-12); }
.np-count.on { border-color: var(--blue); background: var(--blue-soft); }
.np-brow { cursor: pointer; gap: 12px; }
.np-brow input { width: 22px; height: 22px; accent-color: var(--blue); flex: 0 0 auto; }
.np-nochk { width: 22px; flex: 0 0 auto; }
.np-fee { height: 44px; display: flex; align-items: center; font-weight: 600; }
/* 비셀러 상품 추가 표 */
@media (min-width: 768px) { .np-src-m { display: none; } }       /* PC 는 위 메뉴가 따로 있음 */
.bt-filters { display: grid; grid-template-columns: 200px 1fr; gap: 8px; margin-top: 12px; }
.bt-filters select, .bt-filters input { height: 44px; }
@media (max-width: 520px) { .bt-filters { grid-template-columns: 1fr; } }
.bt-table { width: 100%; font-size: var(--fs-13); }
.bt-table th { white-space: nowrap; color: var(--ink3); font-weight: 600; text-align: left; padding: 8px; border-bottom: 1px solid var(--line); }
.bt-table th[data-sort] { cursor: pointer; user-select: none; }
.bt-table th[data-sort]:hover { color: var(--ink); }
.th-dir { font-size: 10px; margin-left: 2px; color: var(--blue); }
.th-f { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-left: 2px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--ink4, var(--ink3)); opacity: .45; cursor: pointer; vertical-align: middle; }
.th-f:hover, .th-f:focus-visible { opacity: 1; background: var(--fill); }
.bt-table th.filtered .th-f { opacity: 1; color: var(--blue); background: var(--blue-soft); }
.gf-pop { position: fixed; z-index: 60; width: 260px; max-height: min(440px, 70vh); display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(0, 0, 0, .16); font-size: var(--fs-14); }
.gf-sort { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.gf-sort button { height: 34px; border: 0; border-radius: 8px; background: var(--fill); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.gf-sort button:hover { background: var(--fill-strong); }
.gf-q { height: 36px; border-radius: 8px; border: 1px solid var(--line); padding: 0 10px; background: var(--card); color: var(--ink); font: inherit; }
.gf-all, .gf-list label { display: flex; gap: 8px; align-items: center; padding: 4px 2px; cursor: pointer; }
.gf-all { font-weight: 600; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.gf-list { overflow: auto; min-height: 40px; }
.gf-list label span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gf-list label em { font-style: normal; color: var(--ink3); font-size: var(--fs-13); }
.gf-all input, .gf-list input { width: 16px; height: 16px; accent-color: var(--blue); margin: 0; flex: 0 0 auto; }
.gf-range { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: center; }
.gf-range input { height: 36px; min-width: 0; border-radius: 8px; border: 1px solid var(--line); padding: 0 8px; background: var(--card); color: var(--ink); font: inherit; }
.gf-foot { display: flex; justify-content: flex-end; gap: 4px; }
.gf-more { margin: 0; }
.bt-table tbody tr:has(input[type=checkbox]) { cursor: pointer; }
.opt-toggle { margin-top: 4px; padding: 2px 8px; border: 0; border-radius: 999px; background: var(--blue-soft); color: var(--blue-soft-ink); font: inherit; font-size: var(--fs-13); font-weight: 600; cursor: pointer; }
.bt-table tr.opt-row td { background: var(--fill); }
.bt-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.bt-table tr.on td { background: var(--blue-soft); }
.bt-table td.num, .bt-table td.nowrap { white-space: nowrap; }
.bt-table input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--blue); }
.bt-img img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; display: block; background: var(--fill); }
.bt-name { min-width: 220px; font-weight: 600; } .bt-name a { color: var(--ink); }
.bt-pager { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
.bt-pager button { min-width: 36px; height: 36px; border-radius: 10px; border: 0; background: var(--fill); color: var(--ink2); font-weight: 600; cursor: pointer; font-family: inherit; }
.bt-pager button.on { background: var(--ink); color: var(--card); }

.bt-filters input[type=search] { width: 100%; padding: 0 16px; border: 1.5px solid transparent; border-radius: 12px; background: var(--fill); color: var(--ink); font: inherit; font-size: var(--fs-15); -webkit-appearance: none; appearance: none; }
.bt-filters input[type=search]:focus { outline: none; border-color: var(--blue); background: var(--card); }

/* 표 열 폭 조절 (base.html) */
.col-wrap { overflow-x: auto; }
thead th { position: relative; }
.col-grip { position: absolute; top: 0; right: -6px; bottom: 0; width: 12px; cursor: col-resize; touch-action: none; z-index: 1; }
.col-grip::after { content: ''; position: absolute; top: 25%; bottom: 25%; left: 5px; width: 2px; border-radius: 1px; background: var(--line); }
.col-grip:hover::after, .col-grip.on::after { top: 0; bottom: 0; background: var(--blue); }
thead th:last-child .col-grip { right: 0; }
thead th:last-child .col-grip::after { display: none; }   /* 마지막 칸 오른쪽 막대가 오른쪽 맞춤 머리글(금액·취소)에 붙어 잘려 보임 (11-08 점검) */
table.col-fixed { table-layout: fixed; max-width: none; }
table.col-fixed th, table.col-fixed td { overflow: hidden; text-overflow: ellipsis; overflow-wrap: anywhere; }
table.col-fixed th { overflow: visible; }

/* 도매매 상품 상세 팝업 */
.pd-open { all: unset; cursor: pointer; font-weight: 600; color: var(--ink); }
.pd-open:hover { color: var(--blue); text-decoration: underline; } .pd-open:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.pd { border: 0; padding: 0; border-radius: 20px; width: min(640px, calc(100vw - 32px)); height: min(820px, calc(100dvh - 48px)); background: var(--card); color: var(--ink); overflow: hidden; }
.pd[open] { display: grid; grid-template-rows: auto 1fr auto; }
.pd::backdrop { background: rgba(0, 0, 0, .45); }
body.pd-on { overflow: hidden; }
.pd-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--line); }
.pd-x { width: 40px; height: 40px; border: 0; border-radius: 12px; background: transparent; color: var(--ink2); font-size: 24px; line-height: 1; cursor: pointer; }
.pd-x:hover { background: var(--fill); }
.pd-nav { display: flex; align-items: center; gap: 2px; }
.pd-arrow { font-size: 28px; }
.pd-arrow:disabled { opacity: .3; cursor: default; background: transparent; }
.pd-pos { min-width: 56px; text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pd-body { overflow-y: auto; padding: 20px; overscroll-behavior: contain; }
.pd-wait { margin: 40px 0; text-align: center; color: var(--ink3); }
.pd-top { display: grid; grid-template-columns: 160px 1fr; gap: 16px; align-items: start; }
.pd-img { display: block; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--fill); }
.pd-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-top h2 { margin: 0 0 8px; font-size: var(--fs-17); line-height: 1.4; overflow-wrap: anywhere; }
.pd-cost { margin: 0; font-size: var(--fs-20, 20px); font-weight: 700; } .pd-cost span { margin-left: 6px; font-size: var(--fs-13); font-weight: 400; color: var(--ink3); }
.pd-info { margin-top: 16px; } .pd-info .item { align-items: flex-start; gap: 16px; } .pd-info .k { flex: 0 0 76px; color: var(--ink3); } .pd-info .v { flex: 1; text-align: left; overflow-wrap: anywhere; }
.pd-desc { margin-top: 16px; text-align: center; } .pd-desc img { max-width: 100%; height: auto; display: block; margin: 0 auto; } .pd-desc p { margin: 8px 0; overflow-wrap: anywhere; }
.pd-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.pd-foot .btn { width: 100%; text-align: center; }
@media (max-width: 640px) {
  .pd { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .pd-top { grid-template-columns: 1fr; } .pd-img { max-width: 240px; margin: 0 auto; width: 100%; }
}

/* 상품 추가 공용 */
.bt-filters.has-btn { grid-template-columns: 200px 1fr auto; }
.bt-filters.has-btn .btn { height: 44px; }
@media (max-width: 520px) { .bt-filters.has-btn { grid-template-columns: 1fr auto; } .bt-filters.has-btn select { grid-column: 1 / -1; } }
.np-radios { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: var(--fs-15); }
.np-radios .k { font-weight: 600; }
.np-radios label { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; cursor: pointer; }
.np-radios input { width: 18px; height: 18px; accent-color: var(--blue); }
.pd-foot.one { grid-template-columns: 1fr; }

/* 토스 기준 점검 (2026-11-04) */
.cols.one { grid-template-columns: minmax(0, 1fr); }
.cols.one > .dash-col:first-child { display: none; }
.amt-n { width: 96px; height: 44px; }
.m-line, .m-sort { display: none; }
@media (max-width: 640px) {
  .board-more, .auth .foot a, .legal .small a { display: inline-flex; align-items: center; min-height: 44px; }
  /* 휴대폰 상품 목록: 표 대신 한 줄 목록 */
  .bt-card .table-wrap { overflow: visible; margin: 0; }
  .bt-table, .bt-table tbody { display: block; width: auto !important; }
  .bt-table thead { display: none; }
  .bt-table tr { display: grid; grid-template-columns: 28px 56px minmax(0, 1fr); column-gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: start; }
  .bt-table tr.on { background: var(--blue-soft); margin: 0 -8px; padding: 12px 8px; border-radius: 12px; }
  .bt-table td { display: none; padding: 0; border: 0; background: none !important; }
  .bt-table td.m-keep { display: block; }
  .bt-table td.m-chk { grid-row: 1 / span 3; padding-top: 14px; }
  .bt-table td.bt-img { grid-row: 1 / span 3; grid-column: 2; }
  .bt-img img { width: 56px; height: 56px; border-radius: 12px; }
  .bt-table td.bt-name, .bt-table td.m-price, .bt-table td.m-line { grid-column: 3; min-width: 0; }
  .bt-table td.m-price { text-align: left !important; font-size: var(--fs-15); font-weight: 700; margin-top: 4px; }
  .bt-table td.m-line { color: var(--ink3); font-size: var(--fs-13); margin-top: 2px; overflow-wrap: anywhere; }
  .bt-table td.m-empty { grid-column: 1 / -1; }
  .bt-table input[type=checkbox] { width: 24px; height: 24px; }
  .pd-open { display: block; line-height: 1.4; overflow-wrap: anywhere; }
  .m-sort { display: block; height: 36px; margin-left: auto; }
  .bt-card .h-row { flex-wrap: wrap; gap: 8px; }
  .bt-card .np-top { width: 100%; }
}
@media (max-width: 767px) {   /* 처리 이력이 본문 아래에 오므로 아래 탭만큼의 여백은 맨 끝에만 */
  body.has-tabs main.content { padding-bottom: 0; }
  body.has-tabs .side { margin-bottom: calc(var(--tabbar) + 24px + env(safe-area-inset-bottom)); }
}
.np-count span, .sl-name .flow, .sl-name .flow span, .sl-name .flow i { font-size: var(--fs-13); }
@media (max-width: 640px) { summary { min-height: 44px; } }

/* 예약 작업 시작·종료 시각 */
.sr-body em.sr-time { color: var(--ink3); }
.sec-title { margin: 24px 4px 8px; font-size: var(--fs-17); font-weight: 700; color: var(--ink); }
.sync-row.sr-plain, .sync-row.sr-plain:hover { background: none; cursor: default; }
.side-list a, .side-list .sl-row { flex-wrap: wrap; }
.sl-time { flex-basis: 100%; padding-left: 52px; margin-top: -6px; font-size: var(--fs-13); color: var(--ink3); }
@media (max-width: 640px) { .bt-table:not(:has(.m-chk)) tr { grid-template-columns: 56px minmax(0, 1fr); } .bt-table:not(:has(.m-chk)) td.bt-img { grid-column: 1; } .bt-table:not(:has(.m-chk)) td.bt-name, .bt-table:not(:has(.m-chk)) td.m-price, .bt-table:not(:has(.m-chk)) td.m-line { grid-column: 2; } }

/* 운영자 업체 바꾸기 */
.brand-switch { margin: 0 0 0 -8px; min-width: 0; }
.brand-switch select { height: 36px; max-width: 280px; padding: 0 28px 0 8px; border: 0; border-radius: 10px; background-color: var(--fill); color: var(--ink2); font-size: var(--fs-13); text-overflow: ellipsis; }
@media (max-width: 1023px) { .brand-switch { margin-left: 4px; } .brand-switch select { max-width: 46vw; } }

/* 상단 메뉴 끌어서 순서 바꾸기 (static/nav.js) */
.topnav a[draggable="true"] { cursor: pointer; -webkit-user-drag: element; }
.topnav a.dragging { opacity: .4; background: var(--fill); }

/* 한 번에 보기 + 전체 선택 */
.rows-pick { display: flex; gap: 12px; align-items: center; }
.rows-pick select { flex: 1; min-width: 0; }
.rows-pick .check { white-space: nowrap; padding: 0; }
.field .rows-pick label.check { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ink); font-size: var(--fs-15); font-weight: 500; }
.field .rows-pick label.check input { margin: 0; }
.np-opts.one { grid-template-columns: minmax(0, 360px); }
.bt-table th.th-chk input { width: 20px; height: 20px; accent-color: var(--blue); vertical-align: middle; }
@media (max-width: 640px) { .bt-table th.th-chk { display: none; } }
#gf-clear[hidden] { display: none; }
/* 카테고리 맵 */
.cm-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cm-col { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow: auto; padding: 8px; border-radius: 12px; background: var(--fill); }
.cm-h { font-size: var(--fs-13); color: var(--ink3); font-weight: 600; padding: 2px 8px 6px; }
.cm-i { display: flex; justify-content: space-between; gap: 8px; align-items: center; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-size: var(--fs-14); text-align: left; cursor: pointer; }
.cm-i span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-i em { font-style: normal; color: var(--ink3); font-size: var(--fs-13); flex: 0 0 auto; }
.cm-i:hover { background: var(--card); }
.cm-i.on { background: var(--blue-soft); color: var(--blue-soft-ink); font-weight: 600; }
.cm-i.on em { color: inherit; }
.cm-now { font-size: var(--fs-13); color: var(--ink2); }
@media (max-width: 640px) { .cm-cols { grid-template-columns: 1fr; } .cm-col { max-height: 200px; } }

.cm-wrap { margin: 12px 0 4px; }
.cm-head { display: flex; align-items: baseline; gap: 8px; margin: 0 2px 8px; }
.cm-head b { font-size: var(--fs-13); color: var(--ink2); font-weight: 600; }
.cm-toggle { width: 100%; background: none; border: 0; padding: 6px 2px; font: inherit; text-align: left; cursor: pointer; border-radius: 8px; }
.cm-toggle:hover { background: var(--fill); }
.cm-toggle[aria-expanded="false"] { margin-bottom: 0; }
.cm-chev { margin-left: auto; font-size: var(--fs-13); color: var(--ink3, var(--ink2)); }
.cm-chev::after { content: ' ⌄'; }
.cm-toggle[aria-expanded="true"] .cm-chev::after { content: ' ⌃'; }
/* 펼친 옵션 줄: 이름 앞에 └ 로 하위임을 보인다 */
.opt-line { display: flex; align-items: flex-start; gap: 6px; padding-left: 4px; }
.opt-line .pd-open { flex: 1; min-width: 0; }
/* └ 를 글자 대신 선으로: 글꼴마다 모양이 달라 어긋나지 않게 */
.opt-mark { flex: 0 0 auto; width: 10px; height: 10px; margin-top: 3px; border-left: 1.5px solid var(--ink3); border-bottom: 1.5px solid var(--ink3); border-bottom-left-radius: 3px; }
.bt-filters.one { grid-template-columns: 1fr; }

/* 처리 이력 옆 칸: 글은 짧게 만들어 넣고, '…'로 자르지 않는다 */
.side-list.act-list .sl-name b, .side-list.act-list .sl-name em { white-space: normal; display: block; -webkit-line-clamp: unset; overflow: visible; text-overflow: clip; }
.side-list.act-list li + li { margin-top: 2px; }
/* 머리글이 글꼴을 받기 전·업체 이름이 길 때 두 줄로 깨지지 않게 (2026-11-05 사용자: 메뉴 옮길 때 한 번 깨짐) */
.topbar .brand, .topbar .topnav a, .top-right > * { white-space: nowrap; flex-shrink: 0; }
.topbar .topnav { min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.topbar .topnav::-webkit-scrollbar { display: none; }
@media (min-width: 1024px) { .brand-switch select { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }

/* 등록 기록: 평소엔 접어 둠 */
details.rec > summary { display: flex; align-items: baseline; gap: 8px; cursor: pointer; list-style: none; }
details.rec > summary::-webkit-details-marker { display: none; }
details.rec > summary h2 { margin: 0; }
details.rec > summary::after { content: '펼치기'; margin-left: auto; font-size: var(--fs-13); color: var(--ink3); }
details.rec[open] > summary::after { content: '접기'; }
details.rec[open] > summary { margin-bottom: 8px; }

/* 표 머리 글자는 가운데 (2026-11-05 사용자) */
.bt-table thead th, .rank-table thead th { text-align: center; }

/* 휴대폰: 표 위 막대와 아래 시트 */
.gm-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0; }
.gm-bar[hidden] { display: none; }
.gm-bar .gm-btn { margin-left: auto; min-height: 44px; }
.gm-bar .gm-btn.on { background: var(--blue-soft); color: var(--blue-soft-ink); }
/* 정렬·거르기 아이콘 단추 (모든 목록, 휴대폰) */
.gm-ico { position: relative; width: 44px; min-width: 44px; min-height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.gm-ico em { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--blue); color: #fff; font-size: 11px; font-style: normal; font-weight: 700; line-height: 16px; text-align: center; }
/* 내려받기 아이콘 단추 */
.dl-ico { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.dl-ico svg { width: 18px; height: 18px; }
.gm-bar .gm-all { padding: 0; min-height: 44px; }
.gf-pop.gf-sheet { left: 0 !important; right: 0; top: auto !important; bottom: 0; width: 100%; max-height: 75dvh; z-index: 70; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); border: 0; border-radius: 20px 20px 0 0; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .4); }
.gf-sheet input { font-size: 16px; }
.gf-sheet .gf-q, .gf-sheet .gf-range input, .gf-sheet .gf-sort button { height: 44px; }
.gf-sheet .gf-all, .gf-sheet .gf-list label { min-height: 44px; }
.gf-sheet .gf-foot .btn { min-height: 44px; }
.gf-title { font-size: var(--fs-17); }
.gf-cols { display: grid; overflow: auto; }
.gf-cols button { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 48px; padding: 0 4px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: inherit; font-size: var(--fs-15); text-align: left; }
.gf-cols em { font-style: normal; font-size: var(--fs-13); color: var(--blue); }
.m-only { display: none; }
@media (max-width: 767px) { .m-only { display: block; } }
@media (max-width: 640px) { .np-opts .field:has(.rows-pick) { grid-column: 1 / -1; } }

/* 휴대폰: 옵션 펼치기는 모양은 그대로, 누르는 칸만 44px */
@media (max-width: 640px) { .opt-toggle { position: relative; } .opt-toggle::after { content: ''; position: absolute; inset: -10px -6px; } }
/* 어두운 테마: 라디오·날짜·스크롤바 같은 브라우저 기본 조각도 어둡게 */
@media (prefers-color-scheme: dark) { :root { color-scheme: dark; } }
input[type=radio] { accent-color: var(--blue); }
/* 휴대폰 시트 뒤를 어둡게 */
.gf-pop.gf-sheet { box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45); }

/* 검색 줄: 아래 칸들과 같은 높이 52, 첫 칸은 아래 세 칸의 첫 칸과 같은 폭 */
.bt-filters select, .bt-filters input, .bt-filters.has-btn .btn { height: 52px; }
@media (min-width: 521px) { .bt-filters.has-btn { grid-template-columns: calc((100% - 16px) / 3) 1fr auto; } }
@media (min-width: 521px) { .bt-filters.has-btn .btn { padding: 0 24px; } }
/* 비셀러: 검색과 한 번에 보기를 한 줄에 */
.np-opts.q2 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); margin-top: 12px; }
.np-opts.q2 input[type=search] { width: 100%; height: 52px; padding: 0 16px; border: 1.5px solid transparent; border-radius: 12px; background: var(--fill); color: var(--ink); font: inherit; font-size: var(--fs-15); }
.np-opts.q2 input[type=search]:focus { outline: none; border-color: var(--blue); background: var(--card); }
@media (max-width: 640px) { .np-opts.q2 { grid-template-columns: minmax(0, 1fr); } .bt-card .np-top.r { width: auto; margin-left: auto; } }
/* 목록 구분선 끝이 둥글게 말리지 않게 */
.list .item + .item, .list + .list .item { border-top-left-radius: 0; border-top-right-radius: 0; }
/* 한 단으로 쌓일 때 두 묶음 사이 간격 */
@media (max-width: 1199px) { .cols > .dash-col + .dash-col { margin-top: var(--gap); } }

/* 주문 현황 배송 동기화: 도매매 → 쇼핑몰 → 샵플링, 단계마다 한 줄 */
.board-title .ord-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.ds { display: grid; gap: 4px; font-size: var(--fs-13); color: var(--ink2); min-width: 180px; }
.ds-s { display: flex; align-items: baseline; gap: 6px; }
.ds-s b { font-weight: 600; color: var(--ink); white-space: nowrap; }
.ds-s em { font-style: normal; color: var(--ink3); overflow-wrap: anywhere; }
.ds-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fill-strong); flex: 0 0 auto; align-self: center; }
.ds-s.ok .ds-dot { background: var(--green, #00a661); } .ds-s.bad .ds-dot { background: var(--red); } .ds-s.run .ds-dot { background: var(--blue); }
.ds-s.na .ds-dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--fill-strong); }
.ds-s.bad em { color: var(--red); } .ds-s.run em { color: var(--blue); }
.ds.ds-c { display: inline-flex; flex-wrap: wrap; gap: 2px 10px; min-width: 0; }
.ds.ds-c .ds-s { color: var(--ink2); } .ds.ds-c .ds-s.na { color: var(--ink3); }
.ds-cell .ds-go { display: block; margin-top: 8px; }
@media (max-width: 640px) { .board-title { flex-wrap: wrap; gap: 8px; } .board-title .ord-acts { width: 100%; } .board-title .ord-acts .btn { flex: 1; min-height: 44px; } .ds-cell .ds-go { width: 100%; min-height: 44px; } }

/* 진행률(%)이 적힌 단추는 모두 바탕이 진행 막대: 회색 단추도 같은 모양 */
.btn.gray.prog-btn.busy, .btn.gray.prog-btn.busy:disabled { color: var(--blue-soft-ink); }
.order-table .od-open { padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.order-table .od-open:hover { color: var(--blue); text-decoration: underline; }
.od[open] { grid-template-rows: auto 1fr auto; }
.od .pd-body { padding: 24px 20px 8px; }
.od-top { padding-bottom: 20px; }
.od-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.od-nm { margin: 0; font-size: var(--fs-20); font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.od-opt { margin: 4px 0 0; color: var(--ink2); font-size: var(--fs-15); }
.od-amt { margin: 12px 0 0; font-size: var(--fs-22); font-weight: 700; font-variant-numeric: tabular-nums; }
.od-amt span { margin-left: 8px; font-size: var(--fs-15); font-weight: 500; color: var(--ink3); }
.od-sec { padding: 20px 0; border-top: 8px solid var(--fill); margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
.od-sec h3 { margin: 0 0 8px; font-size: var(--fs-17); font-weight: 700; }
.od-sec .list .item { min-height: 44px; padding: 10px 0; gap: 16px; align-items: flex-start; }
.od-sec .list .item .k { flex: 0 0 104px; color: var(--ink3); }
.od-sec .list .item .v { flex: 1; text-align: right; font-weight: 500; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.od-sec .ds { margin-top: 4px; font-size: var(--fs-15); gap: 8px; }
.od-tel { display: block; color: var(--blue); font-weight: 500; }
.pd-foot.one { grid-template-columns: 1fr; }
.pd-foot.one #od-go { display: none; }
.or-row { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; width: 100%; padding: 16px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }

/* 방금 처리한 주문 줄: 세 번 깜빡인 뒤 옅게 남는다 */
@keyframes hl-blink { 0%, 100% { background: var(--blue-soft); } 50% { background: transparent; } }
tr.hl-blink > td, li.hl-blink { animation: hl-blink .7s ease-in-out 3; background: var(--blue-soft); }
@media (prefers-reduced-motion: reduce) { tr.hl-blink > td, li.hl-blink { animation: none; } }
.od-sec .list { margin: 0; padding: 0; background: none; }
.od-sec .list .item { padding-left: 0; padding-right: 0; }

/* 팝업 공통 (토스 대화상자·시트): 제목 굵게, 설명은 보통 글자, 아래 단추는 꽉 차게 */
.dlg { padding: 28px 20px 20px; width: min(400px, calc(100vw - 32px)); }
.dlg-msg { margin: 0; font-size: var(--fs-20); font-weight: 700; line-height: 1.4; }
.dlg-desc { margin: 8px 0 0; color: var(--ink2); font-size: var(--fs-15); line-height: 1.6; white-space: pre-line; }
.dlg-btns { margin-top: 24px; }
.pd-head b { font-size: var(--fs-17); }
.pd .pd-body { padding: 24px 20px 8px; }
.pd-top { grid-template-columns: 120px 1fr; gap: 16px; align-items: center; padding-bottom: 20px; }
.pd-top h2 { font-size: var(--fs-20); font-weight: 700; }
.pd-cost { font-size: var(--fs-22); font-variant-numeric: tabular-nums; }
.pd .od-sec .pd-info { margin: 0; }
.pd-info .item .v { text-align: right; }
.pd-desc { margin: 0; }
.gf-sheet .gf-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.gf-sheet .gf-foot .btn { width: 100%; }
@media (max-width: 640px) { .pd-top { grid-template-columns: 1fr; } .pd-img { max-width: none; width: 100%; } .dlg-btns .btn { min-height: 52px; } }
.pd-body:focus { outline: none; }
.pd-img:empty { display: none; } .pd-top:has(.pd-img:empty) { grid-template-columns: 1fr; }

/* ---------- 운영 대시보드 (/admin, 데이터독식 위젯 격자) ----------
   계열 색은 dataviz 기준 팔레트 1~5번 (밝은·어두운 화면 각각 검증), 상태 색은 상태 전용 (아이콘·글자와 같이) */
.dd { --dd-s1: #2a78d6; --dd-s2: #eb6834; --dd-s3: #1baf7a; --dd-s4: #eda100; --dd-s5: #e87ba4;
  --dd-good: #0ca30c; --dd-warn: #fab219; --dd-bad: #d03b3b; --dd-info: var(--blue);
  --dd-w: var(--card); --dd-line: var(--line); }
@media (prefers-color-scheme: dark) {
  .dd { --dd-s1: #3987e5; --dd-s2: #d95926; --dd-s3: #199e70; --dd-s4: #c98500; --dd-s5: #d55181; }
}
main:has(> .admin-head + .dd), main:has(.dd) { max-width: 1600px; }
.dd { display: grid; gap: 12px; transition: opacity .2s; }
.dd.dd-loading .dd-tiles, .dd.dd-loading .dd-grid { opacity: .55; }
.dd-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.dd-seg { display: inline-flex; background: var(--fill); border-radius: 10px; padding: 3px; }
.dd-seg a { padding: 5px 12px; border-radius: 8px; color: var(--ink2); font-size: var(--fs-13); font-weight: 600; }
.dd-seg a.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.dd-live { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-13); color: var(--ink2); cursor: pointer; }
.dd-live input { width: 16px; height: 16px; accent-color: var(--blue); margin: 0; }
.dd-at { margin-left: auto; }

.dd-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.dd-qv { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 6px; }
.dd-tile { position: relative; display: grid; gap: 2px; align-content: start; padding: 12px 14px; border-radius: 12px; background: var(--dd-w);
  border: 1px solid var(--dd-line); color: inherit; text-decoration: none; min-width: 0; }
a.dd-tile:hover { border-color: var(--ink3); }
.dd-tile-k { font-size: var(--fs-12); color: var(--ink2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-tile b { font-size: var(--fs-28); font-weight: 700; line-height: 1.15; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.dd-qv .dd-tile b { font-size: var(--fs-22); }
.dd-tile b small { font-size: var(--fs-13); font-weight: 600; color: var(--ink3); margin-left: 2px; }
.dd-tile-s { font-size: var(--fs-12); color: var(--ink3); }
.dd-tile::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: transparent; }
.dd-tile.good::before { background: var(--dd-good); } .dd-tile.warn::before { background: var(--dd-warn); }
.dd-tile.bad::before { background: var(--dd-bad); } .dd-tile.info::before { background: var(--dd-info); }
.dd-tile.bad b { color: var(--red); } .dd-tile.warn b { color: var(--orange-ink); }

.dd-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.dd-w { grid-column: span 12; background: var(--dd-w); border: 1px solid var(--dd-line); border-radius: 12px; padding: 12px 14px 14px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 1024px) { .dd-w.s8 { grid-column: span 8; } .dd-w.s4 { grid-column: span 4; } }
@media (min-width: 640px) and (max-width: 1023px) { .dd-w.s4 { grid-column: span 6; } }
.dd-h { display: flex; align-items: center; gap: 8px; min-height: 24px; }
.dd-h h2 { margin: 0; font-size: var(--fs-13); font-weight: 700; color: var(--ink); }
.dd-sub { font-size: var(--fs-12); color: var(--ink3); }
.dd-count { font-size: var(--fs-12); font-weight: 700; color: var(--ink2); background: var(--fill); border-radius: 6px; padding: 0 6px; }
.dd-tbl { margin-left: auto; border: 1px solid var(--dd-line); background: none; color: var(--ink2); border-radius: 6px; padding: 1px 8px; font-size: var(--fs-12); font-weight: 600; cursor: pointer; }
.dd-tbl.on, .dd-tbl:hover { color: var(--ink); border-color: var(--ink3); }
.dd-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: var(--fs-12); color: var(--ink2); }
.dd-lg { display: inline-flex; align-items: center; gap: 6px; }
.dd-lg i { display: inline-block; flex: none; }
.dd-lg i.box { width: 10px; height: 10px; border-radius: 3px; }
.dd-lg i.ln { width: 14px; height: 2px; border-radius: 1px; }
.dd-plot { flex: 1; position: relative; min-height: 180px; }
.dd-plot > p { position: static; }
.dd-svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; overflow: visible; }
.dd-svg .dd-gl { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 3; }
.dd-svg .dd-base { stroke: var(--ink3); stroke-width: 1; opacity: .5; }
.dd-svg .dd-ax { fill: var(--ink3); font-size: 11px; font-variant-numeric: tabular-nums; }
.dd-svg .dd-cross { stroke: var(--ink3); stroke-width: 1; }
.dd-svg .dd-dot { stroke: var(--dd-w); stroke-width: 2; }
.dd-svg .dd-col.on path { filter: brightness(1.12); }
.dd-svg rect[tabindex]:focus { outline: none; }
.dd-svg rect[tabindex]:focus-visible { stroke: var(--blue); stroke-width: 2; }
.dd-table { overflow-x: auto; max-height: 240px; overflow-y: auto; }
.dd-table .admin-table { width: 100%; }
.dd-table th, .dd-table td { white-space: nowrap; font-variant-numeric: tabular-nums; }

.dd-tip { position: fixed; z-index: 60; pointer-events: none; background: var(--card); color: var(--ink); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; box-shadow: 0 6px 20px rgb(0 0 0 / .14); font-size: var(--fs-12); min-width: 140px; }
.dd-tip-t { color: var(--ink2); margin-bottom: 4px; font-weight: 600; }
.dd-tip-r { display: flex; align-items: center; gap: 8px; line-height: 1.7; }
.dd-tip-r i { width: 12px; height: 2px; border-radius: 1px; flex: none; }
.dd-tip-r b { font-variant-numeric: tabular-nums; min-width: 36px; }
.dd-tip-r span { color: var(--ink2); }

.dd-mons { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.dd-mon { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 8px; align-items: center; padding: 8px 10px; border-radius: 8px;
  background: var(--fill); color: inherit; text-decoration: none; }
.dd-mon:hover { background: var(--fill-strong); }
.dd-mon-ic { grid-row: span 2; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 800; color: #fff; background: var(--ink3); }
.dd-mon.ok .dd-mon-ic { background: var(--dd-good); } .dd-mon.bad .dd-mon-ic { background: var(--dd-bad); }
.dd-mon-n { font-size: var(--fs-13); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-mon-s { font-size: var(--fs-12); color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-mon.bad .dd-mon-s { color: var(--red); }

.dd-top { display: grid; gap: 10px; }
.dd-tl { display: grid; gap: 3px; color: inherit; text-decoration: none; }
.dd-tl-t { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-13); }
.dd-tl-n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-tl-t b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dd-tl-b { position: relative; height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.dd-tl-b i, .dd-tl-b em { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; }
.dd-tl-b i { background: var(--dd-s1); } .dd-tl-b em { background: var(--dd-bad); }
.dd-tl-s { font-size: var(--fs-12); color: var(--ink3); }
a.dd-tl:hover .dd-tl-n { text-decoration: underline; }

.dd-list { display: grid; gap: 2px; }
.dd-li { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 6px; color: inherit; font-size: var(--fs-13); }
.dd-li:hover { background: var(--fill); }
.dd-li-n { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-li-s { color: var(--ink3); font-size: var(--fs-12); font-variant-numeric: tabular-nums; }
.dd-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--dd-info); flex: none; animation: dd-pulse 1.6s ease-in-out infinite; }
@keyframes dd-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .dd-pulse { animation: none; } }

.dd-ev { display: grid; max-height: 320px; overflow-y: auto; }
.dd-e { display: grid; grid-template-columns: 76px 10px auto minmax(0, max-content) minmax(0, 1fr); align-items: baseline; gap: 8px; padding: 6px 4px;
  border-bottom: 1px solid var(--line); color: inherit; font-size: var(--fs-13); text-decoration: none; }
.dd-e:last-child { border-bottom: 0; }
a.dd-e:hover { background: var(--fill); }
.dd-e-at { color: var(--ink3); font-size: var(--fs-12); font-variant-numeric: tabular-nums; }
.dd-e-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink3); align-self: center; }
.dd-e.bad .dd-e-dot { background: var(--dd-bad); } .dd-e.warn .dd-e-dot { background: var(--dd-warn); }
.dd-e.info .dd-e-dot { background: var(--dd-info); } .dd-e.admin .dd-e-dot { background: var(--dd-s5); }
.dd-e b { white-space: nowrap; }
.dd-e-who { color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-e-d { color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 639px) {
  .dd-e { grid-template-columns: 10px minmax(0, 1fr); row-gap: 0; }
  .dd-e-at { grid-column: 2; order: 5; } .dd-e-dot { grid-row: span 2; }
  .dd-e-who, .dd-e-d { grid-column: 2; }
  .dd-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dd-at { margin-left: 0; }
}

/* 도매매 발주 (purchase*.html) */
.pu-list { display: flex; flex-direction: column; }
.pu-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.pu-row:first-child { border-top: 0; }
.pu-row > input { margin-top: 4px; flex: none; }
.pu-main { flex: 1; min-width: 0; }
.pu-name { font-weight: 600; overflow-wrap: anywhere; }
.pu-opt { font-size: var(--fs-13); margin-top: 2px; overflow-wrap: anywhere; }
.pu-big { font-size: var(--fs-17); font-weight: 600; overflow-wrap: anywhere; }
.pu-amt { text-align: right; font-weight: 600; white-space: nowrap; }
.pu-acts { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.pu-note { font-size: var(--fs-13); margin-top: 4px; }
.pu-note.warn { color: var(--orange-ink); }
.pu-note.bad { color: var(--red); }
.pu-side { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pu-cmp { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; margin: 6px 0; }
.pu-arrow { color: var(--ink2); }
.pu-pick { cursor: pointer; }
.pu-pick.same { background: var(--green-soft); border-radius: 8px; padding-left: 8px; }
.pu-pick.off { opacity: .5; }
.tok-bad { color: var(--red); text-decoration: underline wavy; }
@media (max-width: 640px) { .pu-side, .pu-cmp { grid-template-columns: 1fr; } .pu-arrow { font-size: 0; text-align: center; line-height: 1; } .pu-arrow::after { content: "↓"; font-size: var(--fs-17); } }
/* 발주 확인: 고객 옵션 ↔ 발주 옵션 나란히 + 깜빡임 (2026-11-06 사용자 요청). 확인 체크하면 그 줄은 멈춤 */
.pu-box { border: 2px solid var(--orange-ink); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.pu-lab { font-size: var(--fs-12); font-weight: 600; color: var(--orange-ink); margin-bottom: 4px; }
.pu-amt-inline { float: right; font-weight: 600; }
.pu-eye-check { margin: 6px 0 2px; font-weight: 600; }
/* 옵션 글자 통째 깜빡임은 11-16 없앰 (사장님: 다른 글자 형광펜만 깜빡이게). 칸 모양은 그대로 */
.pu-blink { border-radius: 4px; padding: 0 4px; }
.pu-eye.seen .pu-box { border-color: var(--green); }
.pu-eye.seen .pu-lab { color: var(--green); }

/* 홈 위쪽: 할 일(왼쪽) + 자동 작업 5개 세로(오른쪽). 2026-11-06 */
.home-top { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; margin-bottom: 16px; }
.home-top > .board { margin: 0; }
.auto-list { list-style: none; margin: 4px 0 0; padding: 0; }
.auto-list a { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.auto-list li:first-child a { border-top: 0; }
.au-name { font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.au-st { font-size: var(--fs-12); color: var(--ink2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.au-st em { font-style: normal; font-weight: 600; }
.au-st .t-ok { color: var(--green); } .au-st .t-bad { color: var(--red); } .au-st .t-warn { color: var(--orange-ink); } .au-st .t-info { color: var(--blue, #3182f6); }
.auto-list a:hover .au-name { text-decoration: underline; }
a.idx { color: inherit; text-decoration: none; border-radius: 10px; }
a.idx:hover { background: var(--fill); }
@media (max-width: 900px) { .home-top { grid-template-columns: 1fr; } }

/* 옵션 맞추기 (purchase_match.html): 왼쪽 들어온 옵션 · 오른쪽 발주할 옵션, 같은 글자 크기, 강조 최소 (2026-11-06 다시 구성) */
.om-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; align-items: start; }
.om-left { position: sticky; top: 72px; }
.om-lab { font-size: var(--fs-12); color: var(--ink2); margin-bottom: 6px; }
.om-opt { font-size: var(--fs-20); font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.om-meta { font-size: var(--fs-13); color: var(--ink2); margin-top: 4px; overflow-wrap: anywhere; }
.om-note { font-size: var(--fs-13); color: var(--ink2); margin: 10px 0 0; }
.om-list { margin-top: 12px; }
.om-row { display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-radius: 10px; cursor: pointer; }
.om-row + .om-row { margin-top: 2px; }
.om-row:hover { background: var(--fill); }
.om-row.on { background: var(--fill); box-shadow: inset 0 0 0 2px var(--ink); }
.om-row.off { opacity: .45; cursor: default; }
.om-row .om-opt { flex: 1; min-width: 0; font-size: var(--fs-17); font-weight: 600; }
.om-side { font-size: var(--fs-13); color: var(--ink2); white-space: nowrap; }
.om-same { color: var(--green); font-weight: 600; }
.om-check { margin-top: 16px; }
.om-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.om-verdict { margin: 10px 0 0; font-size: var(--fs-15); }
.om-verdict.ok { color: var(--green); }
.om-verdict.diff { color: var(--orange-ink); font-weight: 600; }
.om-money { margin: 6px 0 0; font-size: var(--fs-15); font-weight: 600; }
.om-money:empty { display: none; }
.om-money.warn { color: var(--orange-ink); }
.om-money.bad, .om-err { color: var(--red); font-weight: 600; }
.om-err { margin: 8px 0 0; }
.om-more { margin: 10px 0 14px; display: flex; flex-direction: column; gap: 8px; }
.om-more .field { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.om-more .field input { width: 80px; }
@media (max-width: 760px) {
  .om-cols { grid-template-columns: 1fr; }
  .om-left { top: 56px; z-index: 2; padding: 12px 16px; }
  .om-left .om-meta { display: none; }
  .om-cmp { grid-template-columns: 1fr 1fr; gap: 10px; }
  .om-opt { font-size: var(--fs-17); }
  .om-row { flex-wrap: wrap; }                       /* 옆 글(추가금·손님 값 차이)이 길면 아래 줄로: 옵션 이름이 한 글자 폭으로 눌리지 않게 (11-23) */
  .om-side { white-space: normal; flex: 1 0 100%; padding-left: 34px; }
  .om-side:empty { display: none; }
}

/* 처리 이력 한 타임라인: 예정(위) · 지금 구분선 · 지난 일 (2026-11-06) */
.act-list li.sched .sl-name b { color: var(--ink2); font-weight: 600; }
.act-list li.sched .sl-ic { opacity: .7; }
.act-list li.act-now { display: flex; align-items: center; gap: 8px; margin: 6px 0; color: var(--blue, #3182f6); font-size: var(--fs-12); font-weight: 700; }
.act-list li.act-now::before, .act-list li.act-now::after { content: ''; flex: 1; height: 1px; background: currentColor; opacity: .35; }

/* 홈 (2026-11-06 다시 디자인): 차분한 인사·큰 요약 → 숫자 띠 → 할 일 | 자동 작업 한 카드 */
.hm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 8px 4px 18px; }
.hm-hello { margin: 0 0 4px; font-size: var(--fs-13); color: var(--ink2); }
.hm-title { margin: 0; font-size: var(--fs-28); font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
.hm-title b.warn { color: var(--yellow-ink, #b7791f); } .hm-title b.bad { color: var(--red); }
.hm-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }   /* 머리 오른쪽: 내 스토어 버튼 + 기준 시각 */
.hm-stores { margin: 0; justify-content: flex-end; }
.hm-stores .hm-chip { color: var(--ink2); text-decoration: none; }
.hm-stores .hm-chip:hover { color: var(--ink); }
@media (max-width: 1023px) { .hm-stores .hm-chip { height: 44px; } }
.hm-live { margin: 0; font-size: var(--fs-12); color: var(--ink2); display: flex; align-items: center; gap: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hm-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 var(--green); animation: hm-pulse 2s ease-out infinite; }
@keyframes hm-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 50%, transparent); } 100% { box-shadow: 0 0 0 8px transparent; } }
@media (prefers-reduced-motion: reduce) { .hm-pulse { animation: none; } }

.hm-kpis { display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }   /* 카드 수만큼 칸 (주문 흐름이 있으면 '할 일' 카드가 빠져 5개, 11-12) */
.hm-kpi { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px 18px 16px; min-height: 128px; overflow: hidden;
  background: var(--card); border-radius: 18px; color: inherit; text-decoration: none; transition: transform .12s ease, background .12s ease; }
.hm-kpi:hover { transform: translateY(-2px); }
.hm-k { font-size: var(--fs-13); color: var(--ink2); }
.hm-v { font-size: var(--fs-28); font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.hm-v small { font-size: var(--fs-15); font-weight: 600; margin-left: 2px; color: var(--ink2); }
.hm-v.blue { color: var(--blue, #3182f6); } .hm-v.red { color: var(--red); } .hm-v.yellow { color: var(--yellow-ink, #b7791f); }
.hm-d, .hm-s { font-size: var(--fs-12); color: var(--ink2); font-variant-numeric: tabular-nums; }
.hm-d.up { color: var(--red); } .hm-d.dn { color: var(--blue, #3182f6); } .hm-d em { font-style: normal; color: var(--ink2); }
.hm-kpi .spark { position: absolute; right: 12px; bottom: 12px; width: 44%; height: 34px; opacity: .9; }

.hm-duo { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); background: var(--card); border-radius: 18px; margin-bottom: 16px; }
.hm-duo h2 { font-size: var(--fs-15); font-weight: 700; margin: 0 0 8px; display: flex; align-items: baseline; gap: 8px; }
.hm-duo h2 a { font-size: var(--fs-12); font-weight: 500; color: var(--ink2); text-decoration: none; margin-left: auto; }
.hm-todo, .hm-auto { padding: 18px 20px; min-width: 0; }
.hm-auto { border-left: 1px solid var(--line); }
.hm-duo ul { list-style: none; margin: 0; padding: 0; }
.hm-todo li > a, .hm-todo li > div { display: flex; align-items: center; gap: 12px; padding: 12px 10px; margin: 0 -10px; border-radius: 12px; color: inherit; text-decoration: none; }
.hm-todo li > a:hover { background: var(--fill); }
.hm-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--yellow-ink, #b7791f); }
.hm-todo li.bad .hm-dot { background: var(--red); }
.hm-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hm-t b { font-weight: 600; }
.hm-t em { font-style: normal; font-size: var(--fs-12); color: var(--ink2); }
.hm-todo strong { font-size: var(--fs-20); font-variant-numeric: tabular-nums; }
.hm-todo li.bad strong { color: var(--red); } .hm-todo li.warn strong { color: var(--yellow-ink, #b7791f); }
.hm-chev { color: var(--ink2); display: flex; }
.hm-none { margin: 8px 0 0; color: var(--ink2); }
.hm-auto li a { display: flex; align-items: center; gap: 8px; padding: 6px 0; color: inherit; text-decoration: none; font-size: var(--fs-13); }
.hm-auto li a:hover .hm-an { text-decoration: underline; }
.hm-an { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-as { color: var(--ink2); font-size: var(--fs-12); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hm-as em { font-style: normal; font-weight: 600; }
.hm-as .t-ok { color: var(--green); } .hm-as .t-bad { color: var(--red); } .hm-as .t-warn { color: var(--orange-ink); } .hm-as .t-info { color: var(--blue, #3182f6); }

@media (max-width: 1200px) { .hm-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } .hm-kpi { grid-column: span 2; }
  .hm-kpis[style*="--n: 5"] .hm-kpi:nth-child(n+4) { grid-column: span 3; } }   /* 5개면 3+2 를 칸 남김 없이 */
@media (max-width: 760px) {
  .hm-head { margin: 4px 2px 14px; } .hm-title { font-size: var(--fs-22); }
  .hm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hm-kpi, .hm-kpis[style*="--n: 5"] .hm-kpi:nth-child(n+4) { grid-column: auto; }
  .hm-kpis[style] .hm-kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }   /* 홀수 개면 마지막 카드는 한 줄 전체 */
  .hm-kpi { min-height: 108px; padding: 14px; } .hm-v { font-size: var(--fs-22); }
  .hm-duo { grid-template-columns: 1fr; } .hm-auto { border-left: 0; border-top: 1px solid var(--line); }
}

/* 숫자 띠 손질: 큰 숫자는 한 줄, 그래프는 글자 아래 */
.hm-v { white-space: nowrap; font-size: clamp(20px, 1.7vw, 28px); }
.hm-kpi .spark { position: static; display: block; width: 100%; height: 28px; margin-top: auto; padding-top: 8px; }
@media (max-width: 760px) { .hm-v { font-size: var(--fs-22); } }

/* 홈 인사·할 일 문장 (상자·배경 없이) + 자동 작업 한 줄 띠 (2026-11-06 사용자) */
.hm-head { align-items: flex-start; margin: 10px 4px 22px; }
.hm-greet { min-width: 0; }
.hm-title { font-size: var(--fs-28); margin: 0 0 10px; }
.hm-say { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hm-say li { font-size: var(--fs-20); line-height: 1.45; letter-spacing: -0.01em; color: var(--ink); }
.hm-say li a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.hm-say li a:hover { text-decoration: underline; text-underline-offset: 4px; }
.hm-say b { font-weight: 700; font-variant-numeric: tabular-nums; }
.hm-say li.bad b { color: var(--red); } .hm-say li.warn b { color: var(--blue, #3182f6); }
.hm-go { display: inline-flex; color: var(--ink2); }
.hm-calm { margin: 0; font-size: var(--fs-20); color: var(--ink2); }
.hm-autos { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: 4px 6px 20px; font-size: var(--fs-13); }
.hm-autos-h { font-weight: 700; color: var(--ink); text-decoration: none; margin-right: 2px; }
.hm-au { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.hm-au:hover { text-decoration: underline; }
.hm-au .dot { margin: 0; }
@media (max-width: 760px) {
  .hm-title { font-size: var(--fs-22); } .hm-say li, .hm-calm { font-size: var(--fs-17); }
  .hm-head { flex-direction: column; gap: 8px; } .hm-live { align-self: flex-end; }
  .hm-autos { flex-direction: column; align-items: stretch; gap: 8px; }
  .hm-au { justify-content: space-between; } .hm-au .hm-as { margin-left: auto; }
}

.hm-say li a { display: inline; }
.hm-go { display: inline-block; vertical-align: -3px; margin-left: 2px; }
.hm-kpi { box-shadow: inset 0 0 0 1px var(--line); }

/* 홈 인사: 한 문장 + 짧은 한 줄 (2026-11-06 '문장이 너무 많다') */
.hm-hello { margin: 0 0 6px; font-size: var(--fs-15); color: var(--ink2); }
.hm-title a { color: inherit; text-decoration: none; }
.hm-title a:hover { text-decoration: underline; text-underline-offset: 6px; }
.hm-title a.bad b { color: var(--red); } .hm-title a.warn b { color: var(--blue, #3182f6); }
.hm-more { margin: 8px 0 0; font-size: var(--fs-15); color: var(--ink2); }
.hm-more a { color: var(--ink); text-decoration: none; white-space: nowrap; }
.hm-more a:hover { text-decoration: underline; }
.hm-more a.bad b { color: var(--red); }
.hm-more i { font-style: normal; margin: 0 8px; color: var(--ink2); }
.hm-wait { margin: 6px 0 0; font-size: var(--fs-13); color: var(--ink2); }      /* 기다리는 중: 할 일 아님, 회색 작은 줄 */
.hm-wait a { color: var(--ink2); text-decoration: none; }
.hm-wait a:hover { text-decoration: underline; }
.hm-wait i { font-style: normal; margin: 0 6px; }

/* 발주 화면 2열 (2026-11-06) */
.pu-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.pu-col > .card { margin-top: 0; }
.pu-col > .card + .card { margin-top: 16px; }
.pu-today .list .item { padding: 6px 0; }
@media (max-width: 900px) { .pu-grid { grid-template-columns: 1fr; } }

/* 주문 현황 체크박스·고른 주문 막대 (2026-11-06) */
.order-table th.cb, .order-table td.cb { width: 36px; text-align: center; padding-left: 8px; padding-right: 4px; }
.order-rows li.has-cb { display: flex; align-items: center; gap: 8px; }
.order-rows li.has-cb > input { flex: none; margin-left: 4px; }
.order-rows li.has-cb > .or-row { flex: 1; min-width: 0; }
.ord-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 56px; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 14px; background: var(--card); box-shadow: 0 6px 24px rgba(0,0,0,.18), inset 0 0 0 1px var(--line);
  width: max-content; max-width: calc(100vw - 32px); }   /* left:50% 고정 막대는 폭이 화면 절반으로 묶여 단추가 두 줄로 꺾였음 (2026-11-09 사용자) */
.ord-bar form { margin: 0; }
.om-also { display: grid; gap: 6px; padding: 12px; border-radius: 12px; background: var(--fill); }
.om-also .check { font-size: var(--fs-14); }
.ord-bar .btn { white-space: nowrap; }
.ord-bar #ord-msg:empty { display: none; }
.ord-n { font-size: var(--fs-13); margin-right: 4px; white-space: nowrap; }
@media (max-width: 760px) {   /* 좁은 창: 첫 줄 '3건 선택 · 전체 선택 · 선택 해제', 둘째 줄 동작 단추가 폭을 나눠 씀 ('선택 해제'만 외따로 꺾이던 것, 2026-11-09 전수조사) */
  .ord-bar { bottom: 76px; left: 16px; right: 16px; transform: none; width: auto; max-width: none; }
  .ord-bar > * { order: 2; }
  .ord-bar > .ord-n, .ord-bar > #ord-all-m, .ord-bar > #ord-clear { order: 0; }
  .ord-bar > #ord-clear { margin-left: auto; }
  .ord-bar::before { content: ''; order: 1; flex-basis: 100%; height: 0; }
  .ord-bar > form, .ord-bar > #ord-send, .ord-bar > #ord-nvc { flex: 1 1 0; min-width: max-content; }
  .ord-bar > form .btn, .ord-bar > #ord-send, .ord-bar > #ord-nvc { width: 100%; justify-content: center; }
  .ord-bar > #ord-msg { order: 3; flex-basis: 100%; }
  /* 발주확인까지 단추 넷: 한 줄에 둘씩 (하나만 외따로 꺾이지 않게) */
  .ord-bar:has(#ord-nvc:not([hidden])) > form, .ord-bar:has(#ord-nvc:not([hidden])) > #ord-send,
  .ord-bar:has(#ord-nvc:not([hidden])) > #ord-nvc { flex: 1 1 calc(50% - 4px); min-width: 0; }
}
.nvc-t.ok, .nvc-t.todo, .nvc-t.sending { color: var(--ink3); }
.nvc-t.fail { color: var(--red); font-weight: 600; }
.or-side .nvc-t { display: block; margin-top: 2px; font-size: var(--fs-13); }
.refresh-msg { white-space: pre-line; }

/* 조회 칸 압축 (2026-11-06 사용자: 검색 칸이 화면을 너무 차지함). 토스처럼: 높이 40, 옵션은 이름표를 칸 안으로, 넓은 화면은 한 줄 */
.bt-filters, .np-opts, .np-opts.q2 { margin-top: 10px; }
.bt-filters select, .bt-filters input, .bt-filters.has-btn .btn, .np-opts.q2 input[type=search],
.filters input, .filters select, .filters .btn { height: 40px; }
.bt-filters input[type=search], .np-opts.q2 input[type=search] { border-radius: 10px; font-size: var(--fs-15); }
.bt-filters.has-btn { grid-template-columns: 160px 1fr auto; }
.np-opts { gap: 8px; }
.np-opts .field { display: flex; align-items: center; gap: 8px; min-width: 0; }
.np-opts .field > label { flex: none; margin: 0; font-size: var(--fs-12); color: var(--ink2); white-space: nowrap; }
.np-opts .field select { height: 36px; min-width: 0; flex: 1; }
.np-opts .rows-pick { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.np-opts .rows-pick select { height: 36px; }
.np-opts .rows-pick .check { white-space: nowrap; font-size: var(--fs-13); }
@media (min-width: 1100px) {
  form#srch:has(> .bt-filters + .np-opts) { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 8px 16px; align-items: center; }
  form#srch > .bt-filters + .np-opts { margin-top: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  form#srch > .cm-wrap, form#srch > .check { grid-column: 1 / -1; }
}
@media (max-width: 520px) { .bt-filters.has-btn { grid-template-columns: 1fr auto; } }

/* 조회 칸 손질: 한 줄 합치기는 처리 이력 칸 때문에 좁아 잘림 → 두 줄, 옵션은 내용 길이만큼 */
@media (min-width: 1100px) { form#srch:has(> .bt-filters + .np-opts) { display: block; } }
.np-opts, form#srch > .bt-filters + .np-opts { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.np-opts .field { flex: 0 1 auto; }
.np-opts .field select { flex: 0 1 auto; width: auto; min-width: 120px; }
.np-opts .rows-pick { flex: 0 1 auto; }
@media (max-width: 640px) { .np-opts .field { flex: 1 1 140px; } .np-opts .field select { flex: 1; } }

/* hidden 속성은 어떤 display 규칙보다 우선 (2026-11-06: 주문 현황 막대가 체크 전에도 보이던 버그) */
[hidden] { display: none !important; }

/* 실행 기록 「모든 기록」 (2026-11-06) */
.log-filters { margin-bottom: 8px; }
.log-filters select { min-width: 140px; }
.log-table td.lg-d { overflow-wrap: anywhere; max-width: 520px; }
.log-table tr.lg-row { cursor: pointer; } .log-table tr.lg-row:hover td { background: var(--fill); }
/* 휴대폰: 표 대신 한 줄씩 쌓인 목록 (오른쪽이 잘리던 것, 2026-11-06) */
@media (max-width: 760px) {
  .log-table thead { display: none; }
  .log-table, .log-table tbody { display: block; }
  .log-table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .log-table td { display: block; padding: 0 !important; border: 0 !important; white-space: normal; }
  .log-table td:nth-child(1) { grid-column: 1; grid-row: 2; color: var(--ink3); }
  .log-table td:nth-child(2) { grid-column: 1; grid-row: 1; font-weight: 600; }
  .log-table td:nth-child(5) { grid-column: 2; grid-row: 1; text-align: right; }
  .log-table td.lg-d { grid-column: 1 / -1; grid-row: 3; max-width: none; color: var(--ink2); }
  .log-table td:nth-child(4) { grid-column: 2; grid-row: 2; text-align: right; color: var(--ink3); }
  .log-table td:nth-child(4) .sub { display: inline; margin-left: 4px; }
  .log-table td:nth-child(5) .lg-ack { display: block; margin: 6px 0 0; }   /* 휴대폰: 확인 완료 단추는 결과 알약 아래로 (11-10) */
  .log-table td:nth-child(5) .chip { white-space: nowrap; }
}

/* 같은 상품군 제안 단추 (비셀러 상품 추가) */
.fam-btn { margin-top: 4px; padding: 2px 8px; border: 0; border-radius: 6px; background: var(--fill); color: var(--blue, #3182f6); font: inherit; font-size: var(--fs-12); cursor: pointer; }
.fam-btn:hover { text-decoration: underline; }

/* 주문 표 가독성 (토스 원칙: 한 칸 두 줄까지, 숫자 굵게, 줄 높이 넉넉) */
.order-table td { font-size: var(--fs-15); line-height: 1.45; padding-top: 14px; padding-bottom: 14px; }
.order-table .sub { margin-top: 2px; }
.order-table td.r b { font-size: var(--fs-15); font-variant-numeric: tabular-nums; }

/* 동기화 목록 2열 (넓은 화면, 2026-11-06 최소 2열) */
@media (min-width: 1000px) {
  .sync-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; }
  /* 2열일 때 오른쪽 열 맨 위 줄에도 선이 그어지던 것 (2026-11-08 #76): 구분선은 같은 열 안 줄 사이에만 */
  .sync-list > .sync-row:nth-child(2) { border-top: 0; border-radius: 16px; }
}

/* 발주 여부 칩 (2026-11-06): 발주함 초록, 발주 전 주황, 확인 필요 빨강, 기록 없음 회색 */
.pu-mark { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: var(--fs-13); font-weight: 600; white-space: nowrap; background: var(--fill); color: var(--ink3); }
.pu-mark.done { background: var(--green-soft); color: var(--green); }
.pu-mark.todo, .pu-mark.wait { background: var(--orange-soft); color: var(--orange-ink); }
.pu-mark.check { background: var(--red-soft); color: var(--red); }
.or-side .pu-mark { margin-top: 2px; }

/* 발주 기록 줄: 좁은 화면에서 단추·취소 칸이 상품 이름을 밀어 글자가 세로로 깨지던 것 (2026-11-06 휴대폰 사진) */
.pu-rec { flex-wrap: wrap; }
.pu-rec .pu-main { flex: 1 1 260px; }
.pu-rec .pu-acts { flex: 0 1 auto; }
.pu-rec:has(details[open]) .pu-acts { flex: 1 1 100%; align-items: stretch; }
.pu-rec details[open] > summary { align-self: flex-end; }
.pu-rec details .inner { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.pu-rec details .inner input[name=memo] { width: 100%; }
.pu-rec details .inner .btn { align-self: flex-start; }
.ev-v { overflow-wrap: anywhere; text-align: right; }

/* 옵션 맞추기 (#31, 2026-11-06): 왼쪽 열에 주문 옵션과 비교·확정을 붙여 빈 공간 없이, 내려도 따라옴 */
.om-pane { position: sticky; top: 72px; display: flex; flex-direction: column; gap: 16px; }
.om-pane .om-left { position: static; }
.om-pane .om-check { margin-top: 0; }
.om-pane .om-check .btn.big { width: 100%; }
@media (max-width: 760px) {
  .om-pane { display: contents; }
  .om-pane .om-left { position: sticky; top: 56px; z-index: 2; order: 1; }
  .om-right { order: 2; }
  .om-pane .om-check { order: 3; }
}
/* #29 UI 기본 규칙 (2026-11-06) */
.bt-line .bt-h1 { font-size: var(--fs-20); font-weight: 700; margin: 0; letter-spacing: -0.02em; }
.bt-line .bt-h1 + .flow { margin: 4px 0 0; }
.rows-pick .check { min-height: 40px; display: inline-flex; align-items: center; }
.legal .backlink { margin: 0 0 8px -4px; }
.switch-row { min-height: 44px; }
/* 클레임·문의 (#32) */
.cs-table tr.lg-row { cursor: pointer; } .cs-table tr.lg-row:hover td { background: var(--fill); }
.cs-qna { list-style: none; margin: 0; padding: 0; }
.cs-qna li { padding: 14px 0; border-top: 1px solid var(--line); }
.cs-qna li:first-child { border-top: 0; }
.cs-q-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cs-q-body { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.cs-q-ans { margin: 6px 0 0; padding: 8px 12px; background: var(--fill); border-radius: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.orders-cs-link { display: none; }
@media (max-width: 1023px) { .orders-cs-link { display: inline-flex; } }
.more-link { align-items: center; gap: 2px; font-size: var(--fs-15); font-weight: 600; color: var(--blue); text-decoration: none; white-space: nowrap; }
.more-link span { font-size: 1.2em; line-height: 1; }
.cs-table .sub { display: block; font-size: var(--fs-13); font-weight: 400; }
@media (max-width: 760px) {
  .cs-table thead { display: none; }
  .cs-table, .cs-table tbody { display: block; }
  .cs-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
  .cs-table td { display: block; padding: 0 !important; border: 0 !important; min-width: 0; overflow-wrap: anywhere; }
  .cs-table td:nth-child(3) { grid-column: 1; grid-row: 1; font-weight: 600; }
  .cs-table td:nth-child(4) { grid-column: 2; grid-row: 1; text-align: right; }
  .cs-table td:nth-child(2) { grid-column: 1; grid-row: 2; }
  .cs-table td:nth-child(2) .sub { display: inline; margin-left: 6px; }
  .cs-table td:nth-child(6) { grid-column: 2; grid-row: 2; text-align: right; }
  .cs-table td:nth-child(6) .sub { display: none; }
  .cs-table td:nth-child(1) { grid-column: 1; grid-row: 3; color: var(--ink3); font-weight: 400; }
  .cs-table td:nth-child(1) b { font-weight: 400; }
  .cs-table td:nth-child(5) { grid-column: 2; grid-row: 3; text-align: right; color: var(--ink3); }
}
.bad-t { color: var(--red); }
.nav-card { display: flex; flex-direction: column; gap: 4px; color: var(--ink); text-decoration: none; }
.nav-card:hover { background: var(--fill); }
.zero-n { color: var(--ink4, var(--ink3)); opacity: .6; }

/* ===== 토스 규칙 정리 (2026-11-06 정밀 검증: 글자 13·15·17·20·22·28, 굵기 400~700, 모서리 8·12·16·20·둥글게,
   단추 32·36·40·44·48·56, 아이콘 16·20·24, 여백 4의 배수, 색은 토큰만) ===== */
:root { --orange-ink: var(--yellow-ink); --orange-soft: var(--yellow-soft); }      /* '주의' 색 한 벌로 (주황·노랑 두 벌이 섞여 있었음) */
b, strong { font-weight: 700; }                                                     /* 굵은 부모 안 b 가 900 으로 더 굵어지던 것 */
/* 홈 숫자: 화면 폭 따라 20~28px 사이로 늘던 것을 단계값으로 */
.hm-v { font-size: var(--fs-22); }
@media (min-width: 1800px) { .hm-v { font-size: var(--fs-28); } }
.hm-kpi { border-radius: 20px; padding: 20px 20px 16px; }
.hm-head { margin-bottom: 24px; }
@media (max-width: 760px) { .hm-kpi { padding: 16px; } }
/* 작은 표시: 방향 칩·'지금' 선은 13px */
.flow, .flow span, .flow i, .act-list li.act-now { font-size: var(--fs-13); }
/* 모서리 */
.pu-mark { border-radius: 8px; }
.seg label { border-radius: 8px; }
/* 단추·탭 높이 */
.bd-tabs button { min-height: 44px; }
/* 아이콘 */
.btn svg, .banner svg { width: 20px; height: 20px; }
.appbar .brand .mark svg { width: 16px; height: 16px; }
.auth .logo .mark svg, .legal .logo .mark svg { width: 20px; height: 20px; }
.th-f svg { width: 16px; height: 16px; }
.steps li .dot svg { width: 16px; height: 16px; }
.list .item .chev { width: 20px; height: 20px; }
/* 여백 */
.legal p, .legal ul, .legal ol { margin: 0 0 16px; }
p.small { margin-top: 12px; margin-bottom: 12px; }
p.small.m-0 { margin: 0; }
@media (max-width: 760px) { table.changes td { padding: 4px 0; } }
.auth { padding-top: 24px; }
/* 입력칸: 어두운 화면에서 브라우저 기본색(회색 #3b3b3b)이 나오던 칸 */
.log-filters input, .om-more input, input[type=number], input[type=search] { background-color: var(--fill); color: var(--ink); border: 0; border-radius: 12px; }

/* 회원 목록·날짜 머리 (직접 쓴 style 을 클래스로, 2026-11-06) */
.mb-list { padding: 12px; }
.mb-row { padding: 0 8px; }
.mb-row + .mb-row { border-top: 1px solid var(--line); }
.mb-row > summary { min-height: 64px; }
.mb-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mb-ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue-soft-ink); font-weight: 700; flex: 0 0 auto; }
.mb-txt { min-width: 0; } .mb-name { display: block; font-weight: 600; }
.mb-inner { padding-bottom: 12px; }
.day-head { margin: 16px 8px 4px; } .day-head.first { margin-top: 4px; }
/* 12px 를 쓰던 작은 글자 → 13px (12px 는 배지·아래 탭만) */
.np-opts .field > label, .hm-d, .hm-s, .hm-as, .hm-live { font-size: var(--fs-13); }
/* 체크박스·라디오 브라우저 기본 여백(3px) 대신 칸 사이 gap 으로 */
.check input[type=checkbox], .check input[type=radio], .om-row > input, .th-chk input, .pu-row > input, label > input[type=checkbox], label > input[type=radio] { margin: 0; }
p.muted, p.sub { margin-top: 0; margin-bottom: 16px; }
p.muted.m-0, p.sub.m-0, .card p.muted:last-child { margin-bottom: 0; }
/* 휴대폰: 처리 이력 칸을 뺀 뒤(2026-11-06) 아래 탭바만큼의 여백이 사라져 마지막 내용이 탭바에 가려지던 것 (2026-11-07) */
@media (max-width: 1023px) { body.has-tabs main.shell-main { padding-bottom: calc(var(--tabbar) + 32px + env(safe-area-inset-bottom)); } }
/* 쇼핑몰 전송 창 기록 (반영 화면, 2026-11-07) */
.send-log { margin: 4px 0 8px; }
.send-log > .log-sec { margin-top: 8px; padding-left: 4px; }
/* 실행 상세 화면 공통 (templates/_detail.html, 2026-11-07 통일안) */
.dt-head { margin: 24px 4px 20px; }
.dt-eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.dt-no { color: var(--ink3); font-size: var(--fs-13); font-weight: 600; font-variant-numeric: tabular-nums; }
.dt-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.dt-title .page-title { margin: 0; }
.dt-summary { margin: 8px 0 0; font-size: var(--fs-17); font-weight: 500; color: var(--ink2); line-height: 1.5; }
.dt-prog-row { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.dt-prog-row b { font-size: var(--fs-28); font-weight: 700; font-variant-numeric: tabular-nums; }
.dt-eta { margin-left: auto; font-size: var(--fs-13); }
.dt-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin: 0 0 16px; }
.dt-tiles .tile { background: var(--fill); }
.dt-info .item .v { text-align: right; overflow-wrap: anywhere; }
main:has(.dt-head) > .act-title { display: none; }      /* 상세 화면은 머리에 분류·이름이 있으니 위치 줄을 겹쳐 보이지 않음 */
.what-card .item .k { white-space: nowrap; }

/* 화면 머리 공통 (2026-11-08 #75): 같은 단계 메뉴는 제목·부제·오른쪽 단추·탭·첫 카드 위치가 같다. 단추는 제목 줄 오른쪽 */
.page-head .ph-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; align-self: center; }
@media (max-width: 640px) { .page-head .ph-acts { width: 100%; margin-left: 0; } .page-head .ph-acts .btn { flex: 1; min-height: 44px; } }
/* 처리 예정 아래 처리 이력 (2026-11-08 #77) */
.side-head.sh-2 { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
/* 휴대폰 위 시계(처리 이력) 단추: 도는 작업이 있으면 파란 점 (2026-11-08: 빈 진행 알림 자리 대신) */
.hist-btn { position: relative; }
.hist-btn.live::after { content: ''; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 2px var(--bg); }
/* 휴대폰: 조회 옵션(상위 기준·분류·공급사 조건·한 번에 보기)이 카드 오른쪽 밖으로 넘치던 것 (2026-11-08 사용자 사진) → 한 줄에 하나, 이름 폭 맞춤 */
@media (max-width: 640px) {
  .np-opts, form#srch > .bt-filters + .np-opts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .np-opts .field > label { width: 76px; }
  .np-opts .field select, .np-opts .rows-pick select { height: 44px; }
}
/* 2026-11-08 관리자 점검: 실행 기록 '내용'이 길면 옆 칸(누가·IP)을 덮던 것 → 줄바꿈, 홈 쇼핑몰별 표 '취소' 머리 잘림 */
.log-table td.lg-d { white-space: normal; }
.bd-left .rank-table th:last-child, .bd-left .rank-table td:last-child { padding-right: 8px; }
.order-table tbody tr { cursor: pointer; }   /* 줄 아무 데나 누르면 주문 상세 (11-08 점검) */

/* 실행 기록 거르기 칸, 휴대폰: [종류][결과] / [내용 찾기][⤓] 두 줄 (2026-11-09 통상적 관례) */
@media (max-width: 640px) {
  .log-filters { display: flex; flex-wrap: wrap; gap: 8px; }
  .log-filters select { flex: 1 1 calc(50% - 4px); min-width: 0; width: auto; }
  .log-filters #lg-q { flex: 1 1 0; min-width: 0; }
  .log-filters .dl-ico { flex: none; width: 44px; min-height: 44px; padding: 0; }
  .log-filters .dl-ico .dl-t { display: none; }
}

/* 계정 메뉴 (위쪽 사람 아이콘: 이름·업체, 설정, 회원 관리, 로그아웃) — 2026-11-09 통상적 관례 */
.me-menu { position: relative; }
.me-menu > summary { list-style: none; cursor: pointer; display: grid; place-items: center; }
.me-menu > summary::-webkit-details-marker { display: none; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 200px; padding: 8px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .14); display: flex; flex-direction: column; }
.acct-who { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.acct-who b { font-size: var(--fs-15); }
.acct-who span { font-size: var(--fs-13); color: var(--ink3); }
.acct-menu a, .acct-menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-radius: 10px; background: none;
  color: var(--ink); font: inherit; font-size: var(--fs-15); text-decoration: none; cursor: pointer; }
.acct-menu a:hover, .acct-menu button:hover { background: var(--fill); }
.acct-menu form { margin: 0; }
/* 옆으로 넘치는 탭: 오른쪽 끝을 흐리게 해 '더 있음'을 보인다 (.more 는 base.html 이 붙임) */
.bd-tabs.more { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
/* 휴대폰 클레임 목록: 긴 상품명이 오른쪽 상태 표시 밑으로 겹치지 않게 */
@media (max-width: 760px) { .cs-table td.nm, .cs-table td:nth-child(3) { max-width: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
.me-menu > summary::after { display: none !important; }   /* 계정 아이콘에는 펼침 화살표 없음 */
.me-menu > summary { width: 36px; height: 36px; padding: 0; margin: 0; }

#ord-all-m { display: none; }
@media (max-width: 640px) { #ord-all-m { display: inline-flex; } }   /* 휴대폰만: PC 는 표 머리 체크칸 */

/* 비밀번호 보기 단추 */
.pw-wrap { position: relative; display: block; }
.pw-wrap > input { width: 100%; padding-right: 48px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: none;
  color: var(--ink3); display: grid; place-items: center; cursor: pointer; border-radius: 10px; }
.pw-eye:hover { color: var(--ink); background: var(--fill); }

/* 주문 상세 본문 안 글자 링크 (배송 조회·복사) */
.od-link { display: inline-flex; margin-left: 8px; font-size: var(--fs-13); background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; }
/* 주문 현황 → 발주하기 로 들어온 주문 */
.pu-row.hl { background: color-mix(in srgb, var(--blue, #3182f6) 8%, transparent); border-radius: 12px; padding-left: 8px; padding-right: 8px; scroll-margin-top: 96px; }

/* 운영 › 접속 중 */
.on-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green, #20c997); margin-right: 6px; vertical-align: middle; }
.online-gap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.card.mt-16 { margin-top: 16px; }
/* 휴대폰: 주문 현황 위 단추 4개는 2×2 같은 폭 (단추 폭을 글자 맞춤으로 바꾼 뒤 3+1 로 줄이 갈렸음) */
@media (max-width: 640px) { .page-head .ph-acts.ord-acts { display: grid; grid-template-columns: 1fr 1fr; } }

/* 발주 확인: 빠진 체크 표시 (감시 봇 #6) */
.pu-eye.need { outline: 2px solid var(--red, #f04452); outline-offset: 4px; border-radius: 12px; }
.pu-eye.need .pu-eye-check, label.check.need { color: var(--red, #f04452); }
.pu-need { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--red, #f04452) 12%, transparent);
  color: var(--red, #f04452); font-weight: 600; font-size: var(--fs-15); }
/* 클레임·문의 한 목록 (2026-11-09 모든 쇼핑몰) */
.cs-all .cs-link { color: inherit; text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 520px; }
.cs-all .cs-link:hover { text-decoration: underline; }
.cs-all td.nm { max-width: 540px; }
.cs-all td.nm .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-filters { margin-bottom: 8px; }
.cs-answer textarea { min-height: 160px; }
.cs-count { text-align: right; margin-top: 4px; }
.cs-act + .cs-act { margin-top: 16px; }
.cs-src-err { padding: 0 8px 8px; }
@media (max-width: 760px) { .cs-all .cs-link, .cs-all td.nm { max-width: none; } }
.cs-one { max-width: 720px; }

/* ---------- 네이버·쿠팡 바로 등록 (products_direct.html, settings_mall_register.html) ---------- */
.mr-row { align-items: flex-start; }
.mr-img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; background: var(--fill); }
.mr-body { min-width: 0; overflow-wrap: anywhere; }
.mr-top { display: flex; align-items: flex-start; gap: 6px; min-width: 0; }
/* 상품명은 두 줄까지 (11-12 사장님 '모바일에서 상품명이 너무 잘려') */
.mr-top .t { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: anywhere; }
.mr-top .chip { flex: 0 0 auto; }
.mr-top .mr-st-m { display: none; }
@media (max-width: 640px) {      /* 휴대폰: 알약 두 개를 윗줄에, 이름은 아래 줄 전체 폭으로 세 줄까지, 오른쪽 상태 알약은 숨김 */
  .mr-top { flex-wrap: wrap; }
  .mr-top .mr-st-m { display: inline-flex; }
  .mr-top .t { flex: 1 1 100%; -webkit-line-clamp: 3; line-clamp: 3; }
  .mr-row > .mr-st { display: none; }
}
.list .item .mr-body .d.down { color: var(--red); }
.mr-fix { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.mr-fix .cat-pick { flex: 1 1 100%; display: grid; gap: 6px; max-width: 560px; }
.mr-fix .cat-pick[hidden] { display: none; }
.mr-fix .cat-q { height: 36px; width: 100%; min-width: 0; }
.cat-list { display: grid; gap: 2px; max-height: 280px; overflow-y: auto; }
.cat-opt { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 6px 10px; border: 0; border-radius: 8px; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.cat-opt:hover, .cat-opt.on { background: var(--fill); }
.cat-opt .grow { min-width: 0; overflow-wrap: anywhere; }
.mr-fix input { height: 36px; flex: 1 1 auto; min-width: 0; }
.mr-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.mr-pick .np-mall.off { opacity: .5; }
.mr-set .field + .field { margin-top: 12px; }
.mr-set .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .mr-set .row2 { grid-template-columns: 1fr; } }
.mr-hgo { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.mr-tiles .dt-tiles { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 480px) { .mr-tiles .dt-tiles { grid-template-columns: repeat(2, 1fr); } }

/* 입력 검사 안내 (2026-11-10 감시 봇 #27) */
.field-err { color: var(--red); margin-top: 4px; }
[aria-invalid="true"] { border-color: var(--red) !important; }

/* 주문 상세 팝업 아래 단추 여러 개 (2026-11-10): 두 칸씩, 칸이 홀수면 닫기가 맨 아래 한 줄 */
.pd-foot[data-n="3"] #od-close, .pd-foot[data-n="5"] #od-close, .pd-foot[data-n="7"] #od-close { order: 99; grid-column: span 2; }
.pd-foot .od-soldout { margin: 0; display: contents; }
.pd-foot .danger-t { color: var(--red); }

/* 주문 상세: 이 상품 바로가기·메모 (2026-11-10) */
.od-prod-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pd-foot .od-prod-acts { grid-column: 1 / -1; order: -1; margin: 0 0 4px; }
.pd-foot .od-prod-acts .btn { width: auto; white-space: nowrap; }
/* 좁은 창: 옆으로 숨기지 않고 줄을 바꿔 다 보이게 (11-11 520px에서 '판매가·마진 계산'이 밖으로 밀림). 꺾인 줄은 단추가 폭을 나눠 채움 */
.pd-foot .od-prod-acts .btn { flex: 1 1 auto; }
.od-memo .v { white-space: pre-wrap; text-align: left; }
.od-memo-form { display: grid; gap: 8px; justify-items: end; margin-top: 8px; }   /* 메모 칸 아래 오른쪽에 단추 (11-16) */
.od-memo-form textarea { width: 100%; justify-self: stretch; }
.od-memo-form textarea { flex: 1; min-width: 0; resize: vertical; }

/* 취소·환불 사유 고르기 (11-10) */
.cc-reasons { display: flex; flex-direction: column; gap: 8px; }
.cc-reasons label { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border-radius: 12px; background: var(--fill); cursor: pointer; font-weight: 600; font-size: var(--fs-15); color: var(--ink); }
.cc-reasons label:has(input:checked) { background: var(--card); box-shadow: inset 0 0 0 2px var(--ink); }
.cc-reasons input { margin: 0; }

/* 홈 '셀러브레인이 알아서 한 일' (11-10) */
.hm-story { margin: 0 0 16px; padding: 16px 20px; border-radius: 16px; background: var(--card); }
.hm-story-h { margin: 0 0 8px; font-size: var(--fs-15); font-weight: 700; color: var(--ink); }
.hm-story ul { list-style: none; margin: 0; padding: 0; }
.hm-story li a { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; color: var(--ink); text-decoration: none; font-size: var(--fs-15); line-height: 1.45; }
.hm-story li a:hover span { text-decoration: underline; }
.hm-story time { flex: none; min-width: 3.4em; color: var(--ink3); font-variant-numeric: tabular-nums; font-size: var(--fs-13); }
.hm-story em { font-style: normal; color: var(--ink3); font-size: var(--fs-13); }
.hm-story li.warn span { color: var(--red); font-weight: 600; }

/* 주문 상세 맨 위 며칠째·발송 기한 (11-10 사용자 "몇일째 지연인지 알려줘야지") */
.od-delay { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-15); color: var(--ink2); }
.od-delay.bad li:nth-child(2) { color: var(--red); font-weight: 600; }
.od-delay.warn li:first-child { color: var(--ink); font-weight: 600; }

/* 홈에서 눌러 들어온 목록: 해당 줄 파랗게 깜빡임 (11-10 사용자) */
@keyframes row-flash { 0%, 50%, 100% { background: transparent; } 25%, 75% { background: rgba(49, 130, 246, .32); } }
tr.row-flash > td, li.row-flash, label.row-flash { animation: row-flash 1.2s ease-in-out 2; }
li.row-flash, label.row-flash { border-radius: 12px; }
@media (prefers-reduced-motion: reduce) { tr.row-flash > td, li.row-flash, label.row-flash { animation: none; background: rgba(49, 130, 246, .32); } }

/* 주문 현황: 알약 옆 한 줄 보조 글자 (11-10 사용자 '결제·서비스 이름 글자가 알약과 안 어울림' → C안) */
.pill-line, .order-table .sub.pill-line, .order-table .pill-line { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.pill-line em { font-style: normal; color: var(--ink3); }

/* 상세 화면 '확인 완료' (11-10) */
.dt-ack { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.lg-ack { display: inline; margin-left: 6px; }
.lg-ack .btn { padding: 2px 10px; min-height: 28px; font-size: var(--fs-13); }

/* 동기화 상세 '최근 실행': 칸 안에서 스크롤 (11-10 사용자) */
.run-scroll { max-height: min(640px, 70vh); overflow-y: auto; scrollbar-width: thin; }   /* 끝까지 올리면 화면 전체가 이어서 움직임 (11-12 사장님) */
.btn.block { display: flex; width: 100%; justify-content: center; }
.run-list .item[hidden] { display: none; }

/* 목록 썸네일 (11-10 사용자): 도매매 받은 상품 목록의 사진, 없으면 빈 칸 */
.th { flex: none; width: 40px; height: 40px; border-radius: 8px; background: var(--fill); overflow: hidden; display: inline-block; }
.th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.th.th-lg { width: 56px; height: 56px; border-radius: 10px; }
.nm-th { display: flex; gap: 10px; align-items: flex-start; }
.nm-th > div { min-width: 0; }
.od-nm-row { display: flex; gap: 12px; align-items: center; }
.or-row > .th { align-self: flex-start; }

/* 창 기록 제목 아래 한 줄 요약 (11-10) */
.log-sec summary { flex-wrap: wrap; }
.log-sum { flex-basis: 100%; order: 3; font-weight: 500; font-size: var(--fs-13); color: var(--ink3); }

/* 체험 막대 '처음 상태로' (11-10) */
.demo-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.demo-reset { margin-left: auto; }

/* 홈 다듬기 (11-10 사용자 '왜 이렇게 번잡해'): 체험 막대 한 줄, 쇼핑몰별 숫자는 제목 아래 회색, 나머지 할 일은 칩 */
.demo-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--fs-13); text-align: left; }
.demo-bar .demo-msg { flex: 1 1 240px; min-width: 0; }
.demo-bar a.btn { text-decoration: none; }
.demo-bar .demo-reset { margin: 0; }
.demo-bar .demo-acts { display: inline-flex; gap: 6px; margin-left: auto; }
.demo-bar .demo-acts .btn { height: 30px; min-height: 30px; padding: 0 12px; font-size: var(--fs-13); }
@media (max-width: 639px) { .demo-bar { padding: 10px 12px; } .demo-bar .demo-msg { flex-basis: 100%; } }
.hm-by { margin: 6px 0 0; font-size: var(--fs-15); color: var(--ink2); }
.hm-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.hm-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 17px; background: var(--fill);
  color: var(--ink); font-size: var(--fs-15); text-decoration: none; white-space: nowrap; }
.hm-chip b { font-weight: 700; }
.hm-chip.bad b { color: var(--red); }
.hm-chip:hover { background: var(--line); }

/* 열 폭 (11-10 사장님 '열 너비가 낭비되지 않고 내용보다 약간 크게', 토스식): 긴 글 칸(th.grow) 하나가 남는 폭을 다 갖고,
   나머지 칸은 내용 폭 + 양쪽 12px. 사람이 폭을 끌어 정한 표(col-fixed)는 그 폭 그대로 */
table:has(th.grow):not(.col-fixed) th:not(.grow) { width: 1%; white-space: nowrap; }
table:has(th.grow) th, table:has(th.grow) td { padding-left: 12px; padding-right: 12px; }
table:has(th.grow) tr > :first-child { padding-left: 4px; }
table:has(th.grow) tr > :last-child { padding-right: 4px; }
/* 표는 끝까지 채우고 남는 폭은 긴 글 칸이 (11-10 사장님 '표 오른쪽이 비는데?'). 긴 글 칸은 최소 240px, 글이 길면 줄바꿈 */
table:has(th.grow) th.grow { min-width: 240px; }
table:has(th.grow):not(.col-fixed) td.nm { white-space: normal; }
/* 매출 분석: 넓은 화면에서 쇼핑몰별·상품별 표를 나란히 (상품명 칸이 화면 폭을 다 먹어 과해 보였음, 11-10 사장님) */
.sa-pair { display: grid; gap: 16px; }
.sa-pair > .card { margin: 0; min-width: 0; }
@media (min-width: 1280px) { .sa-pair { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; } }
/* 클레임·문의 2단 (11-11 사장님). 칸이 좁아 표 대신 줄 목록: 내용·상태 / 쇼핑몰·금액 / 시각·종류 */
.cs-split { display: grid; gap: 24px; margin-top: 12px; }
@media (min-width: 1200px) { .cs-split:not(.one) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.cs-col { min-width: 0; }
.cs-col-h { font-size: var(--fs-17); margin: 0 0 4px; }
.cs-col-h em { font-style: normal; color: var(--ink3); font-weight: 600; margin-left: 2px; }
.cs-list, .cs-list tbody { display: block; width: 100%; }
.cs-list tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.cs-list tr:last-child { border-bottom: 0; }
.cs-list td { display: block; padding: 0 !important; border: 0 !important; min-width: 0; }
.cs-list td:nth-child(3) { grid-column: 1; grid-row: 1; font-weight: 600; }
.cs-list td:nth-child(4) { grid-column: 2; grid-row: 1; text-align: right; }
.cs-list td:nth-child(2) { grid-column: 1; grid-row: 2; padding-left: 50px !important; }
.cs-list td:nth-child(2) b { font-weight: 600; }
.cs-list td:nth-child(2) .sub { display: inline; margin-left: 6px; }
.cs-list td:nth-child(6) { grid-column: 2; grid-row: 2; text-align: right; }
.cs-list td:nth-child(6) .sub { display: none; }
.cs-list td:nth-child(1) { grid-column: 1; grid-row: 3; color: var(--ink3); padding-left: 50px !important; }
.cs-list td:nth-child(1) b { font-weight: 400; }
.cs-list td:nth-child(5) { grid-column: 2; grid-row: 3; text-align: right; color: var(--ink3); }
.cs-list td.nm { max-width: none; }
.cs-list .cs-link { max-width: none; }
@media (max-width: 760px) { .cs-list td:nth-child(1), .cs-list td:nth-child(2) { padding-left: 0 !important; } }
/* 로그인 화면: 로그인 단추와 둘러보기 사이 (11-11 사장님 '너무 붙어 있다') */
.login-or { display: flex; align-items: center; gap: 12px; margin: 20px 0 16px; color: var(--ink3); font-size: var(--fs-13); }
.login-or::before, .login-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* 오류 원문: 쉬운 말 아래 작은 글씨 (#106, app/errtext.py) */
.err-raw { display: block; margin-top: 2px; font-size: var(--fs-13); font-weight: 400; color: var(--ink3); line-height: 1.45; overflow-wrap: anywhere; }

/* 설정 › 발주 경고 기준 입력 (11-11) */
.warn-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.warn-grid input { width: 100%; }
@media (max-width: 600px) { .warn-grid { grid-template-columns: 1fr; } }
.pu-over-ok.need, .pu-over-ok.need input { outline: 2px solid var(--bad, #e5484d); outline-offset: 2px; border-radius: 6px; }

/* 도매매 상품 추가: 사입 판단 칸 (11-11 사장님 '이 페이지만 보고 뭘 살지') */
.tr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.tr-col { min-width: 0; }
.tr-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.tr-kw, .tr-ours { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.tr-kw > li, .tr-ours > li { min-width: 0; }
.tr-kw { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; }
.tr-link { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 4px 6px; border: 0; background: none; border-radius: 8px; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.tr-link:hover { background: var(--fill); }
.tr-n { flex: 0 0 auto; min-width: 20px; text-align: right; white-space: nowrap; font-weight: 700; color: var(--ink2); font-variant-numeric: tabular-nums; }
.tr-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-mv, .tr-q { flex: 0 0 auto; font-size: var(--fs-13); font-variant-numeric: tabular-nums; }
.tr-mv.up { color: var(--red); } .tr-mv.down { color: var(--blue); } .tr-mv.new { color: var(--orange-ink); font-weight: 700; } .tr-mv.same { color: var(--ink2); }
.tr-q { color: var(--ink2); }
.tr-rank { height: 20px; margin-right: 4px; vertical-align: 1px; }
.np-checks { display: flex; flex-wrap: wrap; gap: 8px 20px; }

@media (max-width: 760px) { .tr-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; } }
/* 도매매 검색 줄: 찾기 옆 '인기 TOP100' (11-11 사장님) · 보낼 곳 단계 창 */
@media (min-width: 521px) { .bt-filters.has-btn.has-top { grid-template-columns: calc((100% - 24px) / 3) 1fr auto auto; } }
@media (max-width: 520px) { .bt-filters.has-btn.has-top { grid-template-columns: 1fr auto; } .bt-filters.has-top .tr-top { grid-column: 1 / -1; } }
.tr-top { white-space: nowrap; }
.dest-dlg { width: min(640px, calc(100vw - 32px)); }
.dest-dlg .np-pick { margin-top: 4px; }
/* 화면 전용 오른쪽 칸: 넓은 화면은 오른쪽, 좁은 화면(1023px 아래)은 본문 안 .side-inline 으로 (11-11 사장님) */
.side-inline { display: none; }
@media (max-width: 1023px) { .side-inline { display: block; margin-bottom: 16px; } }
.side-sec + .side-sec { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.side-page .tr-kw { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.side-page .hm-story { padding: 0; background: none; margin: 0; }
.side-page .hm-story li a { font-size: var(--fs-13); flex-wrap: wrap; gap: 2px 8px; }
/* 상품 상세 팝업 탭 (11-11 사장님) */
.pd-tabs { position: sticky; top: -1px; z-index: 2; display: flex; gap: 4px; margin: 0 0 12px; padding: 4px; border-radius: 12px; background: var(--fill); }
.pd-tabs button { flex: 1; height: 40px; border: 0; border-radius: 9px; background: none; color: var(--ink2); font: inherit; font-weight: 600; cursor: pointer; }
.pd-tabs button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
/* 고르기 칸: 머리글(가운데)과 줄(왼쪽) 정렬이 달라 칸이 넓어지면 어긋났음 → 둘 다 가운데·여백 0 (11-11 사장님) */
.bt-table th.th-chk, .bt-table td.m-chk { text-align: center; }
.bt-table td.m-chk input[type=checkbox], .bt-table th.th-chk input { margin: 0; vertical-align: middle; }
/* 사이드바(320px)에서 글씨가 커 '…'으로 잘렸음 → 한 단계 작게, 잘라 내지 않고 두 줄까지 (11-11 사장님) */
.side-page .tr-link { font-size: var(--fs-14, 14px); min-height: 28px; padding: 3px 4px; gap: 6px; align-items: flex-start; }
.side-page .tr-n { min-width: 16px; font-size: var(--fs-13); line-height: 1.5; }
.side-page .tr-t { white-space: normal; text-overflow: clip; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; line-height: 1.45; word-break: keep-all; overflow-wrap: anywhere; }
.side-page .tr-mv, .side-page .tr-q { font-size: 12px; line-height: 1.7; }
.side-page .tr-kw { column-gap: 4px; }
.side-page .side-head h2 { font-size: var(--fs-15); }
/* 쇼핑몰 이름 알약: 쇼핑몰 대표색 (11-11 사장님). 한 곳에서 정하고 모든 알약(.chip·.np-mall 고르기)에 같이 씀 */
:root { --m-naver: #03c75a; --m-coupang: #d61e02; --m-st11: #ff0237; --m-auction: #eb000a; --m-gmarket: #01b9ad; }   /* 로고에서 뽑은 색 (11-11) */
/* 알약 맨 앞 쇼핑몰 로고 (11-11 사장님). 파비콘을 흰 바탕 네모에 */
:is(.chip, .np-mall span):is(.m-naver, .m-coupang, .m-st11, .m-auction, .m-gmarket)::before,
:is(.np-mall.m-naver, .np-mall.m-coupang, .np-mall.m-st11, .np-mall.m-auction, .np-mall.m-gmarket) span::before { content: ''; flex: 0 0 auto; width: 16px; height: 16px; margin-right: 5px; border-radius: 4px;
  background-color: #fff; background-position: center; background-size: 14px 14px; background-repeat: no-repeat; }   /* 줄임형 background 는 로고 그림까지 지워서 (11-12 흰 네모) */
.chip.m-naver::before, .np-mall.m-naver span::before { background-image: url(/static/mall/naver.png); }
.chip.m-coupang::before, .np-mall.m-coupang span::before { background-image: url(/static/mall/coupang.png); }
.chip.m-st11::before, .np-mall.m-st11 span::before { background-image: url(/static/mall/st11.png); }
.chip.m-auction::before, .np-mall.m-auction span::before { background-image: url(/static/mall/auction.png); }
.chip.m-gmarket::before, .np-mall.m-gmarket span::before { background-image: url(/static/mall/gmarket.png); }
.chip.m-naver, .np-mall.m-naver input:checked + span { background: var(--m-naver); color: #fff; }
.chip.m-coupang, .np-mall.m-coupang input:checked + span { background: var(--m-coupang); color: #fff; }
.chip.m-st11, .np-mall.m-st11 input:checked + span { background: var(--m-st11); color: #fff; }
.chip.m-auction, .np-mall.m-auction input:checked + span { background: var(--m-auction); color: #fff; }
.chip.m-gmarket, .np-mall.m-gmarket input:checked + span { background: var(--m-gmarket); color: #fff; }
/* 미리 보기 상품 줄: 상자 안에서 스크롤 (11-11 사장님) */
.mr-card .mr-list { max-height: calc(100vh - 260px); min-height: 240px; overflow-y: auto; margin-right: -8px; padding-right: 8px; }
.mr-tabs button em { font-style: normal; margin-left: 2px; color: var(--ink3); }
.mr-tabs button.late em { color: var(--red); }
.mr-row[hidden] { display: none !important; }
@media (max-width: 1023px) { .mr-card .mr-list { max-height: 70vh; } }

/* 미리 보기 상품명 고치기 (11-11) */
.mr-name { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mr-name input { flex: 1 1 320px; min-width: 0; height: 36px; }
/* 미리 보기: 자동으로 뺀 말 · 원래대로 (11-12 사장님) */
.mr-cut form.inline { display: inline; margin: 0 0 0 6px; }
.mr-cut .linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--blue-soft-ink); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
/* 미리 보기 지우기 (11-12) */
.btn.text.danger-text { color: var(--red); }
.btn.text.danger-text:hover { background: var(--red-soft); color: var(--red); }
.banner form.inline { display: inline; margin-left: 8px; }
/* 클레임·문의 목록: 칸마다 칠하면 칸 사이 틈이 띠처럼 보여서 줄 전체를 한 번에 칠함 (11-12 사장님) */
.cs-list.cs-table tbody tr.lg-row:hover td, .cs-list tbody tr:hover td { background: transparent; }
.cs-list tbody tr { border-radius: 12px; transition: background-color .12s; }
.cs-list tbody tr:hover { background: var(--fill); cursor: pointer; }

/* 홈 주문 흐름 · 기한 위험 (11-12 사장님 홈 개선 1단계) */
.hm-sec-h { font-size: var(--fs-15); font-weight: 700; margin: 0 0 10px; color: var(--ink); }
.hm-flow, .hm-risk { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 16px; }
.hm-flow ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
.hm-flow li { position: relative; min-width: 0; }
.hm-flow li + li::before { content: '›'; position: absolute; left: -6px; top: 50%; transform: translateY(-50%); color: var(--ink3); font-size: 20px; }
.hm-flow a { display: flex; flex-direction: column; gap: 4px; padding: 6px 16px; color: inherit; text-decoration: none; border-radius: 12px; }
.hm-flow a:hover { background: var(--fill); }
.hm-flow span { font-size: var(--fs-13); color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-flow span em { font-style: normal; color: var(--ink3); }
.hm-flow b { font-size: 26px; line-height: 1.2; color: var(--ink); }
.hm-flow b small, .hm-rk b small { font-size: 13px; font-weight: 600; margin-left: 2px; color: var(--ink2); }
.hm-flow li.zero b { color: var(--ink3); }
.hm-flow li.hot b { color: var(--red); }
.hm-risk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.hm-rk { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--fill); color: inherit; text-decoration: none; min-width: 0; }
.hm-rk span { font-size: var(--fs-13); color: var(--ink2); }
.hm-rk b { font-size: 22px; line-height: 1.25; }
.hm-rk em { font-style: normal; font-size: 12px; color: var(--ink3); }
.hm-rk.bad { background: var(--red-soft); } .hm-rk.bad b { color: var(--red); }
.hm-rk.warn { background: var(--orange-soft); } .hm-rk.warn b { color: var(--orange-ink); }
.hm-rk.zero b { color: var(--ink3); }
.hm-risk.calm { padding: 14px 20px; } .hm-risk.calm .hm-sec-h { display: inline; margin-right: 10px; }
.hm-calm { display: inline; margin: 0; color: var(--ink2); font-size: var(--fs-13); }
@media (max-width: 760px) {
  .hm-flow ol { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .hm-flow li + li::before { display: none; }
  .hm-flow a { padding: 8px 10px; background: var(--fill); }
  .hm-flow b { font-size: 22px; }
  .hm-risk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-flow, .hm-risk { padding: 14px; }
}

/* 쇼핑몰 등록 미리 보기 표 (11-12 사장님 '전체 너비, 표만 보면 한눈에') */
.mr-card .mr-wrap { max-height: none; overflow-x: auto; }
.mr-card > .h-row { flex-wrap: wrap; gap: 8px 16px; }
.mr-tbl { width: 100%; font-size: var(--fs-13); border-collapse: separate; border-spacing: 0; }
.mr-tbl.rank-table td { white-space: normal; }   /* 표 공통 한 줄 규칙 대신 칸 안에서 줄바꿈 (숫자·칩만 한 줄) */
.mr-tbl.rank-table td.num, .mr-tbl.rank-table td.mr-act { white-space: nowrap; }
.mr-tbl thead th { position: sticky; top: 0; z-index: 1; background: var(--card, #fff); font-weight: 600; color: var(--ink3); font-size: var(--fs-12, 12px);
  text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.mr-tbl thead th.r, .mr-tbl td.r { text-align: right; }
.mr-tbl td { padding: 10px 8px; vertical-align: top; border-bottom: 1px solid var(--line); }
.mr-tbl tbody.mr-row:not(.mr-first) td { border-top: 0; }
.mr-tbl tbody.mr-first tr:first-child td { border-top: 1px solid var(--line-strong, var(--line)); }
.mr-tbl tbody.mr-row:not(.mr-first) tr:first-child td { padding-top: 6px; }
.mr-tbl tbody.mr-row:hover td { background: var(--fill-soft, rgba(0,0,0,.015)); }
.mr-tbl .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mr-c-prod { width: 26%; min-width: 200px; }
.mr-c-cat { width: 22%; min-width: 150px; }
.mr-c-note { width: 26%; min-width: 170px; }
.mr-prod { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.mr-tbl .mr-img { width: 44px; height: 44px; border-radius: 8px; }
.mr-pt { min-width: 0; display: grid; gap: 2px; }
.mr-pt .t { font-weight: 600; color: var(--ink); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.mr-sub { display: block; font-size: var(--fs-12, 12px); color: var(--ink3); overflow-wrap: anywhere; }
.mr-sub.mr-warn { color: var(--orange-ink); font-weight: 600; }
.mr-same { color: var(--ink4, var(--ink3)); padding-left: 54px; }
.mr-cat { display: block; color: var(--ink); overflow-wrap: anywhere; }
.mr-msg { display: block; overflow-wrap: anywhere; line-height: 1.45; }
.mr-msg + .mr-msg { margin-top: 3px; }
.mr-msg.stop { color: var(--red); font-weight: 600; }
.mr-msg.warn { color: var(--ink3); }
.mr-msg.done { color: var(--ink); }
.mr-act { white-space: nowrap; }
.mr-btns { display: inline-flex; flex-direction: column; align-items: stretch; gap: 4px; }
.mr-btns .btn { justify-content: center; height: 26px; min-height: 26px; padding: 0 10px; font-size: var(--fs-12, 12px); border-radius: 7px; }
.mr-tbl tr.mr-edit td { padding: 0 10px; border-bottom: 0; background: var(--fill-soft, rgba(0,0,0,.02)); }
.mr-tbl tr.mr-edit:not(.open) { display: none; }
.mr-tbl tr.mr-edit.open td { padding: 12px 10px 14px; border-bottom: 1px solid var(--line); }
.mr-tbl tr.mr-edit .mr-fix { margin-top: 0; }
.mr-tbl tr.mr-edit .mr-name:not([hidden]) { margin-top: 8px; }
.mr-tbl .linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: var(--fs-12, 12px); color: var(--blue-soft-ink); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.mr-tbl form.inline { display: inline; }
/* 휴대폰: 줄마다 카드 (칸 이름을 앞에) */
@media (max-width: 760px) {
  .mr-tbl thead { display: none; }
  .mr-tbl, .mr-tbl tbody, .mr-tbl tr, .mr-tbl td { display: block; width: auto; min-width: 0; }
  .mr-tbl tbody.mr-row { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; padding: 10px 12px; }
  .mr-tbl tbody.mr-row td, .mr-tbl tbody.mr-first tr:first-child td { border: 0; padding: 3px 0; }
  .mr-tbl td[data-th]:not(.mr-c-prod)::before { content: attr(data-th); display: inline-block; min-width: 64px; color: var(--ink3); font-size: var(--fs-12, 12px); }
  .mr-tbl td.r { text-align: left; }
  .mr-tbl td.mr-c-note .mr-msg { display: block; }
  .mr-same { display: none; }
  .mr-tbl tbody.mr-row:not(.mr-first) td.mr-c-prod:not(:has(.mr-sub, form)) { display: none; }   /* 같은 상품 둘째 쇼핑몰 카드: 빈 상품 칸 숨김 */
  .mr-btns { flex-direction: row; flex-wrap: wrap; }
  .mr-tbl tr.mr-edit.open td { padding: 10px 0 0; background: none; }
}
.mr-tbl tbody.mr-row[data-st="skip"] tr:first-child td:not(.mr-c-prod) { opacity: .5; }   /* 건너뛴 줄(지우고 다시 올린 옛 줄 등)은 흐리게 */

/* 발주 확인: 고객 옵션과 도매매 옵션에서 다른 글자만 노란 형광펜 (11-16 사장님) */
mark.pu-diff { background: #ffe500; color: #111; box-shadow: 0 0 0 1px #e6c200; border-radius: 2px; padding: 0 1px;
  animation: pu-diff-blink 1s steps(1, end) infinite; }
/* 형광펜 뒤 바탕만 깜빡임: 진한 노랑 ↔ 옅은 노랑 (글자는 늘 진한 색이라 어두운 화면에서도 읽힘). 줄을 확인 체크하면 멈춤 */
@keyframes pu-diff-blink { 0%, 100% { background: #ffe500; box-shadow: 0 0 0 1px #e6c200; } 50% { background: #fff9c4; box-shadow: 0 0 0 1px #fff9c4; } }
.pu-eye.seen mark.pu-diff { animation: none; }
@media (prefers-reduced-motion: reduce) { mark.pu-diff { animation: none; } }

/* 디자인 규칙 (2026-11-16 사장님: "체크박스 사이가 너무 가깝고, 발주버튼 밑에 텍스트가 버튼이랑 너무 붙어있어. 디자인 규칙으로 정해서 다른 페이지에서도"):
   1) 폼·카드에 바로 놓인 체크 항목은 한 줄에 하나씩, 사이 8px (화면별 inline-flex 가 둘을 한 줄에 붙였음)
   2) 단추 줄(.row-actions) 아래 안내 글은 위로 8px 띄움. docs/디자인_지침.md 에 같은 규칙 */
main :is(form, section, .card) > label.check { display: flex !important; }
main :is(form, section, .card) > label.check + label.check { margin-top: 8px !important; }
main .row-actions ~ p { margin-top: 8px; }

/* 2단계 인증 안내 띠: 다른 안내처럼 상자 안에, 단추는 오른쪽 가운데 (11-17 사장님 '여기도 박스 쳐줘') */
.banner.twofa-band { align-items: center; }
.banner.twofa-band > span { flex: 1 1 auto; min-width: 0; }
.banner.twofa-band > .btn { flex: 0 0 auto; margin-left: auto; white-space: nowrap; }

/* 계정 아이콘: 메뉴를 열면 파란 테두리(바깥 2px)가 다른 아이콘과 줄이 어긋나 보였음 (11-17 사장님 '사람 아이콘 정렬이 이상').
   열린 동안은 다른 아이콘 hover 와 같은 바탕, 키보드 테두리는 안쪽에 */
.me-menu[open] > summary { background: var(--fill); color: var(--ink); outline: none; }
/* 사파리는 누른 뒤 메뉴를 닫아도 summary 에 포커스 테두리(바깥으로 튀어나온 파란 네모)를 남김 (11-17 다시 지적): 바깥 테두리는 아예 쓰지 않고
   키보드로 고를 때만 단추 안쪽 선으로 */
.me-menu > summary:focus, .me-menu > summary:focus-visible { outline: none; }
.me-menu > summary:focus-visible { box-shadow: inset 0 0 0 2px var(--blue); }
