/* ─── MarketKok 통합 사이드바 CSS v2 ─── */
.mkk-sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: 220px;
  background: linear-gradient(180deg, #f97316 0%, #ea580c 100%);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow-y: auto;
  overflow-x: hidden;
  font-family: 'Pretendard', 'Noto Sans KR', -apple-system, sans-serif;
  scrollbar-width: none;
  box-shadow: 2px 0 12px rgba(0,0,0,0.15);
}
.mkk-sidebar::-webkit-scrollbar { display: none; }

/* 로고 */
.mkk-sb-logo {
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
}
.mkk-sb-logo-text {
  font-size: 20px; font-weight: 900;
  color: #fff; letter-spacing: -0.5px;
}
.mkk-sb-logo-acc { color: rgba(255,255,255,0.65); }
.mkk-sb-logo-sub {
  font-size: 10px; color: rgba(255,255,255,0.55);
  margin-top: 2px; font-weight: 500;
}

/* 홈 */
.mkk-sb-home {
  display: block;
  padding: 10px 18px;
  font-size: 13px; font-weight: 700;
  color: #fff; text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.18);
  transition: background 0.15s;
}
.mkk-sb-home:hover { background: rgba(255,255,255,0.12); }
.mkk-sb-home.active {
  background: rgba(255,255,255,0.95);
  color: #c24a00;
  font-weight: 800;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* 섹션 */
.mkk-sb-section { margin-top: 2px; }

/* 카테고리 헤더 */
.mkk-sb-cat {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px 4px;
  font-size: 10px; font-weight: 800;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.06em;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}
.mkk-sb-cat:hover { color: rgba(255,255,255,0.9); }
.mkk-sb-cat.step-1 { color: rgba(180,220,255,0.85); }
.mkk-sb-cat.step-2 { color: rgba(255,190,180,0.85); }
.mkk-sb-cat.step-3 { color: rgba(150,240,200,0.85); }

/* 화살표 */
.mkk-sb-arrow {
  font-size: 9px; font-weight: 700;
  transition: transform 0.22s ease;
  color: rgba(255,255,255,0.45);
  flex-shrink: 0;
}
.mkk-sb-cat.collapsed .mkk-sb-arrow { transform: rotate(-90deg); }

/* 아이템 컨테이너 */
.mkk-sb-items {
  overflow: hidden;
  max-height: 600px;
  transition: max-height 0.25s ease;
}
.mkk-sb-items.collapsed { max-height: 0; }

/* 개별 아이템 */
.mkk-sb-item {
  display: flex; align-items: center;
  padding: 7px 14px 7px 26px;
  font-size: 12.5px; font-weight: 500;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  border-radius: 7px;
  margin: 1px 8px;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}
.mkk-sb-item:hover {
  background: rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.95);
  border-left-color: rgba(255,255,255,0.3);
}
/* ── Active 상태 강화 ── */
.mkk-sb-item.active {
  background: rgba(255,255,255,0.95);
  color: #c24a00;
  font-weight: 800;
  font-size: 13px;
  border-left: 4px solid #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
  margin: 2px 6px;
  padding: 8px 12px 8px 22px;
  letter-spacing: -0.15px;
}
.mkk-sb-item.active:hover {
  background: rgba(255,255,255,1);
  color: #a83c00;
}

/* STEP 배지 */
.mkk-sb-badge {
  font-size: 8.5px; font-weight: 800;
  background: rgba(255,255,255,0.22);
  color: #fff;
  padding: 1px 5px; border-radius: 3px;
  margin-left: auto; flex-shrink: 0;
}

/* ── 사이드바 오프셋: 모든 페이지에 적용 ── */

/* dashboard_wing는 자체 레이아웃 사용 - body padding 제외 */
body:not(.wing-layout) {
  padding-left: 220px;
  min-height: 100vh;
}


/* 사이드바 푸터 (이메일/플랜 정보) */
.mkk-sb-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.18);
  padding: 14px 14px 10px;
  flex-shrink: 0;
}
.mkk-sb-email {
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 4px;
}
.mkk-sb-plan {
  font-size: 10px; font-weight: 700;
  padding: 3px 10px; border-radius: 12px;
  display: inline-block;
  background: rgba(255,255,255,0.18);
  color: #fff; letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.mkk-sb-logout {
  display: block; width: 100%;
  padding: 7px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 8px;
  color: rgba(255,255,255,0.85);
  font-size: 12px; font-weight: 600;
  cursor: pointer; text-align: center;
  font-family: inherit;
  transition: background 0.15s;
}
.mkk-sb-logout:hover { background: rgba(255,255,255,0.22); }

/* 사이드바와 함께 사용하는 콘텐츠 래퍼 - 왼쪽 정렬 */
.app-body {
  padding-left: 32px !important;
  padding-right: 32px !important;
  box-sizing: border-box;
}

/* ── 사이드바 있을 때 콘텐츠 왼쪽 정렬 ── */
/* max-width + margin:auto 조합 방지 */
.feat-page,
.pricing-page,
.ad-analytics-page,
.keyword-page,
.main-content,
.content-page,
.page-content {
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: none !important;
  width: 100%;
}

/* STEP 배지 (카테고리 헤더용) */
.mkk-sb-step-badge {
  font-size: 8px; font-weight: 800;
  background: rgba(255,255,255,0.28);
  color: rgba(255,255,255,0.95);
  padding: 2px 6px; border-radius: 4px;
  margin-left: 4px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
/* step 카테고리 헤더 색상 */
.mkk-sb-cat.step-1 .mkk-sb-step-badge { background: rgba(100,200,255,0.3); }
.mkk-sb-cat.step-2 .mkk-sb-step-badge { background: rgba(255,150,100,0.35); }
.mkk-sb-cat.step-3 .mkk-sb-step-badge { background: rgba(100,255,150,0.3); }
