.ann-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}
.ann-head h3{margin:0 0 4px;font-size:24px}
.ann-head p{margin:0}
.ann-toolbar{
  display:grid;
  grid-template-columns:minmax(220px,1fr) 220px auto;
  gap:12px;
  align-items:center;
  padding:14px;
  margin-bottom:16px;
}
.ann-toolbar input,.ann-toolbar select{
  width:100%;
}
.ann-counter{
  font-size:13px;
  font-weight:700;
  white-space:nowrap;
}
.ann-list{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.ann-priority.normal{
  background:rgba(100,116,139,.12);
}
.ann-priority.important{
  background:rgba(245,158,11,.16);
}
.ann-priority.urgent{
  background:rgba(239,68,68,.15);
}
.ann-pin{
  background:rgba(59,130,246,.12);
}
.ann-new{
  background:rgba(34,197,94,.14);
}
.ann-item h3{
  margin:0 0 10px;
  font-size:19px;
}
.ann-body{
  line-height:1.6;
  overflow-wrap:anywhere;
}
.ann-date{
  font-size:12px;
  white-space:nowrap;
}
.ann-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:16px;
  padding-top:12px;
  border-top:1px solid rgba(127,127,127,.15);
}
.ann-actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
}
.ann-actions button{
  padding:6px 9px;
  min-width:auto;
}
.ann-empty{
  padding:30px;
  text-align:center;
}
.ann-modal-card{
  width:min(720px,94vw);
  max-height:90vh;
  overflow:auto;
}
.ann-modal-card textarea{
  width:100%;
  resize:vertical;
}
.ann-form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin-top:12px;
}
.ann-check-wrap{
  display:flex;
  align-items:flex-end;
  padding-bottom:10px;
}
.ann-check-wrap label{
  display:flex;
  align-items:center;
  gap:8px;
}
.ann-check-wrap input{
  width:auto;
}
@media(max-width:760px){
  .ann-head{
    align-items:flex-start;
    flex-direction:column;
  }
  .ann-head button{
    width:100%;
  }
  .ann-toolbar{
    grid-template-columns:1fr;
  }
  .ann-form-grid{
    grid-template-columns:1fr;
  }
  .ann-item-top{
    flex-direction:column;
  }
  .ann-footer{
    align-items:flex-start;
    flex-direction:column;
  }
  .ann-actions{
    width:100%;
  }
}

.ann-item{
  padding:22px 24px;
  border-radius:18px;
}
.ann-item-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
}
.ann-item-top strong{
  display:block;
  font-size:18px;
  line-height:1.3;
}
.ann-new{
  flex:0 0 auto;
  padding:5px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  background:rgba(34,197,94,.12);
}
.ann-body{
  margin-top:4px;
  font-size:15px;
  line-height:1.65;
}
.ann-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-top:20px;
  padding-top:14px;
  border-top:1px solid rgba(127,127,127,.15);
}
.ann-footer .muted{
  font-size:13px;
}
.ann-item.unread{
  border-left:4px solid currentColor;
}

@media(max-width:700px){
  .ann-item{
    padding:18px;
  }
  .ann-item-top{
    align-items:flex-start;
  }
  .ann-footer{
    flex-direction:column;
    align-items:flex-start;
    gap:6px;
  }
}

.ann-sidebar-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:20px;
  height:20px;
  padding:0 6px;
  margin-left:auto;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  background:#dc2626;
  color:#fff;
}
.ann-sidebar-badge.hidden{
  display:none;
}

.ann-targeting{
  margin-top:16px;
}
.ann-targeting>select{
  width:100%;
}
.ann-target-box{
  margin-top:10px;
  padding:10px;
  max-height:220px;
  overflow:auto;
  border:1px solid rgba(127,127,127,.2);
  border-radius:12px;
}
.ann-target-option{
  display:flex;
  align-items:flex-start;
  gap:9px;
  padding:8px;
  cursor:pointer;
}
.ann-target-option input{
  width:auto;
  margin-top:3px;
}
.ann-target-option span{
  display:flex;
  flex-direction:column;
}
.ann-target-option small{
  opacity:.65;
  margin-top:2px;
}

.ann-audience-info{
  margin-top:14px;
  font-size:13px;
}
.ann-readers-card{
  width:min(540px,94vw);
  max-height:80vh;
  overflow:auto;
}
.ann-readers-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.ann-reader-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding:11px 4px;
  border-bottom:1px solid rgba(127,127,127,.14);
}
.ann-reader-row span{
  font-size:12px;
  opacity:.7;
}

.ann-schedule-fields{
  margin-top:14px;
}
.ann-schedule-fields input{
  width:100%;
}

