/* =========================================================================
   ITEMGATE 앱 디자인 시스템 (style A, 1단계)
   - 원본 샘플: design/app.css. 쓰는 법은 design/APPLY.md.
   - index.html의 인라인 <style> 뒤에 읽혀서 같은 명시도면 이 파일이 이긴다.
   - 모듈(dashboard.js 등)이 나중에 넣는 <style>은 이 파일보다 뒤라서, 모듈 고유 클래스는
     모듈 쪽이 이긴다. 그래서 여기서는 옛 변수(--brand, --text ...)를 새 토큰에 연결해
     모듈이 색·둥글기를 자동으로 따라오게 하고, 요소 기본값은 :where()로 명시도 0을 준다.
   - 글꼴(Pretendard)은 index.html <head>의 jsDelivr 링크로 이미 읽는다.
   ========================================================================= */

/* ---------- 1. 토큰 ---------- */
:root {
  /* 글자색(남색 계열) */
  --ink: #0A0F1F;          /* 제목, 주요 글자 */
  --ink-2: #2B3244;        /* 본문 */
  --ink-3: #555D70;        /* 보조 글자, 메타 */
  --ink-4: #8A91A2;        /* placeholder, 비활성 전용 */
  --line: #E4E7EE;         /* 테두리 */
  --line-2: #EEF0F4;       /* 행 구분선 */
  --bg: #F5F6F9;           /* 바탕 */
  --surface: #FFFFFF;
  --surface-2: #F8F9FB;    /* 표 머리, 옅은 면 */
  --hover: #F1F3F7;

  /* 브랜드 */
  --brand: #2F5BFF;
  --brand-600: #234BE6;
  --brand-700: #1C3DC2;
  --brand-50: #EEF2FF;
  --brand-100: #DCE4FF;
  --brand-ink: #1F45D6;

  /* 상태 */
  --ok: #0E9F6E;   --ok-bg: #E7F6EF;   --ok-ink: #05603A;
  --warn: #F79009; --warn-bg: #FFF4E3; --warn-ink: #93370D;
  --bad: #E5383B;  --bad-bg: #FDECEC;  --bad-ink: #B42318;
  --mute-dot: #A3A9B7;

  /* 글자 크기: 13 / 14 / 16 / 20 / 24 / 28 */
  --fs-1: 13px;  --fs-2: 14px;  --fs-3: 16px;  --fs-4: 20px;  --fs-5: 24px;  --fs-6: 28px;

  /* 간격 */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-7: 32px; --s-8: 40px; --s-9: 48px;

  /* 둥글기 6 / 8 / 12 */
  --r-sm: 6px;  --r-md: 8px;  --r-lg: 12px;

  /* 그림자 */
  --sh-1: 0 1px 2px rgba(10, 15, 31, .05);
  --sh-2: 0 2px 6px rgba(10, 15, 31, .06), 0 16px 40px -12px rgba(10, 15, 31, .22);
  --ring: 0 0 0 3px rgba(47, 91, 255, .28);
  --side-w: 240px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* ---- 옛 변수 → 새 토큰 (모듈 CSS가 이걸 쓴다) ---- */
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --border: var(--line);
  --text: var(--ink);
  --text-2: var(--ink-2);
  --text-3: var(--ink-3);
  --brand-dark: var(--brand-600);
  --brand-soft: var(--brand-50);
  --danger: var(--bad);
  --disabled-bg: #E4E7EE;
  --disabled-bg-hover: #D0D5E0;
  --radius-sm: var(--r-sm);
  --radius-md: var(--r-md);
  --radius-lg: var(--r-lg);
  --shadow-sm: var(--sh-1);
  --shadow-md: 0 4px 14px -6px rgba(10, 15, 31, .15);
  --shadow-lg: var(--sh-2);
  /* 토스 테마의 회색 단계도 같은 남색 계열로 */
  --grey-50: #F8F9FB; --grey-100: #F1F3F7; --grey-200: #E4E7EE; --grey-300: #D0D5E0; --grey-400: #A3A9B7;
  --grey-500: #8A91A2; --grey-600: #555D70; --grey-700: #2B3244; --grey-800: #1A2033; --grey-900: #0A0F1F;
}

/* ---------- 2. 바탕 ---------- */
body {
  font-family: var(--font);
  font-size: var(--fs-2);
  line-height: 1.55;
  color: var(--ink-2);
  background: var(--bg);
  letter-spacing: -0.1px;
  font-feature-settings: normal;
  -webkit-font-smoothing: antialiased;
}
:where(h1, h2, h3, h4) { color: var(--ink); letter-spacing: -0.4px; }
:where(button, input, select, textarea) { font-family: inherit; }
:focus-visible { outline: none; box-shadow: var(--ring); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 아이콘: index.html 맨 위 숨은 <svg>의 symbol을 <svg class="i"><use href="#ic-이름"/></svg>로 쓴다 */
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.i-sm { width: 16px; height: 16px; }
.i-xs { width: 14px; height: 14px; }
.mk-ico { width: 16px; height: 16px; flex: none; border-radius: 4px; display: block; }

/* ---------- 3. 요소 기본값 (명시도 0: 모듈 클래스가 있으면 그쪽이 이긴다) ---------- */
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]), textarea, select) {
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background-color: var(--surface);
  font-size: var(--fs-2);
  transition: border-color .12s, box-shadow .12s;
}
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), textarea, select):hover { border-color: #D0D5E0; }
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), textarea, select):focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
:where(input, textarea)::placeholder { color: var(--ink-4); }
:where(input[type="checkbox"], input[type="radio"]) { accent-color: var(--brand); }
:where(table) { border-collapse: collapse; }

/* 네이티브 <select>: 샘플 select와 같은 꺽쇠·높이·둥글기. 모듈이 background를 통째로 덮어도
   꺽쇠가 사라지지 않게 이미지 쪽만 !important. (multiple/size 목록형은 제외) */
select:not([multiple]):not([size]) {
  -webkit-appearance: none;
  appearance: none;
  min-height: 36px;
  padding-left: 12px;
  padding-right: 34px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23555D70' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 16px 16px !important;
  cursor: pointer;
  font-weight: 500;
  text-overflow: ellipsis;
}
select:disabled { cursor: not-allowed; opacity: .55; }
/* backup.js가 select 옆에 그리던 '▾'는 이제 select 자체 꺽쇠와 겹친다 */
.bk-select::after { content: none !important; }

/* ---------- 4. 앱 틀 + 왼쪽 메뉴 ---------- */
.app-shell { display: flex; align-items: flex-start; min-height: 100vh; }
main > div { max-width: 1200px; margin: 0 auto; padding: var(--s-7) var(--s-8) var(--s-9); }

