/* ========== 슬림 헤더 스타일 ========== */

/* 기존 header 스타일 리셋 */
header.slim-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--color-bg-card);
  padding: 0 24px;
  height: 56px;
  border-radius: 0;
  margin-bottom: 20px;
  box-shadow: none;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow 0.2s ease;
}

header.slim-header.scrolled {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] header.slim-header.scrolled {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* 기존 header h1, p 숨기기 */
header.slim-header h1,
header.slim-header p {
  display: none;
}

/* ========== 로고 영역 ========== */
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.header-logo .logo-img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.header-logo .logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.5px;
}

.header-logo:hover .logo-text {
  color: var(--color-primary);
}

/* ========== 네비게이션 ========== */
.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.header-nav .nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease;
  position: relative;
}

.header-nav .nav-item:hover {
  color: var(--color-text-primary);
  background: var(--color-gray-100);
}

.header-nav .nav-item.active {
  color: var(--color-primary);
  background: rgba(99, 102, 241, 0.1);
}

.header-nav .nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px;
}

.header-nav .nav-icon {
  font-size: 16px;
}

.header-nav .nav-label {
  font-size: 13px;
}

/* ========== 액션 영역 ========== */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* 헤더 버튼 공통 */
.header-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.header-btn:hover {
  background: var(--color-gray-100);
  color: var(--color-text-primary);
}

/* 알림 버튼 */
.notification-btn {
  position: relative;
}

.notification-btn .btn-icon {
  font-size: 18px;
}

.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--color-danger);
  color: white;
  font-size: 10px;
  font-weight: 600;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 피드백 버튼 (오픈카톡) */
.feedback-btn {
  text-decoration: none;
  padding: 6px 12px;
  background: #FEE500;
  color: #3C1E1E;
  border-radius: 6px;
  font-weight: 500;
}

.feedback-btn:hover {
  background: #F5DC00;
  color: #3C1E1E;
}

.feedback-btn .btn-icon {
  font-size: 14px;
}

.feedback-btn .btn-label {
  font-size: 13px;
}

/* 테마 버튼 */
.theme-btn {
  width: 36px;
  height: 36px;
}

.theme-btn .icon-light,
.theme-btn .icon-dark {
  font-size: 18px;
}

/* 라이트 모드: 달 아이콘 표시 */
.theme-btn .icon-light {
  display: none;
}
.theme-btn .icon-dark {
  display: block;
}

/* 다크 모드: 해 아이콘 표시 */
[data-theme="dark"] .theme-btn .icon-light {
  display: block;
}
[data-theme="dark"] .theme-btn .icon-dark {
  display: none;
}

/* 사용자 버튼 */
.user-btn {
  padding: 6px 10px;
  border-radius: 8px;
}

.user-btn .user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, #4f46e5 100%);
  color: white;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-btn .user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-primary);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-btn .dropdown-arrow {
  font-size: 12px;
  color: var(--color-text-light);
  transition: transform 0.2s;
}

.header-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

/* ========== 드롭다운 메뉴 공통 ========== */
.header-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 1000;
}

[data-theme="dark"] .dropdown-menu {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.header-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.dropdown-header .btn-text {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  color: var(--color-primary);
  cursor: pointer;
}

.dropdown-header .btn-text:hover {
  text-decoration: underline;
}

.dropdown-body {
  max-height: 300px;
  overflow-y: auto;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: none;
  color: var(--color-text-primary);
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}

.dropdown-item:hover {
  background: var(--color-gray-100);
}

.dropdown-item.logout-item {
  color: var(--color-danger);
}

.dropdown-divider {
  height: 1px;
  background: var(--color-border);
  margin: 4px 0;
}

/* ========== 알림 드롭다운 ========== */
.notification-menu {
  width: 320px;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-table-border);
  cursor: pointer;
  transition: background 0.15s;
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-item:hover {
  background: var(--color-gray-50);
}

.notification-item.unread {
  background: rgba(99, 102, 241, 0.05);
}

.notification-item.unread::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--color-primary);
  border-radius: 50%;
}

.notification-item .notif-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.notification-item .notif-content {
  flex: 1;
  min-width: 0;
}

.notification-item .notif-message {
  font-size: 13px;
  color: var(--color-text-primary);
  line-height: 1.4;
  margin-bottom: 4px;
}

.notification-item .notif-time {
  font-size: 11px;
  color: var(--color-text-light);
}

.empty-notification {
  padding: 24px 16px;
  text-align: center;
  color: var(--color-text-light);
  font-size: 13px;
}

/* ========== 사용자 메뉴 ========== */
.user-menu {
  min-width: 160px;
}

.user-menu .dropdown-item span {
  font-size: 16px;
}
