/* 오더몽 브랜드 팔레트 — 크림 베이지 · 라떼 브라운 · 에스프레소 브라운 */
:root {
  --bg: #fcfaf6;
  --card: #ffffff;
  --ink: #3d2817;
  --ink-2: #5b4633;
  --muted: #8a735e;
  --muted-2: #ab9784;
  --line: #eadfce;
  --line-2: #f2e9dc;
  --brand: #5b3a1e;
  --brand-2: #7c5230;
  --brand-soft: #f7ede0;
  --green: #059669;
  --green-soft: #ecfdf5;
  --amber: #b45309;
  --amber-soft: #fffbeb;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --cyan: #0e7490;
  --cyan-soft: #ecfeff;
  /* 보라 대신 쓰는 카카오/모카 브라운 — 상태 구분은 그대로 유지 */
  --violet: #8a5a2b;
  --violet-soft: #f7ecdc;
  --blue: #1d4ed8;
  --blue-soft: #eff6ff;
  --slate-soft: #f4eee4;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(93, 64, 35, .06);
  --shadow: 0 8px 24px rgba(93, 64, 35, .08);
  --shadow-lg: 0 24px 60px rgba(72, 46, 22, .18);
  --sidebar-w: 244px;
  font-synthesis-weight: none;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.layout { display: flex; align-items: stretch; min-height: 100vh; }

/* ───────── 사이드바 ─────────
   .sidebar = 배경·구분선을 페이지 끝까지 채우는 기둥(전체 높이)
   .sidebar-inner = 화면에 붙어 따라오는 내용(스티키 · 100vh) */
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  align-self: stretch;
  min-height: 100vh;
  height: auto;
  background: linear-gradient(178deg, #f9f3e8 0%, #f4ebdb 52%, #f0e4d1 100%);
  color: #5b4633;
  border-right: 1px solid #e6d8c3;
  box-shadow: 1px 0 0 rgba(255, 255, 255, .6) inset;
}
.sidebar-inner {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px 16px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.brand { display: flex; align-items: center; gap: 11px; padding: 0 6px; }
.brand-logo {
  width: 42px; height: 42px; border-radius: 13px;
  object-fit: cover; display: block; flex: 0 0 42px;
  background: #fcedd6;
  box-shadow: 0 6px 14px rgba(150, 108, 62, .16), 0 0 0 1px rgba(203, 170, 128, .4) inset;
}
.brand-text { min-width: 0; }
.brand-wordmark { display: block; height: 30px; width: auto; max-width: 150px; margin: -5px 0 1px -2px; }
.brand strong { display: block; color: #3d2817; font-size: 15.5px; letter-spacing: -.2px; }
.brand span { display: block; font-size: 11px; color: #8a735e; margin-top: 1px; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-label { font-size: 10.5px; letter-spacing: .12em; color: #a58e75; padding: 6px 10px 4px; text-transform: uppercase; }
.nav button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 12px; border: 0; border-radius: 10px;
  background: transparent; color: #6b5540; font-size: 13.5px; text-align: left;
  transition: background .15s, color .15s, box-shadow .15s;
}
.nav button .ic { width: 18px; text-align: center; font-size: 15px; opacity: .85; }
.nav button .nav-count {
  margin-left: auto; font-size: 11px; font-weight: 700;
  background: rgba(124, 82, 48, .14); color: #6b4423;
  border-radius: 999px; padding: 1px 7px; min-width: 20px; text-align: center;
}
.nav button:hover { background: rgba(124, 82, 48, .08); color: #3d2817; }
.nav button.active {
  background: linear-gradient(92deg, #5c3d24 0%, #6b4423 100%);
  color: #fdf6ea; font-weight: 650;
  box-shadow: inset 2px 0 0 rgba(253, 238, 212, .55), 0 6px 14px rgba(91, 58, 30, .18);
}
.nav button.active .ic { opacity: 1; }
.nav button.active .nav-count { background: rgba(253, 246, 234, .22); color: #fdf6ea; }

.sidebar-foot {
  margin-top: auto; font-size: 11px; color: #8a735e;
  border-top: 1px solid rgba(124, 82, 48, .16);
  padding-top: 14px; display: flex; flex-direction: column; gap: 6px;
}
.sidebar-foot .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #34d399; margin-right: 6px; }
.foot-mascot {
  display: flex; align-items: center; gap: 7px; margin-top: 2px;
  padding: 7px 9px; border-radius: 10px;
  background: rgba(255, 252, 245, .72); border: 1px solid rgba(196, 160, 112, .38);
  color: #7a5a38; font-size: 10.5px;
}
.foot-mascot img { width: 22px; height: 22px; border-radius: 7px; object-fit: cover; flex: 0 0 22px; }

/* 오더몽 환영 배너 */
.welcome {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 14px; padding: 14px 18px; border-radius: 16px;
  background: radial-gradient(120% 170% at 0% 0%, #fdf7ec 0%, #f7ecda 55%, #f1e2ca 100%);
  color: #4b3d2e; border: 1px solid #e9d9bf; box-shadow: 0 10px 26px rgba(120, 96, 64, .10);
}
.welcome-mascot {
  width: 62px; height: 62px; border-radius: 16px; object-fit: cover; flex: 0 0 62px;
  background: #f7eddb; box-shadow: 0 6px 16px rgba(120, 96, 64, .18), 0 0 0 1px rgba(214, 188, 150, .6) inset;
}
.welcome-body { min-width: 0; }
.welcome-title { font-size: 14.5px; font-weight: 700; color: #40332a; letter-spacing: -.2px; }
.welcome-sub { margin-top: 3px; font-size: 12px; color: #7d6a54; }
.welcome-sub b { color: #b4762a; font-weight: 700; }
.welcome-logo { margin-left: auto; flex: 0 0 auto; height: 40px; width: auto; max-width: 190px; opacity: .95; }
.welcome-tag {
  margin-left: auto; flex: 0 0 auto; font-size: 10.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: #a97a35; background: rgba(214, 178, 128, .18);
  border: 1px solid rgba(190, 155, 108, .38); border-radius: 999px; padding: 5px 10px;
}
@media (max-width: 720px) {
  .welcome { flex-wrap: wrap; }
  .welcome-tag, .welcome-logo { margin-left: 0; }
}

/* ───────── 본문 ───────── */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: 22px 28px 16px;
}
.topbar h1 { margin: 0; font-size: 21px; letter-spacing: -.4px; }
.topbar p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }
.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.view { padding: 0 28px 40px; }

/* ───────── 버튼 ───────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  border-radius: 9px; padding: 8px 12px; font-size: 12.5px; font-weight: 600;
  transition: border-color .15s, background .15s, transform .05s;
  white-space: nowrap;
}
.btn:hover { border-color: #d9c7ab; background: #fdf8f0; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fdf6ea; box-shadow: 0 4px 12px rgba(91, 58, 30, .22); }
.btn.primary:hover { background: #4a2f18; border-color: #4a2f18; }
.btn.dark { background: #3d2817; border-color: #3d2817; color: #fdf6ea; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--slate-soft); color: var(--ink); }
.btn.sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.btn.xs { padding: 4px 8px; font-size: 11.5px; border-radius: 7px; }
.btn.danger { color: var(--red); border-color: #fecaca; background: #fff; }
.btn.danger:hover { background: var(--red-soft); }

/* ───────── 카드/그리드 ───────── */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); min-width: 0;
}
.card-hd {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 16px 18px 0;
}
.card-hd h3 { margin: 0; font-size: 14.5px; letter-spacing: -.2px; display: flex; align-items: center; gap: 8px; }
.card-hd .sub { color: var(--muted); font-size: 12px; font-weight: 400; }
.card-bd { padding: 16px 18px 18px; }

.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 15px 15px 13px; overflow: hidden;
  cursor: pointer; transition: box-shadow .15s, border-color .15s, transform .1s;
}
.kpi:hover { box-shadow: var(--shadow); border-color: #e2d3bd; transform: translateY(-1px); }
.kpi .kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi .kpi-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi .kpi-ic {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 13px;
}
.kpi .kpi-value { font-size: 27px; font-weight: 800; letter-spacing: -.8px; margin-top: 6px; line-height: 1.1; }
.kpi .kpi-value .unit { font-size: 12px; font-weight: 600; color: var(--muted-2); margin-left: 3px; letter-spacing: 0; }
.kpi .kpi-sub { font-size: 11.5px; color: var(--muted-2); margin-top: 4px; }
.kpi::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--accent, transparent); }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px;
  white-space: nowrap; line-height: 1.6;
}
.tone-blue { background: var(--blue-soft); color: var(--blue); }
.tone-violet { background: var(--violet-soft); color: var(--violet); }
.tone-amber { background: var(--amber-soft); color: var(--amber); }
.tone-cyan { background: var(--cyan-soft); color: var(--cyan); }
.tone-green { background: var(--green-soft); color: var(--green); }
.tone-red { background: var(--red-soft); color: var(--red); }
.tone-slate { background: var(--slate-soft); color: #6b5540; }
.badge.channel { background: #fbf7f0; border: 1px solid var(--line); color: var(--ink-2); }
.badge.channel .dot { width: 6px; height: 6px; border-radius: 50%; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* 채널 요약 */
.channel-table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 620px; }
.channel-table th {
  text-align: right; font-size: 11px; color: var(--muted); font-weight: 600;
  padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.channel-table th:first-child, .channel-table td:first-child { text-align: left; }
.channel-table td { text-align: right; padding: 11px 6px; border-bottom: 1px solid var(--line-2); }
.channel-table tr:last-child td { border-bottom: 0; }
.channel-table .num { font-variant-numeric: tabular-nums; font-weight: 700; }
.channel-table .num.zero { color: #d6c7b4; font-weight: 500; }
.channel-name { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.channel-name .dot { width: 8px; height: 8px; border-radius: 3px; }

/* 긴급 리스트 */
.urgent-list { display: flex; flex-direction: column; }
.urgent-item {
  display: flex; gap: 11px; align-items: flex-start; padding: 11px 4px;
  border-bottom: 1px dashed var(--line); cursor: pointer;
}
.urgent-item:last-child { border-bottom: 0; }
.urgent-item:hover { background: #fdf8f0; }
.urgent-ic {
  flex: 0 0 30px; width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center; font-size: 13px;
}
.urgent-body { min-width: 0; flex: 1; }
.urgent-title { font-size: 12.5px; font-weight: 650; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.urgent-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.urgent-time { font-size: 11px; font-weight: 700; white-space: nowrap; }
.urgent-time.over { color: var(--red); }
.urgent-time.soon { color: var(--amber); }
.urgent-time.ok { color: var(--muted); }
.empty { text-align: center; color: var(--muted-2); font-size: 12.5px; padding: 26px 10px; }
.empty .big { font-size: 26px; display: block; margin-bottom: 6px; opacity: .5; }

/* 처리 내역 */
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-item { display: flex; gap: 12px; padding: 9px 2px; position: relative; }
.tl-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: #d9c4a4; margin-top: 6px; }
.tl-body { min-width: 0; }
.tl-title { font-size: 12.5px; font-weight: 650; }
.tl-meta { font-size: 11.5px; color: var(--muted); margin-top: 1px; }

/* ───────── 필터/툴바 ───────── */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.toolbar .spacer { flex: 1; }
.seg { display: inline-flex; background: #f4ece0; border-radius: 10px; padding: 3px; gap: 2px; }
.seg button {
  border: 0; background: transparent; padding: 7px 12px; border-radius: 8px;
  font-size: 12.5px; font-weight: 650; color: #8a735e;
}
.seg button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.seg button .cnt { font-size: 10.5px; color: var(--muted-2); margin-left: 4px; }

.field { display: inline-flex; align-items: center; gap: 6px; }
.input, .select, textarea.input {
  border: 1px solid var(--line); background: #fff; border-radius: 9px;
  padding: 8px 11px; font-size: 12.5px; outline: none; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, textarea.input:focus {
  border-color: #c79a63; box-shadow: 0 0 0 3px rgba(199, 154, 99, .18);
}
.search { position: relative; }
.search .input { padding-left: 32px; width: 260px; }
.search .mag { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted-2); font-size: 13px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }

.actionbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: #f8f1e4; border: 1px solid #ecdbc2; border-radius: 12px;
  padding: 9px 12px; margin-bottom: 12px;
}
.actionbar .sel { font-size: 12.5px; font-weight: 700; color: #6b4423; margin-right: 4px; }

/* ───────── 테이블 ───────── */
.table-wrap { overflow: auto; border-radius: var(--radius); }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; min-width: 900px; }
table.data thead th {
  position: sticky; top: 0; background: #f8f2e8; z-index: 1;
  text-align: left; font-size: 11px; letter-spacing: .02em; color: var(--muted);
  font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data tbody td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.data tbody tr { cursor: pointer; transition: background .12s; }
table.data tbody tr:hover { background: #fdf9f3; }
table.data tbody tr.selected { background: #f8f0e4; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
table.data .muted { color: var(--muted); }
table.data .strong { font-weight: 700; }
.cell-stack { display: flex; flex-direction: column; gap: 2px; }
.cell-stack .sub { font-size: 11.5px; color: var(--muted); }
.cell-product { max-width: 230px; }
.cell-product .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-addr { max-width: 240px; font-size: 12px; color: var(--ink-2); }
.cell-addr .sub { color: var(--muted); font-size: 11.5px; }
.tracking { font-size: 11.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tracking .carrier { color: var(--muted); }
.iconbtn {
  border: 1px solid var(--line); background: #fff; border-radius: 7px;
  width: 26px; height: 26px; display: grid; place-items: center; font-size: 12px; color: var(--muted);
}
.iconbtn:hover { background: var(--slate-soft); color: var(--ink); }
input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }

.tag { display: inline-block; font-size: 10.5px; font-weight: 700; border-radius: 5px; padding: 1px 5px; }
.tag.cut { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.tag.general { background: #faf6ef; color: #7a6552; border: 1px solid var(--line); }
.merge-pill {
  display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 800;
  background: #fef3c7; color: #92400e; border-radius: 999px; padding: 2px 7px;
}

/* ───────── 드로어 ───────── */
.overlay {
  position: fixed; inset: 0; background: rgba(61, 40, 23, .38);
  backdrop-filter: blur(1.5px); z-index: 40;
  animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 480px; max-width: 94vw;
  background: #fff; z-index: 50; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  animation: slide .2s cubic-bezier(.2, .8, .3, 1);
}
@keyframes slide { from { transform: translateX(30px); opacity: .4; } }
.drawer-hd { padding: 18px 20px 14px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: flex-start; }
.drawer-hd h3 { margin: 0; font-size: 15.5px; }
.drawer-hd .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.drawer-bd { padding: 18px 20px 26px; overflow: auto; flex: 1; }
.drawer-ft { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; background: #fbf7f0; }
.x { margin-left: auto; border: 0; background: transparent; font-size: 18px; color: var(--muted); width: 30px; height: 30px; border-radius: 8px; }
.x:hover { background: var(--slate-soft); }

.kv { display: grid; grid-template-columns: 96px 1fr; gap: 8px 10px; font-size: 12.5px; }
.kv dt { color: var(--muted); font-weight: 500; }
.kv dd { margin: 0; color: var(--ink); word-break: break-all; }
.section-title { font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: .04em; margin: 20px 0 10px; text-transform: uppercase; }
.section-title:first-child { margin-top: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.form-row.full { grid-template-columns: 1fr; }
.form-row label { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.form-row .input, .form-row .select, .form-row textarea { width: 100%; }

.note {
  border-radius: 10px; padding: 10px 12px; font-size: 12px; line-height: 1.55;
  display: flex; gap: 8px; align-items: flex-start;
}
.note.warn { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.note.info { background: #eff4fb; color: #33578f; border: 1px solid #dde7f5; }
.note.ok { background: var(--green-soft); color: #065f46; border: 1px solid #a7f3d0; }

/* ───────── 채팅형 CS ───────── */
.chat { display: flex; flex-direction: column; gap: 10px; }
.bubble { border-radius: 12px; padding: 11px 13px; font-size: 12.5px; line-height: 1.62; white-space: pre-wrap; }
.bubble.customer { background: #f4efe6; color: var(--ink-2); border-top-left-radius: 4px; }
.bubble.answer { background: var(--brand-soft); color: #4f351a; border-top-right-radius: 4px; }
.bubble .who { font-size: 11px; font-weight: 800; opacity: .7; margin-bottom: 4px; display: block; }
.tpl-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.tpl-chip {
  border: 1px solid #e6d6bd; background: #fff; border-radius: 999px;
  padding: 5px 10px; font-size: 11.5px; color: var(--ink-2);
}
.tpl-chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

/* ───────── 설정 ───────── */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.provider-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 16px 18px 0; }
.provider-hd h3 { margin: 0; font-size: 14px; display: flex; align-items: center; gap: 7px; }
.provider-hd .sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.switch { position: relative; width: 38px; height: 22px; flex: 0 0 38px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; background: #cfbca4; border-radius: 999px; transition: .2s;
}
.switch .slider::before {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; left: 3px; top: 3px; transition: .2s;
}
.switch input:checked + .slider { background: var(--brand); }
.switch input:checked + .slider::before { transform: translateX(16px); }
.provider-bd { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.provider-bd .field-row label { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.provider-bd .field-row .input { width: 100%; }
.provider-actions { display: flex; gap: 8px; align-items: center; margin-top: 2px; }
.provider-actions .result { font-size: 11.5px; color: var(--muted); }
.pill { font-size: 10.5px; font-weight: 800; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.pill.on { background: var(--green-soft); color: var(--green); }
.pill.off { background: var(--slate-soft); color: #7a6552; }
.pill.warn { background: var(--amber-soft); color: var(--amber); }
.pill.live { background: var(--brand); color: #fdf6ea; }
.h3-pills { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ───────── 원클릭 연동 마법사 ───────── */
.wizard-summary {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff 0%, #fbf3e7 100%);
  box-shadow: var(--shadow-sm); padding: 18px 20px 16px; margin-bottom: 16px;
}
.ws-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ws-title { display: flex; align-items: baseline; gap: 8px; font-size: 15px; font-weight: 800; color: var(--ink); }
.ws-num { font-size: 22px; font-weight: 800; color: var(--brand); letter-spacing: -.5px; }
.ws-cap { font-size: 12px; font-weight: 700; color: var(--muted); }
.ws-sub { font-size: 11.5px; color: var(--muted); margin-top: 5px; line-height: 1.6; }
.ws-legend { display: inline-flex; flex-wrap: wrap; gap: 10px; margin-left: 8px; color: var(--muted-2); }
.ws-legend-box {
  display: flex; align-items: baseline; gap: 6px; font-size: 11px; font-weight: 700; color: var(--muted);
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 7px 12px;
}
.ws-legend-num { font-size: 18px; font-weight: 800; color: var(--brand); }
.ws-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.ws-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  border-radius: 999px; padding: 5px 12px;
}
.ws-chip b { font-weight: 800; color: var(--ink); }
.ws-chip.on { background: var(--green-soft); border-color: #a7f3d0; color: #065f46; }
.ws-chip.on b { color: #065f46; }
.ws-chip.test { background: var(--amber-soft); border-color: #fde68a; color: #92400e; }
.ws-chip.test b { color: #92400e; }
.ws-chip.off { background: #fff; border-style: dashed; color: var(--muted-2); }
.ws-chip.off b { color: var(--muted); }
.ws-mini { font-size: 10px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: rgba(93, 64, 35, .09); }
.ws-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.ws-progress { height: 6px; border-radius: 999px; background: #efe3d2; overflow: hidden; margin-top: 14px; }
.ws-progress > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #7c5230, #b5814c); transition: width .45s ease; }
.ws-next {
  margin-top: 11px; font-size: 11.5px; color: var(--ink-2); line-height: 1.65;
  background: #fff; border: 1px dashed var(--line); border-radius: 10px; padding: 8px 11px;
}

.wizard-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.wizard-bar .btn.portal { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.portal-host { font-size: 10.5px; font-weight: 600; color: var(--muted-2); }
.wizard-guide { border: 1px solid var(--line); background: #fdfaf5; border-radius: 12px; padding: 12px 14px; }
.wg-title { font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted-2); font-weight: 800; margin-bottom: 9px; }
.wg-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.wg-steps li { display: flex; gap: 9px; font-size: 12px; line-height: 1.6; color: var(--ink-2); }
.wg-num {
  flex: 0 0 20px; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: #fcf5e9;
  font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.wg-copy { margin-top: 11px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 11.5px; color: var(--muted); }
.wg-copy code { background: #f2e9db; border-radius: 6px; padding: 2px 7px; font-size: 11px; font-weight: 700; color: var(--brand); }
.wg-note { margin-top: 9px; font-size: 11.5px; line-height: 1.55; color: #92400e; background: var(--amber-soft); border-radius: 8px; padding: 7px 10px; }
.test-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.test-stamp { font-size: 10.5px; color: var(--muted-2); }
.btn.busy { opacity: .65; pointer-events: none; }
.provider-card[data-linked="1"] { border-color: #d7ecdf; }
.provider-card.flash, .card.flash { box-shadow: 0 0 0 3px rgba(181, 129, 76, .35); border-color: #c79a63; transition: box-shadow .2s; }
@media (max-width: 720px) {
  .ws-sep { display: none; }
  .ws-legend { margin-left: 0; }
}
.store-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.store-grid label { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.store-grid .input { width: 100%; }
.runtime-list { font-size: 12px; color: var(--ink-2); display: flex; flex-direction: column; gap: 8px; }
.runtime-list code { background: #f4eee4; border-radius: 6px; padding: 2px 6px; font-size: 11.5px; }

/* ───────── 모달/토스트/로딩 ───────── */
.modal-wrap { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; }
.modal {
  background: #fff; border-radius: 18px; width: 640px; max-width: 100%;
  max-height: 88vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
  animation: pop .18s ease;
}
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: .6; } }
.modal-hd { padding: 18px 20px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 10px; }
.modal-hd h3 { margin: 0; font-size: 16px; }
.modal-hd p { margin: 3px 0 0; font-size: 12px; color: var(--muted); }
.modal-bd { padding: 18px 20px; overflow: auto; }
.modal-ft { padding: 12px 20px 16px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); background: #fbf7f0; border-radius: 0 0 18px 18px; }

.toast-wrap { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #3d2817; color: #fdf6ea; border-radius: 10px; padding: 10px 16px; font-size: 12.5px;
  box-shadow: var(--shadow-lg); animation: toastIn .2s ease; max-width: 92vw;
}
.toast.ok { background: #064e3b; }
.toast.err { background: #7f1d1d; }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } }

.skeleton { height: 96px; border-radius: 14px; background: linear-gradient(90deg, #f2e9db, #fbf7f0, #f2e9db); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.hint { font-size: 11.5px; color: var(--muted-2); }
.mono { font-variant-numeric: tabular-nums; }
.text-cut { color: #c2410c; }

@media (max-width: 1280px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; flex: none; align-self: auto; min-height: 0; height: auto; }
  .sidebar-inner { position: static; height: auto; min-height: 0; padding: 12px 10px; gap: 10px; overflow: visible; }
  .nav { flex-direction: row; flex-wrap: wrap; overflow-x: auto; gap: 4px; padding-bottom: 2px; }
  .nav-label, .sidebar-foot { display: none; }
  .nav button { width: auto; white-space: nowrap; padding: 8px 9px; font-size: 12.5px; gap: 6px; }
  .nav button .nav-count { display: none; }
  .topbar { padding: 16px 16px 10px; flex-direction: column; align-items: flex-start; }
  .view { padding: 0 16px 30px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search .input { width: 100%; }
  .search { flex: 1; }
  .toolbar { gap: 8px; }
  .store-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}

/* ── 상품·재고(WMS) ─────────────────────────────── */
.stock-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.stock-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; box-shadow: var(--shadow-sm); }
.stock-card span { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.stock-card b { display: block; font-size: 17px; letter-spacing: -.4px; margin-top: 3px; }
.stock-card b i { font-style: normal; font-size: 11px; color: var(--muted); font-weight: 600; margin-left: 2px; }
.stock-card.warn { border-color: #fde68a; background: #fffdf5; }
.stock-card.warn b { color: var(--amber); }
.stock-card.danger { border-color: #fecaca; background: #fffafa; }
.stock-card.danger b { color: var(--red); }
.stock-pill { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: 12.5px; }
.stock-pill i { font-style: normal; font-size: 10px; padding: 1px 5px; border-radius: 5px; font-weight: 700; }
.stock-pill.ok i { background: var(--green-soft); color: var(--green); }
.stock-pill.low i { background: var(--amber-soft); color: var(--amber); }
.stock-pill.out i { background: var(--red-soft); color: var(--red); }
.stock-pill.low { color: var(--amber); }
.stock-pill.out { color: var(--red); }
.stock-mini { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); padding: 0 2px 8px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.stock-mini b { color: var(--ink-2); }
.chip { display: inline-block; font-size: 10.5px; padding: 1px 6px; border-radius: 6px; background: var(--brand-soft); color: var(--brand); font-weight: 650; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.field-group { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; margin-top: 4px; border-top: 1px dashed var(--line); padding-top: 10px; }
.provider-bd .field-switch { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); }
.provider-bd .select { width: 100%; }
.device-sim { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--amber); background: var(--amber-soft); border: 1px solid #fde68a; padding: 1px 6px; border-radius: 6px; font-weight: 700; }

@media (max-width: 1180px) {
  .stock-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .stock-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ══════════════════════════════════════════════════════════
   계정 게이트 (로그인 · 회원가입) — 오더몽 크림 베이지 톤
   ══════════════════════════════════════════════════════════ */
body:not(.authed) { background: #fbf5ea; }
body:not(.authed) .layout { display: none; }

#auth-root:empty { display: none; }
.auth-gate {
  position: fixed; inset: 0; z-index: 900;
  display: grid; grid-template-columns: 1.02fr .98fr;
  background:
    radial-gradient(1200px 600px at 12% 8%, #fdf8ee 0%, rgba(253, 248, 238, 0) 60%),
    linear-gradient(155deg, #f9f0e0 0%, #f5e9d6 48%, #f2e2cb 100%);
  color: #4a301a;
  overflow: hidden;
}
.auth-hero { position: relative; display: flex; align-items: center; justify-content: center; padding: 48px; }
.auth-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(160, 118, 66, .13) 1.4px, transparent 1.5px);
  background-size: 26px 26px; opacity: .5;
  mask-image: radial-gradient(circle at 40% 45%, #000 30%, transparent 72%);
}
.auth-hero-inner { position: relative; max-width: 420px; text-align: center; }
.auth-mascot { width: 232px; height: 232px; object-fit: contain; display: block; margin: 0 auto -4px;
  filter: drop-shadow(0 22px 30px rgba(120, 78, 36, .18)); mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(closest-side, #000 60%, rgba(0,0,0,.85) 74%, transparent 92%);
  mask-image: radial-gradient(closest-side, #000 60%, rgba(0,0,0,.85) 74%, transparent 92%); }
.auth-wordmark { width: 274px; max-width: 84%; height: auto; display: block; margin: 0 auto 10px; }
.auth-tagline { margin: 0 0 26px; font-size: 14.5px; line-height: 1.75; color: #7a5a38; font-weight: 600; letter-spacing: -.1px; }
.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; text-align: left; }
.auth-points li {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 253, 247, .82); border: 1px solid #ead9bf; border-radius: 13px;
  padding: 11px 14px; font-size: 12.8px; font-weight: 600; color: #5d4227;
  box-shadow: 0 6px 16px rgba(150, 108, 62, .06);
}
.auth-points li span { font-size: 15px; }

.auth-side { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 32px; }
.auth-card {
  width: 100%; max-width: 424px; background: #fffdf8; border: 1px solid #efe2cd;
  border-radius: 24px; padding: 26px 26px 22px;
  box-shadow: 0 30px 70px rgba(120, 82, 40, .13), 0 2px 0 #fff inset;
}
.auth-tabs { display: flex; gap: 6px; background: #f6ecdc; border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.auth-tabs button {
  flex: 1; border: 0; background: transparent; border-radius: 9px; padding: 9px 0;
  font-size: 13px; font-weight: 700; color: #8a6a45; transition: all .15s;
}
.auth-tabs button.on { background: #fffdf8; color: #4a301a; box-shadow: 0 2px 8px rgba(140, 96, 50, .14); }
.auth-form { display: grid; gap: 12px; }
.auth-form h2 { margin: 0; font-size: 20px; letter-spacing: -.4px; }
.auth-form h2 span { font-size: 16px; }
.auth-sub { margin: -4px 0 6px; font-size: 12.5px; color: #8a6a45; }
.auth-form label { display: grid; gap: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .2px; color: #7a5a38; text-transform: uppercase; }
.auth-form input {
  border: 1px solid #e7d7bf; background: #fffefb; border-radius: 11px; padding: 11px 13px;
  font-size: 13.5px; color: #3f2b17; transition: border-color .15s, box-shadow .15s;
}
.auth-form input::placeholder { color: #bda98f; }
.auth-form input:focus { outline: 0; border-color: #c79a63; box-shadow: 0 0 0 3px rgba(199, 154, 99, .18); }
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-submit {
  margin-top: 6px; border: 0; border-radius: 12px; padding: 13px 0;
  background: linear-gradient(160deg, #6b4522, #4a301a); color: #fff7ea;
  font-size: 14.5px; font-weight: 800; letter-spacing: -.2px;
  box-shadow: 0 10px 22px rgba(74, 48, 26, .26); transition: transform .12s, box-shadow .12s;
}
.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 14px 26px rgba(74, 48, 26, .3); }
.auth-submit:disabled { opacity: .7; transform: none; }
.auth-demo-btn {
  border: 1px dashed #d9bd94; background: #fdf6ea; border-radius: 11px; padding: 10px 0;
  font-size: 12.5px; font-weight: 700; color: #8a5a2b;
}
.auth-demo-btn:hover { background: #fbf0de; }
.auth-hint { margin: 2px 0 0; font-size: 11.5px; line-height: 1.7; color: #9a7a55; text-align: center; }
.auth-msg { margin-top: 14px; border-radius: 11px; padding: 10px 12px; font-size: 12.5px; font-weight: 600; }
.auth-msg.err { background: #fdecec; color: #a83232; border: 1px solid #f6d5d5; }
.auth-msg.ok { background: #eef8ee; color: #2f7a3f; border: 1px solid #d5ebd7; }
.auth-foot { margin: 18px 0 0; font-size: 11px; color: #a98c66; letter-spacing: .2px; }
.auth-foot span { opacity: .7; }

@media (max-width: 980px) {
  .auth-gate { grid-template-columns: 1fr; overflow-y: auto; position: fixed; }
  .auth-hero { padding: 30px 24px 0; }
  .auth-mascot { width: 150px; height: 150px; }
  .auth-wordmark { width: 210px; }
  .auth-tagline { margin-bottom: 16px; font-size: 13px; }
  .auth-points { display: none; }
  .auth-side { padding: 22px 18px 40px; }
}

/* ───────── 사이드바 프로필 ───────── */
.profile { display: grid; grid-template-columns: 34px 1fr auto; gap: 7px; align-items: center;
  background: rgba(255, 253, 248, .86); border: 1px solid #e8d8c0;
  border-radius: 12px; padding: 8px; box-shadow: 0 4px 12px rgba(150, 108, 62, .08); }
.profile-avatar { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  background: #f7eddb; font-size: 18px; }
.profile-body { min-width: 0; }
.profile-shop { font-size: 12px; font-weight: 800; color: #3d2817; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-meta { display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.profile-id { font-size: 10.5px; color: #8a735e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-logout { border: 1px solid #ddc9ac; background: #fffdf8; color: #6b4423;
  border-radius: 8px; padding: 3px 6px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.profile-logout:hover { background: #f7ede0; color: #3d2817; }
.plan-badge { font-size: 9.5px; font-weight: 900; letter-spacing: .4px; border-radius: 999px; padding: 1px 7px;
  text-transform: uppercase; border: 1px solid transparent; }
.plan-badge.plan-free { background: #f3ece1; color: #7a6552; border-color: #e6d9c6; }
.plan-badge.plan-lite { background: #f9efdd; color: #8a5a2b; border-color: #ecd9b9; }
.plan-badge.plan-pro { background: #4a301a; color: #fbf2e2; border-color: #4a301a;
  box-shadow: 0 1px 2px rgba(74, 48, 26, .18); }
.sidebar .plan-badge { background: rgba(124, 82, 48, .12); color: #6b4423; border-color: rgba(124, 82, 48, .22);
  box-shadow: none; }
.sidebar .plan-badge.plan-lite { background: rgba(160, 104, 52, .18); color: #7a4f28; border-color: rgba(160, 104, 52, .3); }
.sidebar .plan-badge.plan-pro { background: #4a301a; color: #fdf5e6; border-color: #4a301a; }
.foot-note { font-size: 10px; color: #a08a72; padding: 6px 4px 0; }
.foot-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #34d399; }

/* ───────── 마스터 콘솔 ───────── */
.nav-master { color: #8a5a2b !important; font-weight: 700; }
.nav-master .ic { filter: drop-shadow(0 1px 1px rgba(138, 90, 43, .25)); }
.nav-master.active { color: #fdf6ea !important; }
.master-head { display: grid; gap: 14px; margin-bottom: 16px; }
.master-hero { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, #2a1d10, #4a301a 60%, #63421f);
  color: #fdf5e6; border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.master-crown { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(255, 245, 224, .14); font-size: 24px; }
.master-title { font-size: 16.5px; font-weight: 800; letter-spacing: -.3px; }
.master-sub { font-size: 11.5px; color: #cbb392; margin-top: 2px; }
.master-hero .pill { margin-left: auto; background: rgba(52, 211, 153, .16); color: #6ee7b7; }
.master-plans { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plan-chip { font-size: 11px; font-weight: 800; border-radius: 999px; padding: 5px 11px; background: #fff; border: 1px solid var(--line); color: var(--ink-2);
  letter-spacing: .3px; }
.plan-chip b { margin-left: 4px; }
.plan-chip.plan-free { color: #7a6552; border-color: #e8dcc8; background: #fffdf8; }
.plan-chip.plan-lite { color: #8a5a2b; border-color: #ecd9b9; background: #fbf2e2; }
.plan-chip.plan-pro { color: #fdf5e6; border-color: #4a301a; background: linear-gradient(135deg, #4a301a, #63421f);
  box-shadow: 0 2px 6px rgba(74, 48, 26, .16); }
.admin-table select[data-plan] { min-width: 92px; }
.master-kpis { margin-bottom: 16px; }
.master-kpi .kpi-ic { background: #f6f1e8; }
.master-kpi.tone-blue { --accent: #3b82f6; }
.master-kpi.tone-green { --accent: #10b981; }
.master-kpi.tone-red { --accent: #ef4444; }
.master-kpi.tone-violet { --accent: #b0793c; }
.master-kpi.tone-cyan { --accent: #06b6d4; }
.master-kpi.tone-amber { --accent: #f59e0b; }
.master-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.input.sm { padding: 7px 10px; font-size: 12px; border-radius:  9px; }
.input.xs { padding: 4px 6px; font-size: 11.5px; border-radius: 8px; }
.admin-table td { vertical-align: middle; }
.admin-table .cell-main { font-weight: 700; font-size: 12.8px; }
.admin-table tr.muted-row { background: #fffafa; }
.admin-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.alert-text { margin: 0; font-family: inherit; font-size: 12.8px; line-height: 1.8; white-space: pre-wrap;
  background: #faf6ee; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; color: var(--ink-2); }

/* 빈 계정 안내 */
.empty-start { display: flex; align-items: center; gap: 16px; background: #fffdf8; border: 1px solid #efe2cd;
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.empty-start img { width: 58px; height: 58px; border-radius: 16px; }
.empty-start h3 { margin: 0 0 3px; font-size: 14.5px; }
.empty-start p { margin: 0; font-size: 12px; color: var(--muted); }
.empty-start .btn { margin-left: auto; }

/* hidden 속성이 display 규칙보다 우선하도록 */
.auth-form[hidden], [hidden] { display: none !important; }

/* ══════════════════════════════════════════════════════════
   Phase A — 전 마켓 동시 반영 · 라벨 · 반품 파이프라인 · CS 인박스
   ══════════════════════════════════════════════════════════ */
.link-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.link-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 999px;
  background: var(--slate-soft); color: var(--ink-2); border: 1px solid var(--line);
}
.link-badge .dot { width: 5px; height: 5px; border-radius: 50%; }
.link-badge b { font-weight: 800; }
.link-badge.tone-green { background: var(--green-soft); color: var(--green); border-color: #a7f3d0; }
.link-badge.tone-amber { background: var(--amber-soft); color: var(--amber); border-color: #fde68a; }
.link-badge.tone-red { background: var(--red-soft); color: var(--red); border-color: #fecaca; }
.link-badge.tone-slate { background: var(--slate-soft); color: var(--muted); }
.sla-note { font-size: 10px; color: var(--muted-2); margin-top: 2px; }
.var-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10.5px;
  background: var(--brand-soft); color: var(--brand); border: 1px dashed var(--line);
  border-radius: 6px; padding: 1px 6px;
}
.macro-preview { margin-top: 8px; }
.macro-preview .note { font-size: 11.5px; }

.pipeline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 2px 0 14px; }
.pipeline-step {
  font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  background: #f7f1e7; color: var(--muted); border: 1px solid var(--line);
}
.pipeline-step.done { background: var(--green-soft); color: #065f46; border-color: #a7f3d0; }
.pipeline-step.current { background: var(--brand); color: #fff; border-color: var(--brand); }
.pipeline-arrow { color: var(--muted-2); font-size: 10px; }

.inbox-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.inbox-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 6px 10px; font-size: 11.5px; color: var(--ink-2); box-shadow: var(--shadow-sm);
}
.inbox-chip:hover { border-color: var(--brand-2); background: var(--brand-soft); }
.inbox-chip .dot { width: 7px; height: 7px; border-radius: 50%; }
.inbox-chip b { font-weight: 800; }
.inbox-chip .cnt { color: var(--muted); }
.inbox-chip .cnt.urgent { color: var(--red); font-weight: 700; }
.inbox-chip i { font-style: normal; font-size: 10px; color: var(--muted-2); }
.inbox-summary { font-size: 11.5px; color: var(--muted); margin-left: auto; }
.inbox-summary b { color: var(--ink); }

.cs-panel-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; }
.cs-side .section-title { margin-top: 16px; }
.cs-main .chat { max-height: 260px; overflow: auto; }
@media (max-width: 980px) {
  .cs-panel-grid { grid-template-columns: 1fr; }
}

/* 라벨 인쇄 미리보기(앱 내부 안내용) */
.label-preview { border: 1px dashed var(--line); border-radius: 10px; padding: 12px; background: #fffdf9; }

/* CS 상세 사이드패널 — 좁은 폭에서도 읽히는 미니 카드 */
.cs-mini-list { display: flex; flex-direction: column; gap: 8px; }
.cs-mini {
  border: 1px solid var(--line); border-radius: 10px; background: #fffdf9;
  padding: 9px 11px; display: flex; flex-direction: column; gap: 2px;
}
.cs-mini-hd { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12px; }
.cs-mini .sub { font-size: 11px; color: var(--muted); }

/* 480px 드로어 안에서는 2단이 너무 좁아 주문·반품 요약을 위에 가로 카드로 둔다 */
.drawer .cs-panel-grid { grid-template-columns: 1fr; gap: 6px; }
.drawer .cs-side { order: -1; }
.cs-mini-list { flex-direction: row; flex-wrap: wrap; }
.cs-mini { flex: 1 1 170px; min-width: 0; }

/* ═══════════════════════════════════════════════════════════
   Phase B — 바코드 출고 검수 · 자동화(원클릭) · 정산/순이익
   ═══════════════════════════════════════════════════════════ */

/* ── 공통: 작은 셀렉트 · 토글 스위치 ───────────────────── */
.select.sm { padding: 4px 8px; font-size: 12px; border-radius: 8px; width: auto; }
.switch { position: relative; display: inline-flex; width: 42px; height: 24px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span {
  position: absolute; inset: 0; border-radius: 999px; background: #e4d7c4;
  transition: background .18s; pointer-events: none;
}
.switch span::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .18s;
}
.switch input:checked + span { background: var(--brand-2); }
.switch input:checked + span::after { transform: translateX(18px); }

/* ── 📷 바코드 출고 검수 (POS) ─────────────────────────── */
.bc-mode { display: inline-flex; gap: 6px; align-items: center; }
.bc-step {
  font-size: 12px; padding: 5px 12px; border-radius: 999px; background: #f4ece0;
  color: var(--muted); border: 1px solid transparent;
}
.bc-step.done { background: var(--green-soft); color: var(--green); }
.bc-step.active { background: var(--brand); color: #fdf6ea; box-shadow: 0 4px 12px rgba(91,58,30,.2); }
.bc-card { padding: 20px 22px 22px; }
.bc-hd { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 12px; }
.bc-hd h3 { margin: 0 0 2px; font-size: 17px; }
.bc-hd .hint { margin: 0; display: block; }
.bc-beep-legend { display: flex; gap: 12px; font-size: 11.5px; color: var(--muted); }
.bc-beep-legend span { display: inline-flex; align-items: center; gap: 5px; }
.bc-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.bc-dot.ok { background: var(--green); }
.bc-dot.bad { background: var(--red); }
.bc-input-row { display: flex; gap: 8px; }
.bc-input {
  font-size: 20px; letter-spacing: .04em; padding: 14px 16px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  border: 2px solid var(--line); border-radius: 12px; flex: 1;
}
.bc-input:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 4px var(--brand-soft); }
.bc-input-row .btn { padding: 0 22px; font-size: 15px; }
.bc-msg { min-height: 22px; margin: 10px 2px 6px; font-size: 13px; color: var(--muted); }
.bc-msg.ok { color: var(--green); font-weight: 600; }
.bc-msg.bad { color: var(--red); font-weight: 600; }
.bc-empty { display: flex; gap: 18px; align-items: flex-start; padding: 26px 22px; background: #fbf7f0;
  border: 1px dashed var(--line); border-radius: 14px; }
.bc-empty-ic { font-size: 30px; }
.bc-steps { margin: 8px 0 0; padding-left: 20px; color: var(--ink-2); font-size: 13px; line-height: 1.9; }
.bc-progress { display: flex; align-items: center; gap: 14px; margin: 6px 0 12px; font-size: 12.5px; color: var(--muted); }
.bc-progress b { color: var(--ink); font-size: 15px; }
.bc-bar { height: 8px; background: #f1e6d6; border-radius: 999px; overflow: hidden; }
.bc-bar.big { flex: 1; height: 10px; }
.bc-bar i { display: block; height: 100%; background: linear-gradient(90deg, #b0793c, #5b3a1e); border-radius: 999px; transition: width .2s; }
.bc-table td { vertical-align: middle; }
.bc-qty { font-weight: 700; font-size: 15px; color: var(--muted); }
.bc-qty.strong {
  color: #7a3d00; background: #ffedd5; border: 1px solid #fdba74; border-radius: 8px; padding: 3px 9px; font-size: 15px;
}
.bc-count { font-family: ui-monospace, Menlo, monospace; font-weight: 700; color: var(--muted); }
.bc-count.part { color: var(--amber); }
.bc-count.done { color: var(--green); }
.bc-row-done { background: #f4fbf6; }
.bc-comps { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.bc-flash-ok { animation: bcOk .7s ease; }
.bc-flash-bad { animation: bcBad .7s ease; }
@keyframes bcOk { 0% { background: #d1fae5; } 100% { background: transparent; } }
@keyframes bcBad { 0%, 40% { background: #fee2e2; } 100% { background: transparent; } }
.bc-done { display: flex; gap: 16px; align-items: center; padding: 22px; border-radius: 14px;
  background: var(--green-soft); border: 1px solid #bbf7d0; }
.bc-done-ic { width: 44px; height: 44px; border-radius: 50%; background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 22px; flex: 0 0 auto; }

/* ── ⏱ 자동화 ──────────────────────────────────────────── */
.auto-hero { display: flex; justify-content: space-between; gap: 18px; align-items: center;
  background: linear-gradient(120deg, #fff8ee, #f6ede0); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 22px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.auto-hero-title { font-size: 16px; font-weight: 800; color: var(--ink); }
.auto-hero-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.auto-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.auto-rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.auto-rule { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #fff; }
.auto-rule.off { background: #fbf7f0; }
.auto-rule-hd { display: flex; gap: 10px; align-items: flex-start; }
.auto-rule-ic { font-size: 20px; }
.auto-rule-title { flex: 1; }
.auto-rule-title b { font-size: 13.5px; }
.auto-rule-title .hint { display: block; margin-top: 2px; line-height: 1.5; }
.auto-rule-ft { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; font-size: 12px; }
.auto-rule-sum { margin-top: 8px; font-size: 12px; color: var(--ink-2); background: var(--slate-soft);
  border-radius: 8px; padding: 6px 9px; }
.auto-rule-err { margin-top: 6px; font-size: 12px; color: var(--red); }
.auto-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.auto-kpi { background: #fbf7f0; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.auto-kpi span { display: block; font-size: 11.5px; color: var(--muted); }
.auto-kpi b { font-size: 20px; }
.auto-kpi b i { font-style: normal; font-size: 12px; color: var(--muted); margin-left: 2px; }
.auto-kpi.warn b { color: var(--amber); }

/* ── 📊 정산 · 순이익 ──────────────────────────────────── */
.st-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 14px; }
.st-kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow-sm); }
.st-kpi span { font-size: 12px; color: var(--muted); }
.st-kpi b { display: block; font-size: 23px; margin: 3px 0 2px; letter-spacing: -.02em; }
.st-kpi b i { font-style: normal; font-size: 12px; color: var(--muted); margin-left: 2px; }
.st-kpi em { font-style: normal; font-size: 11.5px; color: var(--muted-2); }
.st-kpi.warn b { color: var(--amber); }
.st-kpi.ok b { color: var(--green); }
.st-kpi.danger b { color: var(--red); }
.st-kpi.strong b { font-size: 26px; }
.st-table tfoot td { border-top: 2px solid var(--line); background: #fbf7f0; }
.st-bar { height: 6px; background: #f1e6d6; border-radius: 999px; overflow: hidden; margin-top: 5px; min-width: 90px; }
.st-bar i { display: block; height: 100%; background: linear-gradient(90deg, #d3b28a, #7c5230); border-radius: 999px; }

/* ═══════════════════════════════════════════════════════════
   배민 폰트 — 상업적 무료 폰트로 브랜드 톤 통일
   · 제목·카드 헤더·사이드바·버튼: Jua / Do Hyeon (Google Fonts)
   · 본문·표: BMJUA (눈누 CDN) — 설치돼 있으면 BMHANNAPro 우선
   · 숫자·송장번호는 tabular-nums + 등폭으로 줄맞춤 유지
   ═══════════════════════════════════════════════════════════ */
@font-face {
  font-family: 'BMJUA';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_one@1.0/BMJUA.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-brand: 'Jua', 'BMHANNAPro', 'BMJUA', 'Do Hyeon', "Pretendard", "Apple SD Gothic Neo",
    "Malgun Gothic", -apple-system, sans-serif;
  --font-body: 'BMJUA', 'BMHANNAPro', 'Jua', "Pretendard", "Apple SD Gothic Neo",
    "Malgun Gothic", -apple-system, sans-serif;
  --font-num: ui-monospace, SFMono-Regular, Menlo, "Roboto Mono", monospace;
}

html, body {
  font-family: var(--font-body);
  letter-spacing: .002em;
}

/* 브랜드 UI — 제목·사이드바·버튼·배지 */
h1, h2, h3, .brand, .brand-text, .nav, .nav button, .btn, .seg button,
.card-hd h3, .kpi-label, .kpi-value, .welcome-title, .master-hero h2,
.section-title, .provider-hd h3, .auto-rule-title b, .st-kpi span,
.modal-hd h3, .drawer-hd h3, .tag, .chip, .pill {
  font-family: var(--font-brand);
  letter-spacing: -.005em;
}

/* 숫자·코드 — 줄맞춤(tabular) + 등폭 */
.mono, .tracking, .bc-input, td.num, .num, .kpi-value, .st-kpi b,
.auto-kpi b, .stock-pill, .badge, .table-wrap td.mono,
.order-no, .cel-num, .bc-count, .bc-qty, .master-kpi b {
  font-variant-numeric: tabular-nums;
}
.mono, .tracking, .bc-input, .bc-count, .cel-num {
  font-family: var(--font-num);
  letter-spacing: .01em;
}
td.num, .num, .kpi-value, .st-kpi b, .auto-kpi b {
  letter-spacing: .01em;
}

/* 🚛 화물 전환 — 주문 목록의 원클릭 토글 */
button.freight-toggle, button.freight-add {
  border: 0; cursor: pointer; font-family: inherit;
  transition: filter .15s, background .15s, border-color .15s;
}
button.freight-toggle:hover { filter: brightness(.96); }
button.freight-add {
  background: #fbf7f0; color: #8a6a4f; border: 1px dashed #e2d3bf; font-weight: 700;
}
button.freight-add:hover { background: #f6ecdd; color: #7a4f22; border-color: #d8bf9f; }
.freight-lock { font-size: 10px; opacity: .75; }

/* ───────── ⏰ 오늘의 마감 체크 (대시보드 상단) ───────── */
.closing-card {
  background: linear-gradient(180deg, #fffdf9 0%, #fdf6ec 100%);
  border: 1px solid #e9d9bf; border-radius: 16px;
  padding: 12px 14px 13px; margin-bottom: 14px;
  box-shadow: 0 6px 18px rgba(120, 96, 64, .07);
}
.closing-card.clear { border-color: #cfe8d8; background: linear-gradient(180deg, #fbfffc 0%, #f2fbf5 100%); }
.closing-hd { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.closing-title {
  font-weight: 800; font-size: 15px; color: var(--ink);
  display: flex; align-items: baseline; gap: 8px;
}
.closing-title .sub { font-weight: 500; font-size: 11px; color: var(--muted); }
.closing-progress {
  flex: 1; min-width: 230px; display: flex; align-items: center; gap: 9px;
  font-size: 11.5px; color: var(--ink-2);
}
.cp-bar { flex: 1; height: 8px; background: #efe4d2; border-radius: 999px; overflow: hidden; min-width: 80px; }
.cp-bar i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #c99a5f, #7c5230 60%, #3d2817);
  transition: width .3s ease;
}
.closing-items { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.closing-item {
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  padding: 9px 10px 8px; transition: box-shadow .15s, border-color .15s, transform .1s;
}
.closing-item.hot { cursor: pointer; border-color: #e2c9a8; box-shadow: 0 2px 8px rgba(120, 96, 64, .06); }
.closing-item.hot:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(120, 96, 64, .12); }
.closing-item.zero { background: #fbfdfb; border-color: #e3efe6; }
.ci-top { display: flex; align-items: center; gap: 6px; min-height: 17px; }
.ci-ic { font-size: 14px; line-height: 1; flex: 0 0 auto; }
.ci-label {
  flex: 1; font-size: 11.5px; font-weight: 700; color: var(--ink-2);
  line-height: 1.25; word-break: keep-all;
}
.ci-count {
  font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; color: var(--ink);
  line-height: 1.15; margin: 3px 0 1px; letter-spacing: -.01em;
}
.ci-count i { font-style: normal; font-size: 10.5px; margin-left: 2px; color: var(--muted); font-weight: 600; }
.ci-done { font-size: 12.5px; color: var(--green); }
.closing-item.tone-red { border-left: 3px solid var(--red); }
.closing-item.tone-red .ci-count { color: var(--red); }
.closing-item.tone-amber { border-left: 3px solid var(--amber); }
.closing-item.tone-amber .ci-count { color: var(--amber); }
.closing-item.tone-brown { border-left: 3px solid var(--brand-2); }
.closing-item.tone-brown .ci-count { color: var(--brand-2); }
.closing-item.tone-green { border-left: 3px solid var(--green); }
.closing-item.tone-green .ci-count { color: var(--green); }
.closing-item.zero .ci-count { margin-top: 6px; }
.ci-hint { font-size: 10px; color: var(--muted); margin-top: 1px; line-height: 1.35; word-break: keep-all; }
.ci-subs { display: flex; gap: 4px; margin-top: 5px; flex-wrap: wrap; }
.closing-sub {
  font-size: 10px; border: 1px solid #e2d3bd; background: #fbf7f0; border-radius: 999px;
  padding: 1px 7px; color: var(--ink-2); font-weight: 600;
}
.closing-sub:hover { background: #f4ebdc; border-color: #d8bf9f; }
@media (max-width: 1180px) {
  .closing-items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .closing-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .closing-progress { order: 3; width: 100%; }
}

/* ───────── 출고 파이프라인 (수집 → 상품명 매칭 → 합포장·로젠 송장출력) ───────── */
.pipeline {
  display: flex; align-items: stretch; flex-wrap: wrap; gap: 8px;
  background: linear-gradient(180deg, #fbf6ec, #f8f1e4);
  border: 1px solid #ecdfca; border-radius: 14px;
  padding: 8px 10px; margin-bottom: 10px;
}
.pipeline .pipe-label {
  display: flex; align-items: center; padding: 0 6px 0 2px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .06em; color: var(--muted);
  text-transform: uppercase;
}
.pipe-step {
  display: flex; align-items: center; gap: 8px; flex: 1 1 200px; min-width: 180px;
  background: #fff; border: 1px solid var(--line); border-radius: 11px;
  padding: 7px 10px; text-align: left; transition: box-shadow .15s, border-color .15s, transform .1s;
}
.pipe-step:hover { border-color: #d8bf9f; box-shadow: 0 4px 12px rgba(120, 96, 64, .1); transform: translateY(-1px); }
.pipe-step .n {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11.5px; font-weight: 800;
  background: var(--brand); color: #fff;
}
.pipe-step .t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pipe-step .t b { font-size: 12.5px; font-weight: 800; color: var(--ink); white-space: nowrap; }
.pipe-step .t small { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pipe-arrow { display: flex; align-items: center; color: #c8b096; font-weight: 800; }
.pipe-badge {
  margin-left: auto; flex: 0 0 auto; font-size: 10.5px; font-weight: 800;
  border-radius: 999px; padding: 2px 8px; white-space: nowrap;
}
.pipe-badge.warn { background: #fff1e2; color: #9a4a10; border: 1px solid #f0cfa9; }
.pipe-badge.ok { background: var(--green-soft); color: #065f46; border: 1px solid #a7f3d0; }

/* ───────── 상품명 매칭 모달 ───────── */
.match-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.match-stats { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.match-pill {
  font-size: 11.5px; font-weight: 800; border-radius: 999px; padding: 3px 10px;
  background: #f7f1e6; color: var(--ink-2); border: 1px solid var(--line);
}
.match-pill.warn { background: #fff1e2; color: #9a4a10; border-color: #f0cfa9; }
.match-pill.ok { background: var(--green-soft); color: #065f46; border-color: #a7f3d0; }
.match-table td { vertical-align: top; }
.match-table tr[data-map-row]:hover { background: #fdf8f0; }
.match-table tr.mt-new td { background: #fbf6ec; }
.mt-new-box { padding: 10px 12px; border: 1px dashed #e0cdb1; border-radius: 12px; background: #fffdf9; }
.mt-new-box .form-row { margin-bottom: 8px; }
.match-table select.select { min-width: 240px; }

/* ───────── ✂️ 재단·규격 (맞춤 재단 모듈) ───────── */
.cut-toolbar { padding: 14px 16px; }
.cut-tools-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cut-tools-row .spacer { flex: 1 1 auto; }
.cut-field { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 700; }
.cut-field .input { width: 148px; }
.cut-search { width: 230px; }
.cut-chips { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.cut-chip { font-size: 11.5px; border: 1px solid var(--line); background: #fffdf9; border-radius: 999px; padding: 3px 10px; color: var(--ink-2); }
.cut-chip b { font-size: 13px; color: var(--ink); margin-right: 2px; font-variant-numeric: tabular-nums; }
.cut-chip em { font-style: normal; color: var(--muted); margin-left: 3px; }
.cut-bulk { display: flex; align-items: center; gap: 8px; }
.cutting-table { min-width: 1240px; }
.cutting-table td { vertical-align: middle; }
.cut-spec { font-weight: 700; letter-spacing: -.1px; }
.cut-row.status-needs_check td { background: #fff8ef; }
.cut-row.status-excluded td { opacity: .55; text-decoration: line-through; }
.cut-row.status-excluded .cut-actions { text-decoration: none; opacity: 1; }
.cut-badge { display: inline-block; font-size: 10px; font-weight: 800; border-radius: 5px; padding: 1px 5px; margin-right: 3px; border: 1px solid transparent; }
.cut-badge.ky { background: #fff3cd; color: #8a5a00; border-color: #f3d675; }
.cut-badge.cap { background: #eef4ff; color: #33578f; border-color: #cfdff7; }
.cut-badge.lock { background: #f4f0f8; color: #6b4b8a; border-color: #ddd0ec; }
.cut-actions { display: flex; gap: 4px; }
select.cut-status.tone-needs_check { border-color: #f3c98b; background: #fff8ef; }
select.cut-status.tone-excluded { color: #9b8b7c; }
select.cut-status.tone-done { border-color: #a7f3d0; background: #f0fdf7; }
.cut-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cut-form label { font-size: 12px; }
.cut-memo-label { display: block; margin-top: 12px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.cut-memo-label .input { width: 100%; margin-top: 5px; }
.cut-setting-lead { margin: 0 0 12px; font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.cut-deduct-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.cut-deduct { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.cut-deduct span { flex: 1 1 auto; }
.cut-deduct .input { width: 90px; text-align: right; }
.cut-switches { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; }
.cut-switches .check { font-size: 12px; }
.cutting-table td.cut-channel { white-space: nowrap; }
