:root {
  --bg: #eaf3ff;
  --panel: #ffffff;
  --panel-soft: #f5f9ff;
  --navy: #071f3f;
  --navy-2: #0b2d5c;
  --blue: #1268ff;
  --blue-2: #e8f2ff;
  --line: #d9e6f7;
  --text: #071f3f;
  --muted: #647695;
  --green: #0d7a45;
  --red: #b42318;
  --shadow: 0 18px 50px rgba(7, 31, 63, .12);
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}
button, input, textarea, [contenteditable] { font: inherit; }
button { cursor: pointer; }

.hidden { display: none !important; }
.mobile-only { display: none; }

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  max-width: min(380px, calc(100vw - 32px));
  padding: 13px 15px;
  border-radius: 16px;
  background: rgba(7, 31, 63, .96);
  color: #fff;
  box-shadow: 0 18px 46px rgba(7, 31, 63, .22);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.35;
  border: 1px solid rgba(255,255,255,.10);
  animation: toastIn .16s ease-out;
}
.toast.error { background: #b42318; }
.toast.success { background: #0d7a45; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 640px) {
  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 18% 18%, rgba(18,104,255,.17), transparent 28%),
    radial-gradient(circle at 90% 20%, rgba(57,149,255,.18), transparent 26%),
    var(--bg);
}
.login-card {
  width: min(1120px, 100%);
  min-height: 640px;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  overflow: hidden;
  border-radius: 32px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.brand-panel {
  padding: 58px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(7,31,63,.96), rgba(8,56,115,.96)),
    radial-gradient(circle at 30% 30%, rgba(18,104,255,.42), transparent 28%);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.brand-logo { width: 220px; max-width: 72%; height: auto; margin-bottom: 42px; }
.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 12px;
  color: #99c4ff;
  font-weight: 700;
}
.brand-panel h1 { margin: 0; font-size: clamp(38px, 6vw, 66px); line-height: .96; letter-spacing: -.06em; }
.lead { max-width: 540px; color: #dceaff; font-size: 18px; line-height: 1.55; }
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.feature-grid span {
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  padding: 14px 16px;
  border-radius: 16px;
  color: #e7f1ff;
  font-weight: 700;
}
.login-form {
  padding: 58px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}
.form-top h2 { margin: 12px 0 8px; font-size: 32px; letter-spacing: -.04em; }
.form-top p, .fineprint { color: var(--muted); line-height: 1.45; }
.pill {
  display: inline-flex;
  width: max-content;
  color: var(--blue);
  background: var(--blue-2);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 13px;
}
label { display: grid; gap: 8px; font-weight: 700; color: var(--navy); }
input, textarea, .compose-editor {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 14px 16px;
  outline: 0;
  background: #fff;
  color: var(--text);
  font-weight: 500;
}
input:focus, textarea:focus, .compose-editor:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(18,104,255,.10); }
.primary-btn, .ghost-btn, .ai-btn, .icon-btn, .profile-btn, .folder, .compose-btn {
  border: 0;
  border-radius: 14px;
  font-weight: 700;
}
.primary-btn {
  min-height: 52px;
  padding: 0 18px;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 12px 24px rgba(18,104,255,.24);
}
.primary-btn:disabled { opacity: .6; cursor: wait; }
.ghost-btn {
  min-height: 42px;
  padding: 0 14px;
  color: var(--navy);
  background: var(--panel-soft);
  border: 1px solid var(--line);
}
.danger-lite { color: var(--red); background: #fff4f2; border-color: #ffd6d0; }

.app { min-height: 100vh; display: grid; grid-template-columns: 280px minmax(0, 1fr); transition: grid-template-columns .18s ease; }
.app.sidebar-collapsed { grid-template-columns: 84px minmax(0, 1fr); }
.sidebar {
  min-width: 0;
  background: var(--navy);
  color: #fff;
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-top { display: grid; gap: 14px; min-width: 0; }
.sidebar-toggle {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px;
  color: #fff;
  background: rgba(255,255,255,.08);
  font-weight: 700;
}
.sidebar-brand {
  display: grid;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.sidebar-brand .brand-full { width: 160px; max-width: 100%; height: auto; display: block; }
.sidebar-brand .brand-icon { display: none; width: 36px; height: 36px; object-fit: contain; }
.sidebar-brand span { color: #9fc3f7; font-size: 14px; line-height: 1; font-weight: 650; }
.app.sidebar-collapsed .sidebar { padding-inline: 14px; align-items: center; }
.app.sidebar-collapsed .sidebar-top { justify-items: center; }
.app.sidebar-collapsed .sidebar-brand .brand-full,
.app.sidebar-collapsed .sidebar-brand span { display: none; }
.app.sidebar-collapsed .sidebar-brand .brand-icon { display: block; }
.app.sidebar-collapsed .compose-btn { width: 56px; min-height: 54px; padding: 0; font-size: 0; }
.app.sidebar-collapsed .compose-btn::before { content: "+"; font-size: 26px; line-height: 1; }
.app.sidebar-collapsed .folders { width: 100%; }
.app.sidebar-collapsed .folder { grid-template-columns: 1fr; justify-items: center; padding: 14px 8px; }
.app.sidebar-collapsed .folder .folder-label { display: none; }
.app.sidebar-collapsed .folder .folder-icon { display: grid; }
.app.sidebar-collapsed .folder::before { content: none; }
.app.sidebar-collapsed .folder b { display: none; }
.app.sidebar-collapsed .storage-card { width: 56px; padding: 12px 8px; border-radius: 18px; }
.app.sidebar-collapsed .storage-row span,
.app.sidebar-collapsed .meter,
.app.sidebar-collapsed .storage-card p { display: none; }
.app.sidebar-collapsed .storage-row { justify-content: center; }
.app.sidebar-collapsed .storage-row strong { font-size: 12px; writing-mode: vertical-rl; transform: rotate(180deg); }
.compose-btn { min-height: 54px; color: var(--navy); background: #fff; font-size: 16px; }
.folders { display: grid; gap: 8px; min-width: 0; }
.folder {
  min-width: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 14px 14px;
  color: #dbe9ff;
  background: transparent;
  text-align: left;
}
.folder-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: currentColor;
  opacity: .96;
}
.folder-icon svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.folder-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder b { color: #89bdff; font-size: 13px; }
.folder.active, .folder:hover { background: rgba(255,255,255,.10); color: #fff; }
.storage-card {
  margin-top: auto;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 20px;
  padding: 18px;
  color: #dbe9ff;
  min-width: 0;
}
.storage-row { display: flex; justify-content: space-between; gap: 12px; color: #fff; font-size: 14px; font-weight: 700; }
.meter { height: 8px; margin: 14px 0 10px; background: rgba(255,255,255,.20); border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--blue); border-radius: inherit; }
.storage-card p { margin: 0; font-size: 13px; }

.main { min-width: 0; padding: 0 22px 22px; }
.topbar {
  height: 104px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.search-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  border: 1px solid var(--line);
  background: #f7fbff;
  border-radius: 28px;
  padding: 0 18px;
}
.search-wrap input { border: 0; background: transparent; padding: 0; box-shadow: none; }
.ai-btn { height: 52px; padding: 0 18px; color: #fff; background: var(--navy); }
.profile-btn, .icon-btn {
  width: 52px;
  height: 52px;
  color: #fff;
  background: var(--blue);
  flex: 0 0 auto;
}


.mail-layout {
  display: grid;
  grid-template-columns: minmax(360px, 480px) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
}

.mail-list, .reader {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(7,31,63,.06);
}
.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 22px;
  border-bottom: 1px solid var(--line);
}
.list-head h2 { margin: 0; font-size: 28px; letter-spacing: -.04em; }
.list-head p { margin: 4px 0 0; color: var(--muted); }
.list-actions { display: flex; gap: 8px; flex-shrink: 0; }
.messages { height: calc(100vh - 292px); overflow-y: auto; overflow-x: hidden; }
.message-item {
  width: 100%;
  border-bottom: 1px solid #edf3fb;
  background: #fff;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 0;
  text-align: left;
  align-items: stretch;
}
.message-item:hover, .message-item.active, .message-item.selected { background: #f6faff; }
.message-item.selected { box-shadow: inset 4px 0 0 var(--blue); }
.message-item.unread { background: #fbfdff; }
.message-item.unread .subject { font-weight: 700; }
.message-item.unread .sender { font-weight: 700; }
.message-item:not(.unread) .subject { font-weight: 600; }
.message-item:not(.unread) .sender { font-weight: 600; }
.message-item:not(.unread) .snippet { color: #7385a1; }
.message-item:not(.unread) .avatar { opacity: .72; }

.message-check {
  display: grid;
  place-items: center;
  padding-left: 14px;
  cursor: pointer;
}
.message-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  cursor: pointer;
}
.message-open {
  min-width: 0;
  border: 0;
  background: transparent;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 16px 20px 16px 0;
  text-align: left;
  align-items: start;
  cursor: pointer;
}
.message-open:focus-visible {
  outline: 3px solid rgba(18,104,255,.22);
  outline-offset: -3px;
}
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: var(--blue-2);
  font-weight: 700;
}
.message-main { min-width: 0; }
.subject, .sender, .snippet { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subject { color: var(--text); font-weight: 600; }
.sender { color: #49617f; font-weight: 600; font-size: 14px; margin-top: 3px; }
.snippet { color: var(--muted); font-size: 14px; margin-top: 2px; }
.msg-time { color: #7a8aa6; font-size: 13px; white-space: nowrap; }
.loading, .empty-state { padding: 28px; color: var(--muted); text-align: center; }
.reader { display: flex; flex-direction: column; }
.reader-empty {
  margin: auto;
  text-align: center;
  max-width: 360px;
  padding: 28px;
  color: var(--muted);
}
.reader-empty img { width: 118px; }
.reader-empty h3 { color: var(--navy); margin-bottom: 8px; }
.reader-head { padding: 28px 30px 20px; border-bottom: 1px solid var(--line); }
.reader-head h2 { margin: 0 0 12px; font-size: 28px; line-height: 1.12; letter-spacing: -.045em; }
.meta { color: var(--muted); line-height: 1.55; overflow-wrap: anywhere; }
.reader-actions { display: flex; gap: 8px; padding: 16px 30px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.reader-body {
  padding: 28px 30px;
  color: #263b5d;
  line-height: 1.7;
  overflow: auto;
}
.reader-body img { max-width: 100%; height: auto; }
.image-privacy-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #ffd8a8;
  border-radius: 16px;
  background: #fff8ed;
  color: #5c3a05;
}
.image-privacy-bar strong,
.image-privacy-bar span { display: block; }
.image-privacy-bar span { margin-top: 3px; color: #7a5520; font-size: 13px; }
.image-privacy-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.attachments { margin-top: 22px; padding: 16px; background: var(--panel-soft); border: 1px solid var(--line); border-radius: 16px; }
.attachments strong { display: block; margin-bottom: 8px; }
.attachments span { display: inline-flex; margin: 6px 6px 0 0; padding: 8px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }

.compose-modal {
  width: min(720px, calc(100vw - 28px));
  border: 0;
  border-radius: 24px;
  padding: 0;
  box-shadow: var(--shadow);
}
.compose-modal::backdrop { background: rgba(7,31,63,.45); }
.compose-box { padding: 0; display: grid; gap: 14px; }
.compose-box header, .compose-box footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.compose-box footer { border-top: 1px solid var(--line); border-bottom: 0; }
.compose-footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.draft-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.reader-actions .draft-edit-btn {
  background: #0b5fff;
  color: #fff;
  border-color: #0b5fff;
}

.compose-box header button { width: 38px; height: 38px; border: 0; border-radius: 12px; background: var(--panel-soft); font-size: 22px; }
.compose-box label { padding: 0 20px; }
.compose-box input::placeholder { color: #7e8ca4; font-weight: 500; }
.compose-recipient-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 0 20px;
}
.compose-recipient-row label { padding: 0; }
.compose-recipient-main { min-width: 0; }
.recipient-actions {
  display: flex;
  gap: 6px;
  padding-bottom: 2px;
}
.recipient-actions button {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  color: var(--navy);
  font-weight: 700;
}
.recipient-actions button:hover,
.recipient-actions button.active {
  border-color: var(--blue);
  color: var(--blue);
  background: #eef6ff;
}
.optional-field.hidden { display: none !important; }
.compose-field input,
.compose-recipient-main input { font-weight: 500; }
.compose-toolbar {
  margin: 0 20px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel-soft);
}
.compose-toolbar button {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  min-height: 34px;
  padding: 0 10px;
  font-weight: 700;
}
.compose-toolbar button:hover { border-color: var(--blue); color: var(--blue); }
.compose-editor {
  margin: 0 20px;
  width: calc(100% - 40px);
  min-height: 230px;
  max-height: 52vh;
  overflow: auto;
  line-height: 1.6;
}
.compose-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}
.compose-editor blockquote, .reader-body blockquote {
  margin: 16px 0;
  padding: 10px 14px;
  border-left: 4px solid var(--line);
  color: #51627f;
  background: #f8fbff;
}
.compose-editor p { margin: 0 0 12px; }
.compose-editor ul, .compose-editor ol { padding-left: 22px; }
.compose-quote {
  margin: 0 20px;
  width: calc(100% - 40px);
  max-height: 220px;
  overflow: auto;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fbff;
  color: #51627f;
  line-height: 1.55;
}
.compose-quote::before {
  content: "Mensaje original";
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
  color: var(--navy);
}
.compose-quote blockquote {
  margin: 0;
  padding: 0 0 0 12px;
  border-left: 4px solid var(--line);
}
.compose-quote img { max-width: 100%; height: auto; }

@media (max-width: 1180px) {
  .mail-layout { grid-template-columns: minmax(300px, 430px) minmax(0, 1fr); }
  .sidebar { padding-inline: 18px; }
}

@media (max-width: 960px) {
  .login-card { grid-template-columns: 1fr; }
  .brand-panel, .login-form { padding: 36px; }
  .brand-panel { min-height: 360px; }
  .app, .app.sidebar-collapsed { grid-template-columns: 1fr; }
  .mobile-only { display: inline-grid; place-items: center; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: min(310px, 86vw);
    transform: translateX(-105%);
    transition: transform .2s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .app.sidebar-collapsed .sidebar { align-items: stretch; padding: 30px 18px; }
  .app.sidebar-collapsed .sidebar-brand .brand-full { display: block; }
  .app.sidebar-collapsed .sidebar-brand .brand-icon { display: none; }
  .app.sidebar-collapsed .sidebar-brand span { display: block; }
  .app.sidebar-collapsed .compose-btn { width: 100%; font-size: 16px; }
  .app.sidebar-collapsed .compose-btn::before { content: none; }
  .app.sidebar-collapsed .folder { grid-template-columns: 24px minmax(0, 1fr) auto; justify-items: stretch; padding: 14px; }
  .app.sidebar-collapsed .folder::before { content: none; }
  .app.sidebar-collapsed .folder .folder-icon { display: grid; }
  .app.sidebar-collapsed .folder .folder-label { display: block; }
  .app.sidebar-collapsed .storage-card { width: auto; padding: 18px; }
  .app.sidebar-collapsed .storage-row span,
  .app.sidebar-collapsed .meter,
  .app.sidebar-collapsed .storage-card p { display: block; }
  .app.sidebar-collapsed .storage-row { justify-content: space-between; }
  .app.sidebar-collapsed .storage-row strong { writing-mode: horizontal-tb; transform: none; font-size: 14px; }
  .main { padding-inline: 14px; }
  .topbar { height: 82px; }
  .ai-btn { display: none; }
  .mail-layout { grid-template-columns: 1fr; }
  .messages { height: auto; max-height: 48vh; }
  .reader { min-height: 460px; }
}

@media (max-width: 620px) {
  .image-privacy-bar { align-items: flex-start; flex-direction: column; }
  .image-privacy-actions { width: 100%; justify-content: stretch; }
  .image-privacy-actions .ghost-btn { flex: 1; }
  .login-shell { padding: 14px; }
  .login-card { border-radius: 24px; min-height: 0; }
  .brand-panel, .login-form { padding: 26px; }
  .brand-logo { width: 142px; margin-bottom: 26px; }
  .feature-grid { grid-template-columns: 1fr; }
  .status-strip { align-items: flex-start; }
  .status-strip button { flex: 0 0 auto; }
  .list-head { align-items: flex-start; flex-direction: column; }
  .list-actions { width: 100%; }
  .list-actions .ghost-btn { flex: 1; }
  .message-item { grid-template-columns: 32px minmax(0, 1fr); }
  .message-open { grid-template-columns: 38px minmax(0, 1fr); }
  .msg-time { grid-column: 2; }
  .compose-recipient-row { grid-template-columns: 1fr; }
  .recipient-actions { padding-bottom: 0; }
  .reader-actions, .reader-head, .reader-body { padding-inline: 20px; }
}

/* v2.8: compose UX + mobile mail navigation. */
.mail-frame {
  display: block;
  width: 100%;
  min-height: 220px;
  border: 0;
  background: #fff;
}

/* v2.8: mobile-first mail navigation and composer polish. */
.reader-head-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.reader-head-top h2 { flex: 1; min-width: 0; }
.reader-back {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--navy);
  background: var(--panel-soft);
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 820px) {
  .status-strip {
    display: none;
  }
  .mail-layout {
    display: block;
    min-height: calc(100dvh - 104px);
  }
  .mail-list,
  .reader {
    min-height: calc(100dvh - 104px);
  }
  .mail-layout:not(.reader-open) .reader {
    display: none;
  }
  .mail-layout.reader-open .mail-list {
    display: none;
  }
  .mail-layout.reader-open .reader {
    display: flex;
  }
  .messages {
    height: calc(100dvh - 252px);
    max-height: none;
  }
  .reader-head {
    padding-top: 18px;
  }
  .reader-actions {
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(10px);
  }
  .reader-body {
    padding-bottom: 36px;
  }
  .topbar {
    height: 78px;
  }
  .main {
    padding-bottom: 14px;
  }
}

@media (max-width: 620px) {
  .main { padding-inline: 10px; }
  .topbar { gap: 10px; }
  .search-wrap {
    height: 48px;
    padding: 0 14px;
  }
  .profile-btn,
  .icon-btn {
    width: 48px;
    height: 48px;
  }
  .mail-list,
  .reader {
    border-radius: 18px;
  }
  .list-head {
    padding: 20px 18px;
  }
  .list-head h2 {
    font-size: 26px;
  }
  .message-check { padding-left: 10px; }
  .message-open {
    padding: 15px 14px 15px 0;
    gap: 10px;
  }
  .reader-head-top {
    flex-direction: column;
  }
  .reader-back {
    order: -1;
  }
  .reader-head h2 {
    font-size: 25px;
  }
  .reader-actions {
    gap: 8px;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .reader-actions .ghost-btn {
    flex: 0 0 auto;
  }
  .compose-modal {
    width: calc(100vw - 14px);
    max-height: calc(100dvh - 14px);
    border-radius: 20px;
  }
  .compose-box {
    max-height: calc(100dvh - 14px);
    overflow: auto;
  }
  .compose-box header,
  .compose-box footer {
    position: sticky;
    z-index: 2;
    background: rgba(255,255,255,.98);
    backdrop-filter: blur(10px);
  }
  .compose-box header { top: 0; }
  .compose-box footer { bottom: 0; }
  .compose-toolbar {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: thin;
  }
  .compose-toolbar button {
    flex: 0 0 auto;
  }
  .compose-editor {
    min-height: 260px;
    max-height: none;
  }
}

/* v2.8.1: mobile sidebar close behavior + visual alignment */
@media (max-width: 960px) {
  .sidebar.open .sidebar-top,
  .app.sidebar-collapsed .sidebar.open .sidebar-top {
    justify-items: start;
  }
  .sidebar.open .sidebar-toggle {
    align-self: flex-start;
  }
  .sidebar.open .sidebar-brand,
  .app.sidebar-collapsed .sidebar.open .sidebar-brand {
    justify-items: start;
  }
  .sidebar.open .storage-row strong::after {
    content: '';
  }
}

/* v3.0: account menu + signature editor. */
.account-wrap {
  position: relative;
  flex: 0 0 auto;
}
.account-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 20;
  min-width: 178px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}
.account-menu button {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--navy);
  text-align: left;
  padding: 0 12px;
  font-weight: 700;
}
.account-menu button:hover { background: var(--panel-soft); color: var(--blue); }
.signature-modal { width: min(760px, calc(100vw - 28px)); }
.signature-intro {
  padding: 0 20px;
  display: grid;
  gap: 8px;
}
.signature-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.signature-check {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
  padding: 0;
  font-weight: 700;
}
.signature-check input {
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 5px;
  accent-color: var(--blue);
}
.signature-editor {
  min-height: 180px;
  max-height: 280px;
}
.signature-preview-card {
  margin: 0 20px;
  width: calc(100% - 40px);
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-soft);
}
.signature-preview-card > strong {
  display: block;
  margin-bottom: 10px;
  color: var(--navy);
}
.signature-preview {
  min-height: 54px;
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  color: #243a5d;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.signature-preview img,
.signature-editor img,
.compose-editor img {
  max-width: 100%;
  height: auto;
}
.signature-footer-left {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.th-signature {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #d9e6f7;
  color: #263b5d;
}
.th-signature p { margin: 0 0 8px; }

@media (max-width: 620px) {
  .account-menu { right: -2px; }
  .signature-footer-left,
  .signature-footer-left .ghost-btn,
  .signature-box footer .primary-btn {
    width: 100%;
  }
  .signature-box footer {
    align-items: stretch;
    flex-direction: column;
  }
}


/* v3.0 attachments */
.compose-attachments-row {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}
.attach-btn {
  justify-self: start;
}
.selected-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.selected-attachment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7fbff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.selected-attachment span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(360px, 60vw);
}
.selected-attachment button {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: #e8f1ff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}
.attachments a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid #cfe0ff;
  background: #fff;
  color: #0b63ff;
  text-decoration: none;
  font-weight: 700;
}
.attachments a:hover {
  background: #eef5ff;
}
.attachments small {
  color: var(--muted);
  font-weight: 600;
}
@media (max-width: 820px) {
  .selected-attachment span { max-width: 48vw; }
}

/* v3.1 search + filters / v4.5.1.1.1.1.1.1 toolbar layout */
.mail-tools {
  margin: 0 0 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(7,31,63,.05);
}
.mail-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f8fbff;
  flex-wrap: wrap;
  overflow: visible;
}
.filter-chip,
.filter-select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}
.filter-chip {
  padding: 0 13px;
}
.filter-chip.active,
.filter-chip[aria-pressed="true"] {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}
.filter-select {
  padding: 0 34px 0 13px;
  outline: 0;
  appearance: auto;
}
.filter-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(18,104,255,.10);
}
.message-attach {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  font-size: 13px;
  opacity: .75;
  vertical-align: 1px;
}
@media (max-width: 620px) {
  .mail-filters {
    padding: 10px 14px;
    scrollbar-width: thin;
  }
  .filter-chip,
  .filter-select {
    min-height: 36px;
    font-size: 14px;
  }
}

@media (max-width: 700px) {
  .compose-footer-left { gap: 8px; }
  .compose-footer-left .ghost-btn { padding-inline: 12px; }
  .draft-status { width: 100%; }
}

/* v3.3.2: production copy UI */
.session-info {
  margin: 4px 6px 8px;
  padding: 9px 10px;
  border-radius: 12px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}
.account-menu button#logoutBtn {
  color: #b42318;
}
.account-menu button#logoutBtn:hover {
  background: #fff1f0;
  color: #b42318;
}

/* v3.4.1: contactos y autocompletar destinatarios */
.recipient-field-wrap {
  position: relative;
}
.recipient-invalid {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 4px rgba(180, 35, 24, .10) !important;
}

.recipient-suggestions[hidden] {
  display: none !important;
}

.recipient-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 1200;
  display: grid;
  gap: 4px;
  max-height: 260px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(7,31,63,.14);
}
.compose-recipient-main .recipient-suggestions { top: calc(100% + 6px); }
.recipient-suggestion {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  padding: 8px 10px;
  background: #fff;
  color: var(--navy);
  text-align: left;
}
.recipient-suggestion:hover,
.recipient-suggestion:focus {
  background: var(--panel-soft);
  outline: 0;
}
.contact-avatar {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: var(--blue-2);
  color: var(--blue);
  font-weight: 700;
  flex: 0 0 auto;
}
.recipient-suggestion strong,
.contact-main strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
.recipient-suggestion small,
.contact-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.contacts-box {
  width: min(720px, calc(100vw - 24px));
}
.contacts-intro {
  padding: 0 20px;
  color: var(--muted);
  line-height: 1.45;
}
.contacts-intro p { margin: 0; }
.contacts-search-row {
  padding: 0 20px;
}
.contacts-list {
  margin: 0 20px;
  display: grid;
  gap: 8px;
  max-height: 430px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-soft);
}
.contact-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.contact-row button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--navy);
  font-weight: 700;
}
.contact-row button:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.empty-state.compact {
  min-height: 120px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
@media (max-width: 620px) {
  .contact-row {
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }
  .contact-row button[data-delete-contact] {
    grid-column: 3;
  }
}


/* v3.6 - commercial access / help */
.login-help-link {
  margin-top: 18px;
  align-self: flex-start;
  border: 0;
  background: rgba(255,255,255,.12);
  color: #eaf4ff;
  border-radius: 14px;
  padding: 10px 13px;
  font-weight: 700;
  cursor: pointer;
}
.login-help-link:hover { background: rgba(255,255,255,.2); }
.help-box { max-width: 860px; }
.help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}
.help-card {
  border: 1px solid #e1ecf8;
  background: #f8fbff;
  border-radius: 20px;
  padding: 18px;
}
.help-card h3 {
  margin: 7px 0 7px;
  color: #09265d;
  font-size: 18px;
}
.help-card p {
  margin: 0;
  color: #48607f;
  line-height: 1.5;
  font-size: 14px;
}
.help-kicker {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e7f2ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}
.server-list { margin: 0; display: grid; gap: 9px; }
.server-list div {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 10px;
  align-items: start;
}
.server-list dt { color: #72829c; font-weight: 700; font-size: 13px; }
.server-list dd { margin: 0; color: #17325e; font-weight: 700; font-size: 13px; word-break: break-word; }
.help-link { text-decoration: none; display: inline-flex; align-items: center; }
@media (max-width: 720px) {
  .help-grid { grid-template-columns: 1fr; padding: 14px; }
  .help-box { max-width: calc(100vw - 18px); }
}

/* v3.6.1 - minimal production login */
.login-shell-minimal {
  min-height: 100vh;
  padding: 32px;
  background:
    radial-gradient(circle at 22% 12%, rgba(44, 130, 255, .28), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(30, 105, 255, .18), transparent 34%),
    linear-gradient(135deg, #06162d 0%, #0a2b5a 52%, #071f3f 100%);
}

.login-card-minimal {
  width: min(460px, 100%);
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 28px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.login-brand-minimal {
  display: grid;
  justify-items: center;
  gap: 10px;
  color: #fff;
  text-align: center;
}

.brand-logo-minimal {
  width: min(260px, 72vw);
  height: auto;
  display: block;
}

.login-brand-slogan {
  margin: 0;
  color: #9fcaff;
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.login-form-minimal {
  padding: 36px;
  gap: 18px;
  border: 1px solid rgba(217, 230, 247, .92);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 8, 26, .26);
}

.login-form-minimal .form-top h1 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: -.045em;
}

.login-form-minimal .form-top p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.login-form-minimal label {
  gap: 8px;
  font-weight: 700;
}

.login-form-minimal input {
  min-height: 52px;
  font-weight: 500;
}

.login-form-minimal .primary-btn {
  min-height: 54px;
  margin-top: 2px;
}

.login-help-link-minimal {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 4px 0 0;
  font-weight: 700;
  text-align: center;
}

.login-help-link-minimal:hover {
  color: var(--blue);
}

@media (max-width: 620px) {
  .login-shell-minimal {
    padding: 22px;
    place-items: start center;
    padding-top: 48px;
  }

  .login-card-minimal {
    gap: 22px;
  }

  .brand-logo-minimal {
    width: min(220px, 70vw);
  }

  .login-form-minimal {
    padding: 26px;
    border-radius: 24px;
  }

  .login-form-minimal .form-top h1 {
    font-size: 27px;
  }
}


/* v3.7 archive + flagged messages */
.message-star {
  display: inline-flex;
  align-items: center;
  margin-right: 5px;
  color: #f5a400;
  font-size: 13px;
  vertical-align: 1px;
}


/* v4.5.1.1.1.1.1.1 bulk selection + actions */
.select-visible-btn {
  margin-left: auto;
}
.bulk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #eef6ff;
  flex-wrap: wrap;
}
.bulk-toolbar[hidden] {
  display: flex !important;
}
.bulk-toolbar strong {
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.bulk-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 1 1 520px;
  flex-wrap: wrap;
  overflow: visible;
}
.bulk-actions .ghost-btn {
  min-height: 36px;
  padding: 0 12px;
  white-space: nowrap;
  font-size: 13px;
}
.bulk-toolbar.is-busy {
  opacity: .68;
  pointer-events: none;
}
@media (max-width: 820px) {
  .mail-tools {
    margin-bottom: 14px;
    border-radius: 18px;
  }
  .mail-filters {
    padding: 10px 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
  }
  .select-visible-btn {
    margin-left: 0;
  }
  .bulk-toolbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 10px 12px;
  }
  .bulk-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }
}


