/* 새 알림창 모양 — 검증본 전용 덧댐. 운영 알림창(#notification_panel)에 입힌다.
   [2026-11-24 사용자 「어 이대로 해서 알림창이랑 검증본에 올려봐」] 프리뷰(operations/sales-support-preview?noti=1 · css/noti-panel-preview.css)의 모양을 실제 알림에 입힌 것.
   · 붙는 곳 = 검증본 표식([data-ssp-here])이 있는 화면: 관리자 · 테스트본부 계정의 모든 화면(components/top_menu.php) · 검증본 전환 띠(partials/_p0_switch.php) · 탭 검증본 틀(operations/app_tabs_shell.php).
   · 운영 알림창의 코드(notification_topbar.js)와 마크업(top_menu.php)은 그대로다. js/noti-panel-p0.js 가 창에 .np0 을 붙였을 때만 아래 규칙이 듣는다 → 다른 계정의 운영 화면에는 영향이 없다.
   · 선택자 = #notification_panel.np0 … (운영 규칙 #notification_panel .nac-* 보다 클래스 하나만큼 세다 — 순서에 기대지 않는다).
   · 값 = 등재 토큰만. 글자 = 운영 화면 크기(제목 md 14 · 본문 sm 12 · 보조 xs 10). 굵기 = 400 · 500 뿐. 새 이름은 np0-ib(머리의 아이콘 단추) 하나.
   · 전원에게 낼 때(승격) = 이 값을 알림창 규칙으로 옮기고, 스크립트가 하는 일(머리의 종 · 「모두 읽음」 자리 · 톱니 · 날짜 줄 칩)을 마크업에 넣는다. 그다음 이 파일과 js/noti-panel-p0.js 를 지운다.
   · 프리뷰와 다른 것: 긴 제목 · 내용을 자르지 않는다(운영과 같다 — 가려진 글을 볼 길이 없다) · 날짜 띠의 건수 없음(「더 보기」로 나눠 받는 목록이라 세면 틀린다) · 검색 = 등재 .gna-search · 종류 배지 = 운영의 .badge-status(유형 이름). */

/* ── 창 ── */
#notification_panel.np0 { width: 880px; color: var(--gna-text); font-size: var(--gna-font-sm); font-weight: 400; line-height: 20px; }
#notification_panel.np0 .btn, #notification_panel.np0 .badge-status, #notification_panel.np0 .gna-status-badge, #notification_panel.np0 .gna-tag { font-weight: 400; }

/* 머리 — [종] 알림 [읽지 않음 N건] … [모두 읽음] [톱니] [×] */
#notification_panel.np0 .dv-layer-info-header { display: flex; align-items: center; gap: var(--gna-space-2); padding: var(--gna-space-3) var(--gna-space-4); }
#notification_panel.np0 .dv-layer-info-header > h3 { display: flex; align-items: center; gap: var(--gna-space-2); margin: 0; font-size: var(--gna-font-md); font-weight: 500; line-height: 24px; color: var(--gna-heading); }
#notification_panel.np0 .dv-layer-info-header > h3 i { width: 20px; font-size: var(--gna-font-md); color: var(--gna-text-muted); text-align: center; }
#notification_panel.np0 .nac-hd-count { margin-right: auto; padding: 0 var(--gna-space-2); border-radius: var(--gna-radius-pill); background: var(--gna-primary-light); color: var(--gna-primary); font-size: var(--gna-font-sm); font-weight: 500; line-height: 20px; }
#notification_panel.np0 .nac-hd-count:empty { padding: 0; background: none; }
#notification_panel.np0 .np0-ib { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: var(--gna-radius-form); background: none; color: var(--gna-text-muted); font-size: var(--gna-font-md); cursor: pointer; }
#notification_panel.np0 .np0-ib:hover { background: var(--gna-bg-alt); }
#notification_panel.np0 .np0-ib:focus-visible { outline: 2px solid var(--gna-primary); outline-offset: 2px; }