.ann-schedule-fields{
  margin-top:14px;
}
.ann-schedule-fields input{
  width:100%;
}

.ann-file-box{
  margin-top:16px;
}
.ann-file-box input{
  width:100%;
}
.ann-pending-files{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:8px;
}
.ann-pending-file{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:8px 10px;
  border:1px solid rgba(127,127,127,.15);
  border-radius:10px;
}
.ann-attachments{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:16px;
}
.ann-attachments-title{
  width:100%;
  font-size:13px;
  font-weight:700;
}
.ann-download-file{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.ann-preview-card{
  width:min(1000px,96vw);
  height:min(850px,92vh);
  display:flex;
  flex-direction:column;
}
.ann-preview-image{
  max-width:100%;
  max-height:calc(92vh - 90px);
  object-fit:contain;
  margin:auto;
}
.ann-preview-pdf{
  width:100%;
  flex:1;
  border:0;
  border-radius:10px;
}

.notification-item{
  cursor:pointer;
}
.notification-highlight{
  outline:3px solid rgba(59,130,246,.35);
  transition:outline .2s ease;
}

.notification-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:12px 0 18px;
  flex-wrap:wrap;
}
.notification-filters{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.notification-filter.active{
  font-weight:700;
  box-shadow:0 0 0 2px rgba(59,130,246,.18);
}
.notification-item.unread{
  font-weight:500;
}
@media(max-width:700px){
  .notification-toolbar{
    align-items:stretch;
    flex-direction:column;
  }
}

.notification-settings{
  margin:0 0 18px;
  padding:18px;
  display:grid;
  gap:10px;
}
.notification-settings label{
  display:flex;
  align-items:center;
  gap:8px;
}
.notification-settings-actions{
  display:flex;
  gap:10px;
  margin-top:8px;
  flex-wrap:wrap;
}

/* Notification preferences layout fix */
#notificationSettings{
  max-width:760px;
  padding:20px 22px;
  display:block;
}

#notificationSettings h3{
  margin:0 0 18px;
}

#notificationSettings > label{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:10px !important;
  width:100% !important;
  margin:0 0 13px !important;
  padding:0 !important;
  text-align:left !important;
}

#notificationSettings > label input[type="checkbox"]{
  width:18px !important;
  height:18px !important;
  min-width:18px !important;
  margin:0 !important;
  padding:0 !important;
  flex:0 0 18px !important;
}

#notificationSettings .notification-settings-actions{
  display:flex !important;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  margin-top:20px;
}

@media(max-width:700px){
  #notificationSettings{
    max-width:100%;
  }

  #notificationSettings .notification-settings-actions{
    flex-direction:column;
    align-items:stretch;
  }
}

.ergon-notification-toast{
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:99999;
  width:min(380px,calc(100vw - 32px));
  background:#fff;
  border:1px solid rgba(0,0,0,.1);
  border-radius:14px;
  box-shadow:0 14px 40px rgba(0,0,0,.18);
  padding:16px 48px 16px 16px;
  cursor:pointer;
}

.ergon-notification-toast strong{
  display:block;
  margin-bottom:5px;
}

#ergonToastClose{
  position:absolute;
  top:8px;
  right:8px;
  width:30px;
  height:30px;
  border:0;
  background:transparent;
  font-size:22px;
  cursor:pointer;
}

@media(max-width:700px){
  .ergon-notification-toast{
    right:16px;
    bottom:16px;
  }
}

.notification-source-badge{
  display:inline-flex;
  align-items:center;
  padding:4px 9px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
  background:rgba(0,0,0,.055);
  white-space:nowrap;
}

.notification-source-filter{
  min-width:180px;
  height:40px;
  padding:0 12px;
  border-radius:9px;
}

@media(max-width:700px){
  .notification-source-filter{
    width:100%;
  }
}

#chatNotificationPreference{
  padding:16px 18px;
  margin-bottom:16px;
}

#chatNotificationPreference label{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:14px !important;
  width:100%;
  cursor:pointer;
}

#chatNotificationPreference input[type="checkbox"]{
  width:20px !important;
  height:20px !important;
  min-width:20px !important;
  flex:0 0 20px !important;
  margin:0 !important;
}

#chatNotificationPreference label span{
  display:block;
  flex:1;
  text-align:left;
}

#chatNotificationPreference strong{
  display:block;
  font-size:15px;
  line-height:1.3;
  margin-bottom:3px;
}

#chatNotificationPreference small{
  display:block;
  line-height:1.4;
  opacity:.7;
}

@media(max-width:600px){
  #chatNotificationPreference{
    padding:14px;
  }

  #chatNotificationPreference label{
    align-items:flex-start !important;
  }
}

