/* ==========================================================================
   HOSTINGER MAIL UI — SNAPPYMAIL v2.38.2
   Exact Light & Dark parity, DM Sans typography, Linha/Coluna layouts
   ========================================================================== */

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/dm-sans-latin-ext-400.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/dm-sans-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./fonts/dm-sans-latin-ext-500.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./fonts/dm-sans-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/dm-sans-latin-ext-600.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/dm-sans-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/dm-sans-latin-ext-700.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/dm-sans-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/jetbrains-mono-latin-400.woff2") format("woff2");
}

/* ==========================================================================
   ROOT COLOR SCHEME & TOKENS
   ========================================================================== */
:root {
  color-scheme: light;
  --hm-font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --hm-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --hm-purple: #1e52b8;
  --hm-purple-hover: #163f91;
  --hm-purple-soft: light-dark(#eaf1fc, #16233d);
  --hm-purple-soft-text: light-dark(#1e52b8, #60a5fa);
  --hm-purple-border: light-dark(#c7daf9, #243b6b);

  --hm-chrome-bg: light-dark(#ffffff, #121927);
  --hm-canvas-bg: light-dark(#ffffff, #0d131f);
  --hm-settings-canvas-bg: light-dark(#f5f6fa, #0d131f);
  --hm-surface: light-dark(#ffffff, #121927);
  --hm-surface-card: var(--hm-surface);
  --hm-bg-app: var(--hm-canvas-bg);
  --hm-surface-elevated: light-dark(#ffffff, #172133);
  --hm-surface-subtle: light-dark(#f3f4f8, #1c283d);
  --hm-surface-active: light-dark(#f0f1f6, #22314c);
  --hm-surface-hover: light-dark(#f5f6fa, #1a2538);

  --hm-text: light-dark(#1d1e20, #f1f5f9);
  --hm-text-primary: var(--hm-text);
  --hm-text-secondary: light-dark(#565a66, #9eb0cf);
  --hm-text-muted: light-dark(#767a87, #7889a8);
  --hm-border: light-dark(#e5e7ed, #253552);
  --hm-border-strong: light-dark(#cbd0dc, #3e5685);
  --hm-hairline: light-dark(#eceef2, #1e2b42);

  --hm-pill-active-bg: light-dark(#1d1e20, #ffffff);
  --hm-pill-active-text: light-dark(#ffffff, #111827);

  --hm-input-bg: light-dark(#f4f5f8, #121927);
  --hm-input-border: light-dark(#dce0e9, #2c3e61);

  --hm-scrollbar-thumb: light-dark(#c5c9d6, #354a73);

  /* Override SnappyMail Theme defaults so Love theme never leaks */
  --main-color: var(--hm-text);
  --main-bg-color: var(--hm-chrome-bg);
  --main-bg-image: none;
  --main-font-size: 19px;
  --loading-color: var(--hm-text);
  --loading-text-shadow: none;
  --dropdown-menu-color: var(--hm-text);
  --dropdown-menu-bg-color: var(--hm-surface-elevated);
  --dropdown-menu-hover-bg-color: var(--hm-surface-hover);
  --dropdown-menu-hover-color: var(--hm-text);
  --dropdown-menu-disable-color: var(--hm-text-muted);
  --folders-color: var(--hm-text-secondary);
  --folders-selected-color: var(--hm-text);
  --folders-selected-bg-color: var(--hm-surface-active);
  --folders-hover-color: var(--hm-text);
  --folders-hover-bg-color: var(--hm-surface-hover);
  --message-list-toolbar-bg-color: transparent;
  --border-color: var(--hm-border);
  --dialog-bg-clr: var(--hm-surface-elevated);
  --dialog-clr: var(--hm-text);
  --dialog-border-clr: var(--hm-border);
  --dialog-border-radius: 21px;
}

:root:has(> head > meta[name="color-scheme"][content="dark"]) {
  color-scheme: dark;
}
:root:has(> head > meta[name="color-scheme"][content="light"]) {
  color-scheme: light;
}

/* Follow OS dark mode only when user explicitly selects "system" */
@media (prefers-color-scheme: dark) {
  :root[data-theme-choice="system"] {
    color-scheme: dark;
    --hm-purple-soft: #16233d;
    --hm-purple-soft-text: #60a5fa;
    --hm-purple-border: #243b6b;
    --hm-chrome-bg: #121927;
    --hm-canvas-bg: #0d131f;
    --hm-settings-canvas-bg: #0d131f;
    --hm-surface: #121927;
    --hm-surface-elevated: #172133;
    --hm-surface-subtle: #1c283d;
    --hm-surface-active: #22314c;
    --hm-surface-hover: #1a2538;
    --hm-text: #f1f5f9;
    --hm-text-secondary: #9eb0cf;
    --hm-text-muted: #7889a8;
    --hm-border: #253552;
    --hm-border-strong: #3e5685;
    --hm-hairline: #1e2b42;
    --hm-pill-active-bg: #ffffff;
    --hm-pill-active-text: #111827;
    --hm-input-bg: #121927;
    --hm-input-border: #2c3e61;
    --hm-scrollbar-thumb: #354a73;
  }
}

:root[data-theme-choice="dark"] {
  color-scheme: dark;
  --hm-purple-soft: #16233d;
  --hm-purple-soft-text: #60a5fa;
  --hm-purple-border: #243b6b;
  --hm-chrome-bg: #121927;
  --hm-canvas-bg: #0d131f;
  --hm-settings-canvas-bg: #0d131f;
  --hm-surface: #121927;
  --hm-surface-elevated: #172133;
  --hm-surface-subtle: #1c283d;
  --hm-surface-active: #22314c;
  --hm-surface-hover: #1a2538;
  --hm-text: #f1f5f9;
  --hm-text-secondary: #9eb0cf;
  --hm-text-muted: #7889a8;
  --hm-border: #253552;
  --hm-border-strong: #3e5685;
  --hm-hairline: #1e2b42;
  --hm-pill-active-bg: #ffffff;
  --hm-pill-active-text: #111827;
  --hm-input-bg: #121927;
  --hm-input-border: #2c3e61;
  --hm-scrollbar-thumb: #354a73;
}

:root[data-theme-choice="light"] {
  --hm-purple-soft: #eaf1fc;
  --hm-purple-soft-text: #1e52b8;
  --hm-purple-border: #c7daf9;
  --hm-chrome-bg: #ffffff;
  --hm-canvas-bg: #ffffff;
  --hm-settings-canvas-bg: #f5f6fa;
  --hm-surface: #ffffff;
  --hm-surface-elevated: #ffffff;
  --hm-surface-subtle: #f3f4f8;
  --hm-surface-active: #f0f1f6;
  --hm-surface-hover: #f5f6fa;
  --hm-text: #1d1e20;
  --hm-text-secondary: #565a66;
  --hm-text-muted: #767a87;
  --hm-border: #e5e7ed;
  --hm-border-strong: #cbd0dc;
  --hm-hairline: #eceef2;
  --hm-pill-active-bg: #1d1e20;
  --hm-pill-active-text: #ffffff;
  --hm-input-bg: #f4f5f8;
  --hm-input-border: #dce0e9;
  --hm-scrollbar-thumb: #c5c9d6;
}

/* Base typography & scrollbars */
html, body#rl-app {
  font-family: var(--hm-font) !important;
  font-size: 18.5px;
  background-color: var(--hm-chrome-bg) !important;
  background-image: none !important;
  color: var(--hm-text);
  margin: 0;
  padding: 0;
  height: 100dvh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body#rl-app {
  display: flex;
  flex-direction: column;
}

body#rl-app * {
  scrollbar-width: thin;
  scrollbar-color: var(--hm-scrollbar-thumb) transparent;
}

body#rl-app button,
body#rl-app input,
body#rl-app textarea,
body#rl-app select {
  font-family: var(--hm-font);
}

[hidden] {
  display: none !important;
}

#rl-loading {
  background: var(--hm-chrome-bg) !important;
  color: var(--hm-text) !important;
}

/* ==========================================================================
   TOP BAR (#hm-topbar)
   ========================================================================== */
#hm-topbar {
  height: 74px;
  min-height: 74px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 21px;
  background: var(--hm-chrome-bg);
  border-bottom: 1px solid var(--hm-hairline);
  box-sizing: border-box;
  color: var(--hm-text);
  user-select: none;
  z-index: 40;
}

#hm-topbar[hidden] {
  display: none !important;
}

.hm-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  text-decoration: none;
  color: var(--hm-text);
  cursor: pointer;
}

.hm-brand-svg {
  width: 29px;
  height: 29px;
  flex-shrink: 0;
  color: var(--hm-text);
}

.hm-brand-logo-img {
  width: 35px;
  height: 35px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 8px;
  display: block;
}

.hm-brand-logo-svg {
  height: 28px;
  width: auto;
  max-width: 153px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme-choice="system"] .hm-brand-logo-svg {
    filter: brightness(1.65) saturate(1.1);
  }
}

:root[data-theme-choice="dark"] .hm-brand-logo-svg {
  filter: brightness(1.65) saturate(1.1);
}

:root[data-theme-choice="light"] .hm-brand-logo-svg {
  filter: none;
}

.hm-brand-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 18.5px;
  line-height: 1;
}

.hm-brand-hostinger {
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 18px;
}

.hm-brand-sep {
  width: 1px;
  height: 21px;
  background: var(--hm-border-strong);
  opacity: 0.75;
}

.hm-brand-mail {
  font-weight: 400;
  font-size: 19px;
  color: var(--hm-text-secondary);
}

/* Center Search Box */
.hm-search-wrap {
  flex: 1;
  max-width: 520px;
  margin-right: auto;
  position: relative;
  display: flex;
  align-items: center;
  height: 48px;
  background: var(--hm-surface-subtle);
  border: 1px solid var(--hm-border);
  border-radius: 12px;
  padding: 0 14px;
  gap: 10px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.hm-search-wrap:focus-within {
  border-color: var(--hm-purple);
  background: var(--hm-chrome-bg);
}

body.hm-mode-settings .hm-search-wrap,
body.hm-mode-settings .hm-topbar-mailbox-only {
  display: none !important;
}

.hm-search-icon {
  color: var(--hm-text-muted);
  display: inline-flex;
  flex-shrink: 0;
}

#hm-search-input {
  flex: 1;
  min-width: 0;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--hm-text) !important;
  font-size: 18px !important;
  height: 100%;
  padding: 0 !important;
  margin: 0 !important;
}

#hm-search-input::placeholder {
  color: var(--hm-text-muted);
}

.hm-icon-btn-inline {
  background: transparent;
  border: none;
  color: var(--hm-text-secondary);
  width: 35px;
  height: 35px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.hm-icon-btn-inline:hover {
  background: var(--hm-surface-active);
  color: var(--hm-text);
}

/* Topbar Right Actions */
.hm-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.hm-top-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 45px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--hm-text);
  font-size: 17.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

.hm-top-btn-ghost:hover {
  background: var(--hm-surface-hover);
}

.hm-top-btn-referral {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 45px;
  padding: 0 17px;
  border-radius: 12px;
  border: 1px solid var(--hm-purple-border);
  background: var(--hm-purple-soft);
  color: var(--hm-purple-soft-text);
  font-size: 17.5px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.hm-top-btn-referral:hover {
  filter: brightness(1.06);
}

.hm-top-btn-ai {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 45px;
  padding: 0 19px;
  border-radius: 1159px;
  border: 1px solid var(--hm-border-strong);
  background: var(--hm-surface-subtle);
  color: var(--hm-text);
  font-size: 17.5px;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.hm-top-btn-ai svg {
  color: var(--hm-purple-soft-text);
}

.hm-top-btn-ai:hover,
.hm-top-btn-ai[aria-expanded="true"] {
  border-color: var(--hm-purple);
  background: var(--hm-purple-soft);
}

.hm-top-circle-btn {
  width: 45px;
  height: 45px;
  border-radius: 1159px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--hm-text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.hm-top-circle-btn:hover {
  background: var(--hm-surface-hover);
  color: var(--hm-text);
}

.hm-top-circle-btn[aria-expanded="true"] {
  background: var(--hm-surface-active);
  border-color: var(--hm-border-strong);
  color: var(--hm-text);
}

.hm-avatar-btn {
  width: 45px;
  height: 45px;
  border-radius: 1159px;
  border: 1px solid var(--hm-purple-border);
  background: var(--hm-purple-soft);
  color: var(--hm-purple-soft-text);
  font-weight: 600;
  font-size: 18.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 2px;
}

/* ==========================================================================
   MAIN BODY SHELL (#hm-body-row)
   ========================================================================== */
#hm-body-row {
  flex: 1;
  min-height: 0;
  display: flex;
  width: 100%;
  overflow: hidden;
  background: var(--hm-chrome-bg);
}

#hm-body-row > #rl-content:not([hidden]) {
  flex: 1;
  min-width: 0;
  height: 100% !important;
  display: flex !important;
  background: var(--hm-chrome-bg);
}

/* Left Sidebar (#rl-left) */
body.hm-shell-ready #rl-left {
  width: 299px !important;
  min-width: 299px !important;
  max-width: 299px !important;
  resize: none !important;
  overflow: visible !important;
  background: var(--hm-chrome-bg) !important;
  border: none !important;
  border-right: 1px solid var(--hm-hairline) !important;
  display: flex;
  flex-direction: column;
  padding: 21px 16px 16px 16px;
  box-sizing: border-box;
  position: relative;
}

/* Hide legacy SnappyMail controls cleanly when Hostinger nav owns #rl-left */
body.hm-shell-ready:not(.hm-login-screen) #rl-left #V-MailFolderList,
body.hm-shell-ready:not(.hm-login-screen) #rl-left .b-folders,
body.hm-shell-ready.hm-mode-settings #rl-left #V-SettingsMenu {
  display: none !important;
}

#hm-sidebar-mailbox,
#hm-sidebar-settings {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

#hm-sidebar-mailbox[hidden],
#hm-sidebar-settings[hidden] {
  display: none !important;
}

.hm-compose-cta {
  width: 100%;
  height: 56px;
  border-radius: 14px;
  border: none;
  background: var(--hm-purple);
  color: #ffffff;
  font-size: 18.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  margin-bottom: 19px;
  transition: background 0.15s ease, transform 0.1s ease;
}

.hm-compose-cta:hover {
  background: var(--hm-purple-hover);
}

.hm-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 2px;
}

.hm-nav-item {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--hm-text-secondary);
  font-size: 18px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease, color 0.12s ease;
}

.hm-nav-item:hover {
  background: var(--hm-surface-hover);
  color: var(--hm-text);
}

.hm-nav-item.active {
  background: var(--hm-surface-active);
  color: var(--hm-text);
  font-weight: 600;
}

.hm-nav-item-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.hm-nav-item-left span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hm-nav-badge {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--hm-text-muted);
  padding: 1px 8px;
  border-radius: 1159px;
  background: var(--hm-surface-subtle);
}

.hm-nav-mini-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--hm-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.hm-nav-mini-btn:hover {
  background: var(--hm-surface-active);
  color: var(--hm-text);
}

.hm-nav-sublist {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 27px;
}

.hm-nav-sublist .hm-nav-item {
  height: 43px;
  font-size: 17.5px;
}

/* Sidebar Bottom Footer */
.hm-sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hm-quota-box {
  padding: 6px 2px 8px;
}

.hm-quota-track {
  width: 100%;
  height: 3px;
  background: var(--hm-border);
  border-radius: 1159px;
  overflow: hidden;
  margin-bottom: 10px;
}

.hm-quota-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #1e52b8);
  border-radius: 1159px;
}

.hm-quota-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14.5px;
  color: var(--hm-text-muted);
}

.hm-quota-upgrade {
  background: none;
  border: none;
  padding: 0;
  color: var(--hm-text);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}

.hm-sidebar-foot-btn {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--hm-border);
  background: var(--hm-surface);
  color: var(--hm-text);
  font-size: 17px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.hm-sidebar-foot-btn:hover {
  background: var(--hm-surface-hover);
  border-color: var(--hm-border-strong);
}

.hm-setup-pill-btn {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  border: 1px solid #283959;
  background: #111827;
  color: #ffffff;
  font-size: 17px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
}

.hm-setup-pill-btn:hover {
  background: #1c283d;
}

/* ==========================================================================
   MAIN RIGHT WORKSPACE FRAME (#rl-right)
   ========================================================================== */
body.hm-shell-ready #rl-right:not([hidden]) {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex !important;
  background: var(--hm-canvas-bg) !important;
  border: none !important;
  border-radius: 0 !important;
  overflow: hidden;
  margin-top: 0 !important;
}

body.hm-shell-ready.hm-mode-settings #rl-right:not([hidden]) {
  background: var(--hm-settings-canvas-bg) !important;
}

/* Mailbox split/single handling */
body.hm-shell-ready #rl-right > #V-MailMessageList,
body.hm-shell-ready #V-MailMessageList > .messageList {
  background: var(--hm-canvas-bg) !important;
  color: var(--hm-text) !important;
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  width: 100%;
  height: 100% !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  resize: none !important;
}

html.sm-msgView-side body.hm-shell-ready #V-MailMessageList > .messageList {
  border-right: 1px solid var(--hm-hairline) !important;
}

