/* ============ S&F ERP 공통 스타일 ============ */
:root {
  --ink: #14161a;          /* 짙은 잉크색 (사이드바/제목) */
  --ink-soft: #3d4148;
  --paper: #f5f6f8;        /* 본문 배경 */
  --card: #ffffff;
  --line: #e4e6ea;
  --accent: #d8f34e;       /* 볼트 그린 (스니커 감성 포인트) */
  --accent-ink: #2a3300;
  --muted: #8a8f98;
  --danger: #e5484d;
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Malgun Gothic", sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

/* ============ 로그인 페이지 ============ */
.login-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}

.login-brand {
  background: var(--ink);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
  position: relative;
  overflow: hidden;
}

.login-brand::after {
  /* 배경 대각선 트랙 라인 - 스니커 트랙 모티브 */
  content: "";
  position: absolute;
  inset: -20%;
  background: repeating-linear-gradient(
    -35deg,
    transparent 0 90px,
    rgba(216, 243, 78, 0.06) 90px 92px
  );
  pointer-events: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  z-index: 1;
}

.brand-product {
  font-weight: 500;
  font-size: 0.82em;
  color: inherit;
  opacity: 0.75;
  letter-spacing: 0;
}

.brand-dot {
  width: 12px; height: 12px;
  border-radius: 3px;
  background: var(--accent);
  display: inline-block;
}

.brand-copy { z-index: 1; }

.brand-copy h1 {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.25;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.brand-copy h1 em {
  font-style: normal;
  color: var(--accent);
}

.brand-copy p {
  margin-top: 14px;
  color: #b9bdc4;
  font-size: 15px;
  line-height: 1.6;
}

.brand-foot {
  color: #6b7079;
  font-size: 12.5px;
  z-index: 1;
}

.login-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
}

