/* penblade — Paces(vivid) 참조 대시보드 뼈대.
   폰트: Urbanist(영문/숫자) · Wanted Sans(한글 본문) · Gowun Dodum(한글 장식). */

:root {
  /* 폰트 스택: 라틴=Urbanist, 한글=Wanted Sans 로 자동 폴백 */
  --font-base:   'Urbanist', 'Wanted Sans Variable', 'Wanted Sans', sans-serif;
  --font-kr:     'Wanted Sans Variable', 'Wanted Sans', sans-serif;
  --font-accent: 'Gowun Dodum', serif;
  --font-num:    'Urbanist', sans-serif;

  /* vivid 팔레트: 크림 배경 + 다크 사이드바 */
  --pb-bg:        #faf6ef;
  --pb-card:      #ffffff;
  --pb-sidebar:   #2b2522;
  --pb-sidebar-2: #352e2a;
  --pb-ink:       #2a2f37;
  --pb-muted:     #8a8f99;
  --pb-line:      #ece7df;
  --pb-primary:   #6a5cff;
  --pb-up:        #2fae6a;
  --pb-down:      #e2516a;

  --pb-sidebar-w: 256px;
  --pb-topbar-h:  68px;
  --pb-radius:    16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-base);
  background: var(--pb-bg);
  color: var(--pb-ink);
  -webkit-font-smoothing: antialiased;
}

.pb-shell { display: flex; min-height: 100vh; }

