/* MOTD modal */
.motd-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9000;
  display: flex; align-items: center; justify-content: center;
}
.motd-modal {
  background: #1a1410;
  color: #e8d8b8;
  border: 2px solid #c9a14d;
  border-radius: 8px;
  padding: 20px 24px;
  max-width: 520px; width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  font-family: serif;
}
.motd-modal-title { font-size: 22px; font-weight: bold; margin: 0 0 10px; }
.motd-modal-body { font-size: 15px; white-space: pre-wrap; line-height: 1.45; margin-bottom: 18px; }
.motd-modal-ok {
  background: linear-gradient(to bottom, #c9a14d 0%, #a0822f 100%);
  color: #1a1410;
  border: 1px solid #6f5520;
  border-top-color: #d9b76a;
  border-left-color: #d9b76a;
  padding: 7px 18px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  box-shadow: 0 2px 3px rgba(0,0,0,0.4);
}
.motd-modal-ok:hover { background: linear-gradient(to bottom, #d9b76a 0%, #b89539 100%); }

/* MOTD toast stack */
.motd-toast-stack {
  position: fixed;
  top: 50px; right: 16px;
  z-index: 8000;
  display: flex; flex-direction: column; gap: 8px;
  max-width: 320px;
  pointer-events: none;
}
.motd-toast {
  background: #2a1f17;
  color: #e8d8b8;
  border-left: 4px solid #c9a14d;
  border-radius: 4px;
  padding: 10px 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  pointer-events: auto;
  cursor: pointer;
  font-family: serif;
  animation: motd-toast-in 220ms ease-out;
}
@keyframes motd-toast-in {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.motd-toast-title { font-weight: bold; font-size: 14px; margin-bottom: 2px; }
.motd-toast-preview { font-size: 12px; opacity: 0.8; }
.motd-toast-close {
  float: right;
  background: none; border: none;
  color: inherit; opacity: 0.6;
  font-size: 14px; cursor: pointer;
  padding: 0 4px;
}
.motd-toast-close:hover { opacity: 1; }

/* Mail button in #right-controls — matches the quality-select look */
#motd-btn {
  background: linear-gradient(to bottom, #4a4540 0%, #3a3530 100%);
  color: #e8e0d4;
  border: 1px solid #2a2622;
  border-top-color: #5a5550;
  border-left-color: #5a5550;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 14px;
  font-family: Georgia, serif;
  box-shadow: 0 2px 3px rgba(0,0,0,0.4);
  line-height: 1;
}
#motd-btn:hover { background: linear-gradient(to bottom, #5a5550 0%, #4a4540 100%); }

/* MOTD list panel — anchored under the mail button */
.motd-list-panel {
  position: fixed;
  top: 38px;
  right: 8px;
  z-index: 7500;
  background: #1a1410;
  color: #e8d8b8;
  border: 1px solid #c9a14d;
  border-radius: 6px;
  width: 320px;
  max-height: 60vh; overflow-y: auto;
  font-family: serif;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}
.motd-list-row {
  padding: 8px 12px;
  border-bottom: 1px solid #3a2a20;
  cursor: pointer;
}
.motd-list-row:last-child { border-bottom: none; }
.motd-list-row:hover { background: #2a1f17; }
.motd-list-row-alert .motd-list-title { color: #ff8866; font-weight: bold; }
.motd-list-row-passive .motd-list-title { opacity: 0.65; font-style: italic; }
.motd-list-title { font-size: 14px; }
.motd-list-empty { padding: 12px; opacity: 0.6; font-style: italic; text-align: center; }

/* Work-mode email reader (renders inside .wm-reading-pane-content) */
.wm-motd-reader {
  position: absolute;
  inset: 0;
  background: #ffffff;
  color: #222;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  font-family: 'Segoe UI', system-ui, sans-serif;
  overflow: hidden;
}
.wm-motd-reader-header {
  padding: 16px 24px 12px;
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
}
.wm-motd-reader-subject {
  font-size: 20px;
  font-weight: 600;
  color: #222;
  margin-bottom: 6px;
}
.wm-motd-reader-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #444;
  margin-top: 2px;
}
.wm-motd-reader-sender { color: #0078d4; font-weight: 600; }
.wm-motd-reader-to { color: #777; }
.wm-motd-reader-date { color: #888; }
.wm-motd-reader-importance {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #c0392b;
  margin-left: 8px;
  letter-spacing: 0.5px;
}
.wm-motd-reader-body {
  flex: 1;
  padding: 18px 24px;
  font-size: 14px;
  line-height: 1.55;
  color: #222;
  white-space: pre-wrap;
  overflow-y: auto;
}
.wm-motd-reader-footer {
  padding: 12px 16px;
  border-top: 1px solid #e0e0e0;
  display: flex;
  justify-content: flex-end;
  background: #f9f9f9;
}
.wm-motd-reader-dismiss {
  background: #0078d4;
  color: #fff;
  border: 1px solid #0067b8;
  padding: 6px 18px;
  border-radius: 2px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
}
.wm-motd-reader-dismiss:hover { background: #106ebe; }
.wm-motd-reader-dismiss:active { background: #005a9e; }