html.sm-msgView-side body.hm-shell-ready #V-MailMessageList {
  flex: 0 0 38% !important;
  min-width: 454px !important;
  max-width: 626px !important;
}

html.sm-msgView-side body.hm-shell-ready #V-MailMessageList > .messageList {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

html:not(.sm-msgView-side) body.hm-shell-ready.hm-message-open #V-MailMessageList,
html:not(.sm-msgView-side) #rl-right.message-selected #V-MailMessageList {
  display: none !important;
}

/* Hide legacy SnappyMail list top/bottom toolbars & old search */
body.hm-shell-ready #V-MailMessageList .btn-toolbar,
body.hm-shell-ready #V-MailMessageList .second-toolbar,
body.hm-shell-ready #V-MailMessageList .b-footer,
body.hm-shell-ready #V-MailMessageList .resizer {
  display: none !important;
}

/* Hostinger injected Message List Header */
#hm-list-header {
  padding: 27px 32px 16px;
  background: var(--hm-canvas-bg);
  flex-shrink: 0;
}

.hm-list-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 19px;
}

.hm-list-title {
  margin: 0;
  font-size: 26.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--hm-text);
  line-height: 1.25;
}

.hm-list-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--hm-text-secondary);
}

.hm-sort-btn,
.hm-page-btn {
  width: 37px;
  height: 37px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--hm-text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hm-sort-btn:hover,
.hm-page-btn:not(:disabled):hover {
  background: var(--hm-surface-hover);
  color: var(--hm-text);
}

.hm-page-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.hm-page-label {
  font-size: 17px;
  font-weight: 500;
  color: var(--hm-text-secondary);
  min-width: 35px;
  text-align: center;
}

.hm-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hm-check-menu-wrap {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 8px;
  border-radius: 9px;
  position: relative;
}

.hm-check-menu-wrap:hover {
  background: var(--hm-surface-hover);
}

.hm-master-checkbox {
  width: 21px;
  height: 21px;
  accent-color: var(--hm-purple);
  cursor: pointer;
  margin: 0;
}

.hm-filter-pill {
  height: 39px;
  padding: 0 17px;
  border-radius: 1159px;
  border: 1px solid var(--hm-border);
  background: transparent;
  color: var(--hm-text-secondary);
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s ease;
}

.hm-filter-pill:hover {
  background: var(--hm-surface-hover);
  color: var(--hm-text);
}

.hm-filter-pill.active {
  background: var(--hm-pill-active-bg);
  color: var(--hm-pill-active-text);
  border-color: var(--hm-pill-active-bg);
  font-weight: 600;
}

.hm-bulk-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  padding: 2px 10px;
  border-radius: 10px;
  background: var(--hm-purple-soft);
  border: 1px solid var(--hm-purple-border);
}

.hm-bulk-bar[hidden] {
  display: none !important;
}

.hm-bulk-btn {
  height: 35px;
  padding: 0 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--hm-purple-soft-text);
  font-size: 16px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.hm-bulk-btn:hover {
  background: rgba(30, 82, 184, 0.16);
}

/* Message List Rows */
body.hm-shell-ready #V-MailMessageList .b-content {
  padding: 0 21px 27px;
  background: var(--hm-canvas-bg) !important;
}

body.hm-shell-ready #V-MailMessageList .messageListItem {
  background: transparent !important;
  color: var(--hm-text-secondary) !important;
  border: none !important;
  border-bottom: 1px solid var(--hm-hairline) !important;
  min-height: 61px;
  transition: background 0.1s ease;
  padding: 8px 16px !important;
  display: flex !important;
  align-items: center !important;
  line-height: 1.45 !important;
}

body.hm-shell-ready #V-MailMessageList .messageListItem > div + div {
  display: flex !important;
  align-items: center !important;
  gap: 10px;
  padding: 0 !important;
  min-width: 0;
  width: 100%;
}

body.hm-shell-ready #V-MailMessageList .messageListItem .messageCheckbox {
  display: flex !important;
  align-items: center !important;
  justify-content: center;
  padding: 0 8px 0 0 !important;
  margin: 0 !important;
  flex-shrink: 0;
}

body.hm-shell-ready #V-MailMessageList .messageListItem .messageCheckbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--hm-purple);
}

body.hm-shell-ready #V-MailMessageList .messageListItem .flagParent {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center;
  margin: 0 2px 0 0 !important;
  min-width: 27px;
  font-size: 21px !important;
  line-height: 1 !important;
  flex-shrink: 0;
}

body.hm-shell-ready #V-MailMessageList .messageListItem .sizeParent {
  display: none !important;
}

body.hm-shell-ready #V-MailMessageList .messageListItem .attachmentParent {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center;
  margin: 0 6px 0 auto !important;
  line-height: 1 !important;
  flex-shrink: 0;
  color: var(--hm-text-muted);
}

body.hm-shell-ready #V-MailMessageList .messageListItem:hover {
  background: var(--hm-surface-hover) !important;
}

body.hm-shell-ready #V-MailMessageList .messageListItem.selected,
body.hm-shell-ready #V-MailMessageList .messageListItem.focused {
  background: var(--hm-surface-active) !important;
}

body.hm-shell-ready #V-MailMessageList .messageListItem.unseen {
  color: var(--hm-text) !important;
}

body.hm-shell-ready #V-MailMessageList .messageListItem.unseen .senderParent,
body.hm-shell-ready #V-MailMessageList .messageListItem.unseen .subjectParent,
body.hm-shell-ready #V-MailMessageList .messageListItem.unseen .subjectParent span {
  color: var(--hm-text) !important;
  font-weight: 600 !important;
}

body.hm-shell-ready #V-MailMessageList .messageListItem .senderParent,
body.hm-shell-ready #V-MailMessageList .messageListItem .subjectParent {
  color: inherit !important;
  font-size: 18px;
  line-height: 1.4 !important;
}

body.hm-shell-ready #V-MailMessageList .messageListItem time {
  color: var(--hm-text-muted) !important;
  font-size: 17px !important;
  opacity: 1 !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end;
  min-width: 0 !important;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Column View (Coluna) alignment */
html.sm-msgView-side body.hm-shell-ready #V-MailMessageList .messageListItem {
  padding: 14px 19px !important;
  align-items: center !important;
}

html.sm-msgView-side body.hm-shell-ready #V-MailMessageList .messageListItem > div + div {
  flex-wrap: wrap !important;
  align-items: center !important;
  row-gap: 6px;
  column-gap: 8px;
}

html.sm-msgView-side body.hm-shell-ready #V-MailMessageList .messageListItem .subjectParent {
  width: calc(100% - 64px) !important;
  flex: 1 0 auto;
}

body.hm-shell-ready #V-MailMessageList .messageListItem .flagOn {
  color: #f5b301 !important;
}

body.hm-shell-ready #V-MailMessageList .messageListItem.hm-filtered-out {
  display: none !important;
}

body.hm-shell-ready #V-MailMessageList .listEmptyMessage,
body.hm-shell-ready #V-MailMessageList .hm-filter-empty-msg {
  padding: 64px 32px;
  text-align: center;
  color: var(--hm-text-muted);
  font-size: 18px;
}

body.hm-shell-ready #V-MailMessageList .hm-filter-empty-msg[hidden] {
  display: none !important;
}

/* Scheduled Empty State Overlay inside list pane */
#hm-scheduled-view {
  position: absolute;
  inset: 0;
  background: var(--hm-canvas-bg);
  z-index: 8;
  display: flex;
  flex-direction: column;
  padding: 27px 32px;
}

#hm-scheduled-view[hidden] {
  display: none !important;
}

html.sm-msgView-side #hm-scheduled-view {
  right: auto;
  width: 38%;
  min-width: 454px;
  max-width: 626px;
  border-right: 1px solid var(--hm-hairline);
  box-sizing: border-box;
}

.hm-scheduled-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 454px;
  margin: 0 auto;
}

.hm-feature-badge-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--hm-purple-soft);
  color: var(--hm-purple-soft-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 21px;
}

.hm-scheduled-title {
  font-size: 19.5px;
  font-weight: 700;
  color: var(--hm-text);
  margin: 0 0 10px;
}

.hm-scheduled-desc {
  font-size: 17.5px;
  line-height: 1.5;
  color: var(--hm-text-muted);
  margin: 0 0 24px;
}

.hm-cta-contrast {
  height: 51px;
  padding: 0 27px;
  border-radius: 12px;
  border: none;
  background: var(--hm-pill-active-bg);
  color: var(--hm-pill-active-text);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
}

/* ==========================================================================
   MESSAGE READING PANE (#V-MailMessageView / .messageView)
   Component-specific ALWAYS LIGHT READING SURFACE (per Screenshot 4)
   ========================================================================== */
body.hm-shell-ready #V-MailMessageView {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Split empty placeholder in dark/light mode when no email is open */
body.hm-shell-ready:not(.hm-message-open) #V-MailMessageView {
  background: var(--hm-canvas-bg) !important;
  color: var(--hm-text-secondary) !important;
}

html:not(.sm-msgView-side) body.hm-shell-ready:not(.hm-message-open) #V-MailMessageView {
  display: none !important;
}