.legal-notice {
  margin-top: 22px;
  padding: 11px 13px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 8px;
  background: rgba(127, 127, 127, .05);
  color: var(--muted, #8a8f98);
  font-size: 11px;
  line-height: 1.55;
  word-break: keep-all;
}

.login-copyright {
  margin-top: 18px;
  color: var(--muted, #8a8f98);
  font-size: 11px;
  opacity: .8;
  text-align: center;
}
.login-copyright a { color: inherit; }

.login-card {
  width: 100%;
  max-width: 380px;
}

.login-card h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.login-card .sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.field { margin-top: 22px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.field input {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  background: #fff;
  transition: border-color .15s;
}

.field input:focus {
  outline: none;
  border-color: var(--ink);
}

.btn-primary {
  width: 100%;
  margin-top: 26px;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  transition: transform .05s, background .15s;
}

.btn-primary:hover { background: #24272d; }
.btn-primary:active { transform: scale(0.99); }

.login-error {
  margin-top: 16px;
  padding: 11px 13px;
  border-radius: 10px;
  background: #fdecec;
  color: var(--danger);
  font-size: 13.5px;
  display: none;
}

.login-error.show { display: block; }

/* ============ 대시보드 레이아웃 ============ */
.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  min-height: 100dvh;
}

.sidebar {
  background: var(--ink);
  color: #cdd0d5;
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  /* ★ 높이가 100vh 로 고정이라 내용이 그보다 길면 밖으로 넘쳐 잘린다 (v24.9 표시등 추가 후 발생).
     화면이 낮은 노트북에서도 로그아웃·버전이 잘리지 않도록 사이드바 자체가 스크롤되게 한다. */
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sidebar .brand-mark { color: #fff; padding: 4px 10px 6px; }

/* 로고 아래 한 줄 — 회사명/닉네임 자리 (v25.29). 추후 사용자별 표기 예정 */
.sidebar .brand-org {
  padding: 0 10px 16px 32px;   /* 32px = 점(12px)+간격(10px)+좌패딩(10px) → 글자 시작선 맞춤 */
  font-size: 12px;
  font-weight: 500;
  color: #9aa0aa;
  letter-spacing: 0.01em;
}

.nav-label {
  font-size: 11px;
  font-weight: 700;
  color: #6b7079;
  letter-spacing: 0.08em;
  padding: 14px 10px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  color: #cdd0d5;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.nav-item:hover { background: rgba(255,255,255,0.06); }

.nav-item.active {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.nav-item.soon { color: #6b7079; cursor: default; }
.nav-item.soon:hover { background: none; }

.badge-soon {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(255,255,255,0.08);
  color: #8a8f98;
}

.sidebar-foot {
  margin-top: auto;
  padding: 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.btn-logout {
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 9px;
  background: transparent;
  color: #cdd0d5;
  font-size: 13.5px;
  font-weight: 600;
}

.btn-logout:hover { background: rgba(255,255,255,0.06); }

.main {
  padding: 34px 38px;
  max-width: 1600px;      /* 표 중심 화면이 많아 넓힘 */
}
/* 표가 주인공인 화면은 폭 제한을 풀고 화면을 꽉 쓴다 */
.main.full { max-width: none; }

.page-head h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14.5px;
}

.card-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.card h3 {
  font-size: 15.5px;
  font-weight: 700;
}

.card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.card .tag {
  display: inline-block;
  margin-top: 14px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--paper);
  color: var(--muted);
}

.card.next .tag {
  background: var(--accent);
  color: var(--accent-ink);
}

/* 모바일 상단바 */
.topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--ink);
  color: #fff;
  padding: 14px 16px;
  align-items: center;
  justify-content: space-between;
}

.btn-menu {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

/* ============ 반응형 ============ */
@media (max-width: 900px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-brand { display: none; }

  .layout { grid-template-columns: 1fr; }

  .topbar { display: flex; }

  .sidebar {
    position: fixed;
    left: 0; top: 0;
    width: 260px;
    z-index: 30;
    transform: translateX(-100%);
    transition: transform .2s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,0.25);
  }

  .sidebar.open { transform: translateX(0); }

  .scrim {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 25;
  }

  .scrim.show { display: block; }

  .main { padding: 22px 18px; }
}

/* ============ 시세 비교 (개선판) ============ */
.toolbar {
  margin-top: 22px;
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px;
}
.toolbar .grow { flex: 1; min-width: 220px; }
.inp {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--line);
  border-radius: 10px; font-size: 14.5px; background: #fff; font-family: inherit;
}
.inp:focus { outline: none; border-color: var(--ink); }
.inp-sm { width: 118px; }
.lbl { font-size: 13px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.btn-dark {
  padding: 11px 20px; border: none; border-radius: 10px;
  background: var(--ink); color: #fff; font-weight: 700; font-size: 14px;
}
.btn-dark:hover { background: #24272d; }
.btn-ghost {
  padding: 10px 15px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
}
.btn-ghost:hover { background: var(--paper); }

.feeline {
  margin-top: 10px; font-size: 12.5px; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center;
}
.feeline b { color: var(--ink); }
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 99px; background: var(--paper);
  font-size: 11.5px; font-weight: 700; color: var(--ink-soft);
}
.pill.ok { background: #eaf6ee; color: #0a7a41; }
.pill.warn { background: #fdf1e3; color: #9a5b00; }

/* 결과 2단 */
.cols { margin-top: 16px; display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 16px; align-items: start; }  /* v24.39 포이즌 판매량 2열 공간 확보 */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.panel-head {
  display: flex; align-items: center; gap: 9px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.panel-head h2 { font-size: 14.5px; font-weight: 800; letter-spacing: -0.01em; }
.panel-body { padding: 16px 18px 18px; }
.chip { font-size: 11px; font-weight: 800; width: 22px; height: 22px;
        display: grid; place-items: center; border-radius: 7px; }
.chip.k { background: #14161a; color: #fff; }
.chip.p { background: #d9f3f0; color: #0a6e64; }
.muted { color: var(--muted); font-size: 13.5px; line-height: 1.6; }

/* 검색 결과 */
.hit { display: flex; gap: 12px; align-items: center; padding: 10px;
       border-radius: 11px; cursor: pointer; border: 1.5px solid transparent; }
.hit:hover { background: var(--paper); }
.hit.sel { border-color: var(--ink); background: var(--paper); }
.hit img, .hit .ph { width: 48px; height: 48px; border-radius: 9px; object-fit: cover; background: var(--paper); flex: none; }
.hit .nm { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.hit .cd { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* 상품 헤더 */
.prod { display: flex; gap: 14px; align-items: center; padding: 14px 0 4px; margin-top: 12px; border-top: 1px solid var(--line); }
.prod img { width: 62px; height: 62px; border-radius: 11px; object-fit: cover; background: var(--paper); }
.prod .t { font-weight: 700; font-size: 14.5px; line-height: 1.35; }
.prod .s { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

/* 사이즈 표 */
table.grid { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13.5px; }
table.grid th { text-align: right; padding: 9px 8px; font-size: 11.5px; color: var(--muted);
                border-bottom: 1.5px solid var(--line); white-space: nowrap; font-weight: 700; }
table.grid th:first-child, table.grid td:first-child { text-align: left; }
table.grid td { text-align: right; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.grid tbody tr:hover { background: var(--paper); }
table.grid tr.best { background: #f6fbe8; }
table.grid tr.best td:first-child::after {
  content: "BEST"; margin-left: 6px; font-size: 9.5px; font-weight: 800;
  background: var(--accent); color: var(--accent-ink); padding: 2px 6px; border-radius: 99px;
}
.sz { font-weight: 700; }
.pos { color: #0a8043; font-weight: 700; }
.neg { color: var(--danger); font-weight: 700; }
.sub { font-size: 11.5px; display: block; font-weight: 500; opacity: .85; }

/* 스켈레톤 */
.skel { height: 14px; border-radius: 6px; background: linear-gradient(90deg,#eef0f3,#f7f8fa,#eef0f3);
        background-size: 200% 100%; animation: sk 1.1s linear infinite; }
@keyframes sk { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.skel-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; }

/* 토스트 */
#toast { position: fixed; top: 18px; right: 18px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 12px 16px; border-radius: 11px; font-size: 13.5px; font-weight: 600;
         box-shadow: 0 8px 24px rgba(0,0,0,.12); background: var(--ink); color: #fff;
         animation: tin .22s ease; }
.toast.ok { background: #0a7a41; }
.toast.err { background: var(--danger); }
@keyframes tin { from { opacity: 0; transform: translateY(-6px);} to {opacity:1;transform:none;} }

/* 모달 (수수료 설정) */
.modal-bg { position: fixed; inset: 0; background: rgba(15,17,20,.45); z-index: 50;
            display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-bg.show { display: flex; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 720px;
         max-height: 88vh; overflow: auto; }
.modal-head { display: flex; align-items: center; justify-content: space-between;
              padding: 20px 22px 0; }
.modal-head h3 { font-size: 18px; font-weight: 800; }
.x { background: none; border: none; font-size: 22px; color: var(--muted); line-height: 1; }
.tabs { display: flex; gap: 4px; padding: 16px 22px 0; border-bottom: 1px solid var(--line); }
.tab { padding: 9px 14px; border: none; background: none; font-size: 13.5px; font-weight: 700;
       color: var(--muted); border-bottom: 2.5px solid transparent; }
.tab.on { color: var(--ink); border-bottom-color: var(--ink); }
.tabpane { display: none; padding: 20px 22px 22px; }
.tabpane.on { display: block; }
.frow { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.frow .lbl { min-width: 128px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 22px 22px; }
table.fee { width: 100%; border-collapse: collapse; font-size: 13px; }
table.fee th { text-align: right; padding: 8px 6px; font-size: 11.5px; color: var(--muted);
               border-bottom: 1.5px solid var(--line); }
table.fee th:first-child, table.fee td:first-child { text-align: left; }
table.fee td { padding: 7px 6px; border-bottom: 1px solid var(--line); text-align: right; }
table.fee input { width: 78px; padding: 6px 8px; border: 1.5px solid var(--line);
                  border-radius: 7px; font-size: 12.5px; text-align: right; font-family: inherit; }
.note { font-size: 12.5px; color: var(--muted); line-height: 1.6; margin-top: 12px; }

@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr; }
  table.grid { display: block; overflow-x: auto; }
}


/* ============ 수수료 설정 (인라인 토글) ============ */
.feepanel {
  display: none;
  margin-top: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.feepanel.show { display: block; animation: fp .16s ease; }
@keyframes fp { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.feepanel .tabs { padding: 4px 18px 0; }
.feepanel .tabpane { padding: 18px; }
.fee-foot { display: flex; justify-content: flex-end; padding: 0 18px 18px; }
.btn-ghost.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* 포이즌 하위 섹션 (일반 / 보세) */
.sect { border: 1px solid var(--line); border-radius: 11px; margin-bottom: 10px; overflow: hidden; }
.sect > summary {
  padding: 12px 14px; font-size: 13.5px; font-weight: 700; cursor: pointer;
  background: var(--paper); list-style: none; display: flex; align-items: center; gap: 7px;
}
.sect > summary::-webkit-details-marker { display: none; }
.sect > summary::before { content: "▸"; color: var(--muted); font-size: 12px; transition: transform .15s; }
.sect[open] > summary::before { transform: rotate(90deg); }
.sect-body { padding: 16px 14px 14px; }

.btn-xs { padding: 5px 10px; font-size: 11.5px; }

/* 마진 기준 선택 */
.basisbar { margin-top: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--paper); border: 1px solid var(--line);
       border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: none; background: none; padding: 6px 13px; border-radius: 7px;
              font-size: 12.5px; font-weight: 700; color: var(--muted); font-family: inherit; }
.seg button.on { background: var(--ink); color: #fff; }
.hint-sm { font-size: 12.5px; color: var(--muted); }
.inp-xs { width: 68px; }
table.grid th.basis-col { color: var(--ink); }
table.grid td.basis-col { background: rgba(216,243,78,.16); font-weight: 700; }

.basisbar { padding: 10px 18px 0; }
.panel-head .seg { padding: 2px; }
.panel-head .seg button { padding: 5px 11px; font-size: 12px; }

/* 재고조회 사이트 선택 체크박스 */
.site-picker { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 2px 18px; }
.site-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px;
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 13px;
  background: #fff; user-select: none; transition: border-color .12s, background .12s; }
.site-chip:hover { border-color: var(--ink); }
.site-chip.on { border-color: var(--ink); background: var(--paper); font-weight: 600; }
.site-chip input { accent-color: var(--ink); width: 15px; height: 15px; }
.site-chip.soon { opacity: .55; cursor: default; }
.site-chip.soon:hover { border-color: var(--line); }
.site-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.site-card-head strong { font-size: 15px; }

/* 재고조회 결과: 병렬 카드 그리드 (넓으면 2열, 좁으면 1열) */
.stock-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; align-items: start; }
.stock-results .site-card { margin: 0; }
.site-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); flex: none; }

/* 재고 상세: 버튼 행 + 컴팩트 재고표 */
.detail-actions { display: flex; gap: 8px; margin-top: 10px; }
.detail-actions a { text-decoration: none; display: inline-flex; align-items: center; }
table.grid-compact { max-width: 280px; margin-top: 14px; }
table.grid-compact th, table.grid-compact td { padding: 6px 10px; }
table.grid-compact td.sz { font-weight: 700; }

/* ===== 재고 + 시세 통합 화면 (좌: 재고 / 우: 시세) ===== */
.split { display: block; }
.split-right { display: none; }
.split.open { display: grid; grid-template-columns: minmax(360px, 420px) 1fr; gap: 16px; align-items: start; }
.split.open .split-right { display: block; position: sticky; top: 16px;
  border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.split.open .stock-results { grid-template-columns: 1fr; }   /* 좌측은 1열로 */
.mkt-head { display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--paper); }
.mkt-head strong { font-size: 13.5px; }
#mktFrame { width: 100%; height: calc(100vh - 150px); min-height: 520px; border: 0; display: block; }

/* 좁은 화면: 위아래로 쌓기 */
@media (max-width: 1100px) {
  .split.open { grid-template-columns: 1fr; }
  .split.open .split-right { position: static; }
  #mktFrame { height: 70vh; }
}

/* 임베드 모드(시세비교를 iframe으로 띄울 때) */
.layout.embed { display: block; }
.layout.embed .main { padding: 14px 16px; max-width: none; }

/* 재고 검색결과 목록 컴팩트 */
.site-card .hit { padding: 7px 9px; gap: 10px; margin-bottom: 5px; }
.site-card .hit img, .site-card .hit .ph { width: 40px; height: 40px; border-radius: 7px; }
.site-card .hit .nm { font-size: 13px; }
.site-card .hit .cd { font-size: 11.5px; margin-top: 1px; }
.site-card .prod { padding: 10px 0 2px; margin-top: 8px; gap: 11px; }
.site-card .prod img, .site-card .prod .ph { width: 52px; height: 52px; border-radius: 9px; }
.site-card .prod .t { font-size: 13.5px; }
.site-card .prod .s { font-size: 11.5px; margin-top: 2px; }
.detail-actions { margin-top: 8px; }

/* 사이즈/재고 표 비율 */
table.grid-compact { width: 100%; max-width: 260px; }
table.grid-compact th:first-child, table.grid-compact td:first-child { width: 45%; }
table.grid-compact th:last-child, table.grid-compact td:last-child { width: 55%; }

/* ===== v11.1 여백 정리: 좌우 패널 정보 밀도 ===== */
/* 좌: 재고표가 카드 폭을 꽉 채우도록 (max-width 해제) */
table.grid-compact { width: 100%; max-width: none; }
.split.open .site-card { padding: 14px 16px; }
.split.open .split-left .card { padding: 14px 16px; }

/* 우: 임베드된 시세 화면의 여백 축소 + 표가 카드 폭을 채우도록 */
.layout.embed .main { padding: 10px 12px; }
.layout.embed .card,
.layout.embed .toolbar { padding: 14px 16px; }
.layout.embed .card-grid { grid-template-columns: 1fr; gap: 12px; }
.layout.embed table.grid { width: 100%; }
.layout.embed table.grid th,
.layout.embed table.grid td { padding: 8px 6px; }

/* 임베드 시세표: 좁은 폭에서도 표 레이아웃 유지해 카드 폭을 채움
   (기본 @media 900px 이하 규칙의 display:block 이 표를 축소시키는 문제 방지) */
.layout.embed table.grid { display: table !important; width: 100% !important; overflow: visible; }
.layout.embed .cols { grid-template-columns: 1fr; }

/* ── 사이드바 연동 상태 표시등 (v24.9) ──
   어디가 끊겼는지 화면에 들어가지 않고도 보이게 한다.
   ★ 상단바(.topbar)는 1000px 미만에서만 보이므로 PC 에서는 쓸 수 없다 → 사이드바에 둔다. */
/* ── 연동 표시등 v2 (v24.60): 그룹 4줄 + hover 팝오버 ── */
.link-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 8px; margin-bottom: 9px; }
.lg { position: relative; }
.lg-btn { display: flex; align-items: center; gap: 6px; padding: 4px 7px;
          font-size: 10.5px; color: #9aa0a8; text-decoration: none;
          border: 1px solid #2a2f36; border-radius: 7px; white-space: nowrap; }
.lg-btn:hover { color: #fff; border-color: #3a4048; background: rgba(255,255,255,.03); }
.lg-btn em { margin-left: auto; font-style: normal; font-size: 9.5px; opacity: .65; }
.lg-dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; }
.lg-btn.ok .lg-dot { background: var(--accent); }
.lg-btn.warn .lg-dot { background: #e5484d; }  /* v24.66: 연동 꺼짐 = 빨간불 */
.lg-btn.off .lg-dot { background: #4b5158; }

.lg-pop { display: none; position: absolute; left: 0; bottom: calc(100% + 4px);
          min-width: 158px; padding: 8px 10px; z-index: 60;
          background: #171a1f; border: 1px solid #2e343c; border-radius: 9px;
          box-shadow: 0 8px 22px rgba(0,0,0,.45); }
.lg:hover .lg-pop { display: grid; gap: 4px; }
.lg:nth-child(even) .lg-pop { left: auto; right: 0; }

.lg-pop .ld { display: flex; align-items: center; gap: 6px; font-size: 10.5px;
              line-height: 1.5; color: #9aa0a8; text-decoration: none; white-space: nowrap; }
.lg-pop .ld:hover { color: #fff; }
.lg-pop .ld span { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; }
.lg-pop .ld.ok span { background: var(--accent); }
.lg-pop .ld.warn span { background: #e5484d; }
.lg-pop .ld.off span { background: #4b5158; }
.lg-pop .ld.soon { opacity: .5; }
.lg-pop .ld.soon span { background: transparent; border: 1px solid #4b5158; }

/* ─── v25.30: CI 로고 이미지 ──────────────────────────────────────────
   brand-mark 안의 점+텍스트를 확정 CI 이미지(가로 lockup·white)로 교체.
   로고 자리 3곳(로그인 좌측·사이드바·모바일 상단바) 모두 다크 배경이라 white 단일 사용. */
.brand-logo {
  height: 30px;
  width: auto;
  display: block;
}
.login-brand .brand-logo { height: 38px; }   /* 로그인 좌측 패널은 조금 크게 */
.topbar .brand-logo { height: 26px; }        /* 모바일 상단바는 조금 작게 */

/* 로고가 이미지로 바뀌면서 점(12px) 기준이던 brand-org 들여쓰기(32px)가 남아
   글 시작선이 붕 뜸 → 로고 이미지 좌측선(패딩 10px)에 맞춘다. */
.sidebar .brand-org { padding-left: 10px; }

/* ─── v25.31: 태그라인 · 사용자 표기 · 모바일 로그인 브랜드 ─────────────── */

/* PREMIUM SELLER CENTER — 로고 아래 자간 넓은 한 줄 */
.brand-tagline {
  padding: 6px 10px 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: #8b929c;              /* 다크 배경(로그인 좌측) 기준 */
  text-transform: uppercase;
}
.brand-tagline.ink { color: #6b7280; }   /* 밝은 배경(모바일 로그인)용 */

/* 사이드바 — 법인명 아래 로그인 사용자 한 줄 */
.sidebar .brand-user {
  padding: 0 10px 14px;
  font-size: 11px;
  color: #6f7683;
  letter-spacing: 0.01em;
}
/* brand-org 는 법인명, 그 아래 brand-user 가 이어지므로 org 하단 여백 축소 */
.sidebar .brand-org { padding-bottom: 3px; }

/* 모바일 로그인 브랜드 블록 — PC(좌측 패널 보임)에선 숨김 */
.login-mbrand { display: none; }
@media (max-width: 900px) {
  .login-mbrand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-bottom: 26px;
  }
  .login-mbrand .brand-logo { height: 34px; }
  .login-mbrand .brand-tagline { padding: 8px 0 0; }
}

/* ─── v25.32: 로그인 대문 정리 + 라이트 사이드바/상단바 + 메뉴 아이콘 ──── */

/* 1) 로그인 좌측: 로고+태그라인 한 묶음(상단) · 헤드라인 중앙 · 저작권 하단.
      space-between 3분할이라 brand-copy 가 세로 가운데에 온다. */
.login-brand .brand-head { z-index: 1; }
.login-brand .brand-tagline { padding: 10px 0 0; }   /* 로고 좌측선에 맞춤 */

/* 2) 사이드바 라이트 전환 — 다크 규칙은 그대로 두고 여기서 덮는다 */
.sidebar {
  background: #fff;
  color: #3f4753;
  border-right: 1px solid #e6e8ec;
}
.sidebar .brand-mark { color: #111; }
.sidebar .brand-org  { color: #1f2733; font-weight: 600; }
.sidebar .brand-user { color: #8a919c; }
.nav-label { color: #9aa1ab; }
.nav-item { color: #4b5563; }
.nav-item:hover { background: #f3f4f6; }
.nav-item.active {
  background: #eef0f3;      /* 볼트그린 통짜 → 연회색. 그린은 버튼/포인트로 후퇴 */
  color: #111;
  font-weight: 700;
}
.nav-item.soon { color: #a6acb5; }
.nav-item.soon:hover { background: none; }
.badge-soon { background: #f1f2f4; color: #9aa1ab; }

/* 메뉴 아이콘 (Tabler webfont) */
.nav-item .ti {
  font-size: 17px;
  width: 19px;
  text-align: center;
  flex: 0 0 auto;
  color: #7b828c;
}
.nav-item.active .ti { color: #111; }
.nav-item.soon .ti { color: #b9bec6; }

/* 3) 사이드바 하단 — 연동 표시등·로그아웃 라이트톤 */
.sidebar-foot { border-top: 1px solid #e9ebee; }
.lg-btn { color: #6b7280; border-color: #e3e5e9; }
.lg-btn:hover { color: #111; border-color: #cfd3d9; background: #f7f8f9; }
.lg-btn.ok .lg-dot { background: #57a614; }   /* 볼트그린은 흰 배경에서 안 보임 → 진초록 */
.lg-btn.off .lg-dot { background: #c4c9cf; }
.lg-pop {
  background: #fff;
  border-color: #e3e5e9;
  box-shadow: 0 8px 22px rgba(20, 24, 30, .14);
}
.lg-pop .ld { color: #4b5563; }
.lg-pop .ld.ok span { background: #57a614; }
.lg-pop .ld.soon span { border-color: #c4c9cf; }
.btn-logout { border-color: #e3e5e9; color: #4b5563; }
.btn-logout:hover { background: #f3f4f6; }

/* 4) 모바일 상단바 라이트 */
.topbar {
  background: #fff;
  color: #111;
  border-bottom: 1px solid #e6e8ec;
}
.btn-menu { color: #111; }
@media (max-width: 900px) {
  .sidebar { box-shadow: 4px 0 24px rgba(20, 24, 30, 0.12); }
}