/* v4.5.1.1.1.1.1.1 visual polish */
.app.sidebar-collapsed .sidebar-brand {
  width: 56px;
  justify-items: center;
  overflow: hidden;
}
.app.sidebar-collapsed .sidebar-brand .brand-icon {
  width: 34px;
  height: 34px;
}
.app.sidebar-collapsed .storage-card {
  display: grid;
  place-items: center;
  min-height: 64px;
}
.app.sidebar-collapsed .storage-row strong {
  writing-mode: horizontal-tb;
  transform: none;
  font-size: 0;
}
.app.sidebar-collapsed .storage-row strong::before {
  content: "OK";
  font-size: 12px;
  letter-spacing: .02em;
}

.list-head {
  padding: 22px 22px 20px;
}
.list-head h2 {
  font-size: 27px;
}
.mail-tools {
  border-radius: 22px;
}
.mail-filters {
  padding: 12px 16px;
}
.bulk-toolbar {
  background: #f8fbff;
  border-top: 1px solid #dbe8f8;
}
.bulk-toolbar strong {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eaf3ff;
  border: 1px solid var(--line);
}
.bulk-actions .ghost-btn {
  background: #fff;
}
.message-select {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}
.message-item.selected {
  background: #f3f8ff;
}
.reader-actions {
  gap: 8px;
}
.reader-actions .ghost-btn {
  min-height: 40px;
}
@media (max-width: 820px) {
  .bulk-toolbar strong {
    min-height: 34px;
  }
}


