/* ============================================================
   알림 페이지 (/alerts/)

   껍데기(.md-shell · .md-bar · .md-gate)는 /doctor/ 것을 그대로 쓴다.
   여기서는 목록만 정의한다.

   패널(.nt-item)과 «비슷하지만 같지는 않다» — 패널은 좁은 서랍이라
   빽빽해야 하고, 이 화면은 넘겨 읽는 곳이라 조금 여유를 준다.
   그래서 클래스를 나눴다. 한쪽을 손봐도 다른 쪽이 흔들리지 않게.
   ============================================================ */

.al-main {
    flex: 1;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 12px 14px 40px;
    padding-bottom: calc(40px + env(safe-area-inset-bottom));
}

/* 헤더의 「모두 읽음」.
   이 화면에는 종이 없으므로(여기가 알림이다) 이 버튼이 오른쪽 끝을 잡는다.
   모바일 앱바에도 같은 버튼이 있는데 그쪽은 .ab-btn 차림이라 여기서 건드리지 않는다. */
.md-bar .al-readall {
    flex: 0 0 auto;
    margin-left: auto;
    border: 1px solid var(--line); background: #fff; border-radius: 999px;
    padding: 7px 13px;
    font-family: inherit; font-size: 0.76rem; font-weight: 700;
    color: var(--ink-3); cursor: pointer;
}
.md-bar .al-readall:active { background: #eef3f8; }
.al-readall:disabled { opacity: 0.5; cursor: default; }

/* 날짜 머리글 — 매일 오는 브리핑이 한 덩어리로 뭉치지 않게 */
.al-day {
    padding: 16px 4px 7px;
    font-size: 0.76rem; font-weight: 800; letter-spacing: -0.01em;
    color: var(--ink-3);
}
.al-day:first-child { padding-top: 4px; }

.al-list {
    display: flex;
    flex-direction: column;
}

.al-item {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 14px 14px;
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    text-decoration: none; color: inherit; cursor: pointer;
    transition: border-color 0.15s ease, transform 0.12s ease;
}
.al-item:hover  { border-color: var(--line); }
.al-item:active { transform: scale(0.995); }

.al-item > i {
    flex: 0 0 auto; width: 34px; height: 34px; border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-soft); color: var(--brand); font-size: 14px;
}
.al-item.lv-warn   > i { background: var(--warn-soft); color: #b8781f; }
.al-item.lv-danger > i { background: #ffeaec; color: #d63a4c; }

.al-item > div { flex: 1; min-width: 0; line-height: 1.55; }
.al-item b {
    display: block; font-size: 0.89rem; font-weight: 700; color: var(--ink);
    word-break: keep-all; overflow-wrap: break-word;
}
.al-item span {
    display: block; font-size: 0.81rem; color: var(--ink-2); margin-top: 3px;
    word-break: keep-all; overflow-wrap: break-word;
}
.al-item em {
    display: block; font-size: 0.72rem; color: var(--ink-3); font-style: normal; margin-top: 6px;
}

/* 안 읽은 것 — 배경 대신 왼쪽 띠로 표시한다.
   카드가 커서 배경을 물들이면 화면 전체가 파래 보인다. */
.al-item.unread { border-color: #cfe9f0; box-shadow: inset 3px 0 0 var(--brand); }
.al-item.unread b::after {
    content: ''; display: inline-block; margin-left: 6px; vertical-align: middle;
    width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
}

.al-empty {
    text-align: center; font-size: 0.85rem; color: var(--ink-3);
    line-height: 1.8; padding: 56px 20px;
    word-break: keep-all;
}

.al-more {
    display: block; width: 100%; margin-top: 6px;
    padding: 13px;
    border: 1px solid var(--line); border-radius: 12px; background: #fff;
    font-family: inherit; font-size: 0.84rem; font-weight: 700; color: var(--ink-2);
    cursor: pointer;
}
.al-more:active { background: #eef3f8; }
.al-more[hidden] { display: none; }

/* 모바일 — 하단 탭바에 가리지 않게 */
@media (max-width: 991px) {
    .al-main { padding: 8px 12px calc(90px + env(safe-area-inset-bottom)); }
}
