/* Mailbox: the icon and selection control never displace the subject column. */
.mail-icon { display: block; width: 20px; height: 20px; flex: 0 0 20px; }
.mail-action { display: inline-flex; flex-direction: row; align-items: center; justify-content: center; gap: 8px; text-align: left; }
.inbox-panel { container-type: inline-size; }
.inbox-panel > .section-head { align-items: center; margin-bottom: 20px; }
.inbox-panel > .section-head h2 { margin: 0; font-size: 1.2rem; }
.inbox-message-list { min-width: 0; gap: 10px; }
.mail-folder-toolbar { display: grid; gap: 16px; min-width: 0; margin-bottom: 8px; }
.mail-folder-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.mail-folder-toolbar .button { width: auto; min-height: 40px; margin: 0; padding: 9px 12px; font-size: .8rem; }
.mail-folder-tabs .button { gap: 9px; color: #a9bfd2; background: #0a1929; }
.mail-folder-tabs .button[aria-pressed="true"] { border-color: #cf982d; color: #ffcf73; background: #302714; }
.mail-folder-count { min-width: 24px; padding: 2px 6px; border-radius: 6px; background: #ffffff0c; text-align: center; font-size: .72rem; font-variant-numeric: tabular-nums; }
.mail-selection-toolbar, .mail-bulk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.mail-bulk-actions { margin-left: auto; }
.mail-selection-count { color: #94b0c6; font-size: .76rem; }
.mail-folder-toolbar .mail-action-delete, .mail-thread-actions .mail-action-delete { border: 1px solid #75434c; color: #ffadb2; background: #2a1c27; }
.mail-folder-toolbar .button:disabled { opacity: .45; cursor: default; transform: none; }
.mail-folder-toolbar .mail-folder-hint { margin: 0; color: #96adbf; font-size: .76rem; line-height: 1.5; white-space: normal; }
.inbox-message-list .inbox-message { min-width: 0; border-radius: 12px; background: #0b1b2b; }
.inbox-message-list .inbox-message.unread { border-color: #a5803d; background: linear-gradient(110deg, #29251744, #0b1b2b 65%); }
.inbox-message-list .inbox-message.mail-selected { border-color: #4ea8cd; box-shadow: inset 3px 0 #4ea8cd; background: #102a3b; }
.inbox-message-list .inbox-message > summary { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 14px; align-items: center; min-width: 0; padding: 18px; text-align: left; }
.inbox-message-list .inbox-message > summary:hover { background: #ffffff04; }
.inbox-message-list .inbox-message > summary:focus-visible, .inbox-panel .button:focus-visible, .inbox-message-list .mail-select-checkbox:focus-visible { outline: 2px solid #ffd077; outline-offset: -3px; }
.inbox-message-list .mail-select-checkbox { width: 18px; height: 18px; flex: 0 0 18px; margin: 0; padding: 0; accent-color: #f0b344; cursor: pointer; }
.inbox-message-list .inbox-message-state { position: relative; display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 46px; border: 1px solid #2b485f; border-radius: 12px; color: #84b7d2; background: #102b40; text-shadow: none; }
.inbox-message-state .mail-icon { width: 25px; height: 25px; }
.inbox-message-list .unread .inbox-message-state { border-color: #ac8339; color: #ffca69; background: #352b17; }
.inbox-message-list .unread .inbox-message-state::after { content: ""; position: absolute; top: -3px; right: -3px; width: 8px; height: 8px; border: 2px solid #122033; border-radius: 50%; background: #ffc558; }
.inbox-message-list .inbox-message-title { display: grid; gap: 6px; min-width: 0; flex: 1 1 0; text-align: left; }
.inbox-message-subject { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; min-width: 0; }
.inbox-message-subject strong { color: #edf5fc; font-size: .98rem; font-weight: 750; line-height: 1.45; word-break: normal; overflow-wrap: anywhere; }
.inbox-message-list .inbox-new-badge { flex: 0 0 auto; padding: 2px 7px; font-size: .62rem; line-height: 1.4; letter-spacing: .03em; box-shadow: none; }
.inbox-message-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; min-width: 0; color: #a3bed2; font-size: .76rem; line-height: 1.5; overflow-wrap: anywhere; }
.inbox-message-date { color: #899fb3; }
.inbox-message-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #9db0c1; font-size: .8rem; line-height: 1.5; }
.inbox-message[open] .inbox-message-preview { display: none; }
.inbox-message-list .inbox-message-arrow { display: grid; place-items: center; flex: 0 0 22px; color: #a0b7c9; }
.inbox-message-list .inbox-message-body { min-width: 0; padding: 0 18px 18px; background: #06142155; }
.inbox-message-list .mail-message { display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 12px; min-width: 0; padding: 16px; background: #081726; }
.inbox-message-list .mail-message header { grid-column: 1 / -1; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; min-width: 0; }
.inbox-message-list .mail-message header strong { overflow-wrap: anywhere; font-size: .88rem; }
.inbox-message-list .mail-message header small { font-size: .72rem; line-height: 1.5; }
.inbox-message-list .mail-message > p, .inbox-message-list .mail-message > .mail-attachment { grid-column: 2; min-width: 0; }
.inbox-message-list .mail-message > p { margin: 10px 0 0; color: #d0ddea; line-height: 1.65; font-size: .88rem; text-align: left; }
.inbox-message-list .mail-attachment { max-width: 100%; }
.inbox-message-list .mail-reply-form { padding: 16px; border: 1px solid #294258; border-radius: 12px; background: #0d2031; }
.inbox-message-list .mail-reply-form label { min-width: 0; color: #aac2d6; font-size: .78rem; }
.inbox-message-list .mail-reply-form textarea { margin-top: 7px; min-height: 90px; resize: vertical; }
.inbox-message-list .mail-reply-attachment { align-self: end; }
.mail-label-icon { display: flex; align-items: center; gap: 8px; }
.inbox-message-list .mail-thread-actions { padding-top: 14px; }
.inbox-message-list [hidden] { display: none !important; }
.mail-folder-empty { display: flex; align-items: center; justify-content: center; gap: 18px; min-width: 0; padding: 42px 16px; border: 1px dashed #35516a; border-radius: 12px; background: #091a29; }
.mail-folder-empty > .mail-icon { flex-basis: 36px; width: 36px; height: 36px; color: #8fb8d2; }
.mail-folder-empty > span { min-width: 0; }
.mail-folder-empty strong, .mail-folder-empty small { display: block; overflow-wrap: anywhere; }
.mail-folder-empty small { margin-top: 6px; color: #96adbf; line-height: 1.5; }
.inbox-message-list:has(.mail-folder-empty) + .empty { display: none; }
/* A narrow mailbox also occurs beside office/profile navigation on a wide display. */
@container (max-width: 760px) {
  .mail-bulk-actions { flex-basis: 100%; margin-left: 0; }
  .inbox-message-list .mail-reply-form { grid-template-columns: minmax(0, 1fr); }
  .inbox-message-list .mail-reply-form > .button { justify-self: end; }
  .inbox-message-list .mail-attachment { grid-template-columns: 64px minmax(0, 1fr); }
  .inbox-message-list .mail-attachment-preview { width: 64px; height: 56px; }
  .inbox-message-list .mail-attachment .button { grid-column: 1 / -1; width: 100%; }
}
@container (max-width: 460px) {
  .mail-bulk-actions .button { flex: 1 1 auto; padding-inline: 8px; font-size: .75rem; }
  .mail-folder-tabs { gap: 6px; }
  .mail-folder-tabs .button { flex: 1 1 135px; justify-content: flex-start; }
  .mail-folder-count { margin-left: auto; }
  .inbox-message-list .inbox-message > summary { padding: 14px 10px; gap: 8px; }
  .inbox-message-list .inbox-message-state { width: 34px; height: 38px; flex-basis: 34px; border-radius: 9px; }
  .inbox-message-state .mail-icon { width: 21px; height: 21px; }
  .inbox-message-list .inbox-message-arrow { flex-basis: 16px; }
  .inbox-message-list .inbox-message-arrow .mail-icon { width: 16px; height: 16px; }
  .inbox-message-list .inbox-message-body { padding: 0 8px 10px; }
  .inbox-message-list .mail-message { padding: 10px; column-gap: 8px; grid-template-columns: 30px minmax(0, 1fr); }
  .inbox-message-list .mail-message header { gap: 8px; grid-template-columns: 30px minmax(0, 1fr); }
  .inbox-message-list .mail-sender-avatar { width: 30px; height: 30px; }
  .inbox-message-list .mail-reply-form { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .inbox-message-arrow, .inbox-panel .button { transition: none; }
}