/* 왼쪽 묶음 줄 — 이름 xs · 한 줄 40 · 아이콘 칸 20 · 건수 xs */
#notification_panel.np0 .nac-rail { width: 200px; padding: var(--gna-space-3) var(--gna-space-2); background: var(--gna-white); }
#notification_panel.np0 .nac-rail-grp { padding: var(--gna-space-4) var(--gna-space-2) var(--gna-space-1); font-size: var(--gna-font-xs); font-weight: 400; line-height: 16px; color: var(--gna-text-muted); }
#notification_panel.np0 .nac-rail-it { gap: var(--gna-space-2); height: 40px; padding: 0 var(--gna-space-2); border-radius: var(--gna-radius-form); font-size: var(--gna-font-sm); font-weight: 400; line-height: 20px; color: var(--gna-text); }
#notification_panel.np0 .nac-rail-it:hover { background: var(--gna-bg); }
#notification_panel.np0 .nac-rail-it.on { background: var(--gna-primary-light); color: var(--gna-primary); font-weight: 500; }
#notification_panel.np0 .nac-rail-it i { flex: none; width: 20px; font-size: var(--gna-font-md); color: var(--gna-text-muted); }
#notification_panel.np0 .nac-rail-it .rc { font-size: var(--gna-font-xs); font-weight: 400; color: var(--gna-text-muted); }
#notification_panel.np0 .nac-rail-it.on i, #notification_panel.np0 .nac-rail-it.on .rc { color: var(--gna-primary); }
/* 「신규재고」는 「영업지원」 묶음에 올라가 있다(js/sales-support-preview.js). 묶음이 붙었을 때만 「유형」 쪽의 같은 줄을 감춘다 */
#notification_panel.np0:has(#sspNacGrp) #nac_rail_types [data-type="stock_new"] { display: none; }
#notification_panel.np0:has(#sspNacGrp) #nac_rail_types_hd:has(+ #nac_rail_types > [data-type="stock_new"]:only-child) { display: none; }

/* 검색 줄 · 날짜 띠 */
#notification_panel.np0 .nac-tools { gap: var(--gna-space-2); padding: var(--gna-space-4); border-bottom: 0; }
#notification_panel.np0 .nac-date { display: flex; align-items: center; height: 32px; padding: 0 var(--gna-space-4); border-top: 1px solid var(--gna-border); background: var(--gna-bg); font-size: var(--gna-font-sm); font-weight: 400; line-height: 20px; color: var(--gna-text); }

/* 카드 = 칸 [아이콘 32][글][오른쪽] · 칸 사이 space-3 · 안쪽 space-4.
   운영 마크업 그대로: .nac-top(아이콘 · 종류 · 제목 · 날짜) 을 풀어(display: contents) 칸에 놓는다.
   1줄 = 제목 | 종류 배지 · 2줄 = 내용 | 단추 · 3줄 = 날짜 줄(칩). 배지 줄 ↔ 단추 = space-2 · 내용 ↔ 날짜 줄 = space-1 */