.sidebar {
  width: var(--side-w);
  height: 100vh;
  min-height: 0;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  padding: var(--s-4) var(--s-3);
  background: var(--surface);
  border-right: 1px solid var(--line);
  backdrop-filter: none;
}
.sidebar .brand { display: flex; align-items: center; justify-content: flex-start; gap: 10px; height: 40px; padding: 0 var(--s-2) !important; margin-bottom: var(--s-4); }
.sidebar .brand-mark { width: 22px; height: 22px; border-radius: 7px; background: var(--brand); position: relative; flex: none; }
.sidebar .brand-mark::after { content: ""; position: absolute; inset: 6px; border: 2px solid #fff; border-radius: 2px; }
.sidebar .brand-text { font-weight: 700; font-size: 17px; letter-spacing: -0.3px; color: var(--ink); }

.sidebar-nav { flex: 1; min-height: 0; overflow-y: auto; display: block; margin: 0 calc(var(--s-3) * -1); padding: 0 var(--s-3); gap: 0; }
.nav-section + .nav-section { margin-top: var(--s-5); }
.nav-label {
  display: flex; align-items: center; gap: 6px;
  padding: 0 var(--s-2) var(--s-1);
  font-size: var(--fs-1); font-weight: 600; color: var(--ink-3);
}
.nav-hot, .hot {
  display: inline-block; position: relative; top: 0;
  padding: 2px 6px 1px; border-radius: 999px;
  font-size: 10px; line-height: 12px; font-weight: 700; letter-spacing: .3px;
  color: #fff; background: linear-gradient(90deg, #F0443A, #FB7A1E);
  box-shadow: 0 1px 2px rgba(240, 68, 58, .3);
  align-self: center;
}
.sidebar .nav-item {
  display: flex; align-items: center; justify-content: flex-start; gap: 10px;
  width: 100%; height: 36px; padding: 0 var(--s-2);
  border: 0; border-radius: var(--r-md); background: none;
  font-size: var(--fs-2); font-weight: 500; color: var(--ink-2); text-align: left;
  cursor: pointer; transition: background .12s, color .12s;
}
.sidebar .nav-item::before { content: none; }
.sidebar .nav-item .i { width: 18px; height: 18px; color: var(--ink-3); transition: color .12s; }
.sidebar .nav-item:hover { background: var(--hover); color: var(--ink); }
.sidebar .nav-item:hover .i { color: var(--ink-2); }
.sidebar .nav-item:active { background: #E9ECF2; }
.sidebar .nav-item.active { background: var(--brand-50); color: var(--brand-ink); font-weight: 600; }
.sidebar .nav-item.active .i { color: var(--brand); }
.nav-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 아래: 계정 줄(이메일 말줄임 + 로그아웃) + 상담 버튼 */
.side-foot { border-top: 1px solid var(--line-2); padding-top: var(--s-3); margin-top: var(--s-3); display: flex; align-items: center; gap: var(--s-1); min-width: 0; }
.side-foot .sidebar-footer {
  flex: 1; min-width: 0; margin: 0; padding: 0; border: 0;
  display: flex; flex-direction: row; align-items: center; gap: 2px;
  font-size: var(--fs-1); color: var(--ink-2);
}
.side-foot .sidebar-footer:empty { display: none; }
.side-foot .user-email {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 var(--s-2); border: 0; border-radius: var(--r-md); background: none;
  color: var(--ink-2); word-break: normal;
}
.side-foot .user-email-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: var(--fs-1); color: var(--ink-3); }
.side-foot .user-avatar { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--ink); color: #fff; font-size: var(--fs-1); font-weight: 700; }
#signout-btn, .sidebar .ch-fab {
  position: relative; inset: auto; z-index: auto; width: 36px; height: 36px; flex: none; padding: 0;
  display: grid; place-items: center;
  border: 0; border-radius: var(--r-md); background: transparent; color: var(--ink-3);
  box-shadow: none; cursor: pointer; transition: background .12s, color .12s;
}
#signout-btn:hover, .sidebar .ch-fab:hover { background: var(--hover); color: var(--ink); border: 0; }
#signout-btn .i, .sidebar .ch-fab svg { width: 18px; height: 18px; }
.sidebar .ch-fab[hidden] { display: none; }
/* 상담 창은 메뉴 오른쪽 아래에서 열린다(표 위를 덮는 둥근 버튼은 없앰) */
body .ch-panel { left: calc(var(--side-w) + 12px); right: auto; bottom: 16px; border-radius: var(--r-lg); box-shadow: var(--sh-2); font-family: var(--font); }

@media (max-height: 860px) {
  .sidebar { padding-top: var(--s-3); padding-bottom: var(--s-3); }
  .sidebar .brand { margin-bottom: var(--s-2); }
  .sidebar .nav-item { height: 32px; }
  .nav-section + .nav-section { margin-top: var(--s-3); }
}

/* ---------- 5. 화면 머리 (모든 메뉴 공통) ----------
   <div class="page-title page-head"><div class="page-head-text"><h1>제목</h1><p>설명</p></div>
   <div class="page-actions">버튼</div></div>
   모듈(품절·마켓 연동)은 .page-title 안에 직접 버튼을 붙이므로 .page-title도 같은 줄 배치를 쓴다. */
.page-title, .page-head {
  display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap;
  gap: var(--s-3) var(--s-4);
  min-height: 40px; margin: 0 0 var(--s-6) !important;
  text-align: left !important;
}
.page-title h1, .page-head h1 { font-size: var(--fs-5); font-weight: 700; line-height: 1.3; letter-spacing: -0.4px; color: var(--ink); margin: 0; }
.page-title p, .page-head p, .page-sub { margin: var(--s-1) 0 0; color: var(--ink-3); font-size: var(--fs-2); }
.page-head-text { min-width: 0; flex: 1 1 auto; }
.page-actions { display: flex; align-items: center; gap: var(--s-2); flex: none; }

/* ---------- 6. 버튼 ---------- */
.btn {
  --h: 40px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: var(--h); padding: 0 var(--s-4);
  border-radius: var(--r-md); border: 1px solid transparent;
  font-size: var(--fs-2); font-weight: 600; line-height: 1; white-space: nowrap; text-decoration: none;
  cursor: pointer; user-select: none;
  transition: background .12s, border-color .12s, color .12s, box-shadow .12s, transform .06s;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; opacity: .45; }
