* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Noto Sans KR", sans-serif;
}


/* ===== 헤더 전체 ===== */
.header {
  width: 100%;
  border-bottom: 1px solid #ddd;
  position: sticky;
    top: 0;
    z-index: 9999;

    width: 100%;
    border-bottom: 1px solid #ddd;
    background: #fff;   /* ⭐ 중요 (투명 방지) */
  }
  .header.scrolled {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  }

a{
  text-decoration: none;
  color: inherit;
  }
  a,
  a:link,
  a:visited,
  a:hover,
  a:active {
    text-decoration: none !important;
  }

.header-inner {
  width:100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

/* ===== 좌측 ===== */
.logo {
  padding-left: 50px;
}
.logo img {
  height: 50px;     /* 원하는 높이 */
  width: auto ;      /* 비율 유지 */
  display: block;
}

/* ===== 중앙 메뉴 ===== */
.nav {
  position: absolute;
  left: 52%;
  transform: translateX(-50%);
  display: flex;
  gap: clamp(10px, 3vw, 43px);
  font-size: 18px;
  white-space: nowrap;
}
.nav a {
  text-decoration: none;  /* 밑줄 제거 */
  color: inherit;
}
.nav a:hover {
  text-decoration: none;  /* 호버 시에도 밑줄 안 생기게 */
  color: inherit;
}
.nav span {
  color: #ccc;
}


/* ===== 우측 ===== */
.right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.top-right {
  display: flex;
  align-items: center;
  gap: 4px;
}






/* 로그인/회원가입 스타일 */
.login-link,
.signup-link {
  font-size: 10px;
  color: #333;
  text-decoration: none;
}

.slash {
  font-size: 13px;
  color: #aaa;
}

/* 상단 프로필 바 */
.top-bar {
  width:100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 24px;

  display: flex;
  justify-content: flex-end; /* ⭐ 오른쪽 정렬 핵심 */

  position: relative;
}
.top-center {
  position: absolute; /* ⭐ 움직이는 대상 */
  top: 100%;
  left: 50.5%;
  transform: translate(-50%, -50%);
}
.top-center img{
  width: 180px;
}
/* 상단: 프로필 */
.profile-row {
  display: flex;
  align-items: center;

  gap: 6px;
  position: relative;
  margin-right: 0;
}

.profile-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eee;
}

.profile-name {
  font-size: 12px;
  cursor: pointer;
}

/* 닉네임 드롭다운 */
.user-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0px;

  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  width: 100px;
  z-index: 9999;
  overflow: hidden;
}

.user-dropdown a,
.logout-btn {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-size: 10px;
  color: #333;
  cursor: pointer;
  box-sizing: border-box;
  text-decoration: none;
}

.user-dropdown a:hover,
.logout-btn:hover {
  background: #f5f5f5;
}

.logout-btn {
  all: unset;
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-size: 10px;
  color: #333;
  cursor: pointer;
  box-sizing: border-box;
}

.logout-btn:hover {
  background: #f5f5f5;
}

.profile-row:hover .user-dropdown {
  display: block;
}
.profile-img img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;   /* ⭐ 핵심 */
  display: block;
}


/* 구분선 */
.divider {
  width: 100%;
  height: 1px;
  background: #DCA244;
}

.icon {
  width: 24px;          /* ⭐ 아이콘 크기 통일 */
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* 아이콘 이미지 */
.icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;  /* ⭐ 비율 유지하면서 꽉 */
}

.icon-row{
display: flex;
gap:15px
}
/* 하단 아이콘 */
.after-login.icon-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* 검색바 외형 유지 */
.search-bar {
  width: 140px;
  height: 32px;
  background: #e0e0e0;
  border-radius: 999px;
  /* padding은 form 내부로 옮기는 것이 더 정확합니다 */
  overflow: hidden;
}

/* ⭐ form 태그가 실질적인 flex 컨테이너 역할을 하도록 수정 */
.search-bar form {
  display: flex;
  align-items: center;
  justify-content: space-between; /* 요소 사이 간격 최적화 */
  width: 100%;
  height: 100%;
  padding: 0 12px;
  gap: 5px; /* input과 버튼 사이 간격 */
}

/* 입력창 */
.search-bar input {
  flex: 1; /* 남은 공간을 꽉 채우도록 설정 */
  min-width: 0; /* flex 자식 요소의 최소 너비 버그 방지 */
  border: none;
  background: transparent;
  font-size: 11px;
  outline: none;
}