body.hm-shell-ready:not(.hm-message-open) #V-MailMessageView .b-message-view-desc {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 100%;
  color: var(--hm-text-secondary) !important;
  font-size: 18px;
}

body.hm-shell-ready:not(.hm-message-open) #V-MailMessageView .top-toolbar,
body.hm-shell-ready:not(.hm-message-open) #V-MailMessageView .b-toolbar,
body.hm-shell-ready:not(.hm-message-open) #V-MailMessageView .b-content {
  display: none !important;
}

/* When a message IS open: unified Light/Dark reading frame + crisp email sheet */
body.hm-shell-ready.hm-message-open #V-MailMessageView,
body.hm-shell-ready #rl-right.message-selected #V-MailMessageView {
  background-color: var(--hm-canvas-bg) !important;
  color: var(--hm-text) !important;
  accent-color: #1e52b8;
  padding: 0 37px 37px;
  overflow-y: auto;
  box-sizing: border-box;
}

/* Hide legacy SnappyMail view toolbar when our reading toolbar mounts */
body.hm-shell-ready #V-MailMessageView .top-toolbar,
body.hm-shell-ready #V-MailMessageView .messageView > .b-toolbar,
body.hm-shell-ready #V-MailMessageView .messageView > .btn-toolbar {
  display: none !important;
}

#hm-msgview-toolbar {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 21px 0 16px;
  background: var(--hm-canvas-bg);
  color: var(--hm-text-secondary);
  position: sticky;
  top: 0;
  z-index: 5;
}

body.hm-shell-ready.hm-message-open #hm-msgview-toolbar,
body.hm-shell-ready #rl-right.message-selected #hm-msgview-toolbar {
  display: flex;
}

.hm-read-icon-btn {
  width: 43px;
  height: 43px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--hm-text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hm-read-icon-btn:hover {
  background: var(--hm-surface-subtle);
  color: var(--hm-text);
}

.hm-summarize-btn {
  height: 43px;
  padding: 0 17px;
  border-radius: 10px;
  border: 1px solid var(--hm-border);
  background: var(--hm-surface);
  color: var(--hm-text);
  font-size: 17.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  margin-left: 6px;
}

.hm-summarize-btn:hover {
  background: var(--hm-purple-soft);
  border-color: var(--hm-purple-border);
  color: var(--hm-purple-soft-text);
}

.hm-summarize-btn svg {
  color: var(--hm-purple-soft-text);
}

body.hm-shell-ready.hm-message-open #V-MailMessageView .b-content,
body.hm-shell-ready #rl-right.message-selected #V-MailMessageView .b-content {
  background: var(--hm-canvas-bg) !important;
  color: var(--hm-text) !important;
  padding: 0 !important;
  overflow: visible !important;
}

body.hm-shell-ready.hm-message-open #V-MailMessageView .bodyText,
body.hm-shell-ready #rl-right.message-selected #V-MailMessageView .bodyText,
body.hm-shell-ready #messageItem .b-text-part {
  color-scheme: only light;
  background: #ffffff !important;
  color: #1f2328 !important;
  font-size: 18.5px;
  line-height: 1.65;
  padding: 27px 29px !important;
  margin: 0 !important;
}

body.hm-shell-ready #V-MailMessageView .messageItemHeader .subjectParent {
  font-size: 21px;
}

body.hm-shell-ready.hm-message-open #V-MailMessageView .attachmentsPlace,
body.hm-shell-ready #rl-right.message-selected #V-MailMessageView .attachmentsPlace {
  background: var(--hm-surface);
  border-color: var(--hm-border);
  color: var(--hm-text);
}

#hm-read-bottom-actions {
  display: none;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}

body.hm-shell-ready.hm-message-open #hm-read-bottom-actions,
body.hm-shell-ready #rl-right.message-selected #hm-read-bottom-actions {
  display: flex;
}

.hm-read-reply-btn {
  height: 48px;
  padding: 0 21px;
  border-radius: 10px;
  border: 1px solid var(--hm-border);
  background: var(--hm-surface);
  color: var(--hm-text);
  font-size: 18px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.hm-read-reply-btn:hover {
  background: var(--hm-surface-subtle);
}

/* ==========================================================================
   DETAILED SETTINGS PANELS (Signature, Alias, Filters, Autoresponder, AI,
   Connect Apps, Allow/Block Lists, Import Emails)
   ========================================================================== */
.hm-settings-page-head {
  margin-bottom: 6px;
}

.hm-settings-page-head h1 {
  margin: 0 0 8px;
  font-size: 26.5px;
  font-weight: 700;
  color: var(--hm-text);
  letter-spacing: -0.02em;
}

.hm-settings-page-head p {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
  color: var(--hm-text-secondary);
}

.hm-empty-center-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 37px 37px;
  gap: 14px;
}

.hm-empty-center-card h3 {
  margin: 8px 0 0;
  font-size: 21.5px;
  font-weight: 700;
  color: var(--hm-text);
}

.hm-empty-center-card p {
  margin: 0 0 10px;
  max-width: 587px;
  font-size: 17.5px;
  line-height: 1.5;
  color: var(--hm-text-secondary);
}

.hm-hero-tile {
  width: 59px;
  height: 59px;
  border-radius: 16px;
  background: var(--hm-surface-subtle);
  color: var(--hm-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
}

.hm-hero-tile.purple-solid {
  width: 74px;
  height: 74px;
  border-radius: 19px;
  background: linear-gradient(135deg, #1e52b8 0%, #3b82f6 100%);
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(30, 82, 184, 0.25);
}

.hm-info-banner {
  background: var(--hm-purple-soft);
  border-radius: 14px;
  padding: 17px 21px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 19px;
  font-size: 17.5px;
  line-height: 1.45;
  color: var(--hm-text);
}

.hm-info-banner-left {
  display: flex;
  align-items: center;
  gap: 15px;
  text-align: left;
}

.hm-info-banner-icon {
  color: var(--hm-purple-soft-text);
  flex-shrink: 0;
  display: inline-flex;
}

/* Filters header layout */
.hm-filters-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.hm-filters-hero-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 19px;
}

.hm-filters-illustration {
  width: 226px;
  height: 160px;
  position: relative;
  flex-shrink: 0;
  background-image: linear-gradient(to right, var(--hm-hairline) 1px, transparent 1px),
    linear-gradient(to bottom, var(--hm-hairline) 1px, transparent 1px);
  background-size: 37px 37px;
  border-radius: 16px;
}

.hm-illus-tile {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--hm-surface);
  border: 1px solid var(--hm-border);
  box-shadow: 0 8px 19px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hm-purple-soft-text);
}

/* Date grid & rich editor for Autoresponder */
.hm-date-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 19px;
  margin-bottom: 21px;
}

.hm-input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.hm-input-icon-left {
  position: absolute;
  left: 15px;
  color: var(--hm-text-muted);
  display: inline-flex;
  pointer-events: none;
}

.hm-input-with-icon .hm-input {
  padding-left: 46px !important;
}

.hm-editor-box {
  border: 1px solid var(--hm-input-border);
  border-radius: 14px;
  background: var(--hm-surface);
  overflow: hidden;
  margin-bottom: 21px;
}

.hm-editor-box:focus-within {
  border-color: var(--hm-purple);
}

.hm-editor-area {
  min-height: 194px;
  padding: 19px 21px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--hm-text);
  outline: none;
  word-break: break-word;
}

.hm-editor-area:empty::before {
  content: attr(data-placeholder);
  color: var(--hm-text-muted);
  pointer-events: none;
}

.hm-editor-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 16px;
  border-top: 1px solid var(--hm-hairline);
  background: var(--hm-surface);
}

.hm-editor-select {
  border: none;
  background: transparent;
  color: var(--hm-text-secondary);
  font-size: 16px;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
}

.hm-editor-select:hover {
  background: var(--hm-surface-hover);
}

.hm-editor-tool-btn {
  width: 35px;
  height: 35px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--hm-text-secondary);
  font-size: 17px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hm-editor-tool-btn:hover {
  background: var(--hm-surface-hover);
  color: var(--hm-text);
}

/* Pill tabs & client switcher (AI Personalization, Connect Apps) */
.hm-pill-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
}

.hm-pill-tab {
  height: 45px;
  padding: 0 21px;
  border-radius: 1159px;
  border: 1px solid var(--hm-border);
  background: var(--hm-surface);
  color: var(--hm-text);
  font-size: 17.5px;
  font-weight: 600;
  cursor: pointer;
}

.hm-pill-tab.active {
  background: var(--hm-pill-active-bg);
  color: var(--hm-pill-active-text);
  border-color: var(--hm-pill-active-bg);
}

.hm-input[readonly].hm-input-muted {
  background: var(--hm-surface-subtle) !important;
  color: var(--hm-text-muted) !important;
}

.hm-style-card {
  border: 1px solid var(--hm-border);
  border-radius: 14px;
  padding: 19px 21px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Connect Apps & Devices */
.hm-client-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 21px;
}

.hm-client-pill {
  height: 48px;
  padding: 0 19px;
  border-radius: 1159px;
  border: 1px solid var(--hm-border);
  background: var(--hm-surface);
  color: var(--hm-text);
  font-size: 17.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.hm-client-pill.active {
  background: var(--hm-pill-active-bg);
  color: var(--hm-pill-active-text);
  border-color: var(--hm-pill-active-bg);
}

.hm-steps-box {
  background: var(--hm-surface-subtle);
  border-radius: 16px;
  padding: 24px 27px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hm-steps-badge-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--hm-purple-soft-text);
  margin-bottom: 6px;
}

.hm-step-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 17.5px;
  line-height: 1.5;
  color: var(--hm-text);
}

.hm-step-num {
  width: 29px;
  height: 29px;
  border-radius: 8px;
  background: var(--hm-surface);
  border: 1px solid var(--hm-border);
  color: var(--hm-text-secondary);
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hm-copy-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 12px;
  border-radius: 8px;
  border: 1px solid var(--hm-border);
  background: var(--hm-surface);
  color: var(--hm-text);
  font-family: var(--hm-font);
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
}

.hm-copy-chip:hover {
  border-color: var(--hm-purple);
}

.hm-steps-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 8px;
  font-size: 17px;
}

.hm-link-purple {
  color: var(--hm-purple-soft-text);
  font-weight: 600;
  background: transparent;
  border: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
}

.hm-link-purple:hover {
  text-decoration: underline;
}

/* Allow / Block Lists & Import Grid */
.hm-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 19px;
}

.hm-allowblock-section {
  display: flex;
  flex-direction: column;
  gap: 19px;
}

.hm-allowblock-section + .hm-allowblock-section {
  margin-top: 29px;
  padding-top: 29px;
  border-top: 1px solid var(--hm-hairline);
}

.hm-subcard {
  border: 1px solid var(--hm-border);
  border-radius: 16px;
  padding: 24px;
  background: var(--hm-surface);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hm-status-tile {
  width: 45px;
  height: 45px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hm-status-tile.allow {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}

.hm-status-tile.block {
  background: rgba(225, 29, 72, 0.12);
  color: #e11d48;
}

.hm-inline-add-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hm-allowblock-box {
  border: 1px solid var(--hm-hairline);
  border-radius: 14px;
  min-height: 200px;
  padding: 16px;
  background: var(--hm-surface-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hm-allowblock-empty {
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--hm-text-muted);
  font-size: 17px;
  text-align: center;
}

.hm-allowblock-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--hm-surface);
  border: 1px solid var(--hm-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hm-entry-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--hm-surface);
  border: 1px solid var(--hm-border);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 17px;
}

/* Import Emails option cards */
.hm-import-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 19px;
  width: 100%;
  max-width: 694px;
  margin: 14px 0 10px;
  text-align: left;
}

.hm-import-option {
  border: 1px solid var(--hm-border);
  border-radius: 16px;
  padding: 24px;
  background: var(--hm-surface);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hm-import-option:hover {
  border-color: var(--hm-purple);
  box-shadow: 0 8px 24px rgba(30, 82, 184, 0.10);
}

.hm-import-option strong {
  font-size: 18px;
  font-weight: 700;
  color: var(--hm-text);
  margin-top: 6px;
}

.hm-import-option span {
  font-size: 16px;
  line-height: 1.45;
  color: var(--hm-text-secondary);
}

@media (max-width: 720px) {
  .hm-grid-2,
  .hm-date-grid,
  .hm-import-grid {
    grid-template-columns: 1fr;
  }

  .hm-filters-hero {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ==========================================================================
   RIGHT AI AGENT DRAWER (#hm-ai-drawer)
   ========================================================================== */
#hm-ai-drawer {
  width: 427px;
  min-width: 427px;
  background: var(--hm-chrome-bg);
  border-left: 1px solid var(--hm-border);
  display: flex;
  flex-direction: column;
  color: var(--hm-text);
  z-index: 25;
}

#hm-ai-drawer[hidden] {
  display: none !important;
}

.hm-ai-head {
  height: 70px;
  padding: 0 21px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--hm-hairline);
}

.hm-ai-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 18.5px;
  font-weight: 600;
}

.hm-ai-title svg {
  color: var(--hm-purple-soft-text);
}

