
/* V79: fix inbox card contrast in dark theme.
   v38 forced white/grey cards while keeping light theme text, making messages unreadable. */
#view-email .mail-item{
  color:var(--theme-text)!important;
  border-color:var(--theme-line)!important;
}
#view-email .mail-item:not(.unread){
  background:var(--theme-surface)!important;
}
#view-email .mail-item.unread{
  background:var(--theme-surface-2)!important;
}
#view-email .mail-item.active{
  background:var(--theme-hover)!important;
  border-color:color-mix(in srgb,var(--theme-accent) 30%,var(--theme-line))!important;
  box-shadow:none!important;
}
#view-email .mail-item:hover{
  background:var(--theme-hover)!important;
  border-color:color-mix(in srgb,var(--theme-accent) 22%,var(--theme-line))!important;
}
#view-email .mail-item .mail-item-row strong,
#view-email .mail-item .mail-subject{
  color:var(--theme-text)!important;
}
#view-email .mail-item .mail-preview,
#view-email .mail-item .mail-time{
  color:var(--theme-muted)!important;
}
#view-email .mail-item.unread .mail-item-row strong,
#view-email .mail-item.unread .mail-subject{
  font-weight:800!important;
  color:var(--theme-text)!important;
}
#view-email .mail-item.unread .mail-preview{
  font-weight:600!important;
  color:color-mix(in srgb,var(--theme-text) 78%,var(--theme-muted))!important;
}
/* Preserve the requested white/read + grey/unread look only in light theme. */
html[data-theme-light="true"] #view-email .mail-item:not(.unread){
  background:#ffffff!important;
}
html[data-theme-light="true"] #view-email .mail-item.unread{
  background:#ececec!important;
}
html[data-theme-light="true"] #view-email .mail-item.active{
  background:#ffffff!important;
  border-color:#d9d9d9!important;
}
html[data-theme-light="true"] #view-email .mail-item .mail-item-row strong,
html[data-theme-light="true"] #view-email .mail-item .mail-subject{
  color:#181b19!important;
}
html[data-theme-light="true"] #view-email .mail-item .mail-preview,
html[data-theme-light="true"] #view-email .mail-item .mail-time{
  color:#656c67!important;
}