/* 돋보기 버튼 */
.search-btn {
  width: 15px;
  height: 15px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex; /* 이미지 중앙 정렬을 위해 추가 */
  align-items: center;
  justify-content: center;
  flex-shrink: 0; /* 버튼이 눌리지 않게 고정 */
}

.search-btn img {
  width: 15px;
  height: 15px;
}

.icon {
  font-size: 25px;
  line-height: 100%;
  cursor: pointer;
  position: relative;
}
.after-login icon-group{
  display: flex;
}

/* 알림 탭 */
#alarmBtn {
  background-color: #fff;
  border: none;
  font-size: 25px;
  line-height: 100%;
  cursor: pointer;
  padding : 0;
}

#alarmBox {
  position: absolute;
  top: 30px;          /* 종 아이콘 아래 */
  right: 0;
  display: none;
  z-index: 99999;
}

.alarm-cnt {
  display: none;
  position: absolute;
  color: #FFF;
  top: -30%;
  right: -50%;
  border: 1px solid black;
  border-radius: 50%;
  background-color: red;
  line-height: 100%;
  padding: 3px 5px;
  font-size: 13px;
}

.alarm-panel {
  width: 380px;
  border: 1px solid #ddd;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  cursor: default;
}

.alarm-panel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-right: 10px;
  border-bottom: 1px solid #eee;
}

.alarm-title {
  padding: 14px;
  font-size: 18px;
  font-weight: 700;
}

.alarm-menu-dot {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5px;
  border-radius: 50%;
  background-color: #fff;
  position: relative;
  cursor: pointer;
}

.alarm-menu-dot:hover {
  background-color: #eee;
}

.alarm-menu-dot.alarm-menu-active {
  background-color: #eee;
}

.alarm-menu-dot img {
  width: 15px;
  height: 15px;
  transform: rotate(90deg);
}

.alarm-menu {
  display: none;
  width: 100px;
  position: absolute;
  top: calc(100% + 5px);
  right: 0px;
  background-color: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 5px 10px;
  vertical-align: middle;
}

.alarm-menu button {
  background-color: transparent;
  border: none;
  cursor: pointer;
}

/* 탭 */
.alarm-tabs {
  display: flex;
  flex-wrap: nowrap;        /* ⭐ 한 줄 고정 */
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  overflow-x: auto;         /* ⭐ 넘치면 가로 스크롤 */
}

.alarm-tabs.dragging {
  cursor: grabbing;
}

/* 스크롤바 안 보이게 (선택) */
.alarm-tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  all: unset;                 /* ⭐ 버튼 기본 스타일 제거 */
  flex: 0 0 auto;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1;
  border-radius: 14px;
  border: 1px solid #ddd;     /* ⭐ 우리가 원하는 테두리만 */
  background: #fff;
  white-space: nowrap;
  cursor: pointer;
}

.tab.active {
  background: #bfe5c8;
  border-color: #bfe5c8;
}

/* 리스트 */
.alarm-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 500px;
  overflow-y: auto;
  border-bottom: 1px solid #f0f0f0;
}

.alarm-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  position: relative;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
}

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

.alarm-dot {
  width: 8px;
  height: 8px;
  background: red;
  border-radius: 50%;
  position: absolute;
  left: 8px;
  top: 20px;
}

.alarm-item .alarm-icon {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: contain;
}

.alarm-text {
  flex: 1;
}

.alarm-msg {
  font-size: 15px;
  line-height: 1.5;
  word-break: keep-all;
}

.alarm-msg.danger {
  font-size: 15px;
  font-weight: 600;
  color: #d9534f;
}

.alarm-time {
  font-size: 12px;
  color: #999;
  margin-top: 3px;
  display: block;
}

.alarm-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  border-top: #f0f0f0;
}

#all-noti-btn {
  width: 100%;
  padding: 10px;
  background-color: transparent;
  border: none;
  cursor: pointer;
  color: #333;
}


@media (max-width: 768px) {
  .header-inner {
    flex-direction: column; /* 세로 정렬 */
    gap: 20px;
    padding: 10px;
    margin-top:15px;
  }

  .nav {
    order: 2; /* 메뉴를 아래로 */
    width: 100%;
    justify-content: center;
    gap: 10px;
    font-size: 13px;
  }

  .logo {
    padding-left: 0;
    order: 1;
    margin-top:15px;
  }

  .right {
    order: 3;
    width: 100%;
    align-items: center;
  }

  .search-bar {
    width: 100%; /* 검색바를 가득 채움 */
    max-width: 300px;
  }

  .alarm-panel {
    width: 90vw; /* 알림창 너비를 화면 너비에 맞춤 */
    position: fixed;
    top: 60px;
    right: 5vw;
  }
}