html.dark-mode {
  color-scheme: light !important;
}

html.dark-mode,
html.dark-mode body {
  background: #f8fafc !important;
}

#layout-menu,
#taskmenu,
#taskmenu .special-buttons {
  background: #ffffff !important;
}

#layout-menu {
  border-right: 1px solid #e5e7eb !important;
}

#layout-menu .popover-header {
  background: #ffffff !important;
  border-bottom: 1px solid #e5e7eb !important;
}

#taskmenu a,
html.dark-mode #taskmenu a {
  color: #334155 !important;
}

#taskmenu a:hover,
#taskmenu a.selected,
#taskmenu a.selected:hover,
html.dark-mode #taskmenu a:hover,
html.dark-mode #taskmenu a.selected,
html.dark-mode #taskmenu a.selected:hover {
  color: #2563eb !important;
  background: #eff6ff !important;
}

#taskmenu .action-buttons a,
html.dark-mode #taskmenu .action-buttons a {
  color: #2563eb !important;
  background: #ffffff !important;
}

#taskmenu .action-buttons a:hover,
#taskmenu .action-buttons a.selected,
html.dark-mode #taskmenu .action-buttons a:hover,
html.dark-mode #taskmenu .action-buttons a.selected {
  color: #1d4ed8 !important;
  background: #eff6ff !important;
}

#taskmenu .special-buttons,
#taskmenu a.theme,
#taskmenu a.about,
#taskmenu a.logout {
  display: none !important;
}

#settingstabpreferences,
#settingstabresponses,
#settings-menu li.preferences,
#settings-menu li.responses {
  display: none !important;
}

#settings-menu,
#sections-table {
  background: #ffffff !important;
}

#settings-menu a.selected,
#settings-menu a.selected:hover,
#sections-table tr.selected > td,
#sections-table tr.selected > td.section {
  color: #2563eb !important;
  background: #eff6ff !important;
}

#layout-content .identity-encryption,
#identityform fieldset.identity-encryption {
  display: none !important;
}

#taskmenu span.inner,
html.dark-mode #taskmenu span.inner {
  color: inherit !important;
}

/* Connectia Workspace mail refresh */
:root {
  --connectia-ink: #101828;
  --connectia-muted: #667085;
  --connectia-line: #e5e7eb;
  --connectia-blue: #2563eb;
  --connectia-bg: #f6f8fb;
  --connectia-surface: #ffffff;
}

body,
#layout,
.menu a,
.listing tbody td,
.messagelist td,
.toolbar a.button,
.header-title,
input,
textarea,
select,
button {
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif !important;
  letter-spacing: 0 !important;
}

body,
#layout {
  background: var(--connectia-bg) !important;
  color: var(--connectia-ink) !important;
  font-size: 15px !important;
}

#layout > div > .header,
#layout > div > .footer {
  background: rgba(255, 255, 255, .96) !important;
  border-color: var(--connectia-line) !important;
}

#layout-sidebar,
#layout-list,
#layout-content {
  background: var(--connectia-surface) !important;
}

#layout-content {
  border-left: 1px solid var(--connectia-line) !important;
}

.messagelist td {
  font-size: 13px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.messagelist tbody tr {
  border-bottom: 1px solid #eef2f7 !important;
}

.messagelist tbody tr.selected > td,
.messagelist tbody tr.focused > td {
  background: #eaf7ff !important;
}

.messagelist td.subject {
  padding: 7px 8px 7px 12px !important;
  min-height: 58px !important;
  align-content: center !important;
}

.messagelist td.subject span {
  line-height: 1.22 !important;
}

.messagelist td.subject span.fromto,
.messagelist td.subject span.date,
.messagelist span.size {
  color: var(--connectia-muted) !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
}

.messagelist td.subject span.subject a {
  color: #27323f !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}

.messagelist td.subject span.subject {
  margin-top: 4px !important;
  line-height: 1.25 !important;
}

.messagelist td.flags > span {
  height: 1.4em !important;
  line-height: 1.4em !important;
}

.messagelist tr.unread td.subject span.subject {
  font-weight: 800 !important;
}

#message-header {
  margin: 0 0 20px !important;
  padding: 18px 18px 16px !important;
  border: 1px solid #edf2f7 !important;
  border-radius: 18px !important;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .06) !important;
}

#message-header > .subject {
  margin-bottom: 12px !important;
  color: var(--connectia-ink) !important;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-size: 23px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
}

#message-header > .header img.contactphoto {
  width: 52px !important;
  height: 52px !important;
  margin-right: 14px !important;
  background: #eef2f7 !important;
  border: 1px solid #e5e7eb !important;
}

#message-header .header-summary,
#message-header .header-links,
#message-header .header-headers {
  color: var(--connectia-muted) !important;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif !important;
}

#message-header .header-links a {
  color: var(--connectia-blue) !important;
  font-weight: 650 !important;
}

#message-content {
  padding: 0 18px 24px !important;
}

.message-part,
.message-htmlpart {
  color: #1f2937 !important;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-size: 15px !important;
  line-height: 1.48 !important;
}

.message-part div.rcmBody,
.message-htmlpart div.rcmBody {
  max-width: 920px !important;
  margin-left: 0 !important;
  margin-right: auto !important;
}

.message-part div.pre {
  color: #1f2937 !important;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-size: 15px !important;
  line-height: 1.48 !important;
  white-space: normal !important;
}

.message-part span.sig {
  color: #475467 !important;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif !important;
}

.message-htmlpart img,
.message-part img,
.message-htmlpart .rcmBody img,
.message-part .rcmBody img {
  display: inline-block !important;
  max-width: 100% !important;
  height: auto !important;
}

.message-part blockquote,
.message-htmlpart blockquote {
  border-left: 3px solid #d0d5dd !important;
  border-right: 0 !important;
  background: #f8fafc !important;
  color: #475467 !important;
  border-radius: 10px !important;
  margin: 10px 0 !important;
  padding: 10px 14px !important;
}

.mailboxlist li.mailbox a,
.folderlist.menu a,
.toolbar a.button {
  font-weight: 650 !important;
}