.btn .i { width: 16px; height: 16px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(47, 91, 255, .35), inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn-primary:hover:not(:disabled) { background: var(--brand-600); }
.btn-primary:active:not(:disabled) { background: var(--brand-700); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--sh-1); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); border-color: #D3D8E2; }
.btn-secondary:active:not(:disabled) { background: var(--hover); }
.btn-secondary .i { color: var(--ink-3); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { background: var(--hover); color: var(--ink); }
.btn-ghost:active:not(:disabled) { background: #E9ECF2; }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #CF2B2E; }
.btn-danger:active:not(:disabled) { background: #B42318; }
.btn-sm { --h: 32px; padding: 0 var(--s-3); font-size: var(--fs-1); }
.btn-icon { width: var(--h); padding: 0; }
.btn-link { background: none; border: 0; padding: 0; height: auto; color: var(--brand-ink); font-weight: 600; font-size: var(--fs-1); display: inline-flex; align-items: center; gap: 2px; cursor: pointer; }
.btn-link:hover { color: var(--brand-700); text-decoration: underline; text-underline-offset: 3px; }

/* 기존 버튼 클래스를 같은 규칙으로 (클래스 이름은 그대로) */
/* 주요(파랑) */
#search-btn, .bill-btn.pri, .auth-submit, .me-name-done-btn, .page-jump button, .settings-save-btn,
#market-edit-modal-footer button.primary {
  height: 40px; padding: 0 var(--s-4); border: 1px solid transparent; border-radius: var(--r-md);
  background: var(--brand); color: #fff; font-size: var(--fs-2); font-weight: 600; cursor: pointer;
  box-shadow: 0 1px 2px rgba(47, 91, 255, .35), inset 0 1px 0 rgba(255, 255, 255, .12);
  transition: background .12s, transform .06s;
}
#search-btn:hover, .bill-btn.pri:hover:not(:disabled), .auth-submit:hover:not(:disabled), .me-name-done-btn:hover, .page-jump button:hover, .settings-save-btn:hover,
#market-edit-modal-footer button.primary:hover:not(:disabled) { background: var(--brand-600); }
#search-btn:active { background: var(--brand-700); transform: translateY(1px); }
/* 보조(흰 면 + 테두리) */
.bill-btn, .acc-out, .modal-action-btn, .modal-footer button, .me-name-edit-btn, .me-name-cancel-btn, .settings-test-btn,
.market-edit-gear-btn, .detail-btn, .taobao-btn {
  height: 40px; padding: 0 var(--s-4); display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); box-shadow: var(--sh-1);
  font-size: var(--fs-2); font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: background .12s, border-color .12s, color .12s, transform .06s;
}
.bill-btn:hover:not(:disabled), .acc-out:hover, .modal-action-btn:hover:not(:disabled), .modal-footer button:hover:not(:disabled), .me-name-edit-btn:hover, .me-name-cancel-btn:hover, .settings-test-btn:hover:not(:disabled),
.market-edit-gear-btn:hover, .detail-btn:hover, .taobao-btn:hover:not(:disabled) { background: var(--surface-2); border-color: #D3D8E2; color: var(--ink); }
/* 예전 규칙(index.html)이 마우스를 올리면 테두리를 0으로 지워 버튼 폭이 2px 줄고 옆 버튼이 밀렸다 - 테두리 두께를 그대로 둔다 */
.market-edit-gear-btn:hover, .detail-btn:hover, .taobao-btn:hover { border-width: 1px; border-style: solid; }
.bill-btn:disabled, .modal-action-btn:disabled, .modal-footer button:disabled, .taobao-btn:disabled, .settings-test-btn:disabled { opacity: .45; cursor: not-allowed; }
/* 작은 버튼(행 안, 모달 머리) */
.market-edit-gear-btn, .detail-btn, .taobao-btn, .modal-action-btn, .me-name-edit-btn, .me-name-cancel-btn, .me-name-done-btn, .settings-test-btn, .settings-save-btn {
  height: 32px; padding: 0 var(--s-3); font-size: var(--fs-1);
}
/* 위험(빨강) */
.modal-action-btn.danger, .modal-footer button.primary, .bulk-stop-sale-bar .modal-action-btn.danger, .settings-unlink-btn {
  background: var(--bad); color: #fff; border-color: transparent; box-shadow: none;
}
.modal-action-btn.danger:hover:not(:disabled), .modal-footer button.primary:hover:not(:disabled), .settings-unlink-btn:hover { background: #CF2B2E; color: #fff; border-color: transparent; }
.acc-out:hover { color: var(--bad-ink); border-color: #F3C9C6; background: var(--bad-bg); }

/* ---------- 7. 입력칸 ---------- */
.field { display: grid; gap: 6px; }
.field-label { font-size: var(--fs-1); font-weight: 600; color: var(--ink-2); display: flex; justify-content: space-between; }
.field-label span { font-weight: 500; color: var(--ink-3); }
.field-hint { font-size: var(--fs-1); color: var(--ink-3); }
.input {
  height: 40px; width: 100%; padding: 0 var(--s-3);
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: var(--fs-2);
  transition: border-color .12s, box-shadow .12s;
}
.input::placeholder { color: var(--ink-4); }
.input:hover { border-color: #D0D5E0; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.input.num { text-align: right; }
select.input { padding-right: 34px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > .i { position: absolute; left: 12px; color: var(--ink-3); pointer-events: none; }
.input-wrap > .input { padding-left: 38px; }
.input-wrap .suffix { position: absolute; right: 12px; color: var(--ink-3); font-size: var(--fs-2); pointer-events: none; }
.input-wrap .suffix ~ .input, .input-wrap .input.has-suffix { padding-right: 34px; }

/* 세그먼트 */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: #ECEEF3; border-radius: var(--r-md); }
.seg button { height: 30px; padding: 0 var(--s-3); border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-3); font-size: var(--fs-1); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: background .12s, color .12s; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"], .seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(10, 15, 31, .1); }

/* 칩 */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip {
  height: 32px; padding: 0 var(--s-3); display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font-size: var(--fs-1); font-weight: 600; color: var(--ink-2); cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.chip:hover { border-color: #CDD3DE; color: var(--ink); }
.chip .n { color: var(--ink-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"], .chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip[aria-pressed="true"] .n, .chip.on .n { color: rgba(255, 255, 255, .7); }

/* 체크박스·스위치 */
.cb { appearance: none; width: 16px; height: 16px; margin: 0; border: 1.5px solid #C3C8D4; border-radius: 4px; background: #fff; cursor: pointer; display: grid; place-items: center; transition: background .1s, border-color .1s; }
.cb:hover { border-color: var(--brand); }
.cb:checked { background: var(--brand); border-color: var(--brand); }
.cb:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.switch { appearance: none; width: 34px; height: 20px; border-radius: 999px; background: #CDD2DC; position: relative; cursor: pointer; margin: 0; transition: background .15s; flex: none; vertical-align: middle; display: inline-block; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s var(--ease); }
.switch:checked { background: var(--brand); }
.switch:checked::after { transform: translateX(14px); }

/* ---------- 8. 카드·숫자 타일 ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); min-width: 0; }
.card-head { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-5) var(--s-6) 0; min-height: 52px; }
.card-head h2 { font-size: var(--fs-3); font-weight: 700; letter-spacing: -0.3px; margin: 0; }
.card-head .sub { color: var(--ink-3); font-size: var(--fs-1); }
.card-head .end { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }
.card-body { padding: var(--s-4) var(--s-6) var(--s-6); }
.card-body.flush { padding: var(--s-2) 0; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s-4); }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
.stack { display: grid; gap: var(--s-4); }
.stat { padding: var(--s-5) var(--s-6); display: flex; flex-direction: column; gap: var(--s-2); }
.stat-label { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-1); font-weight: 600; color: var(--ink-3); }
.stat-value { font-size: var(--fs-6); font-weight: 700; color: var(--ink); letter-spacing: -0.8px; line-height: 1.15; display: flex; align-items: baseline; gap: 4px; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: var(--fs-2); font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.stat-foot { font-size: var(--fs-1); color: var(--ink-3); }

/* ---------- 9. 배지·상태·조회수 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px;
  border-radius: var(--r-sm); font-size: var(--fs-1); font-weight: 600; white-space: nowrap;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
}
.badge.soft-brand { background: var(--brand-50); color: var(--brand-ink); border-color: var(--brand-100); }
.badge.ok { background: var(--ok-bg); color: var(--ok-ink); border-color: #CDEEDB; }
.badge.warn { background: var(--warn-bg); color: var(--warn-ink); border-color: #FBDDB0; }
.badge.bad { background: var(--bad-bg); color: var(--bad-ink); border-color: #F6CACA; }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-1); font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mute-dot); flex: none; }
.status.ok::before { background: var(--ok); }
.status.warn::before { background: var(--warn); }
.status.bad::before { background: var(--bad); }
.status.run::before { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
.status.off { color: var(--ink-3); }
.views { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line-2); font-size: var(--fs-1); color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.views .i { width: 14px; height: 14px; color: var(--ink-3); }
.progress { height: 6px; border-radius: 999px; background: #E9ECF2; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.progress.warn > span { background: var(--warn); }

/* ---------- 10. 표 ---------- */
.table-card { overflow: clip; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-2); }
.table.fixed { table-layout: fixed; }
.table th {
  height: 40px; padding: 0 var(--s-3); text-align: left; white-space: nowrap;
  font-size: var(--fs-1); font-weight: 600; color: var(--ink-3);
  background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.table td { padding: 10px var(--s-3); border-bottom: 1px solid var(--line-2); vertical-align: middle; color: var(--ink-2); }
.table th:first-child, .table td:first-child { padding-left: var(--s-5); }
.table th:last-child, .table td:last-child { padding-right: var(--s-4); }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: #FAFBFD; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .strong { color: var(--ink); font-weight: 600; }
.table .w-cb { width: 44px; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--s-1); }
@media (hover: hover) {
  .row-actions .reveal { opacity: 0; transition: opacity .12s; }
  .table tr:hover .reveal, .table tr:focus-within .reveal { opacity: 1; }
}
.table-foot { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-5); border-top: 1px solid var(--line); background: var(--surface); }
.prod { display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.prod-name { color: var(--ink); font-weight: 600; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod-meta { margin-top: 2px; font-size: var(--fs-1); color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* 목록(카드 안) */
.list { list-style: none; margin: 0; padding: 0; }
.list-row { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-6); min-height: 60px; }
.list-row + .list-row { border-top: 1px solid var(--line-2); }
.list-row:hover { background: #FAFBFD; }
.list-text { flex: 1; min-width: 0; }
.list-title { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-sub { font-size: var(--fs-1); color: var(--ink-3); margin-top: 1px; }
.icon-tile { width: 36px; height: 36px; border-radius: var(--r-md); display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--ink-3); }
.icon-tile.bad { background: var(--bad-bg); color: var(--bad-ink); }
.icon-tile.warn { background: var(--warn-bg); color: var(--warn-ink); }
.icon-tile.brand { background: var(--brand-50); color: var(--brand); }

/* 알림 띠 */
.banner {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-3) var(--s-3) var(--s-4); min-height: 52px;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-1);
}
.banner > .i { color: var(--brand); }
.banner .text { flex: 1; min-width: 0; color: var(--ink-2); margin: 0; }
.banner .text b { color: var(--ink); font-weight: 600; margin-right: 6px; }
.banner .end { display: flex; gap: var(--s-1); align-items: center; }
.banner.info { background: var(--brand-50); border-color: var(--brand-100); box-shadow: none; }
.banner.warn { background: var(--warn-bg); border-color: #FBDDB0; box-shadow: none; }
.banner.warn > .i { color: var(--warn-ink); }

/* 빈 상태 */
.empty { display: grid; justify-items: center; text-align: center; gap: var(--s-2); padding: var(--s-9) var(--s-6); }
.empty .icon-tile { width: 48px; height: 48px; margin-bottom: var(--s-2); background: var(--surface-2); border: 1px solid var(--line); }
.empty .icon-tile .i { width: 22px; height: 22px; }
.empty h3 { font-size: var(--fs-3); font-weight: 700; margin: 0; }
.empty p { color: var(--ink-3); max-width: 360px; margin: 0; }
.empty .btn { margin-top: var(--s-3); }
.empty.sm { padding: var(--s-7) var(--s-6); }

/* 단계 표시 */
.steps { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-1); color: var(--ink-3); font-weight: 600; }
.steps .step { display: inline-flex; align-items: center; gap: 6px; }
.steps .step b { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: #E6E9F0; color: var(--ink-3); }
.steps .step.is-on { color: var(--ink); }
.steps .step.is-on b { background: var(--brand); color: #fff; }

/* 페이지 번호 */
.pager { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.pager button { min-width: 32px; height: 32px; padding: 0 var(--s-2); border: 0; border-radius: var(--r-md); background: none; cursor: pointer; color: var(--ink-2); font-size: var(--fs-1); font-weight: 600; font-variant-numeric: tabular-nums; display: grid; place-items: center; }
.pager button:hover:not(:disabled) { background: var(--hover); }
.pager button[aria-current="page"] { background: var(--ink); color: #fff; }
.pager button:disabled { color: var(--ink-4); cursor: default; }
.pager .gap { color: var(--ink-4); padding: 0 4px; }

/* ---------- 11. 모달 (.modal-overlay > .modal-box > .modal-header / .modal-body / .modal-footer) ---------- */
.modal-overlay { background: rgba(10, 15, 31, .42); backdrop-filter: blur(2px); padding: var(--s-6); }
.modal-box { border-radius: var(--r-lg); box-shadow: var(--sh-2); border: 0; }
.modal-header {
  gap: var(--s-3); padding: var(--s-5) var(--s-6) var(--s-4);
  border-bottom: 1px solid var(--line-2);
  font-size: var(--fs-4); font-weight: 700; color: var(--ink); letter-spacing: -0.4px;
}
.modal-close {
  width: 32px; height: 32px; padding: 0; flex: none;
  display: inline-grid; place-items: center;
  border: 0; border-radius: var(--r-md); background: transparent; color: var(--ink-3);
  font-size: 15px; line-height: 1; cursor: pointer;
}
.modal-close:hover { background: var(--hover); color: var(--ink); }
.modal-footer { gap: var(--s-2); padding: var(--s-4) var(--s-6); border-top: 1px solid var(--line-2); background: var(--surface-2); align-items: center; }
#detail-modal-title { font-size: var(--fs-3); }
#confirm-modal-body { font-size: var(--fs-2) !important; color: var(--ink-2) !important; padding: var(--s-6) var(--s-6) var(--s-4) !important; }
#confirm-modal-footer { justify-content: flex-end; }
#stop-sale-modal-body { padding: var(--s-2) var(--s-6) !important; }

/* 알림 토스트 */
.app-toast {
  display: flex; align-items: center; min-height: 44px; padding: 10px var(--s-4);
  background: var(--ink); color: #fff; border-radius: var(--r-md); box-shadow: var(--sh-2);
  font-size: var(--fs-2); font-weight: 500;
}

/* 판매중지 진행 패널 */
.bulk-progress-panel { border-radius: var(--r-lg); box-shadow: var(--sh-2); border: 1px solid var(--line); }

/* ---------- 12. 상품 관리 화면 ---------- */
/* 확장 프로그램 안내: 정보 띠 */
.ext-banner {
  position: static; display: flex; align-items: center; gap: var(--s-3);
  margin: 0 0 var(--s-4); padding: var(--s-3) var(--s-3) var(--s-3) var(--s-4); min-height: 52px;
  border: 1px solid var(--brand-100); border-radius: var(--r-lg); background: var(--brand-50);
  color: var(--ink-2); font-size: var(--fs-2); font-weight: 400; box-shadow: none;
}
.ext-banner > .i { color: var(--brand); }
.ext-banner .ext-banner-text { flex: 1; min-width: 0; }
.ext-banner .ext-banner-text b { color: var(--ink); font-weight: 600; margin-right: 6px; }
.ext-banner .ext-banner-text .muted { color: var(--ink-3); }
.ext-banner-dl {
  height: 32px; padding: 0 var(--s-3); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--sh-1);
  display: inline-flex; align-items: center; font-size: var(--fs-1); font-weight: 600; text-decoration: none; white-space: nowrap;
}
.ext-banner-dl:hover { background: var(--surface-2); border-color: #D3D8E2; }
.ext-banner-x { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: var(--r-md); background: transparent; color: var(--ink-3); cursor: pointer; padding: 0; }
.ext-banner-x:hover { background: rgba(10, 15, 31, .06); color: var(--ink); }

/* 검색줄 */
.search-panel { background: transparent; border: 0; padding: 0; box-shadow: none; margin-bottom: var(--s-4); }
.search-row { display: flex; gap: var(--s-2); align-items: center; }
.search-field { flex: 1; height: 40px; border: 0; border-radius: var(--r-md); background: transparent; box-shadow: none; }
.search-field svg { left: 12px; width: 18px; height: 18px; color: var(--ink-3); }
#search-input {
  height: 40px; padding: 0 var(--s-3) 0 38px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface);
  font-size: var(--fs-2); color: var(--ink); box-shadow: var(--sh-1);
}
#search-input:hover { border-color: #D0D5E0; }
#search-input:focus { border-color: var(--brand); box-shadow: var(--ring); }
#account-filter {
  height: 40px; min-width: 200px; max-width: 260px;
  border: 1px solid var(--line); border-radius: var(--r-md); background-color: var(--surface);
  color: var(--ink); font-size: var(--fs-2); font-weight: 500; box-shadow: var(--sh-1);
}
#account-filter:hover { border-color: #D0D5E0; }
#account-filter:focus { border-color: var(--brand); box-shadow: var(--ring); }
#search-btn { height: 40px; }

/* 마켓 칩 */
.mk-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.mk-chip {
  height: 32px; padding: 0 var(--s-3); display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font-size: var(--fs-1); font-weight: 600; color: var(--ink-2); cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.mk-chip:hover { border-color: #CDD3DE; color: var(--ink); background: var(--surface); }
.mk-chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* 상태 줄 */
#status-line { margin: 0 2px var(--s-3); min-height: 24px; font-size: var(--fs-1); font-weight: 500; color: var(--ink-3); }
#status-line:has(#status-text:empty) { min-height: 0; margin: 0; }
.spinner { border-color: var(--line); border-top-color: var(--brand); }

/* 목록 = 하나의 표 카드: [선택 바(머리)] + [행들] + [페이지 번호(발)] */
.bulk-stop-sale-bar {
  display: flex; align-items: center; gap: var(--s-3);
  min-height: 44px; margin: 0; padding: 0 var(--s-4) 0 var(--s-5);
  background: var(--surface-2); color: var(--ink-3);
  border: 1px solid var(--line); border-bottom: 1px solid var(--line);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  font-size: var(--fs-1); font-weight: 600; box-shadow: var(--sh-1);
}
.bulk-stop-sale-bar.hidden { display: none; }
.bulk-select-all-wrap { margin-right: 0; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; color: var(--ink-3); font-size: var(--fs-1); font-weight: 600; }
.bulk-select-all-wrap input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); }
#bulk-stop-sale-count { color: var(--brand-ink); font-weight: 600; }
#bulk-stop-sale-clear { margin-left: auto; }
.bulk-stop-sale-bar .modal-action-btn { height: 32px; }

#results {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-1); overflow: visible;
}
.bulk-stop-sale-bar:not(.hidden) + #results { border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
#results:has(+ #pagination:not(.hidden)) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
#results .product-card { margin: 0; padding: 0; border: 0; border-top: 1px solid var(--line-2); border-radius: 0; background: transparent; box-shadow: none; position: relative; }
#results .product-card:first-child { border-top: 0; border-top-left-radius: inherit; border-top-right-radius: inherit; }
#results .product-card:last-child { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }
#results .product-card:hover { background: #FAFBFD; box-shadow: none; z-index: 5; }
.pr-row { grid-template-columns: 16px 48px minmax(0, 1fr) auto; gap: var(--s-3) !important; padding: var(--s-3) var(--s-4) var(--s-3) var(--s-5) !important; min-height: 72px; }
.pr-row .bulk-select-wrap { display: grid; place-items: center; }
.pr-row .bulk-select-checkbox { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); }
.pr-thumb { width: 48px; height: 48px; border-radius: var(--r-md) !important; background: linear-gradient(135deg, #E7EBF3, #CBD3E1); box-shadow: inset 0 0 0 1px rgba(10, 15, 31, .06); }
.pr-thumb .main-thumb-wrap, .pr-thumb .thumb-wrap { width: 48px; height: 48px; }
.pr-thumb .main-thumb { width: 48px !important; height: 48px !important; border-radius: var(--r-md) !important; }
.pr-main .product-name { font-size: var(--fs-2); font-weight: 600; line-height: 1.4; letter-spacing: -0.1px; color: var(--ink); }
.pr-meta { gap: 4px 10px; margin-top: 4px; font-size: var(--fs-1); color: var(--ink-3); }
.pr-chip {
  height: 24px; padding: 0 8px; gap: 5px;
  border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface-2);
  font-size: var(--fs-1); font-weight: 600; color: var(--ink-2);
}
.pr-views { font-variant-numeric: tabular-nums; }
.pr-views .i { width: 14px; height: 14px; color: var(--ink-3); }
.pr-mk { gap: 6px; color: var(--ink-2); font-weight: 500; }
.pr-mk .mk-ico { width: 16px; height: 16px; }
.pr-mk:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.pr-mk.stopped { color: var(--bad-ink); }
.pr-code { color: var(--ink-3); }
.bulk-status-badge { font-size: var(--fs-1); font-weight: 600; }
.pr-actions { gap: var(--s-1); align-items: center; }
/* 버튼(상품관리·상세페이지 관리·Taobao 검색)은 항상 보이게 - 마우스를 올려야 나오던 방식은 뺌(2026-12-06 사용자 요청) */

/* 페이지 번호 = 표 카드의 발 */
.pagination {
  display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: var(--s-3);
  margin: 0; padding: var(--s-3) var(--s-5);
  background: var(--surface); border: 1px solid var(--line); border-top: 1px solid var(--line);
  border-radius: 0 0 var(--r-lg) var(--r-lg); box-shadow: var(--sh-1);
}
#results + .pagination { border-top: 0; }
#results:empty + .pagination { border-top: 1px solid var(--line); border-radius: var(--r-lg); }
.page-nums { display: flex; align-items: center; gap: 2px; }
.page-nums button { min-width: 32px; height: 32px; padding: 0 var(--s-2); border: 0; border-radius: var(--r-md); background: none; color: var(--ink-2); font-size: var(--fs-1); font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; }
.page-nums button:hover:not(:disabled) { background: var(--hover); }
.page-nums button.current { background: var(--ink); color: #fff; }
.page-nums button:disabled { color: var(--ink-4); cursor: default; }
.page-nums .ellipsis { color: var(--ink-4); padding: 0 4px; }
.page-jump { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-1); color: var(--ink-3); }
.page-jump input { width: 64px; height: 32px; padding: 0 var(--s-2); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-align: right; font-size: var(--fs-1); }
.page-jump button { height: 32px; padding: 0 var(--s-3); font-size: var(--fs-1); }

/* 빈 상태 (검색 전 / 결과 없음) */
.empty-state { display: grid; justify-items: center; text-align: center; gap: var(--s-2); padding: var(--s-9) var(--s-6); color: var(--ink-3); font-size: var(--fs-2); }
.empty-state .icon { font-size: 0; }
#results .empty { border: 0; }
.search-idle { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
/* 검색어를 넣기 전(목록·상태 글이 비어 있을 때)만 보인다 */
#search-view:not(:has(#results:empty)) .search-idle,
#search-view:has(#status-text:not(:empty)) .search-idle { display: none; }

/* 옛 카드(검색 결과 외)의 기본 모양 */
.product-card { border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--sh-1); }

/* ---------- 13. 상품 수정 창 (#market-edit-modal) ---------- */
#market-edit-modal .modal-box { width: min(880px, 95vw); }
#market-edit-modal .modal-header { padding: var(--s-5) var(--s-6) var(--s-4); }
#market-edit-modal-body { padding: var(--s-5) var(--s-6); }
#market-edit-modal-footer { padding: var(--s-4) var(--s-6); }
#market-edit-modal-footer button { height: 40px; padding: 0 var(--s-4); font-size: var(--fs-2); }
#market-edit-modal-footer-actions { gap: var(--s-2); }
.me-steps { gap: var(--s-2); font-size: var(--fs-1); color: var(--ink-3); font-weight: 600; }
.me-steps .me-step:not(:first-child)::before { content: ""; display: inline-block; width: 16px; height: 1px; background: var(--line); margin-right: var(--s-2); }
.me-steps .me-step b { width: 20px; height: 20px; font-size: 12px; background: #E6E9F0; color: var(--ink-3); }
.me-steps .me-step.active { color: var(--ink); }
.me-steps .me-step.active b { background: var(--brand); color: #fff; }
.me-steps .me-step.done b { background: var(--ok); color: #fff; }
.me-header-row { padding-bottom: var(--s-4); margin-bottom: var(--s-5); border-bottom-color: var(--line-2); }
#me-name-display.me-name-text { font-size: var(--fs-3); color: var(--ink); }
.me-name-input { height: 40px; padding: 0 var(--s-3); border-radius: var(--r-md); font-size: var(--fs-2); }
.me-name-input:focus { box-shadow: var(--ring); }
.me-name-hint { font-size: var(--fs-1); color: var(--ink-3); border-bottom-color: var(--line-2); }
.me-section-label { font-size: var(--fs-1); font-weight: 600; color: var(--ink-2); }
.me-field { font-size: var(--fs-1); color: var(--ink-2); }
.me-field input { height: 32px; border-radius: var(--r-md); padding: 0 var(--s-2); font-size: var(--fs-1); }
.me-options-list-head { font-size: var(--fs-1); font-weight: 600; color: var(--ink-3); background: var(--surface-2); border-bottom-color: var(--line); border-radius: var(--r-md) var(--r-md) 0 0; padding-top: var(--s-2); padding-bottom: var(--s-2); }
.me-option-row { border-bottom-color: var(--line-2); padding-top: var(--s-2); padding-bottom: var(--s-2); }
.me-opt-name { font-size: var(--fs-1); color: var(--ink); }
.me-opt-original { font-size: var(--fs-1); color: var(--ink-3); }
input.me-opt-attr-input { height: 28px; border-radius: var(--r-sm); font-size: var(--fs-1); }
.me-price-input-wrap { height: 30px; border-radius: var(--r-md); border-color: var(--line); }
.me-price-input-wrap:focus-within { box-shadow: var(--ring); }
input.me-price-input { font-size: var(--fs-1); }
.me-price-unit { font-size: var(--fs-1); }
/* 판매 스위치: 샘플 스위치 크기·브랜드색 */
.me-switch { width: 34px; height: 20px; }
.me-switch .me-slider { background: #CDD2DC; }
.me-switch .me-slider::before { width: 16px; height: 16px; left: 2px; top: 2px; }
.me-switch input:checked + .me-slider { background: var(--brand); }
.me-switch input:checked + .me-slider::before { transform: translateX(14px); }
.me-status-label { font-size: var(--fs-1); font-weight: 600; }
.me-status-label.on { color: var(--ok-ink); }
.me-status-label.off { color: var(--bad-ink); }
.me-step-heading { font-size: var(--fs-3); color: var(--ink); }
.me-step-sub, .me-summary-note { font-size: var(--fs-1); color: var(--ink-3); }
.me-change-card { border-color: var(--line); border-radius: var(--r-lg); }
.me-change-card-title { font-size: var(--fs-2); font-weight: 600; color: var(--ink); background: var(--surface-2); border-bottom-color: var(--line); }
.me-change-table-head { font-size: var(--fs-1); font-weight: 600; color: var(--ink-3); border-bottom-color: var(--line); }
.me-change-row { font-size: var(--fs-1); border-bottom-color: var(--line-2); }
.me-summary-empty { font-size: var(--fs-1); }

/* 판매중지 창 */
.stop-sale-option-row { font-size: var(--fs-2); border-bottom-color: var(--line-2); }
.stop-sale-status { font-size: var(--fs-1); }
.stop-sale-status.ok { color: var(--ok-ink); }
.stop-sale-status.err { color: var(--bad-ink); }

/* ---------- 14. 내 계정 ---------- */
.acc-card { max-width: 720px; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: hidden; }
.acc-card .acc-row { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-5) var(--s-6); }
.acc-card .acc-avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-size: var(--fs-3); font-weight: 700; }
.acc-card .acc-row b { color: var(--ink); font-size: var(--fs-3); font-weight: 700; }
.acc-card .acc-row b:empty { display: none; }
.acc-mail { color: var(--ink-3); font-size: var(--fs-2); }
.acc-out { margin-left: auto; }

/* ---------- 15. 결제 ---------- */
.bill-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--s-4); max-width: none; }
.bill-card { padding: var(--s-5) var(--s-6) var(--s-6); gap: var(--s-3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.bill-lbl { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-1); font-weight: 600; color: var(--ink-3); }
.bill-lbl .i { width: 16px; height: 16px; }
.bill-plan b { font-size: var(--fs-6); font-weight: 700; letter-spacing: -0.8px; color: var(--ink); }
.bill-plan span { font-size: var(--fs-2); color: var(--ink-3); font-weight: 600; }
.bill-muted { font-size: var(--fs-1); color: var(--ink-3); }
.bill-row { gap: var(--s-2); margin-top: auto; padding-top: var(--s-2); }
.bill-table { margin-top: var(--s-4); max-width: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: hidden; }
.bill-table-head { display: flex; align-items: center; min-height: 52px; padding: var(--s-5) var(--s-6) var(--s-3); }
.bill-table-head h2 { font-size: var(--fs-3); font-weight: 700; margin: 0; }
.bill-table table { font-size: var(--fs-2); }
.bill-table th { height: 40px; padding: 0 var(--s-3); font-size: var(--fs-1); font-weight: 600; color: var(--ink-3); background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bill-table th:first-child, .bill-table td:first-child { padding-left: var(--s-6); }
.bill-table td { padding: 10px var(--s-3); border-top: 0; border-bottom: 1px solid var(--line-2); color: var(--ink-2); }
.bill-table tr:last-child td { border-bottom: 0; }
.bill-table td.bill-empty { padding: 0; }

/* ---------- 16. 마켓 연동(옛 인라인 표)·공용 카드 ---------- */
.market-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.market-section-title { font-size: var(--fs-3); font-weight: 700; padding: var(--s-4) var(--s-6); border-bottom-color: var(--line-2); }
.settings-table th { font-size: var(--fs-1); font-weight: 600; color: var(--ink-3); background: var(--surface-2); }
.settings-table td { border-top-color: var(--line-2); }
.market-badge { border-radius: var(--r-sm); font-size: var(--fs-1); }

/* ---------- 18. 로그인·인증 화면 ---------- */
.auth-field input { height: 40px; border-radius: var(--r-md); border-color: var(--line); }
.auth-field input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.auth-submit { width: 100%; }
.auth-tabs { border-radius: var(--r-md); background: #ECEEF3; }
.auth-tab { border-radius: var(--r-sm); }

/* ---------- 19. 화면 폭 ---------- */
@media (max-width: 1279px) {
  :root { --side-w: 216px; }
  main > div { padding: var(--s-6) var(--s-6) var(--s-8); }
  .span-3 { grid-column: span 6; }
  .span-8, .span-4, .span-7, .span-5 { grid-column: span 12; }
}
/* 1100px 아래: 메뉴는 아이콘만(이름은 마우스를 올리면 title로) */
@media (max-width: 1099px) {
  :root { --side-w: 68px; }
  .sidebar { padding-left: var(--s-2); padding-right: var(--s-2); align-items: center; }
  .sidebar .brand { padding: 0 !important; justify-content: center; width: 100%; }
  .sidebar .brand-text, .nav-text, .side-foot .user-email-text, .nav-hot { display: none; }
  .sidebar-nav { width: 100%; margin: 0; padding: 0; }
  .nav-label { font-size: 0; padding: 0; height: 1px; background: var(--line-2); margin: 0 var(--s-2) var(--s-2); }
  .sidebar .nav-item { justify-content: center; padding: 0; }
  .sidebar .nav-item .i { width: 20px; height: 20px; }
  .side-foot { flex-direction: column-reverse; width: 100%; gap: 2px; }
  .side-foot .sidebar-footer { flex-direction: column; width: 100%; }
  .side-foot .user-email { justify-content: center; padding: 0; flex: none; }
  .bill-grid { grid-template-columns: minmax(0, 1fr); }
}
/* 옛 720px 규칙(메뉴를 위 가로줄로)을 되돌린다: 좁아도 아이콘 메뉴 유지 */
@media (max-width: 720px) {
  .app-shell { flex-direction: row; }
  .sidebar { width: var(--side-w); height: 100vh; position: sticky; flex-direction: column; flex-wrap: nowrap; }
  .sidebar-nav { flex-direction: column; margin: 0; }
  .nav-tree { flex-direction: column; }
  main > div { padding: var(--s-5) var(--s-4) var(--s-8); }
  .search-row { flex-wrap: wrap; }
  .search-field { flex: 1 1 100%; }
  #account-filter { flex: 1; max-width: none; }
}

/* ---------- 19. 내 계정·결제(2단계) ---------- */
.acc-wrap { display: flex; flex-direction: column; gap: var(--s-4); }
.acc-profile { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-5) var(--s-6); }
.acc-profile .acc-avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-size: var(--fs-4); font-weight: 700; flex: none; }
.acc-id { flex: 1; min-width: 0; }
.acc-id b { color: var(--ink); font-size: var(--fs-4); font-weight: 700; display: block; }
.acc-id .acc-mail { color: var(--ink-3); font-size: var(--fs-2); }
.acc-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: var(--s-2); }
.acc-profile .acc-out { margin-left: auto; height: 40px; }
.acc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); }
.acc-stats .stat { padding: var(--s-4) var(--s-5); gap: 6px; }
.acc-stats .stat-value { font-size: var(--fs-5); }
.acc-stats .icon-tile, .bill-cardph .icon-tile { width: 24px; height: 24px; border-radius: var(--r-sm); }
.acc-stats .icon-tile.ok { background: var(--ok-bg); color: var(--ok-ink); }
.acc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-4); align-items: start; }
.acc-dl, .bill-dl { margin: 0; padding: var(--s-2) var(--s-6) var(--s-5); }
.acc-dl > div, .bill-dl > div { display: flex; justify-content: space-between; gap: var(--s-3); padding: 10px 0; font-size: var(--fs-2); }
.acc-dl > div + div, .bill-dl > div + div { border-top: 1px solid var(--line-2); }
.acc-dl dt, .bill-dl dt { color: var(--ink-3); }
.acc-dl dd, .bill-dl dd { margin: 0; color: var(--ink); font-weight: 600; text-align: right; }
.acc-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 1px 6px; font-weight: 500; }
.acc-sec { list-style: none; margin: 0; padding: var(--s-2) var(--s-6) var(--s-4); }
.acc-sec li { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; }
.acc-sec li + li { border-top: 1px solid var(--line-2); }
.acc-sec li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.acc-sec b { color: var(--ink); font-weight: 600; font-size: var(--fs-2); }
.acc-sec span:not(.icon-tile):not(.badge) { color: var(--ink-3); font-size: var(--fs-1); }
.bill-feats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.bill-feats li { display: flex; align-items: center; gap: 6px; font-size: var(--fs-1); color: var(--ink-2); }
.bill-feats .i { color: var(--ok); }
.bill-cardph { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3); background: var(--surface-2); border: 1px dashed var(--line); border-radius: var(--r-md); }
.bill-cardph > div { display: flex; flex-direction: column; gap: 2px; }
.bill-cardph b { color: var(--ink); font-size: var(--fs-2); font-weight: 600; }
.bill-cardph span:not(.icon-tile) { color: var(--ink-3); font-size: var(--fs-1); }
.bill-dl { padding: 0; }
@media (max-width: 1279px) { .acc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .acc-grid { grid-template-columns: 1fr; } }

/* 상품 관리 요약 숫자 */
.srch-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-3); margin-bottom: var(--s-4); }
.srch-kpis .stat { padding: var(--s-4) var(--s-5); gap: 6px; }
.srch-kpis .stat-value { font-size: var(--fs-5); }
.srch-kpis .icon-tile { width: 24px; height: 24px; border-radius: var(--r-sm); }
.srch-kpis .icon-tile.ok { background: var(--ok-bg); color: var(--ok-ink); }
.srch-kpis .mk-ico { width: 16px; height: 16px; }
@media (max-width: 1279px) { .srch-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }

/* ---------- 20. 휴대폰 화면(720px 아래) ----------
   왼쪽 메뉴는 서랍으로 숨기고, 위 막대(지금 화면 이름) + 아래 탭 5개로 움직인다.
   요약 숫자는 2칸씩, 표는 옆으로 밀어서 본다. */
.m-top, .m-tabs, .m-scrim { display: none; }
@media (max-width: 720px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .app-shell { display: block; }
  .m-top { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 40; height: 54px; padding: 0 var(--s-2) 0 var(--s-4); background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
  .m-brand .brand-mark { display: block; width: 24px; height: 24px; border-radius: 7px; background: var(--brand); position: relative; }
  .m-brand .brand-mark::after { content: ""; position: absolute; inset: 7px; border: 2px solid #fff; border-radius: 2px; }
  .m-title { flex: 1; min-width: 0; font-size: var(--fs-3); font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-menu { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--ink-2); border-radius: var(--r-md); }
  .m-menu .i { width: 22px; height: 22px; }
  .m-tabs { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 4px 4px env(safe-area-inset-bottom); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
  .m-tabs button { height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; color: var(--ink-4); font-size: 11px; font-weight: 600; border-radius: var(--r-md); }
  .m-tabs button .i { width: 22px; height: 22px; }
  .m-tabs button.on { color: var(--brand); }
  body:has(#gate:not(.hidden)) .m-top, body:has(#gate:not(.hidden)) .m-tabs,
  body:has(#verify:not(.hidden)) .m-top, body:has(#verify:not(.hidden)) .m-tabs { display: none; }
  body:has(#gate:not(.hidden)) .sidebar, body:has(#verify:not(.hidden)) .sidebar { display: none; }

  /* 메뉴 서랍: 넓은 화면과 같은 이름 붙은 메뉴 */
  .sidebar { position: fixed !important; top: 0; bottom: 0; left: 0; z-index: 60; width: min(300px, 84vw) !important; height: 100dvh !important; padding: var(--s-4) var(--s-3) !important; align-items: stretch !important; transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--sh-2); }
  body.m-open .sidebar { transform: none; }
  .m-scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(17,20,28,.42); opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.m-open .m-scrim { opacity: 1; pointer-events: auto; }
  body.m-open { overflow: hidden; }
  .sidebar .brand { justify-content: flex-start !important; padding: 0 var(--s-2) !important; }
  .sidebar .brand-text, .sidebar .nav-text, .sidebar .nav-hot { display: inline !important; }
  .sidebar .nav-label { font-size: 12px !important; height: auto !important; background: none !important; padding: var(--s-3) var(--s-3) var(--s-1) !important; margin: 0 !important; }
  .sidebar .nav-item { justify-content: flex-start !important; padding: 0 var(--s-3) !important; height: 44px; }
  .side-foot { flex-direction: row !important; }
  .side-foot .sidebar-footer { flex-direction: row !important; }
  .side-foot .user-email-text { display: inline !important; }

  /* 본문 */
  main > div { padding: var(--s-4) var(--s-4) var(--s-7) !important; }
  .page-head { flex-direction: column; align-items: stretch !important; gap: var(--s-3); margin-bottom: var(--s-4) !important; }
  .page-head h1 { font-size: 22px; }
  .page-head p { font-size: var(--fs-1); }
  .page-actions, .page-head > div:last-child:not(.page-head-text) { display: flex; flex-wrap: wrap; gap: var(--s-2); width: 100%; }
  .page-actions > .btn, .page-actions > button { flex: 1 1 0; justify-content: center; }
  :where(main) :has(> .card.stat) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: var(--s-2) !important; }
  .stat { padding: var(--s-3) var(--s-4) !important; gap: 4px !important; min-width: 0; }
  .stat-value { font-size: 20px !important; }
  .stat-label { font-size: 12px; }
  .stat-foot { font-size: 11.5px; }
  .card-head { padding: var(--s-3) var(--s-4) !important; flex-wrap: wrap; gap: var(--s-2); }
  .banner { padding: var(--s-3) !important; font-size: var(--fs-1); }
  /* 표: 옆으로 밀어서 보기 */
  main div:has(> table) { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  main table th, main table td { white-space: nowrap; }
  .table-foot { flex-wrap: wrap; gap: var(--s-2); font-size: 11.5px; }
  /* 도구 줄: 칩은 옆으로 밀기, 검색은 한 줄 전체 */
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .input-wrap, .seg { max-width: 100%; }
  .acc-grid, .bill-grid, .acc-stats { grid-template-columns: minmax(0, 1fr) !important; }
  .acc-profile { flex-wrap: wrap; padding: var(--s-4) !important; }
  .acc-profile .acc-out { width: 100%; margin: 0; justify-content: center; }
  .acc-dl, .acc-sec { padding-left: var(--s-4) !important; padding-right: var(--s-4) !important; }
  .bill-feats { grid-template-columns: 1fr; }
  .modal-box { width: calc(100vw - 24px) !important; max-height: calc(100dvh - 24px); }
  input, select, textarea { font-size: 16px !important; } /* 아이폰이 입력칸을 누를 때 확대하지 않게 */
}
@media (max-width: 720px) {
  main { padding: 0 !important; }
  .grid > .stat { grid-column: auto !important; }
  .bk-flowbar { overflow-x: auto; scrollbar-width: none; padding: var(--s-3) !important; }
  .bk-flowbar li { flex: none; white-space: nowrap; }
  .bk-flowbar li:not(:last-child)::after { flex: none; width: 16px; }
  .cl-toolbar .chips { flex-wrap: nowrap; overflow-x: auto; }
  :where(main) [class*="toolbar"] .input-wrap, :where(main) [class*="toolbar"] input[type="search"], :where(main) [class*="toolbar"] input[type="text"] { width: 100%; flex: 1 1 100%; }
}
@media (max-width: 720px) { main .chips { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; } }
/* 전체 메뉴: 왼쪽 서랍 대신 아래에서 올라오는 판(아래 탭 위에 뜬다) */
@media (max-width: 720px) {
  .sidebar { top: auto !important; bottom: calc(64px + env(safe-area-inset-bottom)) !important; left: 0 !important; right: 0; width: auto !important; height: auto !important; max-height: calc(100dvh - 140px); border-radius: 20px 20px 0 0; border-right: 0 !important; padding: var(--s-2) var(--s-4) var(--s-3) !important; transform: translateY(calc(100% + 80px)) !important; transition: transform .25s ease; z-index: 39 !important; }
  body.m-open .sidebar { transform: none !important; }
  .sidebar::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 4px auto var(--s-2); flex: none; }
  .sidebar .brand { display: none !important; }
  .sidebar-nav { overflow-y: auto; }
  .sidebar .nav-section { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding-bottom: var(--s-2); }
  .sidebar .nav-label { grid-column: 1 / -1; padding: var(--s-2) var(--s-1) 0 !important; }
  .sidebar .nav-item { flex-direction: column; justify-content: center !important; align-items: center; gap: 6px; height: 74px !important; padding: 0 4px !important; border-radius: var(--r-md); background: var(--surface-2); font-size: 12px; text-align: center; }
  .sidebar .nav-item .i { width: 22px; height: 22px; }
  .sidebar .nav-item.active { background: var(--brand-50); }
  .m-scrim { z-index: 38 !important; }
  .m-tabs { z-index: 41 !important; }
}
@media (max-width: 720px) {
  .sidebar .nav-section { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding-bottom: 4px; }
  .sidebar .nav-label { padding: 6px 2px 0 !important; font-size: 11.5px !important; }
  .sidebar .nav-item { height: 60px !important; gap: 4px; font-size: 11.5px; line-height: 1.2; letter-spacing: -0.2px; }
  .sidebar .nav-item .i { width: 20px; height: 20px; }
  body.m-open .m-tabs [data-mview] { color: var(--ink-4); }
  body.m-open .m-tabs [data-mview="more"] { color: var(--brand); }
}

/* 모바일: 상품 줄 버튼(상품관리·상세페이지 관리·Taobao)을 상품명 아래 줄로 내리고 항상 보이게 */
@media (max-width: 720px) {
  .pr-row { grid-template-columns: 16px 48px minmax(0, 1fr) !important; row-gap: var(--s-2) !important; padding: var(--s-3) var(--s-4) !important; }
  .pr-row .pr-actions { grid-column: 3 / -1; flex-wrap: wrap; justify-content: flex-start; }
  .pr-row .pr-actions > button { opacity: 1 !important; }
  .pr-row .product-name { white-space: normal; word-break: keep-all; }
}

/* 새 버전 알림 버튼(ITEMGATE 옆, 휴대폰은 위 막대 오른쪽) - index.html의 app-update 스크립트가 띄운다 */
.app-update { margin-left: auto; height: 24px; padding: 0 8px; border: 0; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .04em; cursor: pointer; box-shadow: 0 0 0 0 rgba(47, 91, 255, .45); animation: app-update-pulse 2s ease-out infinite; }
.app-update:hover { background: var(--brand-ink, #1F3FCC); }
.app-update:disabled { opacity: .7; cursor: default; animation: none; }
.app-update[hidden] { display: none; }
@keyframes app-update-pulse { 0% { box-shadow: 0 0 0 0 rgba(47, 91, 255, .45); } 70% { box-shadow: 0 0 0 8px rgba(47, 91, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 91, 255, 0); } }
@media (prefers-reduced-motion: reduce) { .app-update { animation: none; } }
.m-top .app-update { flex: none; }

/* 아이템 에이전트(왼쪽 메뉴 아래) - agents.js가 채운다. 에이전트 하나 = 동시에 도는 작업 하나 */
.agents { flex: none; margin: var(--s-3) 0 var(--s-2); padding: 10px 10px 8px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.agents[hidden] { display: none; }
.ag-head { display: flex; align-items: baseline; gap: 6px; margin-bottom: 6px; }
.ag-h { font-size: 12px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.ag-cnt { margin-left: auto; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ag-cnt b { color: var(--brand); }
.ag-list { display: flex; flex-direction: column; gap: 2px; }
.ag-row { display: grid; grid-template-columns: 8px 14px minmax(0, 1fr); align-items: center; gap: 6px; min-height: 26px; padding: 3px 4px; border: 0; border-radius: 6px; background: none; text-align: left; font: inherit; color: inherit; width: 100%; }
button.ag-row { cursor: pointer; }
button.ag-row:hover { background: var(--surface); }
.ag-dot { width: 7px; height: 7px; border-radius: 999px; background: #C9CED8; }
.ag-row.on .ag-dot { background: var(--ok); box-shadow: 0 0 0 0 rgba(14, 159, 110, .5); animation: ag-pulse 1.8s ease-out infinite; }
@keyframes ag-pulse { 0% { box-shadow: 0 0 0 0 rgba(14, 159, 110, .45); } 70% { box-shadow: 0 0 0 5px rgba(14, 159, 110, 0); } 100% { box-shadow: 0 0 0 0 rgba(14, 159, 110, 0); } }
@media (prefers-reduced-motion: reduce) { .ag-row.on .ag-dot { animation: none; } }
.ag-no { font-size: 10.5px; font-weight: 700; color: var(--ink-4, #98A0B0); font-variant-numeric: tabular-nums; }
.ag-txt { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ag-t { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-t img { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.ag-t.idle { color: var(--ink-4, #98A0B0); font-weight: 500; }
.ag-s { font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.ag-bar { display: block; height: 3px; border-radius: 999px; background: #E3E7EE; overflow: hidden; margin-top: 2px; }
.ag-bar i { display: block; height: 100%; background: var(--ok); border-radius: 999px; transition: width .4s; }
.ag-queue { display: block; width: 100%; margin-top: 6px; padding: 5px 6px; border-top: 1px dashed var(--line); font-size: 11px; color: var(--ink-3); }
.ag-queue b { color: var(--warn-ink, #B54708); }
@media (max-width: 720px) { .agents { margin: var(--s-3) 0; } .ag-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; } }

/* 메뉴 맨 위 숫자 카드 줄은 빼기로 함(2026-12-06 사용자 요청: "다 필요 없을 것 같아요").
   되돌리려면 이 규칙만 지우면 된다(값 채우는 코드는 그대로 둠). */
/* 다시 요청(같은 날): 대시보드·조회수 관리·내 계정까지 "모든 메뉴에서" 뺀다. */
.srch-kpis, .cl-kpis, .sf2-kpis, .mc2-kpis, .bk-kpis, .tr-kpis, .rf-kpis, .acc-stats, .db .card.stat { display: none !important; }