.hm-ai-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 24px 21px;
  display: flex;
  flex-direction: column;
}

.hm-ai-hero {
  margin: auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 27px 0 16px;
}

.hm-ai-emblem {
  width: 90px;
  height: 90px;
  margin-bottom: 14px;
}

.hm-ai-hello {
  font-size: 26.5px;
  font-weight: 700;
  margin: 0 0 32px;
  color: var(--hm-text);
}

.hm-ai-prompts {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hm-ai-prompt-card {
  width: 100%;
  padding: 16px 19px;
  border-radius: 14px;
  border: 1px solid var(--hm-border);
  background: var(--hm-surface-subtle);
  color: var(--hm-text-secondary);
  font-size: 17.5px;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.hm-ai-prompt-card:hover {
  border-color: var(--hm-purple-border);
  background: var(--hm-surface-active);
  color: var(--hm-text);
}

.hm-ai-messages {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hm-ai-msg {
  padding: 14px 17px;
  border-radius: 15px;
  font-size: 17.5px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.hm-ai-msg.user {
  align-self: flex-end;
  background: var(--hm-purple);
  color: #ffffff;
  max-width: 88%;
}

.hm-ai-msg.bot {
  align-self: flex-start;
  background: var(--hm-surface-subtle);
  border: 1px solid var(--hm-border);
  color: var(--hm-text);
  width: 100%;
  box-sizing: border-box;
}

.hm-ai-msg-action {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hm-ai-footer {
  padding: 16px 21px 19px;
  border-top: 1px solid var(--hm-hairline);
}

.hm-ai-input-box {
  display: flex;
  flex-direction: column;
  background: var(--hm-surface-subtle);
  border: 1px solid var(--hm-border);
  border-radius: 16px;
  padding: 14px 16px;
  gap: 10px;
}

.hm-ai-input-box:focus-within {
  border-color: var(--hm-purple);
}

.hm-ai-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

#hm-ai-input {
  flex: 1;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  color: var(--hm-text) !important;
  font-size: 17.5px !important;
  padding: 0 !important;
}

.hm-ai-send-btn {
  width: 37px;
  height: 37px;
  border-radius: 1159px;
  border: none;
  background: var(--hm-purple);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.hm-ai-disclaimer {
  margin: 10px 0 0;
  font-size: 14px;
  text-align: center;
  color: var(--hm-text-muted);
}

/* ==========================================================================
   POPOVERS & FLOATING PANELS (Tracking, Gear Settings, Account, Setup Guide)
   ========================================================================== */
.hm-popover {
  position: fixed;
  z-index: 900;
  background: var(--hm-surface-elevated);
  border: 1px solid var(--hm-border);
  border-radius: 19px;
  box-shadow: 0 19px 51px rgba(0, 0, 0, 0.28);
  color: var(--hm-text);
  padding: 21px;
  box-sizing: border-box;
}

.hm-popover[hidden] {
  display: none !important;
}

.hm-popover-eye {
  width: 387px;
}

.hm-badge-premium {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: 1159px;
  background: var(--hm-purple-soft);
  color: var(--hm-purple-soft-text);
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 14px;
}

.hm-popover-gear {
  width: 390px;
  padding: 14px 19px;
}

.hm-gear-row {
  width: 100%;
  min-height: 51px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: transparent;
  border: none;
  color: var(--hm-text);
  font-size: 17.5px;
  font-weight: 500;
  padding: 8px 6px;
  cursor: pointer;
  border-radius: 10px;
  text-align: left;
}

.hm-gear-row:hover {
  background: var(--hm-surface-hover);
}

.hm-gear-row-left {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--hm-text);
}

.hm-gear-row-left svg {
  color: var(--hm-text-secondary);
}

.hm-gear-divider {
  height: 1px;
  background: var(--hm-border);
  margin: 10px 0;
}

.hm-layout-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 8px;
  border-radius: 10px;
  cursor: pointer;
}

.hm-layout-choice:hover {
  background: var(--hm-surface-hover);
}

.hm-radio-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17.5px;
  font-weight: 500;
}

.hm-radio-dot {
  width: 21px;
  height: 21px;
  border-radius: 1159px;
  border: 2px solid var(--hm-border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hm-layout-choice.active .hm-radio-dot {
  border-color: var(--hm-purple);
}

.hm-layout-choice.active .hm-radio-dot::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 1159px;
  background: var(--hm-purple);
}

.hm-layout-thumb {
  width: 64px;
  height: 43px;
  border-radius: 8px;
  border: 1.5px solid var(--hm-border-strong);
  background: var(--hm-surface-subtle);
  padding: 3px;
  box-sizing: border-box;
  display: flex;
  gap: 2px;
}

.hm-layout-choice.active .hm-layout-thumb {
  border-color: var(--hm-purple);
  background: var(--hm-purple-soft);
}

/* Switch toggle */
.hm-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
}

.hm-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.hm-switch-slider {
  position: absolute;
  inset: 0;
  border-radius: 1159px;
  background: var(--hm-border-strong);
  transition: background 0.15s ease;
  cursor: pointer;
}

.hm-switch-slider::before {
  content: "";
  position: absolute;
  width: 19px;
  height: 19px;
  left: 3px;
  top: 3px;
  border-radius: 1159px;
  background: #ffffff;
  transition: transform 0.15s ease;
}

.hm-switch input:checked + .hm-switch-slider {
  background: var(--hm-purple);
}

.hm-switch input:checked + .hm-switch-slider::before {
  transform: translateX(19px);
}

/* Theme select inside gear popover */
.hm-theme-dropdown {
  background: var(--hm-surface-subtle);
  border: 1px solid var(--hm-border);
  border-radius: 10px;
  padding: 6px 10px;
  color: var(--hm-purple-soft-text);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}

/* Account Popover */
.hm-popover-account {
  width: 443px;
  padding: 21px;
}

.hm-acc-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.hm-acc-avatar-lg {
  width: 53px;
  height: 53px;
  border-radius: 1159px;
  background: var(--hm-purple-soft);
  color: var(--hm-purple-soft-text);
  font-weight: 700;
  font-size: 19.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.hm-acc-pencil-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 24px;
  height: 24px;
  border-radius: 1159px;
  background: var(--hm-surface-elevated);
  border: 1px solid var(--hm-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--hm-text);
}

.hm-credits-bar-track {
  width: 100%;
  height: 7px;
  border-radius: 1159px;
  background: var(--hm-border);
  overflow: hidden;
  margin: 10px 0;
}

.hm-credits-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #60a5fa, #1e52b8);
  border-radius: 1159px;
  transition: width 0.2s ease;
}

.hm-acc-pill-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--hm-purple-soft);
  border: 1px solid var(--hm-purple-border);
  margin: 16px 0 8px;
  font-size: 17px;
  font-weight: 600;
}

/* Always-dark Setup Guide Floating Card (Screenshots 6, 7, 8, 12) */
#hm-setup-popover {
  position: fixed;
  left: 21px;
  bottom: 78px;
  width: 374px;
  z-index: 905;
  background: #151e2e;
  border: 1px solid #2c3e61;
  border-radius: 19px;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.55);
  color: #f1f5f9;
  padding: 21px;
  box-sizing: border-box;
}

#hm-setup-popover[hidden] {
  display: none !important;
}

#hm-setup-popover .hm-layout-choice:hover {
  background: #202e47;
}
#hm-setup-popover .hm-radio-dot {
  border-color: #4d689e;
}
#hm-setup-popover .hm-layout-thumb {
  border-color: #3e5685;
  background: #202e47;
}

.hm-setup-check-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #1e2b42;
  border: 1px solid #283959;
  color: #f1f5f9;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 8px;
  text-align: left;
}

.hm-setup-check-row:hover {
  background: #273857;
}

.hm-setup-check-row.done {
  color: #94a5c4;
}

/* ==========================================================================
   SETTINGS EXPERIENCE (Screenshots 9, 10, 11, 14, 15)
   ========================================================================== */
#hm-sidebar-settings {
  padding-top: 8px;
}

.hm-settings-back-btn {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  border: 1px solid var(--hm-border);
  background: var(--hm-surface);
  color: var(--hm-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-bottom: 19px;
}

.hm-settings-back-btn:hover {
  background: var(--hm-surface-hover);
}

.hm-settings-heading {
  font-size: 26.5px;
  font-weight: 700;
  margin: 0 0 21px 2px;
  color: var(--hm-text);
}

.hm-badge-beta {
  font-size: 14px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 1159px;
  background: var(--hm-purple-soft);
  color: var(--hm-purple-soft-text);
}

/* Hostinger Settings Panel mounted in #rl-right */
#hm-settings-canvas {
  flex: 1;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 48px 37px 86px;
  box-sizing: border-box;
  background: var(--hm-settings-canvas-bg);
}

#hm-settings-canvas[hidden] {
  display: none !important;
}

body.hm-mode-settings #rl-right > #V-MailMessageList,
body.hm-mode-settings #rl-right > #V-MailMessageView,
body.hm-mode-settings.hm-hostinger-settings-active #rl-right > #V-SettingsPane {
  display: none !important;
}

body.hm-mode-settings #V-SettingsPane {
  flex: 1;
  width: 100%;
  overflow-y: auto;
  padding: 37px;
  background: var(--hm-settings-canvas-bg) !important;
  color: var(--hm-text) !important;
  box-sizing: border-box;
}

body.hm-mode-settings #V-SettingsPane .form-horizontal,
body.hm-mode-settings #V-SettingsPane .b-content {
  background: var(--hm-surface) !important;
  border: 1px solid var(--hm-border);
  border-radius: 19px;
  padding: 32px;
  max-width: 1041px;
  margin: 0 auto;
  color: var(--hm-text) !important;
}

body.hm-mode-settings #V-SettingsPane legend,
body.hm-mode-settings #V-SettingsPane label {
  color: var(--hm-text) !important;
}

.hm-settings-container {
  max-width: 1041px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 21px;
}

.hm-card {
  background: var(--hm-surface);
  border: 1px solid var(--hm-border);
  border-radius: 19px;
  padding: 32px;
  color: var(--hm-text);
}

.hm-card-title {
  font-size: 21.5px;
  font-weight: 700;
  margin: 0 0 21px;
  color: var(--hm-text);
}

.hm-recipient-preview {
  background: var(--hm-surface-subtle);
  border-radius: 14px;
  padding: 29px 21px;
  text-align: center;
  margin-bottom: 27px;
}

.hm-recipient-caption {
  font-size: 15px;
  color: var(--hm-text-muted);
  margin: 0 0 16px;
}

.hm-recipient-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--hm-surface);
  border: 1px solid var(--hm-border);
  border-radius: 14px;
  padding: 16px 27px;
  font-size: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.hm-dot-purple {
  width: 9px;
  height: 9px;
  border-radius: 1159px;
  background: var(--hm-purple);
}

.hm-field {
  margin-bottom: 21px;
}

.hm-field label {
  display: block;
  font-size: 17.5px;
  font-weight: 600;
  color: var(--hm-text);
  margin-bottom: 9px;
}

.hm-input,
.hm-textarea,
.hm-select {
  width: 100%;
  border: 1px solid var(--hm-input-border) !important;
  border-radius: 10px !important;
  background: var(--hm-surface) !important;
  color: var(--hm-text) !important;
  font-size: 18px !important;
  padding: 12px 16px !important;
  box-sizing: border-box;
  outline: none !important;
  box-shadow: none !important;
}

.hm-input:focus,
.hm-textarea:focus,
.hm-select:focus {
  border-color: var(--hm-purple) !important;
}

.hm-field-hint {
  font-size: 15px;
  color: var(--hm-text-muted);
  margin-top: 8px;
}

.hm-btn-primary {
  height: 48px;
  padding: 0 24px;
  border-radius: 10px;
  border: none;
  background: var(--hm-purple);
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
}

.hm-btn-primary:hover {
  background: var(--hm-purple-hover);
}

.hm-btn-primary:disabled {
  background: var(--hm-border);
  color: var(--hm-text-muted);
  cursor: default;
}

.hm-btn-secondary {
  height: 48px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid var(--hm-border);
  background: var(--hm-surface);
  color: var(--hm-text);
  font-size: 17.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
}

.hm-btn-secondary:hover {
  background: var(--hm-surface-hover);
}

.hm-row-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 21px;
}

.hm-row-card-left {
  display: flex;
  align-items: center;
  gap: 19px;
}