/* v4.5.1.1.1.1.1 storage quota card */
.storage-card .storage-row span {
  font-size: 13px;
}
.storage-card .storage-row strong#storagePercent {
  font-size: 14px;
  white-space: nowrap;
}
.storage-card p#storageText {
  font-size: 12px;
  line-height: 1.35;
  word-break: normal;
}
.app.sidebar-collapsed .storage-card p#storageText {
  display: none;
}
.app.sidebar-collapsed .storage-row strong#storagePercent {
  font-size: 12px;
}
.app.sidebar-collapsed .storage-row strong#storagePercent::before {
  content: "";
}


/* v4.1 fixed bulk actions + quota polish */
.bulk-toolbar {
  min-height: 64px;
}
.bulk-toolbar:not(.has-selection) {
  background: #f8fbff;
}
.bulk-toolbar:not(.has-selection) .bulk-actions {
  opacity: .48;
}
.bulk-toolbar:not(.has-selection) .bulk-actions .ghost-btn,
.bulk-toolbar .bulk-actions .ghost-btn:disabled,
.bulk-toolbar .ghost-btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: .58;
  filter: grayscale(.1);
}
.bulk-toolbar.has-selection {
  background: #eef6ff;
}
.bulk-toolbar.has-selection strong {
  background: #e2f0ff;
  border-color: #bcd8ff;
}
.bulk-toolbar:not(.has-selection) strong {
  background: #fff;
  color: #6a7a96;
}
.storage-card.quota-normal .meter i {
  background: var(--blue);
}
.storage-card.quota-warning .meter i {
  background: #f59e0b;
}
.storage-card.quota-critical .meter i {
  background: #dc2626;
}
.storage-card.quota-unlimited .meter i {
  background: #16a34a;
}
.storage-card.quota-fallback .meter i {
  background: var(--blue);
  opacity: .75;
}


