.icon-bell { mask-image: url('assets/icons/bell.svg'); }
.icon-send { mask-image: url('assets/icons/send.svg'); }
.icon-messages-square { mask-image: url('assets/icons/messages-square.svg'); }
.nav-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 5px; margin-left: auto; background: var(--accent); color: var(--color-navy-900); font-size: 11px; border-radius: 4px; font-variant-numeric: tabular-nums; }
.nav-count[hidden], .push-device button[hidden], #olderMessages[hidden] { display: none; }
#mobileMenuBtn { position: relative; }
.mobile-comm-count { position: absolute; top: 1px; right: 14px; min-width: 18px; height: 18px; font-size: 10px; }
.comm-status { min-height: 24px; margin: 12px 0; font-size: 13px; overflow-wrap: anywhere; }
.chat-workspace { display: grid; grid-template-columns: 250px minmax(0,1fr); border-block: 1px solid var(--border); background: var(--panel); height: min(740px, calc(100dvh - 175px)); min-height: 440px; }
#mainContent:has(#chatsView.active) { display: flex; flex-direction: column; height: 100dvh; min-height: 0; }
#mainContent:has(#chatsView.active) .topbar { flex: 0 0 auto; }
#mainContent:has(#chatsView.active) .topbar .actions { display: none; }
#chatsView.active { flex: 1; min-height: 0; }
#chatsView.active .chat-workspace { height: 100%; min-height: 0; }
.chat-rooms { overflow-y: auto; border-right: 1px solid var(--border); padding: 16px 12px; }
.chat-rooms h2 { font-size: 15px; margin: 0 8px 16px; }
.chat-room { background: transparent; border: 1px solid transparent; color: var(--ink); width: 100%; text-align: left; justify-content: flex-start; padding: 12px 8px; min-height: 66px; gap: 10px; border-radius: 4px; }
.chat-room.selected { background: var(--raised); border-color: var(--border); }
.chat-room:hover { background: var(--raised); border-color: var(--border); color: var(--ink); }
.chat-room > span:not(.ui-icon) { min-width: 0; flex: 1; }
.chat-room strong, .chat-room small { display: block; overflow-wrap: anywhere; }
.chat-room strong { font-size: 13px; font-weight: 600; }
.chat-room small { color: var(--muted); font-size: 11px; margin-top: 4px; }
.chat-thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.chat-header h2 { font-size: 16px; overflow-wrap: anywhere; margin: 0; }
.chat-header span { font-size: 11px; }
.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 20px; }
.chat-day { text-align: center; color: var(--muted); font-size: 11px; padding: 16px 0; }
.chat-message { background: var(--raised); max-width: 82%; width: fit-content; padding: 12px 14px; margin: 0 0 12px; border: 1px solid var(--border); border-radius: 6px; }
.chat-message.mine { margin-left: auto; border-color: var(--accent); }
.chat-message header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.chat-message strong { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.chat-message time { font-size: 10px; color: var(--muted); margin-left: auto; white-space: nowrap; }
.chat-message p { margin: 7px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; }
.chat-message footer { margin-top: 8px; min-height: 22px; }
.chat-read-label { display: block; font-size: 11px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.chat-receipt { display: flex; align-items: center; width: 100%; min-height: 44px; gap: 7px; padding: 4px 0; border: 0; background: transparent; color: var(--muted); border-radius: 4px; text-align: left; font-size: 11px; }
.chat-receipt:hover { background: var(--panel); color: var(--ink); }
.chat-receipt span:not(.ui-icon) { min-width: 0; overflow-wrap: anywhere; }
.chat-receipt .ui-icon { width: 16px; height: 16px; flex-shrink: 0; }
.chat-receipt .ui-icon:last-child { margin-left: auto; }
dialog.chat-receipt-dialog { width: min(480px, calc(100% - 24px)); max-width: calc(100% - 24px); height: fit-content; max-height: calc(100dvh - 32px); margin: auto; border: 1px solid var(--border); border-radius: 8px; padding: 0 20px 20px; }
.chat-receipt-dialog header { position: sticky; top: 0; display: flex; align-items: center; gap: 12px; padding: 16px 0; background: var(--panel); border-bottom: 1px solid var(--border); }
.chat-receipt-dialog h2 { font-size: 18px; margin: 0; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.chat-receipt-dialog header button { flex-shrink: 0; width: 44px; height: 44px; }
.chat-receipt-dialog > p { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.chat-readers { list-style: none; margin: 0; padding: 0; }
.chat-readers li { display: grid; gap: 6px; padding: 14px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.chat-readers strong { font-size: 13px; font-weight: 500; }
.chat-readers span { font-size: 12px; color: var(--muted); }
.chat-thread .comm-status { margin: 0; padding: 0 16px; min-height: 20px; font-size: 11px; }
.chat-composer { display: grid; grid-template-columns: minmax(0,1fr) 48px; align-items: end; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border); }
.chat-composer textarea { resize: vertical; min-height: 48px; max-height: 140px; }
.chat-composer button { width: 48px; height: 48px; background: var(--accent); color: var(--color-navy-900); }
.notification-layout { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 32px; border-top: 1px solid var(--border); }
.notification-layout h2 { font-size: 16px; margin: 0; }
.notification-inbox { min-width: 0; padding-top: 22px; }
.notification-inbox .section-title { margin-bottom: 20px; }
.notification-item { padding: 18px 0; border-bottom: 1px solid var(--border); }
.notification-item header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.notification-item strong { font-size: 14px; overflow-wrap: anywhere; }
.notification-item.unread strong::before { content: ''; display: inline-block; width: 6px; height: 6px; background: var(--accent); margin: 0 8px 2px 0; }
.notification-item time { font-size: 11px; color: var(--muted); margin-left: auto; }
.notification-item p { font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); line-height: 1.6; }
.notification-item button { min-height: 36px; font-size: 12px; }
.notification-settings { min-width: 0; border-left: 1px solid var(--border); padding-left: 28px; }
.notification-settings form, .push-device, .announcement-history { display: grid; gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--border); }
.notification-settings label { margin: 0; }
.notification-settings .check-row { display: flex; flex-direction: row; align-items: center; gap: 10px; font-size: 13px; min-height: 30px; }
.notification-settings .check-row input { width: 18px; min-height: 18px; height: 18px; margin: 0; }
.push-device p { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.push-device a { color: var(--ink); font-size: 12px; text-underline-offset: 3px; }
.push-device .row-actions { flex-wrap: wrap; }
.comm-pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 24px 0; }
.announcement-history { max-height: 360px; overflow: auto; }
.announcement-row { display: grid; gap: 5px; padding-bottom: 12px; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.announcement-row strong { font-size: 12px; }
.announcement-preview { overflow-wrap: anywhere; white-space: pre-wrap; }
.announcement-row small, .announcement-row span { font-size: 11px; color: var(--muted); }
.help-page { max-width: 760px; margin: 0 auto; padding: 40px 24px; line-height: 1.65; }
.help-page h1 { font-size: 28px; }
.help-page h2 { font-size: 20px; margin-top: 32px; }
.help-page a { color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 1100px) { .notification-layout { grid-template-columns: minmax(0,1fr) 300px; gap: 20px; } .notification-settings { padding-left: 20px; } .chat-workspace { grid-template-columns: 215px minmax(0,1fr); } }
@media (max-width: 1000px) { .chat-workspace { height: calc(100dvh - 265px - env(safe-area-inset-bottom)); } }
@media (max-width: 650px) {
  .notification-layout { display: flex; flex-direction: column-reverse; gap: 24px; }
  .notification-settings { border-left: 0; padding-left: 0; }
  .notification-item button { min-height: 44px; }
  .chat-workspace { display: flex; flex-direction: column; height: calc(100dvh - 265px - env(safe-area-inset-bottom)); min-height: 410px; }
  .chat-rooms { flex: 0 0 auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 8px; overflow: hidden; }
  .chat-rooms h2 { display: none; }
  #chatRooms { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; }
  .chat-room { flex: 0 0 165px; min-height: 58px; padding: 8px; }
  .chat-room strong { font-size: 12px; }
  .chat-thread { flex: 1; }
  .chat-header { padding: 12px; }
  .chat-header h2 { font-size: 14px; }
  .chat-scroll { padding: 8px 12px; }
  .chat-message { max-width: 94%; padding: 10px 12px; }
  .chat-composer { padding: 10px; gap: 8px; }
  .chat-composer textarea { font-size: 16px; }
}
@media (max-height: 520px) { .chat-workspace { height: 450px; } }