.hm-icon-tile {
  width: 53px;
  height: 53px;
  border-radius: 14px;
  background: var(--hm-surface-subtle);
  color: var(--hm-text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hm-icon-tile.purple {
  background: var(--hm-purple-soft);
  color: var(--hm-purple-soft-text);
}

/* Agentic Mail Grid (Screenshots 10, 11, 14, 15) */
.hm-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 19px;
}

.hm-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.hm-agentic-card {
  border: 1px solid var(--hm-border);
  background: var(--hm-surface);
  border-radius: 19px;
  padding: 27px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hm-agentic-card h4 {
  margin: 6px 0 0;
  font-size: 19px;
  font-weight: 700;
  color: var(--hm-text);
}

.hm-agentic-card p {
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
  color: var(--hm-text-secondary);
  flex: 1;
}

.hm-mini-cap-card {
  border: 1px solid var(--hm-border);
  background: var(--hm-surface-subtle);
  border-radius: 14px;
  padding: 19px;
}

.hm-mcp-clients {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 43px;
  margin: 24px 0 29px;
}

.hm-mcp-client-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  color: var(--hm-text-muted);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.hm-mcp-client-btn.active,
.hm-mcp-client-btn:hover {
  opacity: 1;
  color: var(--hm-text);
}

.hm-code-terminal {
  background: #0a0f18;
  color: #e6eefb;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #202e47;
}

.hm-code-terminal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 21px;
  border-bottom: 1px solid #1c283d;
  font-size: 17px;
  font-weight: 600;
}

.hm-code-terminal pre {
  margin: 0;
  padding: 21px;
  font-family: var(--hm-mono);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: auto;
  color: #d6e2f5;
}

.hm-token-highlight {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 6px;
  background: rgba(217, 119, 6, 0.25);
  color: #fbbf24;
}

/* ==========================================================================
   NATIVE <DIALOG> MODALS (Strict dialog::backdrop + overscroll compliance)
   ========================================================================== */
dialog.hm-dialog {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
  transition: none !important;
  border: 1px solid var(--hm-border);
  border-radius: 21px;
  background: var(--hm-surface-elevated, #ffffff) !important;
  color: var(--hm-text);
  opacity: 1 !important;
  padding: 0;
  width: min(614px, calc(100vw - 43px));
  max-width: calc(100vw - 43px) !important;
  max-height: calc(100dvh - 64px);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

dialog.hm-dialog:modal {
  overscroll-behavior: contain;
}

dialog.hm-dialog::backdrop {
  background: rgba(8, 13, 24, 0.68);
  backdrop-filter: blur(5px);
  overflow: hidden;
  overscroll-behavior: contain;
}

.hm-dialog-head {
  padding: 24px 29px;
  border-bottom: 1px solid var(--hm-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hm-dialog-title {
  margin: 0;
  font-size: 21.5px;
  font-weight: 700;
}

.hm-dialog-body {
  padding: 27px 29px;
  overflow-y: auto;
  max-height: calc(100dvh - 240px);
}

.hm-dialog-foot {
  padding: 19px 29px;
  border-top: 1px solid var(--hm-hairline);
  display: flex;
  justify-content: flex-end;
  gap: 14px;
}

/* Toast notification */
#hm-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  padding: 14px 24px;
  border-radius: 14px;
  background: #111827;
  color: #ffffff;
  border: 1px solid #2c3e61;
  font-size: 17.5px;
  font-weight: 500;
  box-shadow: 0 14px 37px rgba(0, 0, 0, 0.35);
}

#hm-toast[hidden] {
  display: none !important;
}

/* ==========================================================================
   SNAPPYMAIL POPUPS BASE
   ========================================================================== */
body.hm-shell-ready .btn-primary,
body.hm-shell-ready .button-send {
  background: var(--hm-purple) !important;
  border-color: var(--hm-purple) !important;
  color: #ffffff !important;
}

/* ==========================================================================
   LOGIN SCREEN
   ========================================================================== */
body.hm-login-screen #hm-body-row,
body.hm-login-screen #rl-content {
  background: var(--hm-settings-canvas-bg) !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
}

body.hm-login-screen #rl-left,
body.hm-login-screen #rl-right {
  display: none !important;
}

body.hm-login-screen #V-Login {
  background: var(--hm-surface) !important;
  border: 1px solid var(--hm-border) !important;
  border-radius: 21px !important;
  padding: 48px 45px !important;
  box-shadow: 0 27px 66px rgba(0, 0, 0, 0.16) !important;
  width: min(546px, calc(100vw - 43px));
  color: var(--hm-text) !important;
  margin: auto;
  box-sizing: border-box;
}

body.hm-login-screen #V-Login form {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: none !important;
}

body.hm-login-screen #V-Login input[type="email"],
body.hm-login-screen #V-Login input[type="text"],
body.hm-login-screen #V-Login input[type="password"] {
  background: var(--hm-input-bg) !important;
  color: var(--hm-text) !important;
  border: 1px solid var(--hm-input-border) !important;
  border-radius: 12px !important;
  height: 56px;
}

#hm-login-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

#hm-login-brand .hm-brand-logo-svg {
  height: 32px;
  max-width: 174px;
}

body.hm-login-screen #V-Login .buttonLogin,
body.hm-login-screen #V-Login button[type="submit"] {
  background: var(--hm-purple) !important;
  border-color: var(--hm-purple) !important;
  color: #ffffff !important;
  border-radius: 12px !important;
  height: 56px;
  font-weight: 600;
  font-size: 18.5px;
  width: 100%;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */
@media (max-width: 960px) {
  .hm-grid-3,
  .hm-grid-4 {
    grid-template-columns: 1fr;
  }
  .hm-top-btn-ghost span.hm-hide-sm,
  .hm-top-btn-referral span {
    display: none;
  }
}

/* Override Love/Default theme gradients */
.thm-message-list-top-toolbar,
.thm-message-list-bottom-toolbar {
  background-image: none !important;
  background-color: transparent !important;
}

body.hm-shell-ready #V-MailMessageList {
  height: 100%;
  overflow: hidden;
}

body.hm-shell-ready #V-MailMessageList > .messageList {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

body.hm-shell-ready #V-MailMessageList .b-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

/* Attachment pills in reading card */
body.hm-shell-ready.hm-message-open #V-MailMessageView .attachmentItem,
body.hm-shell-ready #rl-right.message-selected #V-MailMessageView .attachmentItem {
  background: var(--hm-surface-subtle) !important;
  border: 1px solid var(--hm-border) !important;
  border-radius: 12px !important;
  color: var(--hm-text) !important;
  padding: 8px 16px !important;
  box-shadow: none !important;
}

body.hm-shell-ready.hm-message-open #V-MailMessageView .attachmentName,
body.hm-shell-ready.hm-message-open #V-MailMessageView .attachmentSize,
body.hm-shell-ready #rl-right.message-selected #V-MailMessageView .attachmentName,
body.hm-shell-ready #rl-right.message-selected #V-MailMessageView .attachmentSize {
  color: var(--hm-text) !important;
}


/* =====================================================================
 * PHASE B PIXEL PARITY & STANDARDIZED SNAPPYMAIL MODALS
 * ===================================================================== */

.hm-quota-box .hm-quota-fill {
  background: linear-gradient(90deg, #3b82f6, #1e52b8) !important;
  min-width: 6px;
}

/* Hide legacy SnappyMail top-right account bar unconditionally */
#V-SystemDropDown,
#rl-right #V-SystemDropDown,
body.hm-shell-ready #V-SystemDropDown {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ---------- Hostinger Reading Pane (#V-MailMessageView - Screenshot 39fcaa47) ---------- */
body.hm-shell-ready #V-MailMessageView {
  background: var(--hm-bg-app) !important;
  height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

body.hm-shell-ready #V-MailMessageView #hm-msgview-toolbar,
body.hm-shell-ready #V-MailMessageView #hm-read-bottom-actions {
  flex-shrink: 0 !important;
}

body.hm-shell-ready #V-MailMessageView .messageView,
body.hm-shell-ready #V-MailMessageView.focused .messageView {
  background: var(--hm-bg-app) !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  height: auto !important;
  min-height: 0 !important;
  flex: 0 0 auto !important;
  overflow: visible !important;
  padding: 0 !important;
}

body.hm-shell-ready #V-MailMessageView .messageView > .b-message {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  flex: 0 0 auto !important;
  overflow: visible !important;
}

/* Subject Header outside the card - zero gray boxes, zero icons */
body.hm-shell-ready #V-MailMessageView .messageView > .b-message > .messageItemHeader {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 19px 0 19px !important;
  margin: 0 !important;
}

body.hm-shell-ready #V-MailMessageView .messageView > .b-message > .messageItemHeader .subjectParent {
  display: flex;
  align-items: center;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}

body.hm-shell-ready #V-MailMessageView .messageView > .b-message > .messageItemHeader .infoParent,
body.hm-shell-ready #V-MailMessageView .messageView > .b-message > .messageItemHeader .flagParent,
body.hm-shell-ready #V-MailMessageView .messageView > .b-message > .messageItemHeader .close,
body.hm-shell-ready #V-MailMessageView .messageView > .b-message > .messageItemHeader > .informationShort,
body.hm-shell-ready #V-MailMessageView .messageView > .b-message > .message-fixed-button-toolbar {
  display: none !important;
}

body.hm-shell-ready #V-MailMessageView .messageView > .b-message > .messageItemHeader .subject {
  font-size: 28px !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--hm-text-primary) !important;
  padding: 0 !important;
  background: transparent !important;
  white-space: normal !important;
  overflow: visible !important;
}

/* Single Rounded Card (#messageItem) */
body.hm-shell-ready #V-MailMessageView #messageItem {
  background: var(--hm-surface-card) !important;
  border: 1px solid var(--hm-border) !important;
  border-radius: 19px !important;
  box-shadow: none !important;
  height: auto !important;
  max-height: none !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  padding: 0 !important;
}

body.hm-shell-ready #V-MailMessageView #messageItem > .messageItemHeader {
  background: transparent !important;
  border-bottom: 1px solid var(--hm-border) !important;
  padding: 24px 29px 19px !important;
  margin: 0 !important;
}

/* Hide legacy verbose time/to/tags rows inside #messageItem header (replaced by #hm-read-sender-bar) */
body.hm-shell-ready #V-MailMessageView #messageItem > .messageItemHeader > div > time.date,
body.hm-shell-ready #V-MailMessageView #messageItem > .messageItemHeader > div > .informationShortWrp,
body.hm-shell-ready #V-MailMessageView #messageItem > .messageItemHeader > .messageTags {
  display: none !important;
}

body.hm-shell-ready #V-MailMessageView #messageItem > .messageItemHeader .informationFull {
  margin-top: 16px;
  padding: 16px 19px;
  background: var(--hm-surface-subtle);
  border: 1px solid var(--hm-border);
  border-radius: 14px;
  font-size: 17px;
  color: var(--hm-text-secondary);
}

#hm-read-sender-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 21px;
}

.hm-read-sender-left {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hm-read-from-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 18px;
  color: var(--hm-text-primary);
}

.hm-read-from-prefix {
  font-weight: 500;
  color: var(--hm-text-secondary);
}

.hm-read-from-name {
  font-weight: 700;
  color: var(--hm-text-primary);
}

.hm-read-from-email {
  font-weight: 400;
  color: var(--hm-text-secondary);
}

.hm-read-rcpt-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  padding: 0;
  font-family: var(--hm-font);
  font-size: 17px;
  color: var(--hm-text-secondary);
  cursor: pointer;
}
.hm-read-rcpt-toggle:hover { color: var(--hm-text-primary); }
.hm-read-rcpt-toggle svg { width: 17px; height: 17px; }

.hm-read-sender-right {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  font-size: 17px;
  color: var(--hm-text-secondary);
}

.hm-read-meta-date {
  white-space: nowrap;
  font-size: 17px;
  color: var(--hm-text-secondary);
}

.hm-read-meta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 37px;
  height: 37px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--hm-text-secondary);
  cursor: pointer;
  padding: 0;
}
.hm-read-meta-icon:hover {
  background: var(--hm-surface-subtle);
  color: var(--hm-text-primary);
}
.hm-read-meta-icon.starred { color: #f59e0b; }
.hm-read-meta-icon svg { width: 20px; height: 20px; }

/* Attachment chips inside reading view */
body.hm-shell-ready #V-MailMessageView .bodySubHeader {
  padding: 0 29px !important;
  margin-top: 16px !important;
}

body.hm-shell-ready #V-MailMessageView .attachmentsPlace {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
}
body.hm-shell-ready #V-MailMessageView .attachmentsPlace > summary {
  display: none !important;
}
body.hm-shell-ready #V-MailMessageView .attachmentList {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 !important;
}
body.hm-shell-ready #V-MailMessageView .attachmentItem {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  padding: 9px 16px !important;
  margin: 0 !important;
  border-radius: 14px !important;
  border: 1px solid var(--hm-border) !important;
  background: var(--hm-surface-subtle) !important;
  cursor: pointer;
  max-width: 374px;
}
body.hm-shell-ready #V-MailMessageView .attachmentName {
  font-size: 17px !important;
  font-weight: 500;
  color: var(--hm-text-primary) !important;
}
body.hm-shell-ready #V-MailMessageView .attachmentSize {
  font-size: 15px !important;
  color: var(--hm-text-secondary) !important;
}

body.hm-shell-ready #V-MailMessageView .bodyText {
  padding: 27px 29px 32px !important;
  font-size: 18.5px !important;
  line-height: 1.65 !important;
  color: var(--hm-text-primary) !important;
  background: transparent !important;
}

#hm-read-bottom-actions {
  margin: 24px 0 0 !important;
}