/* v4.1 safe message row alignment */
.message-item {
  grid-template-columns: 38px minmax(0, 1fr);
}

.message-check {
  padding-left: 0;
  display: grid;
  place-items: center;
}

.message-check input {
  margin: 0;
}

.message-open {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 18px 14px 0;
}

.avatar {
  justify-self: center;
  align-self: center;
}

.message-main {
  min-width: 0;
  padding-left: 2px;
}

.message-star {
  display: inline-block;
  margin-right: 5px;
  line-height: 1;
  transform: translateY(-1px);
}

.message-attach {
  display: inline-block;
  margin-left: 5px;
  line-height: 1;
}

.msg-time {
  align-self: start;
  padding-top: 2px;
}

@media (max-width: 620px) {
  .message-item {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .message-open {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 14px 16px 14px 0;
  }

  .msg-time {
    grid-column: 2;
    justify-self: start;
    align-self: start;
    padding-top: 0;
    margin-top: 2px;
  }
}


/* v4.1 scheduled send */
.schedule-panel {
  margin: 0 18px 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fbff;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.schedule-panel.hidden {
  display: none !important;
}
.schedule-panel label {
  color: var(--navy);
  font-weight: 700;
  font-size: 14px;
  display: grid;
  gap: 7px;
}
.schedule-panel input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 12px;
  font: inherit;
  font-weight: 600;
  color: var(--navy);
  background: #fff;
}
.schedule-panel input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(18,104,255,.10);
}
.schedule-panel-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}
.scheduled-reader-body .alert-error {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.folder[data-folder="scheduled"] .folder-icon svg {
  stroke-width: 2.1;
}
@media (max-width: 720px) {
  .schedule-panel {
    grid-template-columns: 1fr;
    margin: 0 14px 14px;
  }
  .schedule-panel-actions {
    justify-content: stretch;
  }
  .schedule-panel-actions .ghost-btn,
  .schedule-panel-actions .primary-btn {
    flex: 1;
  }
}


/* v4.5.1.1.1.1.1 schedule modal + attachment spacing */
.schedule-panel {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 22px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: rgba(7, 31, 63, .42);
  backdrop-filter: blur(5px);
  grid-template-columns: 1fr;
  gap: 0;
  align-items: center;
}
.schedule-panel.hidden {
  display: none !important;
}
.schedule-dialog-card {
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(7, 31, 63, .24);
  overflow: hidden;
}
.schedule-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.schedule-dialog-head strong {
  display: block;
  color: var(--navy);
  font-size: 18px;
  font-weight: 700;
}
.schedule-dialog-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.schedule-panel label {
  color: var(--navy);
  font-weight: 700;
  font-size: 14px;
  display: grid;
  gap: 8px;
  padding: 18px 20px 8px;
}
.schedule-panel input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 0 13px;
  font: inherit;
  font-weight: 650;
  color: var(--navy);
  background: #fff;
}
.schedule-panel input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(18,104,255,.10);
}
.schedule-panel-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  padding: 16px 20px 20px;
}
.compose-attachments-row {
  gap: 12px;
  padding-top: 8px;
}
.selected-attachments {
  gap: 10px;
  margin-top: 2px;
  padding-right: 4px;
}
.selected-attachment {
  min-height: 38px;
  padding: 8px 11px;
  gap: 9px;
  font-weight: 700;
  background: #f8fbff;
}
.selected-attachment span {
  max-width: min(430px, 64vw);
}
.selected-attachment button {
  flex: 0 0 auto;
}
@media (max-width: 720px) {
  .schedule-panel {
    padding: 16px;
    align-items: end;
  }
  .schedule-dialog-card {
    border-radius: 22px;
  }
  .schedule-panel-actions {
    justify-content: stretch;
  }
  .schedule-panel-actions .ghost-btn,
  .schedule-panel-actions .primary-btn {
    flex: 1;
  }
  .selected-attachments {
    gap: 8px;
  }
  .selected-attachment span {
    max-width: 68vw;
  }
}