#chatNotificationPreference{
  padding:18px 20px !important;
}

#chatNotificationPreference label{
  display:grid !important;
  grid-template-columns:24px 1fr !important;
  grid-template-rows:auto auto !important;
  column-gap:14px !important;
  row-gap:2px !important;
  align-items:center !important;
  justify-content:initial !important;
  width:100% !important;
}

#chatNotificationPreference input[type="checkbox"]{
  grid-column:1 !important;
  grid-row:1 / span 2 !important;
  width:22px !important;
  height:22px !important;
  margin:0 !important;
  align-self:center !important;
}

#chatNotificationPreference label > span{
  grid-column:2 !important;
  grid-row:1 / span 2 !important;
  display:flex !important;
  flex-direction:column !important;
  justify-content:center !important;
  gap:3px !important;
  width:auto !important;
  text-align:left !important;
}

#chatNotificationPreference strong{
  display:block !important;
  margin:0 !important;
  font-size:16px !important;
  line-height:1.25 !important;
}

#chatNotificationPreference small{
  display:block !important;
  margin:0 !important;
  font-size:13px !important;
  line-height:1.35 !important;
  opacity:.7 !important;
}

#chatNotificationPreference{
  padding:18px 20px !important;
  margin-bottom:16px !important;
}

#chatNotificationPreference .chat-pref-row{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:14px !important;
  width:100% !important;
}

#chatNotificationPreference .chat-pref-row > input[type="checkbox"]{
  display:block !important;
  position:static !important;
  width:20px !important;
  height:20px !important;
  min-width:20px !important;
  flex:0 0 20px !important;
  margin:0 !important;
  padding:0 !important;
}

#chatNotificationPreference .chat-pref-text{
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  justify-content:center !important;
  gap:3px !important;
  width:auto !important;
  margin:0 !important;
  padding:0 !important;
  cursor:pointer !important;
}

#chatNotificationPreference .chat-pref-text strong{
  display:block !important;
  margin:0 !important;
  padding:0 !important;
  font-size:16px !important;
  line-height:1.3 !important;
}

#chatNotificationPreference .chat-pref-text small{
  display:block !important;
  margin:0 !important;
  padding:0 !important;
  font-size:13px !important;
  line-height:1.4 !important;
  opacity:.7 !important;
}

#taskNotificationPreference{
  padding:18px 20px !important;
  margin-bottom:16px !important;
}

#taskNotificationPreference .chat-pref-row{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:14px !important;
  width:100% !important;
}

#taskNotificationPreference .chat-pref-row > input[type="checkbox"]{
  display:block !important;
  position:static !important;
  width:20px !important;
  height:20px !important;
  min-width:20px !important;
  flex:0 0 20px !important;
  margin:0 !important;
  padding:0 !important;
}

#taskNotificationPreference .chat-pref-text{
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  justify-content:center !important;
  gap:3px !important;
  width:auto !important;
  margin:0 !important;
  padding:0 !important;
  cursor:pointer !important;
}

#calendarNotificationPreference{
  padding:18px 20px !important;
  margin-bottom:16px !important;
}

#calendarNotificationPreference .chat-pref-row{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:14px !important;
  width:100% !important;
}

#calendarNotificationPreference .chat-pref-row > input[type="checkbox"]{
  display:block !important;
  position:static !important;
  width:20px !important;
  height:20px !important;
  min-width:20px !important;
  flex:0 0 20px !important;
  margin:0 !important;
  padding:0 !important;
}

#calendarNotificationPreference .chat-pref-text{
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  justify-content:center !important;
  gap:3px !important;
  width:auto !important;
  margin:0 !important;
  padding:0 !important;
  cursor:pointer !important;
}

#calendarNotificationPreference .chat-pref-text strong{
  display:block !important;
  margin:0 !important;
  padding:0 !important;
  font-size:16px !important;
  line-height:1.3 !important;
}

#calendarNotificationPreference .chat-pref-text small{
  display:block !important;
  margin:0 !important;
  padding:0 !important;
  font-size:13px !important;
  line-height:1.4 !important;
  opacity:.7 !important;
}

.notification-settings-pane{
  display:flex;
  flex-direction:column;
  gap:16px;
  margin-top:16px;
}

.notification-settings-pane.hidden{
  display:none !important;
}

#notificationSettingsPane .notification-settings{
  margin:0 !important;
}

#notificationSettingsPane #chatNotificationPreference,
#notificationSettingsPane #taskNotificationPreference,
#notificationSettingsPane #calendarNotificationPreference{
  margin:0 !important;
}