/* ---------- Modern Native Popovers (Agendar, Reformular, Mais) ---------- */
[popover].hm-popover-menu {
  border: 1px solid var(--hm-border, #e5e7ed);
  border-radius: 16px;
  background: var(--hm-surface-elevated, #ffffff) !important;
  background-color: var(--hm-surface-elevated, #ffffff) !important;
  color: var(--hm-text-primary, #1d1e20);
  box-shadow: 0 19px 48px rgba(15, 16, 22, 0.24);
  padding: 8px;
  min-width: 273px;
  opacity: 1 !important;
  z-index: 9999 !important;
  isolation: isolate;
}

#hm-cmp-schedule-btn {
  anchor-name: --hm-anchor-sched;
}
#hm-cmp-schedule-menu {
  position-anchor: --hm-anchor-sched;
}
#hm-cmp-rephrase-btn {
  anchor-name: --hm-anchor-rephrase;
}
#hm-cmp-rephrase-menu {
  position-anchor: --hm-anchor-rephrase;
}

@supports (position-area: block-end) {
  [popover].hm-popover-menu {
    inset: auto;
    margin: 0 0 10px 0;
    position-area: block-start span-inline-end;
    position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
  }
}

@supports not (position-area: block-end) {
  [popover].hm-popover-menu {
    position: fixed;
    margin: 0;
  }
}

.hm-popover-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--hm-text-primary);
  font-family: var(--hm-font);
  font-size: 17.5px;
  text-align: left;
  cursor: pointer;
}
.hm-popover-item:hover {
  background: var(--hm-surface-subtle);
}
.hm-popover-item svg { width: 20px; height: 20px; color: var(--hm-text-secondary); }

/* ---------- Standardized Design System for ALL SnappyMail Modals & Dropdowns ---------- */
body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose)[open] {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
  background: var(--hm-surface-elevated) !important;
  color: var(--hm-text) !important;
  border: 1px solid var(--hm-border) !important;
  border-radius: 21px !important;
  box-shadow: 0 32px 80px rgba(10, 12, 20, 0.28) !important;
  padding: 0 !important;
  max-height: calc(100dvh - 53px) !important;
  width: min(747px, calc(100vw - 43px));
  max-width: calc(100vw - 43px) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  overscroll-behavior: contain;
  font-family: var(--hm-font) !important;
  z-index: 4100 !important;
}
body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose)::backdrop {
  background: rgba(15, 16, 22, 0.52);
  backdrop-filter: blur(2px);
  overscroll-behavior: contain;
}

/* Modal Header */
body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose) > header {
  background: var(--hm-surface-elevated) !important;
  color: var(--hm-text) !important;
  border-bottom: 1px solid var(--hm-hairline) !important;
  padding: 20px 27px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between;
  gap: 14px;
  flex-shrink: 0;
}
body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose) > header h3 {
  order: 1;
  font-family: var(--hm-font) !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  letter-spacing: -0.015em;
  line-height: 1.3 !important;
  margin: 0 !important;
  color: var(--hm-text) !important;
}
body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose) > header .close {
  order: 99;
  margin: 0 0 0 auto !important;
  width: 39px;
  height: 39px;
  border-radius: 10px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  font-size: 26.5px;
  line-height: 1;
  color: var(--hm-text-muted) !important;
  opacity: 1 !important;
  text-shadow: none !important;
  background: transparent;
}
body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose) > header .close:hover {
  background: var(--hm-surface-subtle) !important;
  color: var(--hm-text) !important;
}

/* Modal Body & Footer */
body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose) .modal-body {
  background: var(--hm-surface-elevated) !important;
  color: var(--hm-text) !important;
  padding: 27px 29px !important;
  flex: 1 1 auto;
  overflow-y: auto;
  margin: 0 !important;
}
body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose) > footer {
  background: var(--hm-surface-elevated) !important;
  border-top: 1px solid var(--hm-hairline) !important;
  padding: 19px 29px !important;
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  border-radius: 0 !important;
}

/* Uniform Form Inputs, Selects, Checkboxes & Buttons inside all Native Modals & Settings */
body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose) input[type="text"],
body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose) input[type="email"],
body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose) input[type="password"],
body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose) input[type="search"],
body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose) input[type="url"],
body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose) input[type="tel"],
body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose) input[type="number"],
body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose) select,
body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose) textarea,
body.hm-shell-ready #V-SettingsPane input[type="text"],
body.hm-shell-ready #V-SettingsPane select,
body.hm-shell-ready #V-SettingsPane textarea {
  background-color: var(--hm-input-bg) !important;
  color: var(--hm-text) !important;
  border: 1px solid var(--hm-input-border) !important;
  border-radius: 12px !important;
  padding: 9px 15px !important;
  min-height: 48px;
  box-sizing: border-box !important;
  font-family: var(--hm-font) !important;
  font-size: 18px !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose) :is(input, select, textarea):focus-visible {
  outline: 2px solid var(--hm-purple) !important;
  outline-offset: 1px;
  border-color: var(--hm-purple) !important;
}

body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose) .form-horizontal .control-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  margin: 0 0 19px !important;
}
body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose) .form-horizontal .control-group > label:not(.e-checkbox) {
  width: auto !important;
  float: none !important;
  text-align: left !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 17px !important;
  font-weight: 600 !important;
  color: var(--hm-text-secondary) !important;
}
body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose) .form-horizontal .control-group > :not(label) {
  margin-left: 0 !important;
}
body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose) .e-component select {
  width: 100%;
}
body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose) .e-checkbox {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px;
  margin: 6px 0 !important;
  font-size: 17.5px !important;
  color: var(--hm-text) !important;
  cursor: pointer;
}
body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose) .e-checkbox input[type="checkbox"] {
  accent-color: var(--hm-purple);
}
body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose) .e-checkbox.material-design input[type="checkbox"]:checked + div[role="checkbox"] {
  background-color: var(--hm-purple) !important;
  border-color: var(--hm-purple) !important;
}

/* Uniform Modal Buttons (zero legacy gradient/green #84AB04) */
body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose) .btn,
body.hm-shell-ready #V-SettingsPane .btn {
  height: 48px;
  padding: 0 19px !important;
  border-radius: 12px !important;
  border: 1px solid var(--hm-border-strong) !important;
  background: var(--hm-surface-subtle) !important;
  background-image: none !important;
  color: var(--hm-text) !important;
  font-family: var(--hm-font) !important;
  font-size: 17.5px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  text-shadow: none !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center;
  gap: 8px;
  text-decoration: none !important;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}
body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose) .btn:hover,
body.hm-shell-ready #V-SettingsPane .btn:hover {
  background: var(--hm-surface-hover) !important;
}
body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose) :is(.btn-primary, .buttonAdvSearch, .button-save-contact, .buttonCreate, .buttonYes, .buttonAddAccount, .buttonSave),
body.hm-shell-ready #V-SettingsPane .btn-primary {
  background: var(--hm-purple) !important;
  border-color: var(--hm-purple) !important;
  color: #ffffff !important;
}
body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose) :is(.btn-primary, .buttonAdvSearch, .button-save-contact, .buttonCreate, .buttonYes, .buttonAddAccount, .buttonSave):hover {
  background: var(--hm-purple-hover) !important;
}
body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose) .btn-success {
  background: var(--hm-purple-soft) !important;
  border-color: var(--hm-purple-border) !important;
  color: var(--hm-purple-soft-text) !important;
}
body.hm-shell-ready dialog:not(.hm-dialog):not(#V-PopupsCompose) .btn-danger,
body.hm-shell-ready #V-SettingsPane .btn-danger {
  background: rgba(220, 38, 38, 0.12) !important;
  border-color: rgba(220, 38, 38, 0.35) !important;
  color: #ef4444 !important;
}

/* Pesquisa Avançada (#V-PopupsAdvancedSearch - Screenshot ab518c9d) */
body.hm-shell-ready dialog#V-PopupsAdvancedSearch[open] {
  width: min(907px, calc(100vw - 43px)) !important;
}
body.hm-shell-ready #V-PopupsAdvancedSearch #advancedsearchform {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 32px;
  padding: 27px 32px !important;
}
body.hm-shell-ready #V-PopupsAdvancedSearch #advancedsearchform > div {
  display: flex;
  flex-direction: column;
  margin: 0 !important;
}
body.hm-shell-ready #V-PopupsAdvancedSearch #advancedsearchform input[type="text"],
body.hm-shell-ready #V-PopupsAdvancedSearch #advancedsearchform select {
  width: 100%;
}
@media (max-width: 640px) {
  body.hm-shell-ready #V-PopupsAdvancedSearch #advancedsearchform {
    grid-template-columns: 1fr;
  }
}