/* v4.5.1.1.1.1.1 composer attachment alignment */
.compose-attachments-row {
  margin: 0 20px 14px !important;
  width: calc(100% - 40px) !important;
  display: grid !important;
  gap: 10px !important;
  padding-top: 6px !important;
}
.compose-attachments-row .attach-btn {
  justify-self: start;
}
.selected-attachments {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 0 !important;
}
.selected-attachment {
  max-width: 100%;
}
.selected-attachment span {
  max-width: min(460px, calc(100vw - 170px));
}
@media (max-width: 720px) {
  .compose-attachments-row {
    margin: 0 14px 14px !important;
    width: calc(100% - 28px) !important;
  }
  .selected-attachment span {
    max-width: calc(100vw - 130px);
  }
}


/* v4.5.1.1.1.1.1 schedule error visibility */
.toast {
  z-index: 2200 !important;
}
.schedule-error {
  margin: 6px 20px 0;
  padding: 10px 12px;
  border-radius: 13px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}
.schedule-error.hidden {
  display: none !important;
}


/* v4.5.1.1.1.1.1 schedule timezone/error UX */
.schedule-error {
  display: block;
  margin: 10px 20px 0;
}
.schedule-error.hidden {
  display: none !important;
}


/* v4.5.1.1.1.1.1 draft attachment persistence */
.selected-attachment.existing-attachment {
  background: #eef6ff;
}
.selected-attachment em {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}


/* v4.5.1.1.1.1.1 schedule local time UX */
.schedule-help {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}
.schedule-panel label {
  gap: 7px;
}


/* v4.5.1.1.1.1.1 typography normalization */
button,
.primary-btn,
.ghost-btn,
.icon-btn,
.folder,
.filter-chip,
.filter-select,
.reader-head h2,
.list-head h2,
.compose-modal h2,
.schedule-dialog-head strong,
.login-card h1,
.login-card h2,
.sidebar,
.mail-app,
.app {
  font-weight: 700;
}

strong,
b,
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
}


/* v4.5.1.1.1.1.1 quick replies/templates */
.toolbar-feature-btn {
  min-width: 92px;
}

.templates-box {
  width: min(920px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
}

.templates-layout {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(320px, 1.1fr);
  gap: 0;
  min-height: 430px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.templates-panel {
  border-right: 1px solid var(--line);
  background: #f8fbff;
  min-width: 0;
}

.templates-search-row {
  display: flex;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.templates-search-row input,
.template-editor-panel input,
.template-editor-panel textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 12px 13px;
  color: var(--navy);
  background: #fff;
  font: inherit;
  font-weight: 600;
}

.templates-search-row input:focus,
.template-editor-panel input:focus,
.template-editor-panel textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(18,104,255,.10);
}

.templates-list {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding: 14px 16px 18px;
}

.template-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.template-card span {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.template-card strong {
  display: block;
  color: var(--navy);
  font-size: 15px;
  font-weight: 700;
}

.template-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.template-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.template-card-actions .ghost-btn {
  min-height: 34px;
  padding: 0 12px;
}

.template-editor-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
  background: #fff;
}

.template-editor-panel label {
  display: grid;
  gap: 7px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
}

.template-editor-panel textarea {
  min-height: 220px;
  resize: vertical;
  line-height: 1.45;
}

.template-editor-help {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.templates-modal footer {
  border-top: 0;
}

@media (max-width: 820px) {
  .templates-layout {
    grid-template-columns: 1fr;
  }

  .templates-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .templates-list {
    max-height: 260px;
  }

  .template-card {
    grid-template-columns: 1fr;
  }

  .template-card-actions {
    flex-direction: row;
  }
}


/* v4.5.1.1.1.1 templates UI polish */
.templates-modal {
  overflow: hidden;
}

.templates-box {
  width: min(1040px, calc(100vw - 36px));
  max-width: calc(100vw - 36px);
  overflow: hidden;
}

.templates-box,
.templates-box * {
  box-sizing: border-box;
}

.templates-head {
  min-width: 0;
}

.templates-head > div {
  min-width: 0;
}

.templates-head strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
}

.templates-head span {
  display: block;
  margin-top: 3px;
  max-width: 620px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.templates-layout {
  grid-template-columns: minmax(0, 46%) minmax(0, 54%);
  width: 100%;
  overflow: hidden;
}

.templates-panel,
.template-editor-panel {
  min-width: 0;
  overflow: hidden;
}

.templates-search-row {
  min-width: 0;
}

.templates-search-row input {
  min-width: 0;
}

.templates-list {
  min-width: 0;
  overflow-x: hidden;
}

.template-card {
  grid-template-columns: minmax(0, 1fr) auto;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.template-card-main {
  min-width: 0;
}

.template-card strong,
.template-card p {
  overflow: hidden;
  text-overflow: ellipsis;
}

.template-card p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.template-card-actions {
  flex: 0 0 auto;
}

.template-editor-panel {
  padding: 20px 22px;
}

.template-editor-panel textarea {
  min-height: 240px;
}

.templates-modal footer {
  width: 100%;
  overflow: hidden;
}

@media (max-width: 920px) {
  .templates-layout {
    grid-template-columns: 1fr;
  }

  .templates-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .templates-list {
    max-height: 280px;
  }
}

@media (max-width: 620px) {
  .templates-box {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
  }

  .templates-search-row {
    flex-direction: column;
  }

  .template-card {
    grid-template-columns: 1fr;
  }

  .template-card-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .template-editor-panel {
    padding: 16px;
  }
}


/* v4.5.1.1.1.1 templates dialog width fix */
dialog.templates-modal {
  width: min(1040px, calc(100vw - 36px)) !important;
  max-width: calc(100vw - 36px) !important;
  max-height: calc(100vh - 36px) !important;
  padding: 0 !important;
  margin: auto !important;
  overflow: hidden !important;
}

dialog.templates-modal .templates-box {
  width: 100% !important;
  max-width: 100% !important;
  max-height: calc(100vh - 36px) !important;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  overflow: hidden !important;
}

dialog.templates-modal .templates-layout {
  min-height: 0;
  height: min(560px, calc(100vh - 190px));
  overflow: hidden !important;
}

dialog.templates-modal .templates-list {
  max-height: none;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

dialog.templates-modal .template-editor-panel {
  overflow-y: auto;
  overflow-x: hidden;
}

dialog.templates-modal footer {
  flex-shrink: 0;
}

@media (max-width: 920px) {
  dialog.templates-modal .templates-layout {
    height: min(650px, calc(100vh - 190px));
  }

  dialog.templates-modal .templates-list {
    height: 260px;
  }
}

@media (max-width: 620px) {
  dialog.templates-modal {
    width: calc(100vw - 18px) !important;
    max-width: calc(100vw - 18px) !important;
    max-height: calc(100vh - 18px) !important;
  }

  dialog.templates-modal .templates-box {
    max-height: calc(100vh - 18px) !important;
  }

  dialog.templates-modal .templates-layout {
    height: min(680px, calc(100vh - 178px));
  }
}


/* v4.5.1.1.1.1 templates insert + scroll fix */
dialog.templates-modal .templates-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

dialog.templates-modal .templates-list {
  min-height: 0;
  height: 100%;
  overflow-y: scroll !important;
  overflow-x: hidden !important;
  scrollbar-gutter: stable;
  padding-right: 12px;
}

dialog.templates-modal .templates-list::-webkit-scrollbar {
  width: 10px;
}

dialog.templates-modal .templates-list::-webkit-scrollbar-track {
  background: #eaf2ff;
  border-radius: 999px;
}

dialog.templates-modal .templates-list::-webkit-scrollbar-thumb {
  background: #9db3d1;
  border-radius: 999px;
  border: 2px solid #eaf2ff;
}

dialog.templates-modal .templates-list {
  scrollbar-width: thin;
  scrollbar-color: #9db3d1 #eaf2ff;
}

@media (max-width: 920px) {
  dialog.templates-modal .templates-panel {
    grid-template-rows: auto auto;
  }

  dialog.templates-modal .templates-list {
    height: 270px;
    max-height: 270px;
  }
}


/* v4.5.1.1.1.1 templates layout fix */
dialog.templates-modal {
  width: min(1080px, calc(100vw - 32px)) !important;
}

dialog.templates-modal .templates-box {
  max-height: calc(100vh - 32px) !important;
  height: auto;
}

dialog.templates-modal .templates-layout {
  height: min(590px, calc(100vh - 205px)) !important;
  min-height: 470px;
  grid-template-columns: minmax(320px, 42%) minmax(420px, 58%) !important;
}

dialog.templates-modal .templates-panel {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden !important;
}

dialog.templates-modal .templates-search-row {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
}

dialog.templates-modal .templates-search-row input {
  height: 48px;
}

dialog.templates-modal .templates-list {
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 14px 14px 18px;
  scrollbar-gutter: stable;
}

dialog.templates-modal .template-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
  min-height: 0;
  padding: 14px;
  overflow: visible;
}

dialog.templates-modal .template-card-main {
  min-width: 0;
}

dialog.templates-modal .template-card span {
  margin-bottom: 5px;
}

dialog.templates-modal .template-card strong {
  line-height: 1.25;
}

dialog.templates-modal .template-card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 36px;
  max-height: 38px;
  margin-top: 6px;
  overflow: hidden;
}

dialog.templates-modal .template-card-actions {
  display: flex;
  flex-direction: row;
  gap: 8px;
  justify-content: flex-start;
  align-items: center;
}

dialog.templates-modal .template-card-actions .ghost-btn {
  min-height: 36px;
}

dialog.templates-modal .template-editor-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 14px;
  min-height: 0;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 20px 24px;
}

dialog.templates-modal .template-editor-panel label {
  min-width: 0;
}

dialog.templates-modal .template-editor-panel textarea {
  min-height: 230px;
  max-height: 100%;
}

dialog.templates-modal footer {
  min-height: 78px;
  padding: 16px 20px;
  background: #fff;
}

dialog.templates-modal .compose-footer-left {
  min-width: 0;
}

dialog.templates-modal #newTemplateBtn {
  white-space: nowrap;
}

