@charset "UTF-8";
/* ================================================
   알림 패널 — Artihive Design System v2.0
   ================================================ */

/* ================================================
   0. 컴포넌트 토큰 (디자인 시스템 변수 참조)
   — 하드코딩 방지, 여기서 한 번만 정의
   ================================================ */
.notification-bell,
.notification-page {
    /* 레이아웃 */
    --notify-panel-w: 400px;
    --notify-panel-max-h: 580px;

    /* 색상 — 라이트 기본값, 다크는 body.theme-dark에서 오버라이드 */
    --notify-bg: #fff;
    --notify-bg-content: var(--gray-50, #F9FAFB);
    --notify-border: var(--gray-200, #E5E7EB);
    --notify-border-light: var(--gray-100, #F3F4F6);

    /* 액센트 (브랜드 블루) */
    --notify-accent: var(--border-focus, #3B82F6);
    --notify-accent-rgb: 59, 130, 246;

    /* 알림 상태 — state-up 기반 */
    --notify-alert: var(--state-up, #E85A5A);
    --notify-alert-rgb: 244, 63, 94;
}

.notification-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    font-family: 'Pretendard Variable', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

body.theme-dark .notification-bell {
    --notify-bg: var(--surface-1, #18181B);
    --notify-bg-content: var(--surface-0, #121212);
    --notify-border: rgba(255,255,255,0.1);
    --notify-border-light: rgba(255,255,255,0.07);

}


/* ================================================
   1. 벨 버튼
   ================================================ */
.notification-bell__button {
    position: relative;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 1px solid var(--notify-border);
    border-radius: var(--radius-full, 9999px);
    background-color: var(--notify-bg);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transition: background-color var(--ease-default, 0.2s ease),
                border-color var(--ease-default, 0.2s ease),
                box-shadow var(--ease-default, 0.2s ease);
}

.notification-bell__button:hover:not(:disabled) {
    background-color: var(--gray-50, #F9FAFB);
    border-color: var(--gray-300, #D1D5DB);
}

.notification-bell__button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 읽지 않은 알림이 있을 때 */
.notification-bell--has-unread .notification-bell__button {
    background-color: rgba(var(--notify-alert-rgb), 0.06);
    border-color: rgba(var(--notify-alert-rgb), 0.2);
}

.notification-bell__icon {
    width: 22px;
    height: 22px;
    display: block;
}

.notification-bell__icon--active { display: none; }
.notification-bell--has-unread .notification-bell__icon--active { display: block; }
.notification-bell--has-unread .notification-bell__icon--inactive { display: none; }

/* 뱃지 (카운트) */
.notification-bell__badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 17px;
    height: 17px;
    padding: 0 5px;
    background: var(--notify-alert);
    color: #fff;
    font-size: 10px;
    line-height: 17px;
    font-weight: 700;
    border-radius: var(--radius-full, 9999px);
    text-align: center;
    box-shadow: 0 0 0 2px var(--notify-bg);
}


/* ================================================
   2. 패널 컨테이너
   ================================================ */
.notification-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: min(var(--notify-panel-w), calc(100vw - 24px));
    max-height: var(--notify-panel-max-h);
    padding: 0;
    border: 1px solid var(--notify-border);
    border-radius: var(--radius-xl, 12px);
    background-color: var(--notify-bg);
    box-shadow: var(--shadow-dropdown, 0 10px 30px rgba(0,0,0,0.12));
    z-index: 1100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    transform-origin: top right;
}

.notification-panel:not([hidden]):not(.notification-panel--closing) {
    animation: notification-panel-in 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.notification-panel.notification-panel--closing {
    animation: notification-panel-out 140ms ease-in;
}

.notification-panel[hidden] {
    display: none !important;
}

@keyframes notification-panel-in {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes notification-panel-out {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(-4px) scale(0.98); }
}

@media (prefers-reduced-motion: reduce) {
    .notification-panel:not([hidden]):not(.notification-panel--closing),
    .notification-panel.notification-panel--closing { animation: none; }

    .notification-panel__tab-indicator { transition: none; }

    .notification-item,
    .notification-item * { transition: none; }

    .notification-item__menu { animation: none; }
}


/* ================================================
   3. 패널 헤더
   ================================================ */
.notification-panel__header {
    min-height: auto;
    margin: 0;
    padding: 18px 20px 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background-color: var(--notify-bg);
    border-radius: var(--radius-xl, 12px) var(--radius-xl, 12px) 0 0;
    z-index: 2;
    box-sizing: border-box;
    position: relative;
}

.notification-panel__title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-panel__label {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text-main, #1A1A1A);
    letter-spacing: -0.02em;
}

.notification-panel__badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background-color: var(--notify-alert);
    border-radius: var(--radius-full, 9999px);
    box-sizing: border-box;
}

.notification-panel__badge-count[hidden],
.notification-panel__badge-count:empty {
    display: none;
}

/* 모두 읽기 버튼 */
.notification-panel__full-view,
.notification-panel__read-all {
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-sub, #666);
    background: transparent;
    border: none;
    border-radius: var(--radius-md, 6px);
    cursor: pointer;
    white-space: nowrap;
    transition: color var(--ease-default, 0.2s ease),
                background-color var(--ease-default, 0.2s ease);
}

.notification-panel__full-view {
    text-decoration: none;
}

.notification-panel__full-view:hover,
.notification-panel__read-all:hover:not(:disabled) {
    color: var(--notify-accent);
    background-color: rgba(var(--notify-accent-rgb), 0.06);
}

.notification-panel__read-all:disabled {
    color: var(--text-desc, #999);
    cursor: default;
    opacity: 0.5;
}


/* ================================================
   4. 메인 탭 (알림 / 대화)
   ================================================ */
.notification-panel__body {
    padding: 0;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.notification-panel__main-tabs {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    padding: 0;
    background-color: var(--notify-bg);
    border-bottom: 1px solid var(--notify-border-light);
    box-sizing: border-box;
}

.notification-panel__tab {
    position: relative;
    border: none;
    border-radius: 0;
    background-color: transparent;
    color: var(--gray-400, #9CA3AF);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    padding: 12px 16px 10px;
    cursor: pointer;
    box-sizing: border-box;
    transition: color var(--ease-default, 0.2s ease);
    text-align: center;
}

/* 안 읽은 알림 표시 도트 */
.notification-panel__tab--has-unread::before {
    content: '';
    position: absolute;
    top: 9px;
    right: calc(50% - 24px);
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full, 9999px);
    background: var(--notify-alert);
    box-shadow: 0 0 0 2px var(--notify-bg);
    pointer-events: none;
}

.notification-panel__tab:hover:not(.notification-panel__tab--active) {
    color: var(--text-sub, #666);
}

.notification-panel__tab--active {
    color: var(--text-main, #1A1A1A);
    font-weight: 700;
}

/* 슬라이딩 탭 인디케이터 */
.notification-panel__tab-indicator {
    position: absolute;
    bottom: -1px;
    height: 2px;
    background-color: var(--notify-accent);
    border-radius: 1px;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 1;
}


/* ================================================
   5. 콘텐츠 영역
   ================================================ */
.notification-panel__content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 16px 16px 20px;
    background-color: var(--notify-bg-content);
    box-sizing: border-box;
}

.notification-panel__section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notification-panel__section[hidden] { display: none !important; }


/* ================================================
   6. 카테고리 필터
   ================================================ */
.notification-chips[hidden] { display: none !important; }

.notification-chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.notification-chips::-webkit-scrollbar { display: none; }

.notification-chip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    border: 1px solid var(--notify-border);
    border-radius: var(--radius-full);
    background-color: var(--notify-bg);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    color: var(--text-main);
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--ease-default), border-color var(--ease-default);
}

.notification-chip:hover:not(.notification-chip--active) {
    background-color: var(--notify-bg-content);
    border-color: var(--gray-300);
}

.notification-chip--active {
    border-color: var(--text-main);
    background-color: var(--text-main);
    color: #fff;
}

.notification-chip__count {
    font-weight: 700;
    color: var(--notify-accent);
}

.notification-chip--active .notification-chip__count { color: rgba(255, 255, 255, 0.75); }


/* ================================================
   7. 알림 리스트
   ================================================ */
/* 목록 하나가 흰 판 하나 — 알림 사이는 가는 선으로만 나눈다(패널·페이지 공용, 2026-09-28 결정). */
.notification-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    background-color: var(--notify-bg);
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 2px 10px rgba(17, 24, 39, 0.04);
}


/* ================================================
   8. 알림 행 — 누구 알림인지(아바타·이름)로 시작한다.
   ================================================ */
.notification-item {
    --notify-row-inset: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px var(--notify-row-inset) 18px;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color var(--ease-default);
}

.notification-item + .notification-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: var(--notify-row-inset);
    left: var(--notify-row-inset);
    height: 1px;
    background-color: var(--notify-border-light);
}

.notification-item:first-child { border-top-left-radius: 16px; border-top-right-radius: 16px; }
.notification-item:last-child { border-bottom-left-radius: 16px; border-bottom-right-radius: 16px; }
.notification-item:hover { background-color: var(--notify-bg-content); }
.notification-item.notification-item--selected { background-color: rgba(var(--notify-accent-rgb), 0.06); }

.notification-item__head {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 28px;
    padding-right: 28px;
}

.notification-item__avatar {
    position: relative;
    width: 28px;
    height: 28px;
    margin-right: 2px;
    overflow: visible;
}

.notification-item__avatar .profile-avatar__image { border-radius: 50%; }
.notification-item__avatar .profile-avatar__fallback { font-size: 12px; }

.notification-item__avatar--platform {
    background: #eaf6fd;
    border-color: #d5edfb;
}

.notification-item__avatar--platform .profile-avatar__image {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.notification-item__avatar::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid var(--notify-bg);
    background-color: var(--notify-alert);
    transform: scale(0);
    transition: transform var(--ease-default);
}

.notification-item--unread .notification-item__avatar::after { transform: scale(1); }

.notification-item__badge {
    position: absolute;
    right: -5px;
    bottom: -4px;
    display: grid;
    place-items: center;
    width: 16px;
    height: 16px;
    border: 2px solid var(--notify-bg);
    border-radius: 50%;
    box-sizing: content-box;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    color: #fff;
}

.notification-item__badge svg { width: 9px; height: 9px; }
.notification-item__badge--inquiry { background-color: #7a5af8; }
.notification-item__badge--deal { background-color: #2f6fed; }
.notification-item__badge--performance { background-color: #12b76a; }
.notification-item__badge--payment { background-color: #f79009; }
.notification-item__badge--termination { background-color: #f04438; }

.notification-item__who {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}

.notification-item__sub {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: var(--text-desc);
}

.notification-item__sub::before {
    content: '·';
    margin-right: 8px;
}

.notification-item__time {
    flex-shrink: 0;
    margin-left: auto;
    font-size: 12px;
    color: var(--text-desc);
    white-space: nowrap;
}

/* 아바타(28) + 간격(10)만큼 들여 제목이 이름 아래에서 시작한다. */
.notification-item__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 38px;
}

.notification-item--no-subject .notification-item__text { padding-left: 0; }

.notification-item__title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-main);
    transition: font-weight 0.35s ease;
}

.notification-item--unread .notification-item__title { font-weight: 800; }

/* 읽은 알림은 통째로 물러난다(2026-09-28 결정). 투명도는 내용물에만 건다 — 행에 걸면 ⋮ 메뉴 팝업과 편집 체크박스까지 흐려진다. */
.notification-item > :is(.notification-item__avatar, .notification-item__content, .notification-item__text, .notification-item__more),
.notification-item__head > :not(.notification-item__check) { transition: opacity 0.35s ease; }

.notification-item:not(.notification-item--unread) > :is(.notification-item__avatar, .notification-item__content, .notification-item__text, .notification-item__more),
.notification-item:not(.notification-item--unread) .notification-item__head > :not(.notification-item__check) { opacity: 0.5; }

.notification-item:focus-visible {
    outline: 2px solid var(--notify-accent);
    outline-offset: 2px;
}

/* 본문은 다 보인다 — 알림 대부분이 링크로 이동해서 목록 밖에서는 이 문장을 다시 볼 곳이 없다(QA 2026-09-28). */
.notification-item__body {
    font-size: 14px;
    line-height: 1.55;
    color: #3f444b;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.notification-item__title-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-desc);
}

.notification-item__more {
    position: absolute;
    top: 15px;
    right: 12px;
    width: 28px;
    height: 28px;
    padding: 6px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--gray-400);
    cursor: pointer;
}

.notification-item__more svg { display: block; width: 100%; height: 100%; fill: currentColor; }

.notification-item__more:hover,
.notification-item__more[aria-expanded="true"] {
    background-color: var(--gray-100);
    color: var(--text-main);
}

.notification-item__menu {
    position: absolute;
    top: 46px;
    right: 12px;
    z-index: 5;
    min-width: 140px;
    margin: 0;
    padding: 6px;
    list-style: none;
    border-radius: 12px;
    background-color: var(--notify-bg);
    box-shadow: var(--shadow-dropdown);
    transform-origin: top right;
    animation: notification-menu-in 0.16s ease-out;
}

@keyframes notification-menu-in {
    from { opacity: 0; transform: translateY(-4px) scale(0.97); }
}

.notification-item__menu button {
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 8px;
    background: none;
    text-align: left;
    font-size: 14px;
    color: var(--text-main);
    cursor: pointer;
}

.notification-item__menu button:hover { background-color: var(--gray-100); }
.notification-item__menu .notification-item__menu-danger { color: var(--notify-alert); }


/* ================================================
   12. 채팅 알림 아이템
   ================================================ */
.notification-list--chat .notification-item {
    --notify-row-inset: 16px;
    flex-direction: row;
    align-items: flex-start;
    gap: 14px;
    padding: 14px var(--notify-row-inset);
}

.notification-list--chat .notification-item__avatar {
    width: 44px;
    height: 44px;
    margin-top: 1px;
}

.notification-list--chat .notification-item__content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.notification-list--chat .notification-item__title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.notification-list--chat .notification-item__title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* 채팅은 미리보기 한 줄 — 전문은 링크로 여는 채팅방에 있다. */
.notification-list--chat .notification-item__body {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-list--chat .notification-item__title-count {
    min-width: 20px;
    height: 20px;
    padding: 0 7px;
    border-radius: var(--radius-full, 9999px);
    background-color: var(--notify-alert);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    box-sizing: border-box;
    flex-shrink: 0;
}


/* ================================================
   13. 빈 상태
   ================================================ */
.notification-empty {
    padding: 36px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.notification-empty[hidden] { display: none !important; }

.notification-empty__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--gray-100, #F3F4F6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.notification-empty__icon img {
    width: 24px;
    height: 24px;
    display: block;
    opacity: 0.4;
}

.notification-empty__text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-desc, #999);
    line-height: 1.5;
}


/* ================================================
   14. 스크롤 & 유틸
   ================================================ */
.notification-panel__sentinel {
    width: 100%;
    height: 1px;
    flex: 0 0 auto;
}


/* ================================================
   15. 모바일 반응형
   ================================================ */
@media (max-width: 640px) {
    .notification-panel {
        position: fixed;
        width: calc(100vw - 24px);
        right: 12px;
        left: 12px;
        top: 70px;
        margin: 0;
        max-height: calc(100vh - 88px);
    }
}


/* ================================================
   다크모드 오버라이드
   (컴포넌트 토큰은 섹션 0에서 이미 전환됨,
    여기는 구조적으로 필요한 것만)
   ================================================ */

/* ---- 벨 버튼 ---- */
body.theme-dark .notification-bell__button {
    border-color: var(--notify-border);
    background: var(--surface-3, #2A2A2E);
}

body.theme-dark .notification-bell__button:hover:not(:disabled) {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 0 12px rgba(var(--notify-accent-rgb), 0.15);
}

body.theme-dark .notification-bell__icon--inactive { filter: invert(1); }

body.theme-dark .notification-bell--has-unread .notification-bell__button {
    background: rgba(var(--notify-alert-rgb), 0.12);
    border-color: rgba(var(--notify-alert-rgb), 0.25);
    box-shadow: 0 0 12px rgba(var(--notify-alert-rgb), 0.15);
}

body.theme-dark .notification-bell__badge {
    box-shadow: 0 0 0 2px var(--notify-bg);
}


/* ---- 패널 ---- */
body.theme-dark .notification-panel {
    background-color: var(--notify-bg);
    border-color: var(--notify-border);
    box-shadow: 0 12px 48px rgba(0,0,0,0.6),
                inset 0 1px 0 rgba(255,255,255,0.06);
}


/* ---- 헤더 ---- */
body.theme-dark .notification-panel__header {
    background-color: var(--notify-bg);
}

body.theme-dark .notification-panel__label {
    color: var(--text-on-dark, #FFFFFF);
}


/* ---- 탭 ---- */
body.theme-dark .notification-panel__main-tabs {
    background-color: var(--notify-bg);
    border-bottom-color: var(--notify-border-light);
}

body.theme-dark .notification-panel__tab {
    color: var(--text-desc, #64748B);
}

body.theme-dark .notification-panel__tab:hover:not(.notification-panel__tab--active) {
    color: var(--text-sub, #94A3B8);
}

body.theme-dark .notification-panel__tab--active {
    color: var(--text-on-dark, #FFFFFF);
}

body.theme-dark .notification-panel__tab--has-unread::before {
    box-shadow: 0 0 0 2px var(--notify-bg);
}


/* ---- 콘텐츠 영역 ---- */
body.theme-dark .notification-panel__content {
    background-color: var(--notify-bg-content);
}


/* ---- 섹션 제목 ---- */
body.theme-dark .notification-group__label {
    color: var(--text-sub, #94A3B8);
}


/* ---- 카테고리 필터 ---- */
body.theme-dark .notification-chip {
    background-color: var(--surface-2, #1E1E1E);
    border-color: rgba(255,255,255,0.08);
    color: var(--text-sub, #94A3B8);
}

body.theme-dark .notification-chip:hover:not(.notification-chip--active) {
    background-color: var(--surface-3, #2A2A2E);
    border-color: rgba(255,255,255,0.12);
}

body.theme-dark .notification-chip--active {
    background-color: var(--text-on-dark, #FFFFFF);
    border-color: var(--text-on-dark, #FFFFFF);
    color: var(--surface-0, #121212);
    font-weight: 700;
}


/* ---- 알림 카드 ---- */
body.theme-dark .notification-item__title,
body.theme-dark .notification-item__who {
    color: var(--text-on-dark);
}

body.theme-dark .notification-item__body {
    color: var(--text-sub);
}


body.theme-dark .notification-list--chat .notification-item__title-count {
    background-color: var(--notify-accent);
    color: #fff;
}


/* ---- 빈 상태 ---- */
body.theme-dark .notification-empty__icon {
    background-color: var(--surface-2, #1E1E1E);
}

body.theme-dark .notification-empty__icon img {
    filter: invert(1);
    opacity: 0.3;
}

body.theme-dark .notification-empty__text {
    color: var(--text-desc, #64748B);
}
/* ================================================
   16. 알림 설정 뷰
   ================================================ */

/* 헤더 우측 액션 묶음 — 모두 읽기와 설정 톱니는 형제, 간격은 부모가 소유 */
.notification-panel__actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 2px;
}

.notification-panel__icon-button {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-sub);
    cursor: pointer;
    transition: color var(--ease-default), background-color var(--ease-default);
}
.notification-panel__icon-button:hover {
    color: var(--notify-accent);
    background-color: rgba(var(--notify-accent-rgb), 0.06);
}
.notification-panel__icon-button svg { width: 18px; height: 18px; }

/* 설정 뷰: 탭·목록을 대신해 body 전체를 차지 */
.notification-settings {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background-color: var(--notify-bg-content);
}
.notification-settings__note {
    margin: 0;
    padding: 12px 20px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-desc);
    background-color: var(--notify-bg);
    border-bottom: 1px solid var(--notify-border-light);
}
.notification-settings__list {
    list-style: none;
    margin: 0;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}
.notification-settings__row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background-color: var(--notify-bg);
    border: 1px solid var(--notify-border-light);
    border-radius: var(--radius-lg);
}
.notification-settings__text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.notification-settings__topic {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
}
.notification-settings__desc {
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-sub);
}
.notification-settings__channel {
    flex-shrink: 0;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    color: var(--text-sub);
    background-color: var(--gray-100);
    border-radius: var(--radius-full);
}

/* 스위치 — 네이티브 체크박스를 role=switch 로 씀 (키보드·폼 동작 유지) */
.notification-switch {
    position: relative;
    flex-shrink: 0;
    width: 40px;
    height: 22px;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    border-radius: var(--radius-full);
    background: var(--gray-300);
    cursor: pointer;
    transition: background-color .18s ease;
}
.notification-switch::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .2);
    transition: transform .18s ease;
}
.notification-switch:checked { background: var(--notify-accent); }
.notification-switch:checked::before { transform: translateX(18px); }
.notification-switch:focus-visible { outline: 2px solid var(--notify-accent); outline-offset: 2px; }
.notification-switch:disabled { opacity: .5; cursor: progress; }

.notification-settings__footer {
    margin: 0;
    padding: 10px 20px 14px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-desc);
}
.notification-settings__footer-link {
    font-weight: 600;
    color: var(--notify-accent);
    white-space: nowrap;
}
.notification-settings__status:empty { display: none; }
.notification-settings__status {
    margin: 0;
    padding: 0 20px 12px;
    font-size: 12px;
    color: var(--notify-alert);
}

body.theme-dark .notification-settings__channel { background-color: rgba(255,255,255,0.08); }
body.theme-dark .notification-switch { background: rgba(255,255,255,0.18); }


/* ================================================
   알림 전체보기 페이지 (/notifications)
   ================================================ */
.notification-page {
    padding: 40px 0 88px;
    background-color: #f5f6f8;
}

.notification-page__inner {
    max-width: 1040px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px 32px;
    align-items: start;
}

.notification-page__head {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.notification-page__summary {
    margin: 0;
    font-size: 14px;
    color: var(--text-sub);
}

.notification-page__summary strong {
    font-weight: 700;
    color: var(--notify-accent);
}

.notification-page__title {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.notification-page__link {
    padding: 6px 4px;
    border: 0;
    background: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-sub);
    cursor: pointer;
}

.notification-page__link:hover:not(:disabled) { color: var(--text-main); }
.notification-page__link:disabled { color: var(--text-desc); cursor: default; }

.notification-page__main {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.notification-page__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 32px;
}

.notification-page__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-page__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-sub);
    text-decoration: none;
}

.notification-page__switch {
    position: relative;
    width: 34px;
    height: 20px;
    border-radius: var(--radius-full);
    background-color: var(--gray-300);
}

.notification-page__switch::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
}

.notification-page__toggle[aria-checked="true"] .notification-page__switch { background-color: var(--notify-accent); }
.notification-page__toggle[aria-checked="true"] .notification-page__switch::before { transform: translateX(14px); }

.notification-groups {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.notification-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification-group__label {
    margin: 0 2px;
    font-size: 13px;
    font-weight: 700;
    color: #8b9098;
}

.notification-item__check { display: none; }

.notification-page--editing .notification-item__check { display: inline-flex; }

.notification-item__check input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--notify-accent);
    cursor: pointer;
}

.notification-page--editing .notification-item__text { padding-left: 64px; }
.notification-page--editing .notification-item--no-subject .notification-item__text { padding-left: 0; }
.notification-page--editing .notification-item__more { display: none; }

.notification-page__selection {
    position: sticky;
    bottom: 20px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 10px 10px 20px;
    border-radius: 14px;
    background-color: #111;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.notification-page__selection[hidden] { display: none; }

.notification-page__selection-count {
    flex: 1;
    font-size: 14px;
    font-weight: 700;
}

.notification-page__selection button {
    height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.notification-page__selection button:disabled { opacity: 0.4; cursor: default; }
.notification-page__selection .notification-page__selection-danger { background-color: #e5484d; }

.notification-page__empty { padding: 64px 0; }

.notification-page__side {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.notification-page__card {
    gap: 14px;
    padding: 22px;
    border-radius: 16px;
    background-color: var(--notify-bg);
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 2px 10px rgba(17, 24, 39, 0.04);
}

.notification-page__card-title {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--text-main);
}

.notification-page__card-note {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-desc);
}

.notification-page__card .notification-settings__list { padding: 0; overflow: visible; }
.notification-page__card .notification-settings__row { padding: 12px 14px; background-color: var(--notify-bg-content); }
.notification-page__card .notification-settings__footer,
.notification-page__card .notification-settings__status { padding: 0; }

@media (max-width: 900px) {
    .notification-page { padding: 20px 0 64px; }
    .notification-page__inner { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .notification-page__side { position: static; }
    .notification-page__title { font-size: 22px; }
}

/* 알림 행의 촘촘함은 화면 폭이 아니라 목록이 받은 폭으로 정한다 — 늘 좁은 패널과 모바일 페이지가 같은 규칙을 탄다. */
.notification-feed { container: notification-feed / inline-size; }

@container notification-feed (max-width: 480px) {
    .notification-groups { gap: 16px; }

    .notification-item { --notify-row-inset: 16px; padding: 14px var(--notify-row-inset) 16px; }

    .notification-item__text,
    .notification-page--editing .notification-item__text { padding-left: 0; }
}