/* Contatos (#V-PopupsContacts - Screenshot 2217073b) */
body.hm-shell-ready dialog#V-PopupsContacts[open] {
  width: min(1227px, calc(100vw - 43px)) !important;
  height: min(854px, calc(100dvh - 64px)) !important;
}
body.hm-shell-ready #V-PopupsContacts > header.b-header-toolbar {
  padding: 16px 24px !important;
  gap: 10px;
}
body.hm-shell-ready #V-PopupsContacts > header.b-header-toolbar > .btn-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
body.hm-shell-ready #V-PopupsContacts > header.b-header-toolbar > .btn-group:first-child .btn:first-child {
  background: var(--hm-purple) !important;
  border-color: var(--hm-purple) !important;
  color: #ffffff !important;
}
body.hm-shell-ready #V-PopupsContacts > header.b-header-toolbar > .btn-group:first-child .btn:first-child:hover {
  background: var(--hm-purple-hover) !important;
}
body.hm-shell-ready #V-PopupsContacts .modal-body {
  padding: 0 !important;
  display: flex !important;
  overflow: hidden !important;
  min-height: 0;
}
body.hm-shell-ready #V-PopupsContacts .left {
  width: 374px !important;
  min-width: 320px;
  max-width: 34% !important;
  background: var(--hm-surface) !important;
  border-right: 1px solid var(--hm-border) !important;
  display: flex;
  flex-direction: column;
}
body.hm-shell-ready #V-PopupsContacts .b-list-toolbar {
  height: auto !important;
  padding: 14px 16px !important;
  border-bottom: 1px solid var(--hm-hairline) !important;
}
body.hm-shell-ready #V-PopupsContacts .b-list-toolbar .e-search {
  margin: 0 !important;
  width: 100% !important;
}
body.hm-shell-ready #V-PopupsContacts .b-list-content {
  flex: 1 1 auto !important;
  height: auto !important;
}
body.hm-shell-ready #V-PopupsContacts .b-list-footer-toolbar {
  border-top: 1px solid var(--hm-hairline) !important;
  height: 59px !important;
}
body.hm-shell-ready #V-PopupsContacts .b-list-content .listEmptyList,
body.hm-shell-ready #V-PopupsContacts .b-list-content .listEmptyListLoading,
body.hm-shell-ready #V-PopupsContacts .b-list-content .listEmptySearchList,
body.hm-shell-ready #V-PopupsContacts .b-view-content .b-contact-view-desc {
  color: var(--hm-text-muted) !important;
  font-size: 18.5px !important;
  line-height: 1.5 !important;
  padding: 86px 27px !important;
}
body.hm-shell-ready #V-PopupsContacts .e-contact-item {
  border-left: 3px solid transparent !important;
  border-bottom: 1px solid var(--hm-hairline) !important;
  color: var(--hm-text) !important;
}
body.hm-shell-ready #V-PopupsContacts .e-contact-item:hover {
  background: var(--hm-surface-hover) !important;
}
body.hm-shell-ready #V-PopupsContacts .e-contact-item.selected,
body.hm-shell-ready #V-PopupsContacts .e-contact-item.focused {
  background: var(--hm-surface-active) !important;
  border-left-color: var(--hm-purple) !important;
}
body.hm-shell-ready #V-PopupsContacts .right {
  flex: 1 1 auto;
  border-left: 0 !important;
  background: var(--hm-surface-elevated, #ffffff) !important;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
body.hm-shell-ready #V-PopupsContacts .b-view-content {
  padding: 21px 32px 27px !important;
  flex: 1 1 auto;
  min-height: 0;
  height: auto !important;
  background: var(--hm-surface-elevated, #ffffff) !important;
  overflow-y: auto !important;
}
body.hm-shell-ready #V-PopupsContacts .tabs {
  gap: 0 !important;
  background: var(--hm-surface-elevated, #ffffff) !important;
}
body.hm-shell-ready #V-PopupsContacts .tabs > label[role="tab"] {
  background: var(--hm-surface-elevated, #ffffff) !important;
  color: var(--hm-text-secondary);
  border: 0 !important;
  border-bottom: 2px solid var(--hm-hairline) !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 14px 19px !important;
  opacity: 1 !important;
  font-weight: 600;
  font-size: 17.5px;
  cursor: pointer;
}
body.hm-shell-ready #V-PopupsContacts .tabs > label[role="tab"]:hover {
  color: var(--hm-text) !important;
}
body.hm-shell-ready #V-PopupsContacts .tabs > input[type="radio"]:checked + label[role="tab"] {
  background: var(--hm-surface-elevated, #ffffff) !important;
  color: var(--hm-purple-soft-text) !important;
  border-bottom: 2px solid var(--hm-purple) !important;
}
body.hm-shell-ready #V-PopupsContacts .tab-content {
  padding-top: 24px !important;
  background: var(--hm-surface-elevated, #ffffff) !important;
}
body.hm-shell-ready #V-PopupsContacts .tab-content .control-group:has(> label.iconsize24) {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 16px !important;
}
body.hm-shell-ready #V-PopupsContacts .tab-content .control-group > label.iconsize24 {
  width: 37px !important;
  flex: 0 0 37px !important;
  padding-top: 8px !important;
  font-size: 21.5px !important;
  text-align: center !important;
}
body.hm-shell-ready #V-PopupsContacts .tab-content .control-group:has(> label.iconsize24) > :not(label) {
  flex: 1 1 auto !important;
  min-width: 0;
}
body.hm-shell-ready #V-PopupsContacts .b-view-content .property-line {
  margin-bottom: 10px !important;
}
body.hm-shell-ready #V-PopupsContacts .b-view-content input:not([type="checkbox"]),
body.hm-shell-ready #V-PopupsContacts .b-view-content textarea {
  width: 100% !important;
  max-width: 587px !important;
}
body.hm-shell-ready #V-PopupsContacts .b-view-content-toolbar {
  border-top: 1px solid var(--hm-hairline) !important;
  background: var(--hm-surface-elevated, #ffffff) !important;
  padding: 14px 24px !important;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

/* Native SnappyMail Tables & Alerts inside Modals/Settings */
body.hm-shell-ready :is(dialog:not(.hm-dialog), #V-SettingsPane) .table {
  width: 100%;
  border-collapse: collapse;
  color: var(--hm-text);
  font-size: 18px;
}
body.hm-shell-ready :is(dialog:not(.hm-dialog), #V-SettingsPane) .table :is(th, td) {
  padding: 14px 16px;
  border-top: 1px solid var(--hm-hairline) !important;
  color: var(--hm-text) !important;
  vertical-align: middle;
}
body.hm-shell-ready :is(dialog:not(.hm-dialog), #V-SettingsPane) .table-hover tbody tr:hover :is(td, th) {
  background: var(--hm-surface-hover) !important;
}
body.hm-shell-ready :is(dialog:not(.hm-dialog), #V-SettingsPane) .alert {
  background: rgba(239, 68, 68, 0.1) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  border-radius: 14px !important;
  color: #ef4444 !important;
  padding: 14px 19px !important;
  font-size: 17.5px;
}

/* Native SnappyMail Dropdown Menus */
body.hm-shell-ready .dropdown-menu {
  background: var(--hm-surface-elevated) !important;
  border: 1px solid var(--hm-border) !important;
  border-radius: 16px !important;
  padding: 8px !important;
  box-shadow: 0 16px 43px rgba(0, 0, 0, 0.24) !important;
  min-width: 240px;
}
body.hm-shell-ready .dropdown-menu a {
  background: transparent !important;
  color: var(--hm-text) !important;
  border-radius: 10px !important;
  padding: 9px 14px !important;
  font-size: 17.5px !important;
}
body.hm-shell-ready .dropdown-menu li:not(.disabled) > a:hover,
body.hm-shell-ready .dropdown-menu li:not(.disabled) > a:focus {
  background: var(--hm-surface-subtle) !important;
  color: var(--hm-text) !important;
}

/* ---------- Hostinger Composer (<dialog id="V-PopupsCompose">) (Screenshots 3-7) ---------- */
body.hm-shell-ready dialog#V-PopupsCompose[open] {
  position: fixed !important;
  inset: auto 32px 0 auto !important;
  top: auto !important;
  left: auto !important;
  right: 32px !important;
  bottom: 0 !important;
  margin: 0 !important;
  width: 747px !important;
  max-width: calc(100vw - 43px) !important;
  height: 733px !important;
  max-height: calc(100vh - 101px) !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--hm-border) !important;
  border-bottom: 0 !important;
  border-radius: 19px 19px 0 0 !important;
  background: var(--hm-surface-card, #ffffff) !important;
  background-color: var(--hm-surface-card, #ffffff) !important;
  color: var(--hm-text-primary) !important;
  box-shadow: 0 24px 64px rgba(15, 16, 22, 0.22) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  resize: none !important;
  z-index: 3200 !important;
  transition: opacity 0.16s ease, transform 0.16s ease !important;
}
body.hm-shell-ready dialog#V-PopupsCompose[open]:not(.animate) {
  opacity: 0 !important;
  transform: translateY(16px);
}
body.hm-shell-ready dialog#V-PopupsCompose[open].animate {
  opacity: 1 !important;
  transform: translateY(0);
}
body.hm-shell-ready.hm-ai-drawer-open dialog#V-PopupsCompose[open]:not(.hm-compose-expanded) {
  right: 459px !important;
  max-width: calc(100vw - 480px) !important;
}
@media (max-width: 1080px) {
  body.hm-shell-ready.hm-ai-drawer-open dialog#V-PopupsCompose[open]:not(.hm-compose-expanded) {
    right: 32px !important;
    max-width: calc(100vw - 43px) !important;
  }
}

body.hm-shell-ready dialog#V-PopupsCompose::backdrop {
  background: transparent;
  overflow: hidden;
  overscroll-behavior: contain;
}

body.hm-shell-ready dialog#V-PopupsCompose.hm-compose-minimized[open] {
  width: 413px !important;
  height: 59px !important;
}
body.hm-shell-ready dialog#V-PopupsCompose.hm-compose-minimized .modal-body {
  display: none !important;
}

body.hm-shell-ready dialog#V-PopupsCompose.hm-compose-expanded[open] {
  inset: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  margin: auto !important;
  width: min(1254px, calc(100vw - 64px)) !important;
  height: min(920px, calc(100vh - 74px)) !important;
  max-width: calc(100vw - 64px) !important;
  max-height: calc(100vh - 74px) !important;
  border: 1px solid var(--hm-border) !important;
  border-radius: 21px !important;
  overscroll-behavior: contain;
}
body.hm-shell-ready dialog#V-PopupsCompose.hm-compose-expanded::backdrop {
  background: rgba(15, 16, 22, 0.5) !important;
  backdrop-filter: blur(2px);
}

/* Composer Top Header Bar */
body.hm-shell-ready dialog#V-PopupsCompose > header {
  background: var(--hm-surface-subtle) !important;
  color: var(--hm-text-primary) !important;
  border-bottom: 1px solid var(--hm-border) !important;
  padding: 0 !important;
  min-height: 59px !important;
  height: 59px !important;
  display: flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}

body.hm-shell-ready dialog#V-PopupsCompose > header > :not(#hm-cmp-header) {
  display: none !important;
}

#hm-cmp-header {
  width: 100%;
  height: 59px;
  padding: 0 16px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hm-cmp-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--hm-text-primary);
  font-family: var(--hm-font);
}

.hm-cmp-win-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.hm-cmp-win-btn {
  width: 37px;
  height: 37px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--hm-text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.hm-cmp-win-btn:hover {
  background: var(--hm-surface-hover);
  color: var(--hm-text-primary);
}
.hm-cmp-win-btn svg { width: 20px; height: 20px; }

/* Modal Body Flex Stack */
body.hm-shell-ready dialog#V-PopupsCompose .modal-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  background: var(--hm-surface-card) !important;
  overflow: hidden !important;
}

/* Borderless Recipient / Subject Rows */
body.hm-shell-ready dialog#V-PopupsCompose .b-header {
  background: transparent !important;
  border: 0 !important;
  padding: 0 24px !important;
  margin: 0 !important;
  flex-shrink: 0;
}

body.hm-shell-ready dialog#V-PopupsCompose .b-header table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 !important;
}

body.hm-shell-ready dialog#V-PopupsCompose .b-header tr {
  border-bottom: 1px solid var(--hm-border) !important;
}

/* Hide 'De' row unless toggled */
body.hm-shell-ready dialog#V-PopupsCompose:not(.hm-cmp-show-from) .b-header tr:first-child {
  display: none !important;
}

body.hm-shell-ready dialog#V-PopupsCompose .b-header th,
body.hm-shell-ready dialog#V-PopupsCompose .b-header td {
  border: 0 !important;
  background: transparent !important;
  padding: 10px 0 !important;
  vertical-align: middle !important;
  color: var(--hm-text-primary) !important;
  font-size: 17.5px !important;
}

body.hm-shell-ready dialog#V-PopupsCompose .b-header td:first-child {
  width: 115px !important;
  text-align: left !important;
  font-weight: 500 !important;
  color: var(--hm-text-secondary) !important;
  white-space: nowrap;
  padding-right: 10px !important;
}

body.hm-shell-ready dialog#V-PopupsCompose .b-header tr:nth-child(2) td:nth-child(2) {
  padding-right: 96px !important;
}

body.hm-shell-ready dialog#V-PopupsCompose .b-header input[type="text"],
body.hm-shell-ready dialog#V-PopupsCompose .b-header input[type="email"] {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: var(--hm-text-primary) !important;
  padding: 2px 6px !important;
  height: auto !important;
  margin: 0 !important;
  font-family: var(--hm-font) !important;
  font-size: 17.5px !important;
}

body.hm-shell-ready dialog#V-PopupsCompose .b-header .controls,
body.hm-shell-ready dialog#V-PopupsCompose .b-header .email-tags {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 !important;
  min-height: 32px !important;
}

/* Hide legacy compose header button strip; keep upload button callable */
body.hm-shell-ready dialog#V-PopupsCompose .b-header .btn-toolbar,
body.hm-shell-ready dialog#V-PopupsCompose .b-header > .flex {
  height: 0 !important;
  min-height: 0 !important;
  overflow: visible !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.hm-shell-ready dialog#V-PopupsCompose #composeUploadButton {
  position: fixed !important;
  left: -11599px !important;
  top: -11599px !important;
  opacity: 0 !important;
}

#hm-cmp-cc-links {
  position: absolute;
  right: 24px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  z-index: 4;
}
.hm-cmp-cc-btn {
  border: 0;
  background: transparent;
  padding: 2px 6px;
  font-family: var(--hm-font);
  font-size: 16px;
  font-weight: 500;
  color: var(--hm-text-secondary);
  cursor: pointer;
}
.hm-cmp-cc-btn:hover { color: var(--hm-purple-soft-text); }

/* Hide [Texto | Anexos] radio tab bar and unused Mailvelope/attachment tab panels completely */
body.hm-shell-ready dialog#V-PopupsCompose .tabs {
  flex: 1 1 0% !important;
  height: auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  overflow: hidden !important;
}
body.hm-shell-ready dialog#V-PopupsCompose .tabs > input[type="radio"],
body.hm-shell-ready dialog#V-PopupsCompose .tabs > label,
body.hm-shell-ready dialog#V-PopupsCompose .tabs > .tab-content:not(:first-of-type),
body.hm-shell-ready dialog#V-PopupsCompose #mailvelope-editor[style*="none"] {
  display: none !important;
}
body.hm-shell-ready dialog#V-PopupsCompose .tabs > .tab-content:first-of-type {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 0% !important;
  height: auto !important;
  min-height: 0 !important;
  visibility: visible !important;
  overflow: hidden !important;
}

body.hm-shell-ready dialog#V-PopupsCompose .tabs > .tab-content:first-of-type > .textAreaParent {
  flex: 1 1 0% !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  position: relative;
  background: var(--hm-surface-card) !important;
}

/* Hide formatting toolbar unless user clicks A */
body.hm-shell-ready dialog#V-PopupsCompose:not(.hm-compose-fmt-open) .squire-toolbar {
  display: none !important;
}
body.hm-shell-ready dialog#V-PopupsCompose.hm-compose-fmt-open .squire-toolbar {
  border: 1px solid var(--hm-border) !important;
  border-radius: 10px;
  background: var(--hm-surface-subtle) !important;
  padding: 6px 8px !important;
  margin: 12px 24px 0 !important;
  flex-shrink: 0;
}

body.hm-shell-ready dialog#V-PopupsCompose .tabs > .tab-content:first-of-type > .textAreaParent [contenteditable="true"],
body.hm-shell-ready dialog#V-PopupsCompose .tabs > .tab-content:first-of-type > .textAreaParent textarea {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  height: auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  color: var(--hm-text-primary) !important;
  font-family: var(--hm-font) !important;
  font-size: 18px !important;
  line-height: 1.6 !important;
  padding: 16px 24px 21px !important;
  overflow-y: auto !important;
}

.hm-cmp-editor-placeholder {
  position: absolute;
  top: 16px;
  left: 24px;
  right: 24px;
  font-size: 18px;
  color: var(--hm-text-muted);
  pointer-events: none;
  font-family: var(--hm-font);
}

body.hm-shell-ready dialog#V-PopupsCompose.hm-compose-fmt-open .hm-cmp-editor-placeholder {
  top: 77px;
}

/* When AI Preview Overlay is open, hide normal recipients + editor cleanly to match Screenshots 6 & 7 */
body.hm-shell-ready dialog#V-PopupsCompose.hm-cmp-ai-active .b-header,
body.hm-shell-ready dialog#V-PopupsCompose.hm-cmp-ai-active #hm-cmp-cc-links,
body.hm-shell-ready dialog#V-PopupsCompose.hm-cmp-ai-active .tabs {
  display: none !important;
}

/* Compose Bottom Stack */
#hm-cmp-bottom {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 10px 24px 19px;
  background: var(--hm-surface-card);
}