#notification_panel.np0 .nac-card, #notification_panel.np0 .nac-card.sys { display: grid; grid-template-columns: 32px minmax(0, 1fr) fit-content(280px); gap: 0 var(--gna-space-3); align-items: start; padding: var(--gna-space-4); border-bottom: 1px solid var(--gna-border); }
#notification_panel.np0 .nac-card:hover { background: var(--gna-bg); }
#notification_panel.np0 .nac-top { display: contents; }
#notification_panel.np0 .noti-item-ic { grid-area: 1 / 1 / span 3; position: relative; width: 32px; height: 32px; margin: 0; border-radius: var(--gna-radius-full); font-size: var(--gna-font-md); }
#notification_panel.np0 .nac-card.sys .noti-item-ic { background: var(--gna-bg-alt); color: var(--gna-text-muted); }
#notification_panel.np0 .nac-card:not(.read) .noti-item-ic::after { content: ''; position: absolute; top: 0; right: 0; box-sizing: border-box; width: 12px; height: 12px; border: 2px solid var(--gna-white); border-radius: var(--gna-radius-full); background: var(--gna-primary); }
#notification_panel.np0 .nac-title { grid-area: 1 / 2; margin-top: var(--gna-space-1); font-size: var(--gna-font-md); font-weight: 500; line-height: 20px; color: var(--gna-heading); overflow-wrap: anywhere; }
#notification_panel.np0 .nac-card.read .nac-title { font-weight: 400; color: var(--gna-text-muted); }
#notification_panel.np0 .nac-type { grid-area: 1 / 3; justify-self: end; display: inline-flex; align-items: center; gap: var(--gna-space-1); margin-top: var(--gna-space-1); }
/* 종류 배지 = 운영의 .badge-status(유형 이름) 그대로. 바탕색만 준다 — 업무 = info · 시스템 = 회색 · 유형 몇 가지는 프리뷰와 같은 색(보안 = danger · 정산 · 지출 = success · 재고 = warning).
   앞의 두 줄은 :where 로 약하게 적었다 — 운영의 유형별 규칙(warning 4종 · top_menu.php)이 그대로 이긴다. 아이콘 바탕도 같은 색을 따른다 */
#notification_panel:where(.np0) :where(.nac-type).badge-status { background: var(--gna-info-bg); color: var(--gna-primary); }
#notification_panel:where(.np0) :where(.nac-card.sys .nac-type).badge-status { background: var(--gna-bg-alt); color: var(--gna-text-muted); }
#notification_panel.np0 .nac-type.security, #notification_panel.np0 .noti-item-ic:has(+ .nac-type.security) { background: var(--gna-danger-bg); color: var(--gna-danger); }
#notification_panel.np0 .nac-type.settlement, #notification_panel.np0 .nac-type.expense, #notification_panel.np0 .noti-item-ic:has(+ .nac-type.settlement), #notification_panel.np0 .noti-item-ic:has(+ .nac-type.expense) { background: var(--gna-success-bg); color: var(--gna-success); }
#notification_panel.np0 .nac-type.stock_match, #notification_panel.np0 .noti-item-ic:has(+ .nac-type.stock_new), #notification_panel.np0 .noti-item-ic:has(+ .nac-type.stock_match) { background: var(--gna-warning-bg); color: var(--gna-warning); }
#notification_panel.np0 .nac-msg { grid-area: 2 / 2; margin: var(--gna-space-2) 0 0; font-size: var(--gna-font-sm); line-height: 20px; color: var(--gna-text); overflow-wrap: anywhere; }
#notification_panel.np0 .nac-card.read .nac-msg { color: var(--gna-text-muted); }
/* 날짜 줄 = 칩(등재 .gna-tag · 10px) + 아이콘 — 시계 = 시각 · 달력 = 기간 · 모래시계 = 남은 날(7일 이하 = danger) */
#notification_panel.np0 .nac-time { grid-area: 3 / 2; justify-self: start; display: flex; align-items: center; gap: var(--gna-space-1); margin: var(--gna-space-1) 0 0; font-size: var(--gna-font-xs); }
#notification_panel.np0 .nac-time .gna-tag i { margin-right: var(--gna-space-1); }
/* 단추 = 오른쪽 칸 · 오른쪽 끝부터 놓는다(첫 단추 = 주 단추가 맨 오른쪽) */
#notification_panel.np0 .nac-acts { grid-area: 2 / 3 / span 2; flex-direction: row-reverse; gap: var(--gna-space-2); margin-top: var(--gna-space-2); }
#notification_panel.np0 .nac-close { margin-left: 0; }
#notification_panel.np0 .nac-more { width: calc(100% - var(--gna-space-6)); margin: var(--gna-space-3) var(--gna-space-4); }