@media (max-width: 980px) {
  dialog.templates-modal .templates-layout {
    grid-template-columns: 1fr !important;
    height: min(680px, calc(100vh - 190px)) !important;
  }

  dialog.templates-modal .templates-list {
    max-height: 280px !important;
  }

  dialog.templates-modal .template-editor-panel {
    padding: 18px;
  }
}

@media (max-width: 620px) {
  dialog.templates-modal {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
  }

  dialog.templates-modal .templates-layout {
    min-height: 0;
    height: min(700px, calc(100vh - 176px)) !important;
  }

  dialog.templates-modal footer {
    align-items: stretch;
  }

  dialog.templates-modal .compose-footer-left,
  dialog.templates-modal footer {
    flex-direction: column;
  }

  dialog.templates-modal footer .primary-btn,
  dialog.templates-modal footer .ghost-btn {
    width: 100%;
  }
}


/* v4.5.1.1.1.1 templates card/action polish */
dialog.templates-modal .template-card {
  min-height: 160px;
  align-content: space-between;
}

dialog.templates-modal .template-card-actions {
  display: flex;
  flex-direction: row;
  gap: 8px;
  justify-content: flex-start;
  align-items: center;
  margin-top: 4px;
}

dialog.templates-modal .template-trash-btn {
  width: 38px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fff5f5;
  color: #b91c1c;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

dialog.templates-modal .template-trash-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

dialog.templates-modal .template-trash-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, .14);
}

dialog.templates-modal .template-editor-panel {
  grid-template-rows: auto auto auto minmax(0, 1fr);
}

dialog.templates-modal .template-editor-panel label {
  padding: 0 !important;
  margin: 0;
  gap: 6px;
}

dialog.templates-modal .template-editor-panel textarea {
  margin-top: 0;
  min-height: 230px;
}

dialog.templates-modal .template-editor-help {
  margin-top: -2px;
}

@media (max-width: 620px) {
  dialog.templates-modal .template-card {
    min-height: 145px;
  }
}


/* v4.5.1.1.1.1 editable default templates */
dialog.templates-modal .template-trash-btn {
  display: none !important;
}

dialog.templates-modal .template-card {
  min-height: 160px;
}

dialog.templates-modal .template-card-actions {
  gap: 8px;
}


/* v4.5.1.1.1.1 compact toolbar layout */
.main {
  padding-top: 18px;
}

.compact-topbar {
  height: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: visible;
}

.compact-topbar .mobile-only {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 900;
}

.compact-mail-tools {
  margin: 0 0 18px;
  border-radius: 22px;
  overflow: visible;
}

