/* ===== 나울 재고 관제 웹 — 모바일 우선 ===== */
:root {
  --soldout: #A32D2D;   /* 품절 빨강 */
  --low:     #854F0B;   /* 임박 주황 */
  --ok:      #3B6D11;   /* 양호 초록 */
  --plenty:  #185FA5;   /* 충분 파랑 */

  --bg:      #0f1115;
  --card:    #1a1e26;
  --card-2:  #232834;
  --line:    #2e3440;
  --text:    #e8ebf0;
  --muted:   #9aa3b2;
  --accent:  #185FA5;
  --danger:  #A32D2D;
  --radius: 14px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic",
               "Apple SD Gothic Neo", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 640px; margin: 0 auto; padding: 16px; }

/* ---------- 헤더 ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.topbar .brand { font-weight: 700; font-size: 17px; letter-spacing: -0.3px; }
.topbar .brand small { color: var(--muted); font-weight: 500; font-size: 12px; margin-left: 6px; }
.topbar .actions { display: flex; gap: 8px; align-items: center; }
.topbar .who { color: var(--muted); font-size: 13px; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--card-2); color: var(--text);
  padding: 11px 16px; border-radius: 10px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: filter .12s ease; text-decoration: none;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translatey(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-danger  { background: transparent; border-color: var(--danger); color: #e88; }
.btn-ghost   { background: transparent; }
.btn-sm { padding: 7px 11px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 카드 ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px;
}
.card h2 { margin: 0 0 12px; font-size: 16px; }

/* ---------- 로그인 ---------- */
.login-screen { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-box { width: 100%; max-width: 360px; }
.login-logo { text-align: center; margin-bottom: 22px; }
.login-logo .mark { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
.login-logo .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 12px 14px; font-size: 16px;
  background: var(--card-2); border: 1px solid var(--line);
  border-radius: 10px; color: var(--text);
}
.field input:focus { outline: none; border-color: var(--accent); }
.field-select {
  width: 100%; padding: 12px 14px; font-size: 16px;
  background: var(--card-2); border: 1px solid var(--line);
  border-radius: 10px; color: var(--text); appearance: none;
}
.field-select:focus { outline: none; border-color: var(--accent); }
.login-note { text-align: center; color: var(--muted); font-size: 12px; margin-top: 16px; }
.msg { font-size: 13px; padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; display: none; }
.msg.show { display: block; }
.msg.error { background: rgba(163,45,45,.15); color: #f0a0a0; border: 1px solid rgba(163,45,45,.4); }
.msg.success { background: rgba(59,109,17,.15); color: #a8d98a; border: 1px solid rgba(59,109,17,.4); }

/* ---------- 요약 카드 ---------- */
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 8px; text-align: center; }
.stat .num { font-size: 22px; font-weight: 800; line-height: 1.1; }
.stat .lab { font-size: 11px; color: var(--muted); margin-top: 4px; }
.stat.s-soldout .num { color: #e07a7a; }
.stat.s-low .num { color: #d6a55a; }
.stat .num.total { color: var(--text); }

/* ---------- 경보 ---------- */
.warnings { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.warn { padding: 11px 13px; border-radius: 10px; font-size: 13.5px; font-weight: 600; display: flex; gap: 8px; align-items: flex-start; }
.warn.line_wiped { background: rgba(163,45,45,.18); border: 1px solid rgba(163,45,45,.5); color: #f0b0b0; }
.warn.extension  { background: rgba(133,79,11,.18); border: 1px solid rgba(133,79,11,.5); color: #e6c082; }
.warn.invalid    { background: rgba(110,110,120,.18); border: 1px solid rgba(110,110,120,.5); color: #c8ccd6; }
.warn.soldout    { background: rgba(163,45,45,.18); border: 1px solid rgba(163,45,45,.5); color: #f0b0b0; }

/* 안전재고 라벨 (네이버 재고) */
.sku .safe { font-size: 10px; color: var(--muted); flex: 0 0 auto; white-space: nowrap; }

/* ---------- 라인 섹션 ---------- */
.line-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.line-head .name { font-size: 16px; font-weight: 700; }
.line-head .badge { font-size: 11px; padding: 3px 8px; border-radius: 20px; background: var(--card-2); color: var(--muted); margin-left: 8px; }
.line-head .badge.wiped { background: var(--soldout); color: #fff; }
.line-head .badge.ext  { background: var(--low); color: #fff; }

/* 본품/연장패널 소제목 (한 라인 안에서 구분) */
.sku-group { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .02em; margin: 2px 0; }
.sku-group.ext { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.sku-group + .sku { border-top: none; }

/* SKU 행: 2줄 구조 — 윗줄(점+이름+수량), 아랫줄(안전+막대). 이름은 잘리지 않고 줄바꿈됨 */
.sku { padding: 10px 0; border-top: 1px solid var(--line); }
.sku:first-child { border-top: none; }
.sku-top { display: flex; align-items: flex-start; gap: 8px; }
.sku-top .dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; margin-top: 5px; }
.sku-top .nm { flex: 1; min-width: 0; font-size: 14px; line-height: 1.4; word-break: break-word; }
.sku-top .nm .tag-ext { font-size: 10px; color: var(--low); border: 1px solid var(--low); border-radius: 4px; padding: 0 4px; margin-right: 5px; }
.sku-top .qty { font-size: 15px; font-weight: 700; flex: 0 0 auto; min-width: 40px; text-align: right; }
.sku-bot { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding-left: 17px; }
.sku-bot .safe { font-size: 11px; color: var(--muted); flex: 0 0 auto; white-space: nowrap; }
.bar-wrap { flex: 1; height: 7px; background: var(--card-2); border-radius: 5px; overflow: hidden; }
.bar { height: 100%; border-radius: 5px; }

.st-soldout .dot, .st-soldout .bar { background: var(--soldout); }
.st-low .dot, .st-low .bar { background: var(--low); }
.st-ok .dot, .st-ok .bar { background: var(--ok); }
.st-plenty .dot, .st-plenty .bar { background: var(--plenty); }
.st-soldout .qty { color: #e07a7a; }
.st-low .qty { color: #d6a55a; }

/* ---------- 입력부 ---------- */
textarea {
  width: 100%; min-height: 120px; padding: 12px; font-size: 13px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  background: var(--card-2); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); resize: vertical;
}
textarea:focus { outline: none; border-color: var(--accent); }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; }
.help { font-size: 12px; color: var(--muted); margin: 8px 0; }
.updated { text-align: center; color: var(--muted); font-size: 12px; margin: 8px 0 4px; }
.hidden { display: none !important; }

/* ---------- 관리자 테이블 ---------- */
.user-card { padding: 12px 0; border-top: 1px solid var(--line); }
.user-card:first-child { border-top: none; }
.user-row { display: flex; align-items: center; gap: 10px; }
.user-row .uinfo { flex: 1; min-width: 0; }
.user-row .uinfo .un { font-weight: 600; font-size: 14px; }
.user-row .uinfo .um { font-size: 12px; color: var(--muted); }
.role-pill { font-size: 11px; padding: 2px 8px; border-radius: 20px; }
.role-pill.admin { background: var(--accent); color: #fff; }
.role-pill.staff { background: var(--card-2); color: var(--muted); }
.temp-pass {
  background: rgba(59,109,17,.15); border: 1px solid rgba(59,109,17,.4);
  border-radius: 8px; padding: 10px 12px; margin-top: 10px; font-size: 13px;
}
.temp-pass code { font-family: ui-monospace, monospace; font-size: 15px; color: #a8d98a; user-select: all; }

/* ---------- 권한 영역 ---------- */
.perms { margin-top: 10px; padding: 10px 12px; background: var(--card-2); border-radius: 10px; }
.perms-title { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.perm-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; }
.perm-name { font-size: 13.5px; }
.perm-fixed { font-size: 12px; color: var(--plenty); font-weight: 600; }
.perm-select {
  padding: 6px 10px; font-size: 13px; background: var(--card); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; min-width: 84px;
  transition: border-color .2s ease;
}
.perm-select:focus { outline: none; border-color: var(--accent); }

@media (min-width: 480px) {
  .topbar .who { font-size: 14px; }
}

/* ===== 앱 레이아웃 (디스코드식 사이드바 + 메인) ===== */
.app { display: flex; min-height: 100dvh; }

.sidebar {
  width: 244px; flex: 0 0 244px; background: #14171e;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100dvh;
}
.sidebar-head { padding: 16px 16px 12px; font-weight: 800; font-size: 16px; border-bottom: 1px solid var(--line); }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 10px 8px; }
.cat { margin-bottom: 14px; }
.cat-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; padding: 4px 8px; }
.chan { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: #c7ccd6; font-size: 14px; }
.chan:hover { background: var(--card-2); }
.chan.active { background: var(--accent); color: #fff; }
.chan-ico { width: 18px; text-align: center; flex: 0 0 auto; }
.chan-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chan.soon, .chan.locked { color: #6b7280; cursor: default; }
.chan.soon:hover, .chan.locked:hover { background: transparent; }
.chan-tag.soon { font-size: 10px; background: var(--card-2); color: var(--muted); padding: 1px 6px; border-radius: 10px; flex: 0 0 auto; }
.chan-lock { font-size: 11px; opacity: .7; flex: 0 0 auto; }
.sidebar-foot { border-top: 1px solid var(--line); padding: 10px 12px; }
.sidebar-foot .me { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.sidebar-foot-btns { display: flex; gap: 6px; }

.main { flex: 1; min-width: 0; }
.hamburger { display: none; background: none; border: none; color: var(--text); font-size: 22px; cursor: pointer; padding: 0 10px 0 0; line-height: 1; }
.drawer-overlay { display: none; }
.view.hidden { display: none; }

.placeholder { text-align: center; padding: 56px 20px; color: var(--muted); }
.ph-icon { font-size: 46px; margin-bottom: 14px; }
.ph-title { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.ph-desc { font-size: 14px; max-width: 360px; margin: 0 auto; }

/* ===== 리포트 (숫자카드 + 표 섹션) ===== */
.metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
.metric { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.metric .mlab { font-size: 12px; color: var(--muted); }
.metric .mval { font-size: 21px; font-weight: 800; margin-top: 4px; line-height: 1.15; }
.metric .msub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.metric.good .mval { color: #a8d98a; }
.metric.warn .mval { color: #d6a55a; }
.metric.bad .mval  { color: #e07a7a; }
.rnote { font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.rrow { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.rrow:first-of-type { border-top: none; }
.rrow .rl { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.35; word-break: break-word; }
.rrow .rl .rsub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.rrow .rv { flex: 0 0 auto; font-weight: 700; font-size: 14px; text-align: right; white-space: nowrap; }
.chartbox { position: relative; height: 240px; }

/* 리포트 표 (가로 스크롤) */
.rtable-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
.rtable { border-collapse: collapse; width: 100%; font-size: 12.5px; white-space: nowrap; }
.rtable th { background: var(--card-2); color: var(--muted); font-weight: 700; padding: 8px 10px; text-align: right; position: sticky; top: 0; }
.rtable th:first-child { text-align: left; }
.rtable td { padding: 8px 10px; text-align: right; border-top: 1px solid var(--line); }
.rtable td.rt-name { text-align: left; font-weight: 600; position: sticky; left: 0; background: var(--card); }
.rtable tbody tr:hover td { background: var(--card-2); }

/* ===== 로그인 기록 ===== */
.log-wrap { overflow-x: auto; }
.log-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.log-table th, .log-table td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.log-table th { color: var(--muted); font-weight: 700; font-size: 12px; }
.log-table tbody tr:hover { background: var(--card-2); }
.log-ip { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--muted); }

/* ===== CS 답변 초안 ===== */
.cs-card { border-left: 3px solid var(--accent); }
.cs-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.cs-cat { background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.cs-title { font-weight: 700; font-size: 14px; }
.cs-when { color: var(--muted); font-size: 12px; margin-left: auto; }
.cs-product { color: var(--muted); font-size: 12.5px; margin-bottom: 8px; }
.cs-q { background: var(--card-2); border-radius: 8px; padding: 8px 10px; font-size: 13px; margin-bottom: 10px; white-space: pre-wrap; }
.cs-q-label { display: inline-block; color: var(--muted); font-size: 11px; font-weight: 700; margin-right: 6px; }
.cs-draft-label { font-size: 12.5px; font-weight: 700; color: #a8d98a; margin-bottom: 4px; }
.cs-hint { color: var(--muted); font-weight: 400; font-size: 11px; }
.cs-draft-text { width: 100%; box-sizing: border-box; background: #12331f; color: var(--text); border: 1px solid #2c5a3a; border-radius: 8px; padding: 10px; font-size: 13px; line-height: 1.6; font-family: inherit; resize: vertical; }
.cs-actions { margin-top: 8px; text-align: right; }

/* ===== 과거 날짜 조회 / 엑셀 ===== */
.hist-toolbar { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; flex-wrap: wrap; }
.hist-toolbar-lab { color: var(--muted); font-size: 13px; }
.date-sel { background: var(--card-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.date-inp { background: var(--card-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font-size: 12.5px; color-scheme: dark; }
.past-banner { background: #2a2410; border: 1px solid #5a4a1a; color: #e6c96a; padding: 8px 12px; border-radius: 8px; margin: 0 0 10px; font-size: 13px; }

/* ===== 재고 추이 / 전날 대비 ===== */
.hist-change { font-size: 13px; color: var(--text); }
.hist-muted { color: var(--muted); font-size: 12.5px; }
.d-good { color: #a8d98a; }
.d-warn { color: #d6a55a; }
.d-bad  { color: #e07a7a; }
.d-flat { color: var(--muted); }
.sku-d { font-size: 11px; font-weight: 800; margin-left: 6px; flex: 0 0 auto; }
.sku-d.d-good { color: #a8d98a; }
.sku-d.d-warn { color: #d6a55a; }

/* ===== AI 인사이트 (재고) ===== */
.ai-summary { margin-bottom: 14px; }
.ai-badge { display: inline-block; font-size: 11px; font-weight: 700; color: #c7b8f0; }
.ai-sum-text {
  background: linear-gradient(180deg, rgba(107,91,208,.14), rgba(107,91,208,.06));
  border: 1px solid rgba(107,91,208,.4); border-radius: 12px;
  padding: 13px 15px; margin-top: 6px; font-size: 14.5px; font-weight: 600; line-height: 1.5;
}
.ai-h { margin: 0 0 12px; font-size: 15px; }
.ai-count { font-size: 12px; color: var(--muted); font-weight: 600; margin-left: 4px; }

/* 발주 우선순위 항목 */
.ai-item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.ai-item:first-of-type { border-top: none; }
.ai-rank {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
  background: var(--soldout); color: #fff; font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.ai-item-body { flex: 1; min-width: 0; }
.ai-item-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.ai-item-name { font-size: 14.5px; font-weight: 700; word-break: break-word; }
.ai-chan { font-size: 11px; color: var(--muted); background: var(--card-2); border-radius: 20px; padding: 1px 8px; margin-left: 4px; }
.ai-urg { font-size: 11px; font-weight: 800; border-radius: 6px; padding: 2px 7px; color: #fff; }
.ai-urg.u-soldout { background: var(--soldout); }
.ai-urg.u-high { background: var(--low); }
.ai-urg.u-mid { background: #5a6472; }
.ai-item-nums { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.ai-item-nums b { color: var(--text); }
.ai-reason { font-size: 13.5px; margin-top: 5px; line-height: 1.45; }

/* 위험 옵션 목록 */
.ai-risknote { font-size: 13px; color: #d6a55a; margin: 0 0 12px; line-height: 1.5; }
.ai-risk-list { display: flex; flex-direction: column; }
.ai-risk-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.ai-risk-row:first-child { border-top: none; }
.ai-risk-name { font-size: 13.5px; min-width: 0; word-break: break-word; }
.ai-risk-num { flex: 0 0 auto; font-size: 13px; font-weight: 700; color: #e07a7a; white-space: nowrap; }
.ai-risk-sep { color: var(--muted); font-weight: 400; margin: 0 5px; }

@media (max-width: 768px) {
  .sidebar {
    position: fixed; left: 0; top: 0; height: 100dvh; z-index: 50;
    transform: translateX(-100%); transition: transform .2s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .drawer-overlay.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 40; }
  .hamburger { display: inline-block; }
  .topbar .who { display: none; }
}

/* ---------- 통합재고 ---------- */
.intg-h { font-size: 15px; margin: 18px 2px 8px; }
.intg-count { color: var(--muted); font-size: 13px; font-weight: 500; }
.intg-note { color: var(--muted); font-size: 12px; margin: 0 2px 8px; }

.intg-channels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.intg-ch {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px;
}
.intg-ch.nodata { opacity: .55; }
.intg-ch-top { font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.intg-ch-stats { display: flex; gap: 10px; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.intg-ch-stock { font-size: 13px; color: var(--text); }
.intg-ch-stock b { font-size: 15px; }
.intg-ch-upd { font-size: 11px; color: var(--muted); margin-top: 4px; }
.mx-soldout { color: #e28d8d; }
.mx-low { color: #e6d178; }

.intg-matrix-wrap { overflow: auto; max-height: 72vh; border-radius: 12px; border: 1px solid var(--line); }
.intg-matrix { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; min-width: 460px; }
.intg-matrix th, .intg-matrix td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 6px; text-align: center; line-height: 1.3; height: 26px; box-sizing: border-box; }
/* 채널 헤더 행 고정 — 스크롤해도 항상 보임(엑셀 줄고정) */
.intg-matrix tr:first-child th { position: sticky; top: 0; z-index: 3; background: var(--card-2); font-size: 12px; line-height: 1.3; }
.intg-matrix th.mx-corner { background: var(--card-2); }
.intg-matrix th.mx-row { background: var(--card); text-align: left; font-weight: 600; white-space: nowrap; padding-left: 10px; }
.intg-matrix td.mx { background: var(--card); }
.intg-matrix td.mx b { font-size: 13px; }
.intg-matrix td.mx small { display: inline; font-size: 10px; margin-left: 3px; opacity: .95; }
.intg-matrix td.none { color: var(--muted); background: var(--card); }
/* 3색: 파랑=양호 · 노랑=부족 · 빨강=품절 */
td.mx-soldout { background: rgba(163,45,45,.30) !important; color: #f2b6b6; }
td.mx-low { background: rgba(200,168,20,.24) !important; color: #ecd77e; }
td.mx-ok { background: rgba(24,95,165,.22) !important; color: #a9c9ec; }
.mx-d { display: inline; font-size: 10px; font-weight: 700; margin-left: 4px; vertical-align: middle; }
.mx-d.up { color: #86d693; }
.mx-d.down { color: #f0a3a3; }
.intg-matrix tr.mx-grouphead th { background: var(--card-2); font-weight: 700; text-align: left; padding: 7px 10px; font-size: 13px; }
.intg-matrix tr.mx-optrow th { background: var(--card); text-align: left; font-weight: 500; color: var(--text); padding-left: 22px; white-space: nowrap; font-size: 12px; }
/* 단일 제품(카테고리=제품) 행은 옵션이 아니라 카테고리처럼 보이게 */
.intg-matrix tr.mx-solo th.mx-row { background: var(--card-2); font-weight: 700; font-size: 13px; }
.intg-search { flex: 0 0 auto; width: 150px; background: var(--card-2); border: 1px solid var(--line); border-radius: 8px; color: var(--text); padding: 7px 10px; font-size: 13px; }
.intg-search:focus { outline: none; border-color: var(--accent); }
.intg-updated { color: var(--muted); font-size: 12px; margin-top: 8px; }

/* 쿠팡광고 업로드 */
.cpad-upload { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cpad-fname { color: var(--muted); font-size: 13px; }
.cpad-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 8px; }
.cpad-table th small { font-weight: 500; color: var(--muted); font-size: 9px; }
@media (max-width: 720px) { .cpad-summary { grid-template-columns: repeat(2, 1fr); } }
.nonad-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 720px) { .nonad-grid { grid-template-columns: 1fr; } }
.nonad-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin-top: 10px; background: var(--line); }
.nonad-ad { background: #d18a2e; }
.nonad-non { background: #4e9e2f; }

.intg-alerts { display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow-y: auto; }
.intg-al {
  display: grid; grid-template-columns: 22px 88px 1fr auto; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-left-width: 3px;
  border-radius: 9px; padding: 8px 12px; font-size: 13px;
}
.intg-al.mx-soldout { border-left-color: var(--soldout); }
.intg-al.mx-low { border-left-color: var(--low); }
.intg-al .al-ch { color: var(--muted); font-weight: 600; }
.intg-al .al-prod { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.intg-al .al-qty { font-weight: 700; white-space: nowrap; }
.intg-al.mx-soldout .al-qty { color: #e28d8d; }
.intg-empty { color: var(--muted); padding: 16px; text-align: center; }

@media (max-width: 720px) {
  .intg-channels { grid-template-columns: repeat(2, 1fr); }
  .intg-al { grid-template-columns: 20px 1fr auto; }
  .intg-al .al-ch { display: none; }
}