body.hm-shell-ready dialog#V-PopupsCompose.hm-cmp-ai-active #hm-cmp-bottom {
  flex: 1 1 auto;
  min-height: 0;
  padding-top: 16px;
}

/* Live Attachments Row */
#hm-cmp-attachments {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 99px;
  overflow-y: auto;
}
#hm-cmp-attachments.has-files {
  display: flex;
}
.hm-cmp-att-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px 4px 10px;
  border-radius: 10px;
  border: 1px solid var(--hm-border);
  background: var(--hm-surface-subtle);
  font-size: 14px;
  color: var(--hm-text-primary);
  max-width: 100%;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.hm-cmp-att-chip.is-previewable:hover {
  border-color: var(--hm-accent, #004b87);
  background: var(--hm-surface-hover, rgba(0, 75, 135, 0.06));
}
.hm-cmp-att-chip.is-error {
  border-color: rgba(239, 68, 68, 0.45);
}
.hm-cmp-att-open {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 2px 4px 2px 0;
  cursor: pointer;
  min-width: 0;
  text-align: left;
}
.hm-cmp-att-open[aria-disabled="true"] {
  cursor: wait;
  opacity: 0.72;
}
.hm-cmp-att-open:focus-visible,
.hm-cmp-att-preview:focus-visible,
.hm-cmp-att-del:focus-visible {
  outline: 2px solid var(--hm-accent, #004b87);
  outline-offset: 2px;
  border-radius: 6px;
}
.hm-cmp-att-ico {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.hm-cmp-att-chip svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--hm-text-secondary);
}
.hm-cmp-att-name {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.hm-cmp-att-chip.is-previewable .hm-cmp-att-open:hover .hm-cmp-att-name {
  color: var(--hm-accent, #004b87);
  text-decoration: underline;
}
.hm-cmp-att-size { color: var(--hm-text-secondary); font-size: 13px; white-space: nowrap; }
.hm-cmp-att-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--hm-text-secondary);
  cursor: pointer;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  padding: 0;
  flex-shrink: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.hm-cmp-att-preview:not([aria-disabled="true"]):hover {
  background: rgba(0, 75, 135, 0.12);
  color: var(--hm-accent, #004b87);
}
.hm-cmp-att-preview:not([aria-disabled="true"]):hover svg {
  color: currentColor;
}
.hm-cmp-att-preview[aria-disabled="true"] {
  opacity: 0.4;
  cursor: wait;
}
.hm-cmp-att-del {
  border: 0;
  background: transparent;
  color: var(--hm-text-secondary);
  cursor: pointer;
  padding: 0 3px;
  font-size: 18.5px;
  line-height: 1;
  flex-shrink: 0;
}
.hm-cmp-att-del:hover { color: #ef4444; }

/* Attachment Pre-Send Preview Modal (scoped to [open] per native <dialog> guidelines) */
dialog.hm-dialog.hm-att-preview-dialog[open] {
  display: flex;
  flex-direction: column;
  width: min(1040px, calc(100vw - 40px));
  height: min(86dvh, 840px);
  max-width: calc(100vw - 40px) !important;
  max-height: calc(100dvh - 40px);
  border-radius: 18px;
}
.hm-att-pv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--hm-hairline);
  background: var(--hm-surface-elevated, #ffffff);
  flex-shrink: 0;
}
.hm-att-pv-title-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hm-att-pv-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--hm-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hm-att-pv-meta {
  font-size: 13px;
  color: var(--hm-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hm-att-pv-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.hm-att-pv-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-right: 6px;
  margin-right: 2px;
  border-right: 1px solid var(--hm-hairline);
}
.hm-att-pv-nav[hidden] { display: none; }
.hm-att-pv-counter {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--hm-text-secondary);
  min-width: 44px;
  text-align: center;
}
.hm-att-pv-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.hm-att-pv-btn[hidden] { display: none; }
.hm-att-pv-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.hm-att-pv-stage {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  background: var(--hm-surface-subtle, #f3f6fa);
  display: flex;
  flex-direction: column;
}
.hm-att-pv-stage.is-pdf-stage {
  overflow: hidden;
}
.hm-att-preview-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
  flex: 1 1 auto;
}
.hm-att-pv-img-wrap {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  min-height: 100%;
  box-sizing: border-box;
}
.hm-att-preview-img {
  max-width: 100%;
  max-height: calc(86dvh - 125px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
  background: #ffffff;
}
.hm-att-preview-img.is-zoomed {
  max-width: none;
  max-height: none;
}
.hm-att-pv-truncate-note {
  padding: 10px 18px;
  font-size: 13.5px;
  background: rgba(245, 158, 11, 0.14);
  color: var(--hm-text);
  border-bottom: 1px solid var(--hm-hairline);
}
.hm-att-preview-text {
  margin: 0;
  padding: 20px 24px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--hm-text);
  white-space: pre-wrap;
  word-break: break-word;
  flex: 1 1 auto;
}
.hm-att-pv-loading {
  margin: auto;
  font-size: 15px;
  color: var(--hm-text-secondary);
}
.hm-att-pv-media-box {
  margin: auto;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}
.hm-att-preview-video {
  max-width: 100%;
  max-height: calc(86dvh - 140px);
  border-radius: 10px;
}
.hm-att-pv-empty {
  margin: auto;
  padding: 36px 28px;
  text-align: center;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.hm-att-pv-empty-ico {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--hm-surface-elevated, #ffffff);
  border: 1px solid var(--hm-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--hm-accent, #004b87);
}
.hm-att-pv-empty-ico svg { width: 26px; height: 26px; }
.hm-att-pv-empty-name {
  margin: 4px 0 0;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--hm-text);
  word-break: break-word;
}
.hm-att-pv-empty-desc {
  margin: 0;
  font-size: 14.5px;
  color: var(--hm-text-secondary);
  line-height: 1.5;
}
.hm-att-pv-empty-meta {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--hm-text-muted);
}
@media (max-width: 680px) {
  .hm-att-pv-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .hm-att-pv-actions {
    justify-content: flex-end;
  }
}

/* AI Loading Shimmer + Draft Preview Card (Screenshots 6 & 7) */
#hm-cmp-ai-panel {
  display: none;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  gap: 10px;
}
#hm-cmp-ai-panel.open {
  display: flex;
}

.hm-cmp-ai-card {
  flex: 1 1 auto;
  min-height: 200px;
  overflow-y: auto;
  background: var(--hm-surface-subtle);
  border-radius: 16px;
  padding: 24px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--hm-text-primary);
  white-space: pre-wrap;
}

@keyframes hm-ai-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -150% 0; }
}

.hm-cmp-skeleton-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.hm-cmp-skeleton-bar {
  height: 24px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.22), rgba(30, 82, 184, 0.40), rgba(96, 165, 250, 0.35), rgba(59, 130, 246, 0.22));
  background-size: 250% 100%;
  animation: hm-ai-shimmer 1.6s linear infinite;
}

.hm-cmp-ai-disclaimer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 15px;
  color: var(--hm-text-secondary);
  padding: 0 2px;
}

.hm-cmp-ai-feedback {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hm-cmp-ai-thumb {
  width: 35px;
  height: 35px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--hm-text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.hm-cmp-ai-thumb:hover,
.hm-cmp-ai-thumb.active {
  background: var(--hm-surface-subtle);
  color: var(--hm-purple-soft-text);
}
.hm-cmp-ai-thumb svg { width: 19px; height: 19px; }

/* Inline Iridescent-Bordered AI Prompt Pill (Screenshots 3, 4, 5, 7) */
#hm-cmp-ai-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px 7px 16px;
  margin: 0 !important;
  flex-shrink: 0;
  min-height: 51px;
  box-sizing: border-box;
  border-radius: 1159px;
  background:
    linear-gradient(var(--hm-surface-card), var(--hm-surface-card)) padding-box,
    linear-gradient(90deg, #1e52b8, #3b82f6, #60a5fa, #1e52b8) border-box;
  border: 1.5px solid transparent;
}
#hm-cmp-ai-pill.hidden {
  display: none;
}

.hm-cmp-ai-pill-icon {
  color: var(--hm-text-secondary);
  display: inline-flex;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.hm-cmp-ai-pill-icon svg { width: 20px; height: 20px; }

#hm-cmp-ai-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  color: var(--hm-text-primary) !important;
  font-family: var(--hm-font) !important;
  font-size: 17.5px !important;
  padding: 6px 2px !important;
  box-shadow: none !important;
  margin: 0 !important;
  overflow: hidden;
}

#hm-cmp-ai-submit {
  width: 39px;
  height: 39px;
  border-radius: 1159px;
  border: 0;
  background: var(--hm-surface-subtle);
  color: var(--hm-text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}
#hm-cmp-ai-submit.ready {
  background: var(--hm-purple);
  color: #ffffff;
}
#hm-cmp-ai-submit svg { width: 20px; height: 20px; }

/* Bottom Toolbar */
#hm-cmp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

#hm-cmp-footer [hidden],
.hm-cmp-footer-left[hidden],
.hm-cmp-footer-right[hidden] {
  display: none !important;
}

.hm-cmp-footer-left,
.hm-cmp-footer-right {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.hm-cmp-send-group {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--hm-purple);
  margin-right: 6px;
}
.hm-cmp-send-main {
  border: 0;
  background: transparent;
  color: #ffffff;
  font-family: var(--hm-font);
  font-size: 17.5px;
  font-weight: 600;
  padding: 9px 19px;
  white-space: nowrap;
  cursor: pointer;
}
.hm-cmp-send-main:hover { background: var(--hm-purple-hover); }
.hm-cmp-send-arrow {
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #ffffff;
  padding: 9px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.hm-cmp-send-arrow:hover { background: var(--hm-purple-hover); }
.hm-cmp-send-arrow svg { width: 17px; height: 17px; }

.hm-cmp-tool-btn {
  width: 39px;
  height: 39px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--hm-text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font-family: var(--hm-font);
  font-weight: 600;
  font-size: 18.5px;
}
.hm-cmp-tool-btn:hover {
  background: var(--hm-surface-subtle);
  color: var(--hm-text-primary);
}
.hm-cmp-tool-btn.active {
  background: rgba(30, 82, 184, 0.14);
  color: var(--hm-purple-soft-text);
}
.hm-cmp-tool-btn svg { width: 20px; height: 20px; }

.hm-cmp-text-btn {
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--hm-text-secondary);
  font-family: var(--hm-font);
  font-size: 17px;
  font-weight: 600;
  padding: 8px 10px;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hm-cmp-text-btn:hover {
  background: var(--hm-surface-subtle);
  color: var(--hm-text-primary);
}
.hm-cmp-text-btn.pill {
  background: var(--hm-surface-subtle);
  color: var(--hm-text-primary);
}
.hm-cmp-text-btn svg { width: 19px; height: 19px; }

.hm-cmp-accept-btn {
  border: 0;
  border-radius: 12px;
  background: var(--hm-purple);
  color: #ffffff;
  font-family: var(--hm-font);
  font-size: 17.5px;
  font-weight: 600;
  padding: 9px 19px;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}
.hm-cmp-accept-btn:hover:not(:disabled) { background: var(--hm-purple-hover); }
.hm-cmp-accept-btn:disabled {
  background: var(--hm-surface-subtle);
  color: var(--hm-text-muted);
  cursor: default;
}

/* ---------- Modal Upload de Imagem & Inserir Link ---------- */
.hm-img-dropzone {
  border: 1.5px dashed var(--hm-border-strong);
  border-radius: 16px;
  background: var(--hm-surface-subtle);
  padding: 27px 21px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.hm-img-dropzone:hover,
.hm-img-dropzone.dragover {
  border-color: var(--hm-purple);
  background: var(--hm-purple-soft);
}
.hm-img-dropzone-icon {
  width: 51px;
  height: 51px;
  border-radius: 14px;
  background: var(--hm-surface-elevated);
  border: 1px solid var(--hm-border);
  color: var(--hm-purple-soft-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.hm-img-dropzone-icon svg { width: 24px; height: 24px; }
.hm-img-dropzone-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--hm-text);
}
.hm-img-dropzone-sub {
  font-size: 16px;
  color: var(--hm-text-muted);
}
.hm-img-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 19px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--hm-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.hm-img-divider::before,
.hm-img-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hm-border);
}
.hm-img-preview-box {
  margin-top: 16px;
  border: 1px solid var(--hm-border);
  border-radius: 14px;
  background: var(--hm-surface-subtle);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.hm-img-preview-thumb {
  width: 90px;
  height: 70px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--hm-surface-elevated);
  border: 1px solid var(--hm-border);
  flex-shrink: 0;
}
.hm-img-preview-meta {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 17px;
  color: var(--hm-text);
}
.hm-img-preview-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hm-img-preview-sub {
  font-size: 15px;
  color: var(--hm-text-secondary);
  margin-top: 2px;
}

/* Contacts modal: align icon + label rows */
.hm-contact-label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  width: auto !important;
  min-width: 115px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--hm-text-secondary, #475569) !important;
  white-space: nowrap !important;
}
.hm-contact-label span {
  font-family: inherit !important;
  font-size: 13px !important;
}
