/* RedsMail v97 | Colours and tactile, accessible sorting | 2026-10-22 */
:root {
  --bg: #f5f6fc;
  --bg-2: #edf0f8;
  --panel: #fff;
  --panel-solid: #fff;
  --text: #24263e;
  --muted: #5c667f;
  --muted-2: #72809a;
  --line: #dde3ef;
  --primary: #c83759;
  --primary-2: #e65b7a;
  --primary-dark: #9a2142;
  --accent-purple: #6554c0;
  --accent-blue: #3470c6;
  --accent-teal: #087f75;
  --accent-amber: #a56407;
  --shadow: 0 10px 36px #222b5312;
}
html, body:not(.dark) { background: #f5f6fc !important; }
body:not(.dark) .desktop-frame {
  background: radial-gradient(ellipse at 84% -22%, #eee8fe 0, transparent 38%),
              radial-gradient(ellipse at 1% 4%, #ffe7ea 0, transparent 29%),
              #f5f6fc !important;
}
.app-header {
  background: linear-gradient(105deg, #fff 2%, #fff9fc 52%, #f8f7ff 100%) !important;
  border-bottom-color: #e6daea !important;
  box-shadow: 0 5px 22px #3b2f6010 !important;
}
.logo-mark { background: #fff1f5 !important; border: 1px solid #f7d0da !important; }
.app-title .title-red { color: #c83759 !important; }
.desktop-commandbar {
  background: #f8f9ff !important; border-color: #dfe3f3 !important;
  box-shadow: inset 0 1px 2px #50608808 !important;
}
.desktop-commandbar:focus-within {
  background: white !important; border-color: #968de0 !important;
  box-shadow: 0 0 0 3px #6554c018 !important;
}
.icon-btn:hover, .desktop-mini-btn:hover {
  background: #fff0f5 !important; color: #a82a4c !important;
  border-color: #eeb7c8 !important;
}
.btn:not(.secondary):not(.ghost) {
  background: linear-gradient(120deg, #c83759, #df5374) !important;
  box-shadow: 0 5px 16px #bf335334 !important;
}
.hero-card {
  background: linear-gradient(115deg, #fff, #fff6f8 62%, #f5f2ff) !important;
  border-color: #eddee8 !important;
  box-shadow: 0 12px 30px #3d32500c !important;
}
/* Premium workspace navigation. */
@media (min-width:980px) {
  body:not(.dark) .desktop-rail {
    background: linear-gradient(168deg, #21213c, #333052 58%, #3c2542) !important;
    border-right: 1px solid #4d416d !important;
  }
  body:not(.dark) .desktop-rail-brand strong { color: #fff !important; }
  body:not(.dark) .desktop-nav-btn { color: #d4d2e9 !important; }
  body:not(.dark) .desktop-nav-btn:hover { color: #fff !important; background: #ffffff16 !important; }
  body:not(.dark) .desktop-nav-btn.active {
    background: #e95e8060 !important; color: #fff !important;
    box-shadow: inset 3px 0 #ffa0b4 !important;
  }
  body:not(.dark) .desktop-rail .desktop-compose {
    background: linear-gradient(135deg, #c83759, #d5577a) !important;
    color: #fff !important;
  }
}
.accounts-panel__head h3 { color: #4b467a !important; }
.accounts-panel__manage { color: #64539d !important; font-weight: 650 !important; }
.rm-reorder-hint { font-size: 12px; font-weight: 550; color: #7464aa; padding: 0 6px; white-space: nowrap; }
@media (max-width:570px) { .rm-reorder-hint { font-size:11px; white-space:normal; line-height:1.15; } }
body.dark .rm-reorder-hint { color:#cebefd; }
/* Account tile identity is stable even if the user rearranges tiles. */
.account-color-all { --tile-accent: #705cb8; --tile-soft: #f4f0ff; --tile-border:#ded5f8; }
.account-color-blue { --tile-accent: #3d73c4; --tile-soft: #eef5ff; --tile-border:#cedff7; }
.account-color-purple { --tile-accent: #8053bc; --tile-soft: #f7f0ff; --tile-border:#e3d5f4; }
.account-color-green { --tile-accent: #18887b; --tile-soft: #e9f9f6; --tile-border:#c4e9e2; }
.account-color-orange { --tile-accent: #ba781e; --tile-soft: #fff7e8; --tile-border:#f2dfbd; }
.account-color-red { --tile-accent: #c54560; --tile-soft: #fff1f5; --tile-border:#f1c9d3; }
.account-chip:not(.add-account) {
  background: linear-gradient(122deg, var(--tile-soft,#f5f6fc) 0%, #fff 84%) !important;
  border: 1px solid var(--tile-border,#dddff0) !important;
  border-left: 4px solid var(--tile-accent,#705cb8) !important;
  border-radius: 13px !important;
  box-shadow: 0 3px 10px #34436a10 !important;
  padding: 12px 12px 11px !important;
  transition: box-shadow .2s ease, transform .18s ease, border-color .2s ease !important;
}
.account-chip:not(.add-account):hover {
  box-shadow: 0 7px 20px #34436a19 !important;
  transform: translateY(-2px);
}
.account-chip.active:not(.add-account) {
  background: linear-gradient(135deg, var(--tile-soft,#f5f6fc), #fff 95%) !important;
  border-color: var(--tile-accent,#705cb8) !important;
  box-shadow: 0 0 0 2px #9285be1a,0 6px 20px #34436a20 !important;
}
.account-chip.active strong, .account-chip:not(.add-account) strong { color: var(--text) !important; }
.account-chip.active strong { color: var(--tile-accent,#6554c0) !important; }
.account-chip small { color: #627087 !important; }
.account-count-badge {
  background: var(--tile-soft,#f3f4f8) !important;
  color: var(--tile-accent,#705cb8) !important;
  border: 1px solid var(--tile-border,#dddff0) !important;
  border-radius: 6px !important;
}
.account-chip.add-account {
  background: #fefbff !important; border-color: #cfc3e9 !important;
  color: #6754a3 !important; border-radius: 13px !important;
}
/* Folder tabs: color keyed to meaning instead of black selected states. */
.mailbox-chip { --folder:#595f88; --folder-soft:#f0f2fa; --folder-line:#dfe2ed; }
.mailbox-chip[data-mailbox="ALL"] { --folder:#7054b0; --folder-soft:#f1ecff; --folder-line:#dcd3f3; }
.mailbox-chip[data-mailbox="INBOX"] { --folder:#2d69b3; --folder-soft:#eaf3ff; --folder-line:#d0e2f8; }
.mailbox-chip[data-mailbox="SENT"] { --folder:#117e78; --folder-soft:#e6f6f4; --folder-line:#c0e7e2; }
.mailbox-chip[data-mailbox="DRAFT"] { --folder:#9a640f; --folder-soft:#fff4dc; --folder-line:#f0ddb3; }
.mailbox-chip[data-mailbox="TRASH"] { --folder:#b34364; --folder-soft:#ffedf2; --folder-line:#f2ccda; }
.mailbox-chip[data-mailbox="SPAM"] { --folder:#a65c29; --folder-soft:#fff0e5; --folder-line:#efdbc7; }
.mailbox-chip[data-mailbox="STARRED"] { --folder:#a26a04; --folder-soft:#fff5d8; --folder-line:#f3deab; }
.mailbox-chip[data-mailbox="ARCHIVE"] { --folder:#475b8f; --folder-soft:#eaf0ff; --folder-line:#d5ddf4; }
.mailbox-strip .mailbox-chip {
  background: var(--folder-soft) !important; color: var(--folder) !important;
  border: 1px solid var(--folder-line) !important;
  border-radius: 10px !important; font-weight: 650 !important;
}
.mailbox-strip .mailbox-chip:hover { filter: brightness(.97); }
.mailbox-strip .mailbox-chip.active {
  background: var(--folder) !important; color: #fff !important;
  border-color: var(--folder) !important;
  box-shadow: 0 5px 13px #303a691b !important;
}
.mailbox-strip .folder-glyph { display:inline-flex !important; }
.mailbox-strip .folder-glyph svg { display: block !important; }
/* Sorting chips and message status. */
#filterRow .pill { --filter: #7054b0; --filter-soft:#f2eeff; --filter-line:#e0d6fa; }
#filterRow .pill[data-filter="unread"] { --filter:#b84966; --filter-soft:#fff0f5; --filter-line:#f3cfda; }
#filterRow .pill[data-filter="attachments"] { --filter:#137f85; --filter-soft:#eaf8f9; --filter-line:#c8e7e8; }
#filterRow .pill[data-filter="today"] { --filter:#a36b0b; --filter-soft:#fff5db; --filter-line:#f1dfae; }
#filterRow .pill {
  border:1px solid var(--filter-line) !important;
  background:var(--filter-soft) !important;
  color:var(--filter) !important; border-radius:10px !important;
  font-weight:650 !important;
}
#filterRow .pill.active {
  background:var(--filter) !important; color:#fff !important;
  border-color:var(--filter) !important;
}
#filterRow .pill .filter-count-badge { background: #ffffffcc !important; color:var(--filter) !important; }
#filterRow .pill.active .filter-count-badge { background: #ffffff33 !important; color:#fff !important; }
#filterRow .custom-folder-filter select {
  border-radius:10px !important; background:#f0f3fc !important;
  color:#425987 !important; border-color:#d8e2f6 !important;
}
.mail-selection-toolbar { background: linear-gradient(95deg,#f9f8ff,#fffafc) !important; border-radius: 11px; }
.mail-swipe.is-selected > .mail-item,
.mail-swipe.is-current > .mail-item { background:#eff4ff !important; }
.mail-item.is-unread { border-left:3px solid #5c73d2 !important; }
.mail-item:hover { background: #f8f9ff !important; }
.mail-row-action[data-message-action="move"],
.detail-message-actions [data-detail-message-action="move"] { color:#246c99 !important; background:#eaf6ff !important; border-color:#cee7f6 !important; }
.mail-row-action[data-message-action="trash"],
.detail-message-actions [data-detail-message-action="trash"] { color:#a8314f !important; background:#fff0f4 !important; border-color:#f5cad6 !important; }
.mail-row-action[data-message-action="spam"],
.detail-message-actions [data-detail-message-action="spam"] { color:#a15c20 !important; background:#fff3e5 !important; border-color:#f2dabc !important; }
#bulkActionBar { background: linear-gradient(120deg,#fff8fa,#f7f5ff) !important; border:1px solid #ebdbe7 !important; }
#bulkActionBar [data-bulk-message-action="move"] { background:#eaf6ff !important; color:#205f9b !important; }
#bulkActionBar [data-bulk-message-action="trash"] { background:#fff0f4 !important; color:#a8314f !important; }
#bulkActionBar [data-bulk-message-action="spam"] { background:#fff3e5 !important; color:#965916 !important; }
/* Long-hold sorting cues for mouse and touch; all tiles stay clickable. */
#accountStrip [data-account], #mailboxStrip [data-mailbox], #filterRow [data-filter] {
  cursor: grab !important;
  position: relative;
}
#accountStrip [data-account]:active, #mailboxStrip [data-mailbox]:active,
#filterRow [data-filter]:active { cursor: grabbing !important; }
.rm-sort-dragging { opacity:.8 !important; z-index:90 !important; pointer-events:none !important;
  box-shadow:0 12px 28px #24263e35 !important; filter:saturate(1.1); }
.rm-sort-hover { outline:2px dashed #7054b0 !important; outline-offset:2px !important; }
.rm-sort-before { box-shadow: inset 4px 0 #7054b0 !important; }
.rm-sort-after { box-shadow: inset -4px 0 #7054b0 !important; }
.rm-sortable-container { overscroll-behavior-x: contain; }
/* Dark mode: tinted surfaces without reducing text contrast. */
body.dark {
  --bg:#15192a; --bg-2:#222b40; --panel:#20263b; --panel-solid:#20263b;
  --text:#f0f2fa; --muted:#bac3d6; --muted-2:#a1b0c7;
  --line:#35415a; --primary:#fb879e; --primary-dark:#ffc2cd;
}
body.dark .desktop-rail { background:linear-gradient(165deg,#11172a,#20213e 65%,#332339) !important; }
body.dark .app-header { background:linear-gradient(108deg,#20263b,#28253e) !important; border-color:#3c354e !important; }
body.dark .desktop-commandbar { background:#171e30 !important; border-color:#40445f !important; }
body.dark .hero-card { background:linear-gradient(110deg,#242a40,#33233c) !important; border-color:#52405c !important; }
body.dark .account-chip:not(.add-account) {
  background:linear-gradient(120deg,#252d45,#24273c) !important;
  border-color:#45536f !important; border-left-color:var(--tile-accent,#8f83da) !important;
}
body.dark .account-chip.active:not(.add-account) { background:#34344d !important; border-color:var(--tile-accent,#8f83da) !important; }
body.dark .account-chip strong, body.dark .account-chip.active strong { color:#eef0fb !important; }
body.dark .account-chip small { color:#b7c1d4 !important; }
body.dark .account-count-badge { background:#343a57 !important; color:#f1e9ff !important; border-color:#4e5674 !important; }
body.dark .account-chip.add-account { background:#25283d !important; color:#e6d6ff !important; border-color:#625a82 !important; }
body.dark .mailbox-strip .mailbox-chip:not(.active) {
  background:#293048 !important; border-color:#414b68 !important; color:#d5daf2 !important;
}
body.dark #filterRow .pill:not(.active) { background:#293048 !important; border-color:#414b68 !important; color:#e7ddff !important; }
body.dark #filterRow .pill:not(.active) .filter-count-badge { background:#3b435f !important; color:#fff !important; }
body.dark .mail-item:hover, body.dark .mail-swipe.is-current>.mail-item,
body.dark .mail-swipe.is-selected>.mail-item { background:#303956 !important; }
body.dark .mail-selection-toolbar, body.dark #bulkActionBar { background:#282b43 !important; border-color:#434461 !important; }
body.dark .mail-row-action[data-message-action],body.dark .detail-message-actions [data-detail-message-action] {
  background:#30354e !important; border-color:#484b65 !important; color:#e7ecff !important;
}
@media (hover:none) {
 #accountStrip [data-account], #mailboxStrip [data-mailbox], #filterRow [data-filter] { -webkit-user-select:none; user-select:none; }
}
@media (prefers-reduced-motion:reduce) {
 .account-chip:not(.add-account) { transition:none!important; }
 .account-chip:hover { transform:none!important; }
}