/* 아래 띠 — 왼쪽 알림 보관함(마이페이지) · 오른쪽 알림 설정. 보관함 기간 단추(#nac_days)는 알림창 본체의 것이다(2026-11-25 알림 센터 삭제 때 본체로 옮김) */
#notification_panel.np0 .dv-layer-info-footer { display: flex; align-items: center; justify-content: space-between; padding: var(--gna-space-3) var(--gna-space-4); }
#notification_panel.np0 .noti-mark-all { display: inline-flex; align-items: center; gap: var(--gna-space-2); width: auto; padding: 0; font-size: var(--gna-font-sm); font-weight: 400; line-height: 20px; color: var(--gna-text-muted); }
#notification_panel.np0 .noti-mark-all i { width: 20px; font-size: var(--gna-font-md); text-align: center; }

/* ── 알림 토스트(알림이 올 때 화면 오른쪽 위에 뜨는 카드) — 프리뷰(css/noti-panel-preview.css 의 .npv-toast)의 모양을 운영 토스트에 입힌다.
   [2026-11-30 사용자 「알림창도 지금 검증본 디자인 제대로 안된거 같은데 … 닫기 영영 그대론데」] 종전 = 회색 머리 줄 + 닫기 × 10×16(누르기 어렵다).
   · 마크업과 동작(notification_topbar.js showNotificationToast)은 그대로다. 카드를 누르면 이동하는 것 · 저절로 닫히지 않는 것은 바꾸지 않았다(시나리오 noti_toast_fix 의 결정 대기).
   · 배치 = 알림창 카드와 같은 문법: [아이콘 32][제목][종류][× 32] / 내용 / 시각 / 단추(글 시작선). 머리 · 본문 상자는 display:contents 로 풀어 한 격자에 놓는다.
   · 값 = 등재 토큰만. 좁은 화면(768 미만)은 종전 모양 그대로다(새 알림창과 같은 기준). 되돌리기 = 이 덩어리 삭제 */
@media (min-width: 768px) {
    .noti-toast-container .noti-toast { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto 32px; gap: var(--gna-space-2) var(--gna-space-3); align-items: start; padding: calc(var(--gna-space-4) - 1px); border-radius: var(--gna-radius-form); box-shadow: var(--gna-shadow-modal); }
    .noti-toast-container .noti-toast-head, .noti-toast-container .noti-toast-body { display: contents; }
    .noti-toast-container .noti-toast-ic { grid-area: 1 / 1; width: 32px; height: 32px; border-radius: var(--gna-radius-full); font-size: var(--gna-font-md); }
    .noti-toast-container .noti-toast-title { grid-area: 1 / 2; align-self: center; font-size: var(--gna-font-md); font-weight: 500; line-height: 20px; letter-spacing: 0; color: var(--gna-heading); }
    .noti-toast-container .noti-toast-type { grid-area: 1 / 3; align-self: center; padding: var(--gna-space-1) var(--gna-space-2); border-radius: var(--gna-radius-pill); background: var(--gna-bg-alt); font-size: var(--gna-font-xs); font-weight: 400; letter-spacing: 0; line-height: 16px; }
    .noti-toast-container .noti-toast-close { grid-area: 1 / 4; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--gna-radius-form); font-size: var(--gna-font-xl); color: var(--gna-text-muted); }
    .noti-toast-container .noti-toast-close:hover { background: var(--gna-bg-alt); color: var(--gna-heading); }
    .noti-toast-container .noti-toast-body > * { grid-column: 2 / -1; }
    .noti-toast-container .noti-toast-body > .noti-toast-title { grid-column: 2; }
    .noti-toast-container .noti-toast-msg { grid-row: 2; margin: 0; font-size: var(--gna-font-sm); line-height: 20px; }
    .noti-toast-container .noti-toast-time { grid-area: 3 / 2 / auto / -1; margin-left: 0; font-size: var(--gna-font-xs); line-height: 16px; color: var(--gna-text-muted); }
    .noti-toast-container .noti-toast-acts { grid-row: 4; justify-content: flex-start; margin-top: 0; }
}