/* ░░░░░░ 사이드바 ░░░░░░ */
.pb-sidebar {
  width: var(--pb-sidebar-w);
  flex-shrink: 0;
  background: var(--pb-sidebar);
  color: #d7d2cc;
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.pb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 26px;
}
.pb-brand-mark {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: transparent;   /* 투명배경 — 뒤 색 사각형 제거, 이미지만 */
  object-fit: cover;
  display: block;
}
.pb-brand-name {
  font-family: var(--font-num);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: #fff;
}
.pb-nav-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #7d756e;
  margin: 18px 10px 8px;
}
.pb-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  color: #c9c3bc;
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 500;
  transition: background 0.14s ease, color 0.14s ease;
}
.pb-nav-item i { width: 18px; text-align: center; font-size: 0.95rem; }
.pb-nav-item:hover { background: var(--pb-sidebar-2); color: #fff; }
.pb-nav-item.active { background: var(--pb-primary); color: #fff; }
.pb-nav-divider { height: 1px; background: rgba(255, 255, 255, 0.12); margin: 14px 10px; }

/* ░░░░░░ 메인 ░░░░░░ */
.pb-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* 탑바 */
.pb-topbar {
  height: var(--pb-topbar-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 26px;
  background: var(--pb-bg);
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);   /* 탑바와 본문 사이 연한 수평선 */
}
.pb-topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pb-icon-btn {
  position: relative;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: none;
  background: #fff;
  border: 1px solid var(--pb-line);
  border-radius: 50%;
  color: var(--pb-ink);
  cursor: pointer;
  transition: background 0.14s ease;
}
.pb-icon-btn:hover { background: #f3eee6; }
/* 윤곽선만 (배경 없음) — 설정 버튼 */
.pb-icon-btn-outline { background: transparent; }
.pb-icon-btn-outline:hover { background: rgba(0, 0, 0, 0.04); }
/* 모바일 햄버거 토글 — 첨부 참고: 청록색 채운 원 (데스크톱에선 숨김) */
.pb-sidebar-toggle {
  display: none;
  background: #3f7e95;
  border-color: #3f7e95;
  color: #fff;
}
.pb-sidebar-toggle:hover { background: #356c80; }

/* 사이드바 바깥(backdrop) — 기본 숨김, 모바일 열림 시에만 표시 */
.pb-backdrop { display: none; }

/* 로그인/로그아웃 */
.pb-login { line-height: 0; display: inline-flex; }
.pb-login img { height: 38px; display: block; border-radius: 8px; }
.pb-login:hover img { opacity: 0.9; }
.pb-auth { display: flex; align-items: center; gap: 10px; padding-left: 4px; }
.pb-auth-name { font-size: 0.85rem; font-weight: 600; color: var(--pb-ink); }
.pb-logout-btn {
  display: inline-flex; align-items: center;
  height: 38px; padding: 0 18px;
  background: #1e3a8a;             /* 짙은 푸른색 */
  color: #fff;
  border-radius: 10px;
  font-family: var(--font-base);
  font-size: 0.85rem; font-weight: 600;
  text-decoration: none;
  transition: background 0.14s ease;
}
.pb-logout-btn:hover { background: #16306e; }

/* 콘텐츠 */
.pb-content { padding: 8px 26px 40px; }

.pb-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 22px;
}
.pb-page-title {
  font-family: var(--font-num);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}
.pb-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; color: var(--pb-muted);
}
.pb-breadcrumb i { font-size: 0.66rem; }
.pb-breadcrumb .current { color: var(--pb-ink); font-weight: 600; }

/* 카드 공통 */
.pb-card {
  background: var(--pb-card);
  border: 1px solid var(--pb-line);
  border-radius: var(--pb-radius);
  padding: 22px;
}

/* 그리드 */
.pb-grid { display: grid; gap: 18px; margin-bottom: 18px; }
.pb-grid-stats  { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
.pb-grid-panels { grid-template-columns: 1fr 1fr; }

/* 인사 카드 */
.pb-greet { display: flex; flex-direction: column; justify-content: center; }
.pb-greet-eyebrow { margin: 0; font-size: 0.78rem; font-weight: 700; color: var(--pb-muted); letter-spacing: 0.04em; }
.pb-greet-name { margin: 6px 0 18px; font-family: var(--font-accent); font-size: 1.7rem; font-weight: 700; }
.pb-greet-foot { display: flex; gap: 18px; font-size: 0.8rem; color: var(--pb-muted); }
.pb-greet-foot i { margin-right: 4px; }

/* 지표 카드 */
.pb-stat-head { display: flex; align-items: center; justify-content: space-between; }
.pb-stat-label { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; color: var(--pb-muted); }
.pb-stat-ico {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: #f3eee6;
  border-radius: 12px;
  color: var(--pb-ink);
}
.pb-stat-value {
  font-family: var(--font-num);
  font-size: 2rem;
  font-weight: 700;
  margin: 14px 0 12px;
  letter-spacing: -0.01em;
}
.pb-stat-foot { font-size: 0.8rem; font-weight: 600; }
.pb-stat-foot em { font-style: normal; color: var(--pb-muted); font-weight: 400; margin-left: 4px; }
.pb-stat-foot.up { color: var(--pb-up); }
.pb-stat-foot.down { color: var(--pb-down); }

/* 패널 */
.pb-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.pb-panel-head h3 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.pb-panel-head h3 small { color: var(--pb-muted); font-weight: 500; font-size: 0.82rem; }
.pb-btn-ghost {
  border: 1px solid var(--pb-line);
  background: #fff;
  border-radius: 9px;
  padding: 7px 12px;
  font-family: var(--font-base);
  font-size: 0.82rem;
  color: var(--pb-ink);
  cursor: pointer;
}
.pb-placeholder {
  height: 240px;
  display: grid; place-items: center;
  border: 1.5px dashed var(--pb-line);
  border-radius: 12px;
  color: var(--pb-muted);
  font-size: 0.88rem;
}

/* Sales Report */
.pb-tabs { display: flex; gap: 6px; }
.pb-tabs button {
  border: none; background: transparent;
  font-family: var(--font-base); font-size: 0.86rem; font-weight: 600;
  color: var(--pb-muted); padding: 6px 12px; border-radius: 8px; cursor: pointer;
}
.pb-tabs button.active { color: var(--pb-primary); background: #efecff; }
.pb-salesreport-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  text-align: center;
}
.pb-metric { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; }
.pb-metric-label { font-size: 0.82rem; color: var(--pb-muted); }
.pb-metric-value { font-family: var(--font-num); font-size: 1.4rem; font-weight: 700; }
.pb-metric-value.up { color: var(--pb-up); }

/* ░░░░░░ 반응형 ░░░░░░ */
@media (max-width: 1100px) {
  .pb-grid-stats { grid-template-columns: 1fr 1fr; }
  .pb-grid-panels { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .pb-sidebar {
    position: fixed; left: 0; top: 0; z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  .pb-shell.pb-sidebar-open .pb-sidebar { transform: translateX(0); }
  .pb-sidebar-toggle { display: grid; }
  /* 사이드바 바깥 어둡게 — 클릭 시 닫힘(penblade.js) */
  .pb-shell.pb-sidebar-open .pb-backdrop {
    display: block; position: fixed; inset: 0; z-index: 35;
    background: rgba(0, 0, 0, 0.4);
  }
}
@media (max-width: 560px) {
  .pb-grid-stats { grid-template-columns: 1fr; }
  .pb-salesreport-row { grid-template-columns: 1fr; }
  .pb-auth-name { display: none; }
}
