/* ===== 리버스 전자결재 ===== */
:root {
  --brand: #4f5df0;
  --brand-dark: #3a46d4;
  --brand-light: #eef0fe;
  --brand-grad: linear-gradient(135deg, #4f5df0 0%, #8b5cf6 100%);
  --bg: #f5f6fb;
  --card: #ffffff;
  --text: #191e2e;
  --text-sub: #6a7284;
  --line: #e6e8f2;
  --green: #129a58;
  --green-bg: #e6f7ef;
  --red: #e0442e;
  --red-bg: #fdeeec;
  --amber: #b57b00;
  --amber-bg: #fff6e0;
  --gray-bg: #eef0f6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23, 26, 60, .05), 0 4px 14px rgba(23, 26, 60, .05);
  --sidebar-w: 232px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: "Pretendard Variable", "Pretendard", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
/* 16px 미만이면 iOS Safari가 입력할 때마다 화면을 확대해 옆 칸을 잘못 누르게 됨 */
input, select, textarea { font-family: inherit; font-size: 16px; }
@media (min-width: 768px) {
  input, select, textarea { font-size: 14px; }
}
a { text-decoration: none; color: inherit; }
.hidden { display: none !important; }

/* ===== 로그인 ===== */
.login-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(139, 92, 246, .55), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(79, 93, 240, .5), transparent 60%),
    linear-gradient(135deg, #141a38 0%, #232a5c 55%, #3a3f8f 100%);
  padding: 20px;
}
.login-box {
  background: #fff; border-radius: 22px; padding: 40px 36px;
  width: 100%; max-width: 420px; text-align: center;
  box-shadow: 0 24px 70px rgba(10, 12, 40, .45);
}
.login-logo {
  font-weight: 900; font-size: 26px; letter-spacing: 2px;
  background: var(--brand-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.login-box h1 { font-size: 18px; margin: 8px 0 4px; }
.login-desc { color: var(--text-sub); font-size: 13px; margin-bottom: 20px; }
.login-users { display: flex; flex-direction: column; gap: 10px; }
.login-user-btn {
  display: flex; align-items: center; gap: 12px;
  border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 12px 16px; background: #fff; text-align: left;
  transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
}
.login-user-btn:hover {
  border-color: var(--brand); background: var(--brand-light);
  transform: translateY(-1px); box-shadow: 0 6px 18px rgba(79, 93, 240, .14);
}
.login-user-btn .avatar { width: 40px; height: 40px; font-size: 16px; }
.login-user-btn b { display: block; font-size: 15px; }
.login-user-btn small { color: var(--text-sub); }
.login-note { margin-top: 20px; font-size: 12px; color: var(--text-sub); }
.login-note.error { color: var(--red); font-weight: 600; }
.login-form { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.login-form input[type="password"] {
  border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 14px; font-size: 15px;
}
.login-form input[type="password"]:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 93, 240, .14);
}
.login-selected {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  font-weight: 700; padding: 4px 0;
}

/* ===== 레이아웃 ===== */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #151b33 0%, #1a1836 70%, #221a44 100%);
  color: #cfd6e6;
  display: flex; flex-direction: column;
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 50;
  transition: transform .2s;
}
.sidebar-logo { padding: 22px 20px 18px; }
.logo-mark { font-weight: 900; font-size: 19px; letter-spacing: 1.5px; color: #fff; display: block; }
.logo-sub { font-size: 12px; color: #8b96b0; letter-spacing: 4px; }
.nav { flex: 1; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-label {
  font-size: 10.5px; letter-spacing: 1.5px; color: #6d7891;
  padding: 14px 12px 4px; font-weight: 700;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; font-size: 14px;
  color: #cfd6e6; transition: background .12s, color .12s;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active {
  background: var(--brand-grad); color: #fff; font-weight: 600;
  box-shadow: 0 4px 14px rgba(107, 82, 240, .35);
}
.nav-ico { width: 20px; text-align: center; }
.badge {
  margin-left: auto; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 700; border-radius: 99px;
  min-width: 19px; height: 19px; display: inline-flex;
  align-items: center; justify-content: center; padding: 0 5px;
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.1);
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand-grad); color: #fff; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13.5px; font-weight: 600; color: #fff; }
.user-role { font-size: 11.5px; color: #8b96b0; }

.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 58px; background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 0 22px;
  position: sticky; top: 0; z-index: 40;
}
.topbar-title { font-size: 17px; font-weight: 700; letter-spacing: -.2px; }
.topbar-user { margin-left: auto; font-size: 13px; color: var(--text-sub); }
.menu-toggle { display: none; font-size: 20px; }
.btn-ghost {
  background: none; border: none; color: inherit; font-size: 15px;
  padding: 6px; border-radius: 8px; opacity: .8;
}
.btn-ghost:hover { opacity: 1; background: rgba(128,128,128,.15); }

.content { padding: 24px 26px 60px; max-width: 1180px; width: 100%; }

/* ===== 공통 컴포넌트 ===== */
.card {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 18px;
}
.card h2 { font-size: 16px; margin-bottom: 14px; letter-spacing: -.2px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.card-head h2 { margin-bottom: 0; }

.btn {
  background: var(--brand-grad); color: #fff; border: none;
  border-radius: 10px; padding: 9px 18px; font-size: 14px; font-weight: 600;
  transition: filter .12s, transform .12s, box-shadow .12s;
  box-shadow: 0 2px 8px rgba(79, 93, 240, .25);
}
.btn:hover { filter: brightness(1.07); transform: translateY(-1px); box-shadow: 0 5px 14px rgba(79, 93, 240, .32); }
.btn:focus-visible { outline: 3px solid rgba(79, 93, 240, .35); outline-offset: 1px; }
.btn.secondary { background: var(--gray-bg); color: var(--text); box-shadow: none; }
.btn.secondary:hover { background: #e2e5ee; filter: none; transform: none; box-shadow: none; }
.btn.danger { background: var(--red); box-shadow: 0 2px 8px rgba(224, 68, 46, .25); }
.btn.danger:hover { background: #c23520; filter: none; }
.btn.green { background: var(--green); box-shadow: 0 2px 8px rgba(18, 154, 88, .25); }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; filter: none; }

/* ===== 공용 일정 (달력) ===== */
.cal-scroll { overflow-x: auto; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(92px, 1fr)); }
.cal-head { gap: 6px; margin-bottom: 6px; }
.cal-head > div { text-align: center; font-size: 12.5px; font-weight: 700; color: var(--text-sub); padding: 4px 0; }
.cal-grid { gap: 6px; }
.cal-head .sun, .cal-num.sun { color: var(--red); }
.cal-head .sat, .cal-num.sat { color: var(--brand); }
.cal-cell {
  min-height: 96px; padding: 6px; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--card); cursor: pointer; transition: border-color .15s, background .15s;
  display: flex; flex-direction: column; gap: 3px; text-align: left;
}
.cal-cell:hover { border-color: var(--brand); background: var(--brand-light); }
.cal-cell.out { background: #fafbfe; opacity: .55; }
.cal-cell.today { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(79, 93, 240, .18); }
.cal-num { font-size: 12.5px; font-weight: 800; color: var(--text); margin-bottom: 1px; }
.cal-cell.today .cal-num { color: var(--brand); }
.cal-ev {
  display: block; width: 100%; border: none; border-radius: 6px; padding: 3px 6px;
  font-family: inherit; font-size: 11.5px; font-weight: 600; line-height: 1.35; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-ev:hover { filter: brightness(.94); }
.cal-more { font-size: 11px; color: var(--text-sub); padding-left: 4px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; font-size: 12.5px; color: var(--text-sub); }
.cal-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }
.cal-dots { display: none; gap: 3px; flex-wrap: wrap; justify-content: center; margin-top: 2px; }
.cal-dots i { display: block; width: 5px; height: 5px; border-radius: 50%; }
/* 하루 상세 모달 */
.day-list { display: grid; gap: 8px; margin: 4px 0 6px; }
.day-row {
  display: flex; align-items: stretch; gap: 10px; width: 100%; text-align: left;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 11px;
  font-family: inherit;
}
.day-row:hover { border-color: var(--brand); background: var(--brand-light); }
.day-bar { width: 4px; border-radius: 3px; flex-shrink: 0; }
.day-body { display: flex; flex-direction: column; min-width: 0; }
.day-title { font-size: 14px; font-weight: 700; color: var(--text); }
.day-sub { font-size: 12.5px; color: var(--text-sub); margin-top: 1px; }
/* 폰에서는 칸이 좁아 글씨가 안 들어가므로, 분류 색 점만 찍고 누르면 목록을 보여 준다 */
@media (max-width: 640px) {
  .cal-head, .cal-grid { grid-template-columns: repeat(7, 1fr); gap: 4px; }
  .cal-head > div { font-size: 11.5px; }
  .cal-cell { min-height: 54px; padding: 4px 2px; align-items: center; gap: 2px; }
  .cal-num { font-size: 12px; margin-bottom: 0; }
  .cal-ev, .cal-more { display: none; }
  .cal-dots { display: flex; }
}

.grid-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 18px 20px; cursor: pointer;
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.stat:hover {
  transform: translateY(-2px); border-color: #d5d9ec;
  box-shadow: 0 8px 22px rgba(23, 26, 60, .09);
}
.stat .stat-label { font-size: 13px; color: var(--text-sub); }
.stat .stat-value { font-size: 25px; font-weight: 800; margin-top: 2px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stat .stat-value.blue { color: var(--brand); }
.stat .stat-value.green { color: var(--green); }
.stat .stat-value.red { color: var(--red); }
.stat .stat-value.amber { color: var(--amber); }

/* 2026-09-08 [매출 브리핑 상세] 채널별 매출 / TOP5 2열 - po-parties와 동일하게 좁은
   화면에서는 1열로 접힘(390~430px 모바일에서 표가 눌리지 않도록) */
.briefing-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
@media (max-width: 640px) {
  .briefing-detail-grid { grid-template-columns: 1fr; gap: 12px; }
}

/* 2026-09-08 [사용자 지적 - 카드가 세로로 너무 길어짐] 상품별 판매를 데스크톱은
   컴팩트한 표(상품명|채널|판매량|매출, 기존 ERP 테이블 행높이)로, 모바일은
   상품명 + 요약 1줄(최대 2줄)로 압축. 행 하나(<tr>)에 데스크톱용 개별 칸과
   모바일용 요약 칸(.ps-mobile-meta)을 같이 두고 미디어쿼리로 보이는 쪽만 전환 -
   JS가 화면별로 다른 마크업을 만들지 않음(product_sales_table_html 참고). */
.product-sales-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.product-sales-table th {
  text-align: left; font-size: 11.5px; font-weight: 700; color: var(--text-sub);
  padding: 5px 8px; border-bottom: 1.5px solid var(--line);
}
.product-sales-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
.product-sales-table tr:last-child td { border-bottom: none; }
.product-sales-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.product-sales-table .ps-rank { color: var(--text-sub); width: 20px; }
.product-sales-table .ps-name { font-weight: 700; }
.product-sales-table th.ps-mobile-meta, .product-sales-table td.ps-mobile-meta { display: none; }

@media (max-width: 640px) {
  .product-sales-table thead { display: none; }
  .product-sales-table, .product-sales-table tbody, .product-sales-table tr, .product-sales-table td { display: block; width: 100%; }
  .product-sales-table tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .product-sales-table td { padding: 1px 0; border-bottom: none; }
  .product-sales-table .ps-rank, .product-sales-table .ps-channel, .product-sales-table .ps-qty, .product-sales-table .ps-amount { display: none; }
  .product-sales-table td.ps-mobile-meta { display: block; font-size: 12.5px; color: var(--text-sub); text-align: left; }
}

/* 2026-09-08 [재고·발주 판단 엔진 통일, 사용자 명시 "가로 대형테이블 금지 -
   상품 카드로"] .product-sales-table과 완전히 동일한 기법(한 마크업, 미디어쿼리로
   전환) - 데스크톱은 7열 표, 390px 이하는 상품명+판정+요약줄(.idt-mobile-meta)만
   보이는 카드. */
.inv-decision-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.inv-decision-table th {
  text-align: left; font-size: 11.5px; font-weight: 700; color: var(--text-sub);
  padding: 5px 8px; border-bottom: 1.5px solid var(--line);
}
.inv-decision-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.inv-decision-table tr:last-child td { border-bottom: none; }
.inv-decision-table tr[data-clickable] { cursor: pointer; }
.inv-decision-table tr[data-clickable]:hover { background: var(--bg-soft, rgba(0,0,0,.03)); }
.inv-decision-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.inv-decision-table .idt-name { font-weight: 700; }
.inv-decision-table .idt-mobile-meta { display: none; }

@media (max-width: 640px) {
  .inv-decision-table thead { display: none; }
  .inv-decision-table, .inv-decision-table tbody, .inv-decision-table tr, .inv-decision-table td { display: block; width: 100%; }
  .inv-decision-table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .inv-decision-table td { padding: 1px 0; border-bottom: none; }
  .inv-decision-table .idt-stock, .inv-decision-table .idt-velocity, .inv-decision-table .idt-incoming,
  .inv-decision-table .idt-outlook, .inv-decision-table .idt-reco { display: none; }
  .inv-decision-table td.idt-mobile-meta { display: block; font-size: 12.5px; color: var(--text-sub); text-align: left; margin-top: 2px; }
}

/* 테이블 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table-wrap td { white-space: nowrap; }
th {
  text-align: left; color: var(--text-sub); font-weight: 600; font-size: 12px;
  letter-spacing: .3px;
  padding: 9px 12px; border-bottom: 2px solid var(--line); white-space: nowrap;
}
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--brand-light); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { text-align: center; color: var(--text-sub); padding: 36px 0 !important; }

/* 상태 배지 */
.chip {
  display: inline-block; padding: 3px 10px; border-radius: 99px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.chip.progress { background: var(--amber-bg); color: var(--amber); }
.chip.approved { background: var(--green-bg); color: var(--green); }
.chip.rejected { background: var(--red-bg); color: var(--red); }
.chip.waiting { background: var(--gray-bg); color: var(--text-sub); }
.chip.mine { background: var(--brand-light); color: var(--brand); }
.chip.gold { background: #fff3bf; color: #a67c00; }
.chip.excluded { background: var(--gray-bg); color: var(--text); border: 1px dashed var(--text-sub); }   /* 2026-09-13 재입고 제외 */
.chip.automation { background: var(--amber-bg); color: var(--amber); font-weight: 600; }   /* 2026-09-13 자동화 상태(물류정보 입력 필요 등) */

/* ===== 진행 게이지 (공용) ===== */
.bar { position: relative; height: 12px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar.bar-lg { height: 22px; }
.bar-fill {
  height: 100%; width: 0; border-radius: 99px; background: var(--brand-grad);
  transition: width .7s cubic-bezier(.2, .7, .3, 1);
}
.bar-fill.green { background: var(--green); }
.bar-fill.amber { background: var(--amber); }
.bar-fill.red { background: var(--red); }
/* 눈금은 막대 위에 겹쳐야 하므로 .bar의 형제로 두고 overflow 밖에 그린다 */
.bar-wrap { position: relative; padding: 4px 0 26px; }
.bar-mark { position: absolute; top: 0; width: 2px; height: 30px; background: var(--text-sub); opacity: .45; }
.bar-mark span {
  position: absolute; top: 32px; left: 50%; transform: translateX(-50%);
  font-size: 11px; color: var(--text-sub); white-space: nowrap; font-weight: 700;
}
/* 좁은 화면에서는 눈금 라벨이 서로 겹치므로, 막대 아래 한 줄 범례로 대체 */
.bar-legend { display: none; gap: 4px 14px; flex-wrap: wrap; font-size: 11.5px;
  color: var(--text-sub); font-weight: 700; margin-top: 4px; }
.bar-legend i { font-style: normal; opacity: .55; }
@media (max-width: 720px) {
  .bar-mark span { display: none; }
  .bar-wrap { padding-bottom: 4px; }
  .bar-legend { display: flex; }
}

/* ===== 우리 팀 카드 ===== */
.team-card { border-left: 4px solid var(--brand); }
.team-card.done { border-left-color: var(--green); }
.team-avatars { display: flex; }
.team-avatars .avatar { width: 26px; height: 26px; font-size: 11.5px; border: 2px solid var(--card); margin-left: -8px; }
.team-avatars .avatar:first-child { margin-left: 0; }

/* ===== 마일스톤 배지 ===== */
.mstones { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.mstone {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 700;
  background: var(--gray-bg); color: var(--text-sub);
}
.mstone.on { background: var(--green-bg); color: var(--green); }
.mstone .m-ico { filter: grayscale(1); opacity: .45; }
.mstone.on .m-ico { filter: none; opacity: 1; }

/* ===== 기록 커버리지 점 ===== */
.daydots { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 10px; }
.daydot { width: 11px; height: 11px; border-radius: 3px; background: var(--line); }
.daydot.on { background: var(--green); }
.daydot.half { background: var(--green); opacity: .38; }
.daydot.weekend { opacity: .35; }
.daydot.today { outline: 2px solid var(--brand); outline-offset: 1px; }

/* ===== 축하 카드 ===== */
.celebrate { border: 2px solid var(--green); background: var(--green-bg); }
.celebrate h2 { color: var(--green); }

@media (prefers-reduced-motion: reduce) { .bar-fill { transition: none; } }

/* ===== 발주서 문서 양식 ===== */
.po-doc { max-width: 820px; margin: 0 auto; padding: 34px 38px; }
.po-title { text-align: center; font-size: 30px; font-weight: 900; letter-spacing: 12px; }
.po-sub { text-align: center; font-size: 11px; color: var(--text-sub); letter-spacing: 3px; margin-top: 2px; }
.po-meta { width: 100%; margin-top: 22px; border-top: 2px solid var(--text); border-bottom: 1px solid var(--line); }
.po-meta th { width: 92px; background: var(--gray-bg); color: var(--text); font-size: 12.5px;
  padding: 8px 10px; border-bottom: 1px solid var(--line); }
.po-meta td { padding: 8px 12px; font-size: 13.5px; border-bottom: 1px solid var(--line); white-space: normal; }
.po-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.po-party { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.po-party-h { background: var(--brand-light); color: var(--brand); font-weight: 800;
  font-size: 12.5px; padding: 8px 12px; }
.po-party table { font-size: 13px; }
.po-party th { width: 80px; color: var(--text-sub); font-weight: 600; padding: 6px 12px;
  border-bottom: 1px solid var(--line); font-size: 12px; }
.po-party td { padding: 6px 12px; border-bottom: 1px solid var(--line); white-space: normal; word-break: break-all; }
.po-party tr:last-child th, .po-party tr:last-child td { border-bottom: 0; }
.po-greet { font-size: 13.5px; margin: 20px 0 10px; }
.po-items { width: 100%; border-top: 2px solid var(--text); }
.po-items th { background: var(--gray-bg); color: var(--text); font-size: 12.5px; text-align: center; }
.po-items td { font-size: 13.5px; white-space: normal; }
.po-items tfoot td { background: #fafbfd; font-size: 13px; text-align: right; padding: 8px 12px; }
.po-items tfoot .po-grand td { background: var(--brand-light); font-size: 15px; }
.po-note { font-size: 12.5px; color: var(--text-sub); margin-top: 10px; }
.po-sign { display: flex; gap: 12px; justify-content: flex-end; margin-top: 26px; }
.po-sign-box { width: 120px; border: 1px solid var(--line); border-radius: 6px; text-align: center; }
.po-sign-h { background: var(--gray-bg); font-size: 11.5px; font-weight: 700; color: var(--text-sub); padding: 5px; }
.po-sign-name { font-size: 14px; font-weight: 800; padding: 14px 4px 4px; }
.po-sign-date { font-size: 11px; color: var(--text-sub); padding-bottom: 10px; }
.po-foot { text-align: center; font-size: 11.5px; color: var(--text-sub);
  margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line); }

@media (max-width: 720px) {
  .po-doc { padding: 20px 16px; }
  .po-title { font-size: 23px; letter-spacing: 8px; }
  .po-parties { grid-template-columns: 1fr; }
}

/* 인쇄 / PDF 저장 — 발주서만 남기고 전부 숨긴다 */
@media print {
  .sidebar, .topbar, .no-print, #toast, #modal-root { display: none !important; }
  body { background: #fff; }
  .main, .content { margin: 0 !important; padding: 0 !important; }
  .po-doc { box-shadow: none; border: 0; max-width: none; padding: 0; }
  .po-party-h { background: #eef0fe !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .po-items th, .po-meta th, .po-sign-h { background: #eef0f6 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .po-items tfoot .po-grand td { background: #eef0fe !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { margin: 14mm; }
}

/* ==================== 게임 화면 (목표·성취 전용) ====================
   돈 숫자를 보는 표들은 그대로 두고, 동기부여 화면만 확실히 재미있게. */

/* --- 히어로 카드 --- */
.gcard {
  position: relative; overflow: hidden;
  border-radius: 20px; padding: 22px;
  background: linear-gradient(135deg, #4a6cf7 0%, #7b52f0 55%, #a855f7 100%);
  color: #fff; box-shadow: 0 10px 26px rgba(74, 108, 247, .28);
  margin-bottom: 18px;
}
.gcard.done { background: linear-gradient(135deg, #10b981 0%, #14a05a 55%, #059669 100%);
  box-shadow: 0 10px 26px rgba(16, 185, 129, .3); }
.gcard::after {   /* 은은한 광택 */
  content: ""; position: absolute; top: -60%; right: -20%;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.22), transparent 65%);
  pointer-events: none;
}
.gcard-head { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.gmascot {
  font-size: 46px; line-height: 1;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.2));
  animation: gbob 2.6s ease-in-out infinite;
}
@keyframes gbob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-6px) } }
.glevel { font-size: 12.5px; font-weight: 800; opacity: .9; letter-spacing: .3px; }
.gtitle { font-size: 20px; font-weight: 900; margin-top: 2px; }
.gsub { font-size: 13.5px; opacity: .92; margin-top: 6px; line-height: 1.65; position: relative; z-index: 1; }
.gsub b { font-weight: 900; }

/* --- 게임용 게이지 --- */
.gbar-row { position: relative; z-index: 1; margin-top: 16px; }
.gbar-label { display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12.5px; font-weight: 700; opacity: .95; margin-bottom: 6px; }
.gbar {
  position: relative; height: 26px; border-radius: 99px;
  background: rgba(255,255,255,.22); box-shadow: inset 0 2px 5px rgba(0,0,0,.16);
  overflow: hidden;
}
.gbar-fill {
  height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, #ffd66b, #ffb020);
  box-shadow: 0 0 14px rgba(255, 190, 60, .55);
  transition: width .9s cubic-bezier(.2,.8,.25,1);
  position: relative;
}
.gbar-fill.full { background: linear-gradient(90deg, #7ef0b0, #22c55e); box-shadow: 0 0 14px rgba(60,220,140,.6); }
.gbar-fill::after {   /* 흐르는 광택 */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.5) 50%, transparent 80%);
  background-size: 220% 100%;
  animation: gshine 2.4s linear infinite;
}
@keyframes gshine { 0% { background-position: 130% 0 } 100% { background-position: -130% 0 } }
.gbar-pct {
  position: absolute; top: 50%; right: 12px; transform: translateY(-50%);
  font-size: 12.5px; font-weight: 900; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.35);
}
.gbar-runner { position: absolute; top: 50%; transform: translate(-50%, -50%); font-size: 18px;
  transition: left .9s cubic-bezier(.2,.8,.25,1); filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }

/* --- 오늘의 퀘스트 --- */
.quests { display: grid; gap: 10px; }
.quest {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 15px; border-radius: 14px; border: 2px solid var(--line);
  background: var(--card); cursor: pointer; transition: transform .12s, border-color .2s, background .2s;
}
.quest:hover { transform: translateY(-2px); border-color: var(--brand); }
.quest.done { border-color: var(--green); background: var(--green-bg); }
.quest-ico { font-size: 24px; line-height: 1; flex-shrink: 0; }
.quest-body { flex: 1; min-width: 0; }
.quest-title { font-size: 14px; font-weight: 800; }
.quest.done .quest-title { color: var(--green); }
.quest-desc { font-size: 12.5px; color: var(--text-sub); margin-top: 2px; }
.quest-check {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--line); display: grid; place-items: center;
  font-size: 14px; color: transparent;
}
.quest.done .quest-check { border-color: var(--green); background: var(--green); color: #fff; }

/* --- 코인 배지 --- */
.coins { display: flex; gap: 12px; flex-wrap: wrap; }
.coin { width: 76px; text-align: center; }
.coin-disc {
  width: 58px; height: 58px; margin: 0 auto; border-radius: 50%;
  display: grid; place-items: center; font-size: 26px;
  background: var(--gray-bg); border: 3px solid var(--line);
  filter: grayscale(1); opacity: .5;
  transition: transform .2s;
}
.coin.on .coin-disc {
  background: linear-gradient(135deg, #ffe9a8, #ffc93c);
  border-color: #f0b429; filter: none; opacity: 1;
  box-shadow: 0 5px 14px rgba(240, 180, 41, .4);
  animation: gpop .5s cubic-bezier(.2,1.4,.4,1);
}
.coin.on:hover .coin-disc { transform: scale(1.08) rotate(-6deg); }
@keyframes gpop { 0% { transform: scale(.5) } 70% { transform: scale(1.12) } 100% { transform: scale(1) } }
.coin-label { font-size: 11.5px; font-weight: 700; color: var(--text-sub); margin-top: 6px; line-height: 1.3; }
.coin.on .coin-label { color: var(--text); }

/* --- 연속 달성 불꽃 --- */
.streak { display: flex; align-items: center; gap: 10px; }
.streak-num { font-size: 30px; font-weight: 900; }
.streak-fire { font-size: 26px; animation: gflicker 1.5s ease-in-out infinite; }
@keyframes gflicker { 0%,100% { transform: scale(1) rotate(-3deg) } 50% { transform: scale(1.14) rotate(3deg) } }

@media (prefers-reduced-motion: reduce) {
  .gmascot, .gbar-fill::after, .streak-fire, .coin.on .coin-disc { animation: none; }
  .gbar-fill, .gbar-runner { transition: none; }
}
@media (max-width: 720px) {
  .gcard { padding: 18px; border-radius: 16px; }
  .gmascot { font-size: 38px; }
  .gtitle { font-size: 17px; }
  .coin { width: 66px; }
  .coin-disc { width: 50px; height: 50px; font-size: 22px; }
}

/* 폼 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-sub); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 9px 12px; background: #fff; transition: border-color .12s, box-shadow .12s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 93, 240, .12);
}
.field textarea { resize: vertical; min-height: 74px; }

/* 지출 항목 행 */
.items-table td { padding: 6px 6px; }
.items-table input, .items-table select {
  width: 100%; border: 1.5px solid var(--line); border-radius: 8px; padding: 8px 10px;
}
.items-table input:focus, .items-table select:focus { outline: none; border-color: var(--brand); }
.items-table .amount { text-align: right; }
.btn-row-del { background: none; border: none; color: var(--red); font-size: 16px; }
.total-line {
  display: flex; justify-content: flex-end; align-items: baseline; gap: 12px;
  padding: 12px 6px 0; font-size: 14px;
}
.total-line b { font-size: 20px; color: var(--brand); }

/* 결재선 표시 */
.appr-line { display: flex; gap: 10px; flex-wrap: wrap; }
.appr-step {
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: 10px 14px; min-width: 120px; background: #fff; position: relative;
}
.appr-step.approved { border-color: var(--green); background: var(--green-bg); }
.appr-step.rejected { border-color: var(--red); background: var(--red-bg); }
.appr-step.current { border-color: var(--brand); background: var(--brand-light); }
.appr-step .step-role { font-size: 11.5px; color: var(--text-sub); }
.appr-step .step-name { font-weight: 700; }
.appr-step .step-status { font-size: 12px; margin-top: 2px; }
.appr-step .step-date { font-size: 11px; color: var(--text-sub); }

/* 문서 상세 */
.doc-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 20px; margin-bottom: 16px; font-size: 13.5px; }
.doc-meta div span { color: var(--text-sub); margin-right: 8px; font-size: 12.5px; }
.doc-comment {
  background: var(--gray-bg); border-radius: 10px; padding: 10px 14px;
  font-size: 13px; margin-top: 8px;
}
.approve-box { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.approve-box textarea { flex: 1; min-width: 220px; min-height: 44px; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; }

/* 모달 */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(13, 16, 38, .55);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 18px;
}
.modal {
  background: #fff; border-radius: 18px; padding: 24px;
  width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 70px rgba(10, 12, 40, .35);
}
.modal h3 { font-size: 17px; margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* 토스트 */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: #191e2e; color: #fff; padding: 11px 22px; border-radius: 99px;
  font-size: 14px; z-index: 200; box-shadow: 0 6px 20px rgba(0,0,0,.25);
  animation: toast-in .2s;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* 검색바 */
.searchbar { display: flex; gap: 10px; flex-wrap: wrap; }
.searchbar input, .searchbar select {
  border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 12px;
}
.searchbar input { flex: 1; min-width: 160px; }
.searchbar input:focus, .searchbar select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 93, 240, .12);
}

/* ===== 모바일 ===== */
.sidebar-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 45;
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .menu-toggle { display: block; }
  .content { padding: 16px 14px 60px; }
  .form-grid { grid-template-columns: 1fr; }
  .topbar-user { display: none; }
  .card { padding: 16px; }
  .card-head { flex-direction: column; align-items: stretch; }
  .card-head > div { display: flex; flex-wrap: wrap; }

  /* 터치 대상 최소 44px(iOS HIG) - 승인/발주 등 주요 버튼이 좁은 화면에서도 정확히 눌리도록 */
  .btn { min-height: 44px; padding: 10px 16px; }
  .btn.sm { min-height: 40px; padding: 9px 14px; }

  /* ===== 반응형 테이블(공통) — 여러 화면(재고현황/발주추천/문서함 등)이 함께 쓰는
     테이블→카드 전환 패턴이에요. 테이블마다 새로 짜지 않고, JS에서 td에
     data-label만 달아주면 이 규칙 하나로 전부 카드형이 됩니다. */
  .rtable table { border: none; }
  .rtable thead { display: none; }
  .rtable tbody { display: flex; flex-direction: column; gap: 10px; }
  .rtable tr {
    display: flex; flex-direction: column;
    border: 1.5px solid var(--line); border-radius: 12px;
    padding: 10px 12px; background: var(--card);
  }
  .rtable tr.clickable:hover td { background: none; }
  .rtable td {
    display: flex; justify-content: space-between; align-items: center;
    gap: 14px; padding: 7px 0; border-bottom: 1px solid var(--line);
    text-align: right; white-space: normal; word-break: break-word;
  }
  .rtable td:last-child { border-bottom: none; }
  .rtable td[data-label]::before {
    content: attr(data-label); font-size: 11.5px; font-weight: 700;
    color: var(--text-sub); text-align: left; flex-shrink: 0;
  }
  .rtable td:not([data-label]) { justify-content: flex-end; }
  .rtable td.rt-empty { display: block; text-align: center; }
  .rtable td.rt-empty::before { content: none; }
  /* 상품명 등 "카드 제목" 역할을 하는 첫 칸 - 라벨 없이 왼쪽 정렬, 굵게 */
  .rtable td.rt-title {
    order: -10; justify-content: flex-start; text-align: left;
    font-size: 14.5px; padding-bottom: 9px; margin-bottom: 3px;
    border-bottom: 1.5px solid var(--line);
  }
  .rtable td.rt-title::before { content: none; }
  /* 긴 문장/뱃지 여러 개 등 좌우 정렬이 안 어울리는 칸(라벨 없이 한 줄 전체 사용) */
  .rtable td.rt-block { display: block; text-align: left; }
  .rtable td.rt-block::before { content: none; }
}

/* 2026-09-11 쿠팡 광고비 카드 (공헌이익 탭) */
.ad-chip { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.ad-chip.ad-ok { background: var(--green-bg); color: var(--green); }
.ad-chip.ad-warn { background: var(--amber-bg); color: var(--amber); }
.ad-chip.ad-muted { background: var(--gray-bg); color: var(--text-sub); }
.ad-status { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 4px; }
.ad-sub { font-size: 12px; color: var(--text-sub); }
.ad-note { border-radius: 9px; padding: 9px 12px; margin-top: 10px; font-size: 13px; }
.ad-note.ad-warn { background: #fff4e6; border: 1px solid #ffa94d; color: #8a4b0f; }
.ad-note.ad-ok { background: var(--green-bg); border: 1px solid var(--green); }
.ad-cm-note { font-size: 12px; margin-top: 4px; font-weight: 600; }
.ad-cm-note.ad-warn { color: var(--amber); }
.ad-cm-note.ad-muted { color: var(--text-sub); font-weight: 400; }
.ad-detail { margin-top: 12px; }
.ad-detail > summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 6px 0; }
.ad-recon { margin-top: 12px; border: 1px solid var(--line, #e3e6ef); border-radius: 9px; padding: 10px 12px; display: grid; gap: 6px; }
.ad-recon-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-variant-numeric: tabular-nums; }
.ad-recon-row span { color: var(--text-sub); }
.ad-warn-text { color: var(--amber); }

/* ===== 2026-09-11 쿠팡 센터명 · 입고 요청 거절 ===== */
.center-code { color: var(--text-sub); font-size: 11.5px; font-weight: 400; }
.center-name.unknown { color: var(--amber); font-weight: 600; }
.rg-approval-cell { min-width: 120px; }
.rg-reject-info {
  margin-top: 5px; padding: 6px 8px; background: var(--red-bg); border-radius: 8px;
  font-size: 12px; line-height: 1.5; max-width: 260px; white-space: normal;
}
.rg-reject-info small { color: var(--text-sub); }
.rg-block { color: var(--red); font-weight: 600; }
/* 2026-09-11 합배송(운송 묶음) - 같은 트럭 한 대, 운송비는 묶음 전체에 한 번 */
.rg-group { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 6px; background: var(--brand-light); color: var(--brand); font-weight: 600; font-size: 12px; line-height: 1.5; }
.rg-link, .rg-note { color: var(--text-sub); font-size: 12px; }
.rg-actions { white-space: nowrap; }
.rg-actions .btn { margin: 2px 0; }
.rg-migrate-note { font-size: 12.5px; color: var(--text-sub); margin: 4px 0 10px; }
.rg-modal-sub { font-size: 13.5px; color: var(--text-sub); margin: 4px 0 14px; line-height: 1.7; }
.rg-reason-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.rg-reason-label small { font-weight: 400; color: var(--text-sub); }
.rg-reason-label textarea, .rg-reason-label input {
  display: block; width: 100%; margin-top: 6px; padding: 9px 12px;
  border: 1.5px solid var(--line); border-radius: 10px; font-weight: 400; resize: vertical;
}
.rg-reason-label textarea:focus, .rg-reason-label input:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 93, 240, .12);
}
.rg-reason-label .req { color: var(--red); font-size: 11.5px; margin-left: 4px; }
.rg-modal-notes { font-size: 12.5px; color: var(--text-sub); margin: 0 0 4px 18px; line-height: 1.75; }
.modal.rg-detail-modal { max-width: 660px; }
table.rg-detail { width: 100%; border-collapse: collapse; }
table.rg-detail th, table.rg-detail td { padding: 7px 8px; border-bottom: 1px solid var(--line); font-size: 13px; text-align: left; vertical-align: top; }
table.rg-detail th { white-space: nowrap; color: var(--text-sub); font-weight: 500; width: 104px; }
table.rg-detail td { overflow-wrap: anywhere; word-break: keep-all; }
table.rg-detail td code { word-break: break-all; }
@media (max-width: 520px) {
  table.rg-detail th { width: 72px; white-space: normal; }
  .rg-actions { white-space: normal; }
}
.rg-detail-h { margin: 16px 0 6px; font-size: 13.5px; }
.rg-events { margin: 0 0 0 18px; font-size: 12.5px; line-height: 1.8; max-height: 210px; overflow-y: auto; }
.rg-ev-time { color: var(--text-sub); font-variant-numeric: tabular-nums; }
.rg-ev-note { color: var(--text-sub); }
.rg-muted { color: var(--text-sub); font-size: 12.5px; }
.rg-detail-actions { margin-right: auto; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rg-group-void { background: var(--bg-sub, #f1f3f5); color: var(--text-sub, #6b7487); font-weight: 500; }
.rg-multi-note { display: inline-block; margin-top: 3px; font-size: 11.5px; color: var(--text-sub); }
/* 2026-09-12 발주서 자동입고 보류(재입고 승인 필요) */
.chip.po-hold { background: var(--amber-bg); color: var(--amber); font-weight: 600; }
.po-hold-box { border: 1px solid var(--line); border-radius: 9px; padding: 12px; margin-top: 10px; font-size: 13px; line-height: 1.75; }
.po-hold-form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.po-hold-form input { flex: 1 1 220px; min-width: 0; padding: 7px 10px; border: 1.5px solid var(--line); border-radius: 8px; }
.po-hold-form input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 93, 240, .12); }
/* 2026-09-12 발주·물류 정보 입력 */
.pi-note { color: var(--text-sub); font-size: 13px; line-height: 1.7; margin-bottom: 12px; max-width: 78ch; }
.pi-banner { background: var(--brand-light); color: var(--brand-dark); border-radius: 9px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px; }
.pi-banner.bad { background: var(--red-bg); color: var(--red); }
.pi-tabs { display: flex; gap: 6px; }
.pi-tab { border: 1.5px solid var(--line); background: var(--card); color: var(--text-sub); border-radius: 99px; padding: 5px 12px; font-size: 13px; font-weight: 600; }
.pi-tab.on { border-color: var(--brand); background: var(--brand-light); color: var(--brand); }
.pi-table td { vertical-align: top; padding: 10px 6px; white-space: normal; }
.pi-table th { padding: 9px 6px; white-space: normal; vertical-align: bottom; }
.pi-sync { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.pi-sync .chip { font-size: 11px; padding: 2px 8px; }
.pi-table tr.pi-dirty td { background: #fafbff; }
.pi-table tr.pi-dirty td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.pi-name { max-width: 160px; white-space: normal !important; }
.pi-name b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi-sub { color: var(--text-sub); font-size: 11.5px; line-height: 1.5; }
.pi-in { border: 1.5px solid var(--line); border-radius: 8px; padding: 6px 8px; background: #fff; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.pi-in:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 93, 240, .12); }
.pi-in.bad { border-color: var(--red); background: var(--red-bg); }
.pi-in:disabled { background: var(--gray-bg); color: var(--text-sub); }
.pi-inwrap { white-space: nowrap; }
.pi-unit { margin-left: 4px; color: var(--text-sub); font-size: 12px; }
.pi-code { font-size: 11.5px; }
.pi-table select.pi-in { max-width: 108px; }
.pi-table .pi-sugg { max-width: 118px; }
.pi-table th .pi-sub { font-weight: 500; letter-spacing: 0; }
.pi-err { color: var(--red); font-size: 11.5px; min-height: 0; line-height: 1.45; }
.pi-err:empty { display: none; }
.pi-warn { color: var(--amber); font-size: 11.5px; line-height: 1.45; margin-top: 3px; white-space: normal; max-width: 200px; }
.pi-sugg { color: #9aa1b1; font-size: 11.5px; line-height: 1.45; margin-top: 3px; max-width: 140px; word-break: keep-all; }
.pi-fill { border: 1px solid var(--line); background: var(--card); color: var(--text-sub); border-radius: 6px; padding: 0 6px; font-size: 11px; margin-left: 2px; }
.pi-fill:hover { border-color: var(--brand); color: var(--brand); }
.pi-cost-cell { min-width: 150px; }
.pi-cost { font-size: 14px; font-variant-numeric: tabular-nums; }
.pi-cost-cell.bad .pi-vat { border-color: var(--red); }
.pi-vat-q { font-size: 11.5px; color: var(--text-sub); margin: 6px 0 3px; }
.pi-vat { display: flex; align-items: center; gap: 5px; white-space: nowrap; border: 1.5px solid var(--line); border-radius: 8px; padding: 4px 8px; margin-bottom: 4px; font-size: 12.5px; cursor: pointer; }
.pi-vat.on { border-color: var(--brand); background: var(--brand-light); color: var(--brand-dark); font-weight: 600; }
.pi-link { border: none; background: none; color: var(--brand); font-size: 12px; padding: 0; }
.pi-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.pi-foot > span { margin-right: auto; font-size: 13px; }
.pi-review-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; font-size: 13px; line-height: 1.6; }
.pi-review-cost { margin: 2px 0 6px; }
.pi-result { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.pi-result.bad { color: var(--red); }
/* 2026-09-12 VAT 확인 대기 경고(발주안·기안·승인) */
.po-vat-box { background: var(--amber-bg); border: 1px solid #f1d38a; border-radius: 10px; padding: 10px 12px; margin: 10px 0; font-size: 13px; line-height: 1.6; }
.po-vat-box ul { margin: 4px 0 4px 18px; }
.po-vat-box p { margin: 4px 0; color: var(--text-sub); }
.po-vat-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 4px 0; }
.po-vat-ack { display: flex; gap: 6px; align-items: center; font-weight: 600; margin-top: 4px; cursor: pointer; }
.pi-vat-chip { margin-left: 4px; font-size: 11px; padding: 2px 7px; }
/* 2026-09-13 부분 저장(물류정보 입력 필요) · 재입고·동기화 제외 SKU */
.pi-logi { margin-top: 6px; }
.pi-logi .chip { font-size: 11px; padding: 2px 8px; }
.pi-logi:empty { display: none; }
.pi-warn.pi-warn-wide { max-width: none; }
.pi-ex-form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.pi-ex-reason { max-width: 260px; white-space: normal !important; font-size: 13px; }
.pi-ex-act { white-space: nowrap; }
.pi-ex-act .pi-link { margin-right: 6px; }
.pi-ex-released { margin-top: 10px; font-size: 13px; }
.pi-ex-released summary { cursor: pointer; color: var(--text-sub); margin-bottom: 4px; }
.idt-ref { color: var(--text-sub); font-weight: 600; }