.compact-mail-filters {
  display: grid;
  grid-template-columns: auto auto minmax(150px, 190px) minmax(280px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  overflow: visible;
}

.compact-search-wrap {
  height: 42px;
  border-radius: 999px;
  padding: 0 14px;
  background: #fff;
  min-width: 0;
}

.compact-search-wrap input {
  width: 100%;
  min-width: 0;
  font-size: 14px;
}

.compact-account-wrap {
  justify-self: end;
  position: relative;
}

.compact-account-wrap .profile-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.compact-bulk-toolbar {
  display: grid !important;
  grid-template-columns: minmax(230px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 14px;
}

.bulk-state {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.bulk-state strong {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid #b9d8ff;
  border-radius: 999px;
  background: #eaf4ff;
  color: var(--navy);
}

.bulk-state .select-visible-btn {
  min-height: 36px;
  background: #fff;
}

.compact-bulk-toolbar .bulk-actions {
  justify-content: flex-end;
  flex: initial;
  min-width: 0;
}

.refresh-icon-btn {
  width: 42px;
  height: 42px;
  color: var(--navy);
  background: #f7fbff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: none;
  font-size: 20px;
  line-height: 1;
}

.refresh-icon-btn:hover {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.list-head {
  padding: 20px 20px;
}

.messages {
  height: calc(100vh - 260px);
}

@media (min-width: 821px) {
  .compact-topbar .mobile-only {
    display: none !important;
  }
}

@media (max-width: 1180px) {
  .compact-mail-filters {
    grid-template-columns: auto auto minmax(145px, 180px) minmax(220px, 1fr) auto;
  }

  .compact-bulk-toolbar {
    grid-template-columns: 1fr;
  }

  .compact-bulk-toolbar .bulk-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 820px) {
  .main {
    padding-top: 16px;
  }

  .compact-topbar {
    height: 54px;
    display: flex;
    align-items: center;
  }

  .compact-topbar .mobile-only {
    position: static;
  }

  .compact-mail-filters {
    grid-template-columns: auto auto minmax(145px, 1fr) auto;
    overflow-x: visible;
  }

  .compact-search-wrap {
    grid-column: 1 / -1;
    order: 5;
  }

  .compact-account-wrap {
    grid-column: 4;
    grid-row: 1;
  }

  .compact-bulk-toolbar {
    padding: 10px 12px;
  }

  .bulk-state {
    width: 100%;
  }

  .compact-bulk-toolbar .bulk-actions {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .messages {
    height: calc(100vh - 330px);
  }
}

@media (max-width: 560px) {
  .compact-mail-filters {
    grid-template-columns: 1fr 1fr auto;
  }

  .compact-mail-filters .filter-select {
    grid-column: 1 / 3;
  }

  .compact-account-wrap {
    grid-column: 3;
    grid-row: 1;
  }

  .compact-search-wrap {
    grid-column: 1 / -1;
  }

  .bulk-state {
    align-items: stretch;
  }

  .bulk-state strong,
  .bulk-state .select-visible-btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .list-head h2 {
    font-size: 24px;
  }
}


/* v4.5.1.1.1 select visible contrast fix */
.bulk-state .select-visible-btn,
.bulk-state .select-visible-btn:disabled,
.bulk-state .select-visible-btn[aria-disabled="true"],
.bulk-state .select-visible-btn[aria-pressed="true"],
.bulk-state .select-visible-btn.active {
  color: var(--navy) !important;
  background: #fff !important;
  border-color: #b9d8ff !important;
  opacity: 1 !important;
}

.bulk-state .select-visible-btn:hover:not(:disabled) {
  color: #fff !important;
  background: var(--blue) !important;
  border-color: var(--blue) !important;
}

.bulk-state .select-visible-btn:disabled,
.bulk-state .select-visible-btn[aria-disabled="true"] {
  cursor: default;
}


/* v4.5.1.1.1 message readability weights */
.message-item.unread .subject,
.message-item.unread .sender,
.message-item.unread .snippet {
  font-weight: 800;
}

.message-item:not(.unread) .subject {
  font-weight: 600;
}

.message-item:not(.unread) .sender {
  font-weight: 500;
}

.message-item:not(.unread) .snippet {
  font-weight: 400;
}


/* v4.5.1.1.1 IMAP folders */
.folder {
  display: grid;
  grid-template-columns: auto 22px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
}

.folder-indent {
  display: block;
  width: calc(var(--depth, 0) * 14px);
  height: 1px;
}

.folder.custom-folder .folder-label {
  font-weight: 500;
}

.folder.system-folder .folder-label {
  font-weight: 700;
}

.folder-count {
  min-width: 26px;
  height: 22px;
  padding: 0 8px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #2fb4f3;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.folder.custom-folder .folder-icon {
  opacity: .9;
}

.app.sidebar-collapsed .folder {
  grid-template-columns: 1fr;
  justify-items: center;
}

.app.sidebar-collapsed .folder-indent,
.app.sidebar-collapsed .folder-count {
  display: none;
}


/* v4.5.1.1 folder tree + sidebar scroll */
.sidebar {
  overflow: hidden;
}

.folders {
  min-height: 0;
  max-height: calc(100vh - 330px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.28) rgba(255,255,255,.06);
}

.folders::-webkit-scrollbar {
  width: 8px;
}

.folders::-webkit-scrollbar-track {
  background: rgba(255,255,255,.06);
  border-radius: 999px;
}

.folders::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.28);
  border-radius: 999px;
}

.folder {
  grid-template-columns: auto 16px 22px minmax(0, 1fr) auto;
}

.folder-toggle,
.folder-toggle-placeholder {
  width: 16px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  color: rgba(255,255,255,.74);
  font-size: 17px;
  line-height: 1;
  transform-origin: center;
}

.folder-toggle {
  cursor: pointer;
  border-radius: 6px;
  transition: transform .15s ease, background .15s ease;
}

.folder-toggle:hover {
  background: rgba(255,255,255,.10);
}

.folder-toggle.expanded {
  transform: rotate(90deg);
}

.folder.custom-folder[data-depth="0"] {
  margin-top: 4px;
}

.folder.custom-folder[data-depth="1"] .folder-label,
.folder.custom-folder[data-depth="2"] .folder-label,
.folder.custom-folder[data-depth="3"] .folder-label,
.folder.custom-folder[data-depth="4"] .folder-label {
  font-size: 14px;
}

.folder.custom-folder .folder-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app.sidebar-collapsed .folders {
  max-height: calc(100vh - 250px);
  padding-right: 0;
}

.app.sidebar-collapsed .folder {
  grid-template-columns: 1fr;
}

.app.sidebar-collapsed .folder-toggle,
.app.sidebar-collapsed .folder-toggle-placeholder {
  display: none;
}


/* v4.5.1.1 folder counters + drag/drop */
.folder-count {
  color: #fff !important;
}

.message-item[draggable="true"] {
  cursor: grab;
}

.message-item.dragging {
  opacity: .55;
  cursor: grabbing;
}

.folder.drop-target {
  position: relative;
}

.folder.drop-target.drag-over {
  background: rgba(18,104,255,.28);
  outline: 1px solid rgba(255,255,255,.48);
  box-shadow: inset 3px 0 0 #fff;
}

.folder.drop-target.drag-over .folder-label::after {
  content: 'Mover aquí';
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  vertical-align: 1px;
}

.folder[data-droppable="false"] {
  cursor: default;
}

.app.sidebar-collapsed .folder.drop-target.drag-over .folder-label::after {
  display: none;
}


/* v4.5.1.1 safe folder visibility settings */
.folder-settings-modal {
  width: min(820px, calc(100vw - 28px)) !important;
  max-width: calc(100vw - 28px) !important;
  padding: 0 !important;
  overflow: hidden;
}

.folder-settings-box {
  width: 100%;
  max-height: calc(100vh - 32px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.folder-settings-box header > div strong {
  display: block;
  color: var(--navy);
  font-size: 18px;
  font-weight: 700;
}

.folder-settings-box header > div span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.folder-settings-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
}

.folder-settings-search {
  height: 42px;
  background: #fff;
}

.folder-settings-list {
  min-height: 0;
  overflow: auto;
  padding: 12px 18px 16px;
  background: #fff;
  scrollbar-width: thin;
  scrollbar-color: #9db3d1 #eaf2ff;
}

.folder-settings-list::-webkit-scrollbar {
  width: 10px;
}

.folder-settings-list::-webkit-scrollbar-track {
  background: #eaf2ff;
  border-radius: 999px;
}

.folder-settings-list::-webkit-scrollbar-thumb {
  background: #9db3d1;
  border-radius: 999px;
  border: 2px solid #eaf2ff;
}

.folder-setting-row {
  display: grid;
  grid-template-columns: calc(var(--depth, 0) * 18px) 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 9px;
  background: #fff;
}

.folder-setting-row::before {
  content: '';
  width: calc(var(--depth, 0) * 18px);
}

.folder-setting-icon {
  width: 22px;
  height: 22px;
  color: var(--navy);
}

.folder-setting-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.folder-setting-main {
  min-width: 0;
}

.folder-setting-main strong {
  display: block;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-setting-main small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.folder-setting-row input[type="checkbox"] {
  width: 44px;
  height: 24px;
  appearance: none;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  cursor: pointer;
  transition: background .15s ease;
}

.folder-setting-row input[type="checkbox"]::after {
  content: '';
  width: 18px;
  height: 18px;
  position: absolute;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s ease;
  box-shadow: 0 1px 4px rgba(2, 12, 32, .20);
}

.folder-setting-row input[type="checkbox"]:checked {
  background: var(--blue);
}

.folder-setting-row input[type="checkbox"]:checked::after {
  transform: translateX(20px);
}

.folder-setting-row input[type="checkbox"]:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.folder-setting-row.locked {
  background: #f8fbff;
}

@media (max-width: 720px) {
  .folder-settings-toolbar {
    grid-template-columns: 1fr;
  }

  .folder-settings-toolbar .ghost-btn {
    width: 100%;
  }

  .folder-setting-row {
    grid-template-columns: calc(var(--depth, 0) * 12px) 22px minmax(0, 1fr) auto;
  }
}


/* v4.6 move to folder */
.folder-settings-modal[open] {
  display: block;
}

.folder-settings-list .loading {
  min-height: 180px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
}


/* v4.5.2 svg path fix marker */


/* v4.5.3 folder settings manual fallback */
.folder-settings-modal.manual-open[open] {
  display: block !important;
  position: fixed;
  inset: 0;
  margin: auto;
  z-index: 9999;
}

.folder-settings-modal.manual-open::backdrop {
  background: rgba(7,31,63,.45);
}


/* v4.6 move to folder */
.folder-settings-modal.manual-open[open] {
  display: grid !important;
  place-items: center;
  position: fixed;
  inset: 0;
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh;
  max-height: 100vh !important;
  padding: 18px !important;
  margin: 0 !important;
  border: 0;
  background: rgba(7,31,63,.45);
  z-index: 9999;
}

.folder-settings-modal.manual-open[open] .folder-settings-box {
  width: min(820px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 26px 70px rgba(7,31,63,.26);
}

.folder-settings-modal:not(.manual-open)[open] {
  display: block;
}

.folder-settings-modal .empty-state,
.folder-settings-list .loading {
  min-height: 170px;
}


/* v4.6 move to folder */
.folder-settings-toolbar {
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
}

.folder-settings-list .empty-state {
  min-height: 170px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 820px) {
  .folder-settings-toolbar {
    grid-template-columns: 1fr;
  }
}


/* v4.6 move to folder */
.folder-settings-list {
  min-height: 230px;
}

.folder-settings-list .loading {
  min-height: 170px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
}


/* v4.5.7 folder visibility save feedback */
.folder-setting-row input[type="checkbox"]:not(:checked) + * {
  opacity: .85;
}

.folder-settings-box footer .draft-status {
  max-width: 520px;
}


/* v4.6 move to folder */
.folder-settings-box button {
  pointer-events: auto;
}


/* v4.6 move to folder */
.folder-setting-row.locked {
  background: #f8fbff;
  border-color: #cfe0f7;
}

.folder-setting-row.locked .folder-setting-main small::after {
  content: '';
}

.folder-setting-row.locked input[type="checkbox"] {
  cursor: not-allowed;
  opacity: .65;
}


/* v4.6 move to folder */
.move-folder-modal {
  width: min(720px, calc(100vw - 28px)) !important;
  max-width: calc(100vw - 28px) !important;
  padding: 0 !important;
  overflow: hidden;
}

.move-folder-box {
  width: 100%;
  max-height: calc(100vh - 32px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.move-folder-box header > div strong {
  display: block;
  color: var(--navy);
  font-size: 18px;
  font-weight: 700;
}

.move-folder-box header > div span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.move-folder-toolbar {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
}

.move-folder-search {
  height: 42px;
  background: #fff;
}

.move-folder-list {
  min-height: 260px;
  overflow: auto;
  padding: 12px 18px 16px;
  background: #fff;
  scrollbar-width: thin;
  scrollbar-color: #9db3d1 #eaf2ff;
}

.move-folder-list::-webkit-scrollbar {
  width: 10px;
}

.move-folder-list::-webkit-scrollbar-track {
  background: #eaf2ff;
  border-radius: 999px;
}

.move-folder-list::-webkit-scrollbar-thumb {
  background: #9db3d1;
  border-radius: 999px;
  border: 2px solid #eaf2ff;
}

.move-folder-row {
  width: 100%;
  display: grid;
  grid-template-columns: calc(var(--depth, 0) * 18px) 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 9px;
  background: #fff;
  color: var(--navy);
  text-align: left;
  cursor: pointer;
}

.move-folder-row::before {
  content: '';
  width: calc(var(--depth, 0) * 18px);
}

.move-folder-row:hover {
  border-color: #b9d8ff;
  background: #f8fbff;
}

.move-folder-icon {
  width: 22px;
  height: 22px;
  color: var(--navy);
}

.move-folder-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.move-folder-main {
  min-width: 0;
}

.move-folder-main strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
}

.move-folder-main small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.move-folder-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef6ff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.move-folder-row:hover .move-folder-action {
  color: #fff;
  background: var(--blue);
}

@media (max-width: 620px) {
  .move-folder-row {
    grid-template-columns: calc(var(--depth, 0) * 12px) 22px minmax(0, 1fr);
  }

  .move-folder-action {
    grid-column: 3;
    justify-self: start;
    margin-top: 4px;
  }
}


/* v4.7 simple rules */
.rules-modal {
  width: min(980px, calc(100vw - 32px)) !important;
  max-width: calc(100vw - 32px) !important;
  padding: 0 !important;
  overflow: hidden;
}

.rules-box {
  width: 100%;
  max-height: calc(100vh - 32px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.rules-box header > div strong {
  display: block;
  color: var(--navy);
  font-size: 18px;
  font-weight: 700;
}

.rules-box header > div span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.rules-layout {
  display: grid;
  grid-template-columns: minmax(300px, 42%) minmax(360px, 58%);
  min-height: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.rules-list-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--line);
  background: #f8fbff;
}

.rules-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.rules-search {
  height: 42px;
  background: #fff;
}

.rules-list {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  max-height: calc(100vh - 255px);
  overflow: auto;
  padding: 14px;
}

.rule-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.rule-card.disabled-rule {
  opacity: .65;
}

.rule-card-main {
  min-width: 0;
}

.rule-card span {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.rule-card.disabled-rule span {
  color: var(--muted);
}

.rule-card strong {
  display: block;
  color: var(--navy);
  font-size: 15px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rule-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.rule-editor-panel {
  display: grid;
  align-content: start;
  gap: 13px;
  min-height: 0;
  overflow: auto;
  padding: 18px 22px;
  background: #fff;
}

.rule-editor-panel label {
  display: grid;
  gap: 7px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
}

.rule-editor-panel input[type="text"],
.rule-editor-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 12px 13px;
  color: var(--navy);
  background: #fff;
  font: inherit;
  font-weight: 600;
}

.rule-editor-panel input[type="text"]:focus,
.rule-editor-panel select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(18,104,255,.10);
}

.rule-check {
  display: flex !important;
  grid-template-columns: none !important;
  flex-direction: row;
  align-items: center;
  gap: 10px !important;
  font-weight: 700;
}

.rule-check input {
  width: 18px;
  height: 18px;
}

.rule-section-title {
  margin-top: 4px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.rule-help {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.rules-box footer {
  gap: 10px;
}

@media (max-width: 860px) {
  .rules-layout {
    grid-template-columns: 1fr;
  }

  .rules-list-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rules-list {
    max-height: 260px;
  }
}

@media (max-width: 620px) {
  .rules-toolbar {
    grid-template-columns: 1fr;
  }

  .rules-box footer,
  .rules-box .compose-footer-left {
    flex-direction: column;
    align-items: stretch;
  }

  .rules-box footer .ghost-btn,
  .rules-box footer .primary-btn {
    width: 100%;
  }
}


/* v4.8 rule from message */
#applyRuleToCurrentBtn:not([hidden]) {
  display: inline-flex;
}

.reader-actions #createRuleBtn {
  white-space: nowrap;
}

.rules-box footer .ghost-btn[hidden] {
  display: none !important;
}


/* v4.8.1 subfolder destinations */
.move-folder-main strong {
  white-space: normal;
  line-height: 1.25;
}

.rule-editor-panel select option {
  font-weight: 600;
}


/* v4.9 safe auto rules */
#clearRuleHistoryBtn {
  justify-self: start;
}

.rule-help strong {
  font-weight: 700;
}


/* v4.9.2 rule history open fix */
.rule-history-modal {
  width: min(900px, calc(100vw - 32px)) !important;
  max-width: calc(100vw - 32px) !important;
  padding: 0 !important;
  overflow: hidden;
}

.rule-history-box {
  width: 100%;
  max-height: calc(100vh - 32px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.rule-history-box header > div strong {
  display: block;
  color: var(--navy);
  font-size: 18px;
  font-weight: 700;
}

.rule-history-box header > div span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.rule-history-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
}

.rule-history-search {
  height: 42px;
  background: #fff;
}

.rule-history-list {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding: 14px;
  background: #fff;
}

.rule-history-card {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.rule-history-card.rule-history-error {
  border-color: #ffd0d0;
  background: #fff8f8;
}

.rule-history-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.rule-history-head strong {
  color: var(--navy);
  font-size: 15px;
  font-weight: 700;
}

.rule-history-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.rule-history-card p {
  margin: 0;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

.rule-history-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

#openRuleHistoryBtn {
  white-space: nowrap;
}

@media (max-width: 760px) {
  .rule-history-toolbar {
    grid-template-columns: 1fr;
  }
}


/* v4.9.2 rule history open fallback */
.rule-history-modal.manual-open[open] {
  display: grid !important;
  place-items: center;
  position: fixed;
  inset: 0;
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh;
  max-height: 100vh !important;
  padding: 18px !important;
  margin: 0 !important;
  border: 0;
  background: rgba(7,31,63,.45);
  z-index: 9999;
}

.rule-history-modal.manual-open[open] .rule-history-box {
  width: min(900px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 26px 70px rgba(7,31,63,.26);
}


/* v4.9.3 chile date time */
.reader-head .meta strong {
  font-weight: 700;
}


/* v4.9.4 compact message timestamps */
.msg-time {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  min-width: 52px;
  gap: 2px;
  line-height: 1.05;
  white-space: nowrap;
}

.msg-time-day {
  color: #8a98b0;
  font-size: 11px;
  font-weight: 700;
}

.msg-time-clock {
  color: #6f82a0;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 620px) {
  .msg-time {
    align-items: flex-start;
    min-width: auto;
    margin-top: 3px;
  }
}


/* v5.0 undo movements */
.move-history-modal {
  width: min(900px, calc(100vw - 32px)) !important;
  max-width: calc(100vw - 32px) !important;
  padding: 0 !important;
  overflow: hidden;
}

.move-history-box {
  width: 100%;
  max-height: calc(100vh - 32px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.move-history-box header > div strong {
  display: block;
  color: var(--navy);
  font-size: 18px;
  font-weight: 700;
}

.move-history-box header > div span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.move-history-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
}

.move-history-search {
  height: 42px;
  background: #fff;
}

.move-history-list {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding: 14px;
  background: #fff;
}

.move-history-card {
  display: grid;
  gap: 7px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.move-history-card.move-history-error {
  border-color: #ffd0d0;
  background: #fff8f8;
}

.move-history-card.move-history-undone {
  opacity: .72;
  background: #f8fbff;
}

.move-history-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.move-history-head strong {
  color: var(--navy);
  font-size: 15px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.move-history-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.move-history-card p {
  margin: 0;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.move-history-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.move-history-actions {
  display: flex;
  justify-content: flex-end;
}

.move-history-modal.manual-open[open] {
  display: grid !important;
  place-items: center;
  position: fixed;
  inset: 0;
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh;
  max-height: 100vh !important;
  padding: 18px !important;
  margin: 0 !important;
  border: 0;
  background: rgba(7,31,63,.45);
  z-index: 9999;
}

.move-history-modal.manual-open[open] .move-history-box {
  width: min(900px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 26px 70px rgba(7,31,63,.26);
}

@media (max-width: 760px) {
  .move-history-toolbar {
    grid-template-columns: 1fr;
  }
}


/* v5.0.1 date parser fix */
.msg-time[title] {
  cursor: default;
}

/* BEGIN TURBOHOST MAIL V5.4 INCREMENTAL MAILBOX */
.mailbox-load-more {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px 12px 20px;
  border-top: 1px solid rgba(134, 160, 195, 0.22);
  background: rgba(244, 248, 255, 0.86);
}

.mailbox-load-more-btn {
  min-width: 180px;
}

.mailbox-load-more-btn:disabled {
  cursor: wait;
  opacity: 0.7;
}
/* END TURBOHOST MAIL V5.4 INCREMENTAL MAILBOX */

/* BEGIN TURBOHOST MAIL V5.5 NOTIFICATION BUTTON */
.pwa-notification-btn {
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(117, 143, 179, 0.34);
  border-radius: 10px;
  background: rgba(235, 243, 255, 0.95);
  color: #0b2344;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.pwa-notification-btn:hover:not(:disabled) {
  background: #dfeeff;
}

.pwa-notification-btn:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}
/* END TURBOHOST MAIL V5.5 NOTIFICATION BUTTON */
