/* Hager Mail — layout do esboço "Hager Mail" (película perfurada no menu, degradê do logo) com a identidade
   do site hagerproducoes.com.br: degradê magenta → violeta → azul, fonte Archivo (servida daqui, sem Google Fonts).
   Toda a cor do webmail vem destes tokens (claro, escuro e escuro automático). */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url(fonts/Archivo-normal.woff2) format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --grad: linear-gradient(115deg, #E21BFF 0%, #9B3DFF 42%, #2F8BFF 72%, #22C4F8 100%);
  --grad-hover: linear-gradient(115deg, #EA45FF 0%, #A956FF 42%, #4A9BFF 72%, #45D0FA 100%);
  --brilho: rgba(190, 43, 255, .32);

  --bg: #F3F1F7;
  --panel: #FFFFFF;
  --panel-2: #F8F6FB;
  --hover: #F2EDF9;
  --sel: #EDE4FB;
  --line: #E5DEEF;
  --hole: #DDD5EA;
  --text: #1B1524;
  --muted: #625A75;
  --faint: #756D89;
  --accent: #7E22CE;
  --accent-soft: rgba(126, 34, 206, .10);
  --primary: #1B1524;
  --on-primary: #FFFFFF;
  --btn-bg: var(--grad);
  --btn-bg-hover: var(--grad-hover);
  --on-btn: #FFFFFF;
  --danger: #D3264F;
  --star: #D18A0A;
  --toast-btn: #CF8BFF;
  --scrim: rgba(15, 11, 21, .45);
  --luz-1: rgba(226, 27, 255, .16);
  --luz-2: rgba(34, 196, 248, .14);
  --shadow: 0 1px 2px rgba(27, 21, 36, .06), 0 8px 24px rgba(27, 21, 36, .06);
  --shadow-pop: 0 24px 64px rgba(27, 21, 36, .22);

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0F0B15;
  --panel: #16111E;
  --panel-2: #1C1626;
  --hover: #221A2E;
  --sel: #2B2042;
  --line: #2A2236;
  --hole: #2E2540;
  --text: #F1EDF7;
  --muted: #A9A1BA;
  --faint: #8E86A3;
  --accent: #CF8BFF;
  --accent-soft: rgba(207, 139, 255, .13);
  --primary: #F1EDF7;
  --on-primary: #16111E;
  --danger: #FF5F88;
  --star: #FFBA3B;
  --toast-btn: #7E22CE;
  --scrim: rgba(5, 3, 9, .62);
  --luz-1: rgba(226, 27, 255, .20);
  --luz-2: rgba(34, 196, 248, .14);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .25);
  --shadow-pop: 0 24px 64px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F0B15;
    --panel: #16111E;
    --panel-2: #1C1626;
    --hover: #221A2E;
    --sel: #2B2042;
    --line: #2A2236;
    --hole: #2E2540;
    --text: #F1EDF7;
    --muted: #A9A1BA;
    --faint: #8E86A3;
    --accent: #CF8BFF;
    --accent-soft: rgba(207, 139, 255, .13);
    --primary: #F1EDF7;
    --on-primary: #16111E;
    --danger: #FF5F88;
    --star: #FFBA3B;
    --toast-btn: #7E22CE;
    --scrim: rgba(5, 3, 9, .62);
    --luz-1: rgba(226, 27, 255, .20);
    --luz-2: rgba(34, 196, 248, .14);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .25);
    --shadow-pop: 0 24px 64px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

/* perfurações da película (mesmo desenho do logo): usadas no menu lateral e no cartão de login */
:root {
  --furos: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='20'%3E%3Crect x='0' y='4' width='8' height='12' rx='2.5'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.app {
  display: grid;
  grid-template-columns: 256px 392px minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  padding: 12px;
  gap: 12px;
}

/* ---------- Menu lateral ---------- */
.side {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px 26px 16px 14px;
  min-height: 0;
}
/* perfurações da película na borda direita */
.side::after {
  content: ""; position: absolute; top: 14px; bottom: 14px; right: 8px; width: 8px; z-index: 1;
  background: var(--hole);
  -webkit-mask: var(--furos) repeat-y;
          mask: var(--furos) repeat-y;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 4px 10px; }
.brand-logo { width: 42px; height: auto; display: block; flex: none; }
.brand-name { font-family: var(--display); font-weight: 800; font-stretch: 112%; font-size: 19px; line-height: 1; letter-spacing: -.01em; white-space: nowrap; }
.brand-name small { display: block; font-family: var(--font); font-weight: 500; font-stretch: 100%; font-size: 12px; letter-spacing: 0; color: var(--muted); margin-top: 4px; }
.account { font-size: 12px; color: var(--muted); padding: 2px 4px 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.compose-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; border-radius: 14px;
  background: var(--btn-bg);
  color: var(--on-btn); font-weight: 600; font-size: 15px;
  box-shadow: 0 8px 22px var(--brilho);
  transition: transform .15s ease, box-shadow .15s ease;
}
.compose-btn:hover { background: var(--btn-bg-hover); transform: translateY(-1px); box-shadow: 0 12px 28px rgba(190, 43, 255, .42); }
.compose-btn:active { transform: translateY(0); }

.nav { margin-top: 18px; margin-right: -18px; padding-right: 18px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 0; flex: 1; scrollbar-width: none; }
.nav-title { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); padding: 18px 12px 6px; font-weight: 500; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  min-height: 40px; padding: 0 12px; border-radius: 11px;
  color: var(--muted); font-weight: 500; text-align: left; width: 100%;
}
.nav-item > span:not(.count):not(.dot) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.nav-item[aria-current="page"] svg.i { color: var(--accent); }
/* a perfuração da pasta aberta acende com o degradê do logo */
.nav-item[aria-current="page"]::after {
  content: ""; position: absolute; right: -18px; top: 50%;
  width: 8px; height: 26px; margin-top: -13px; z-index: 2; border-radius: 3px;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(226, 27, 255, .55);
}
.nav-item .count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); }
.nav-item .count.hot { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; background: var(--grad); color: #fff; }
.dot { width: 9px; height: 9px; border-radius: 50%; margin: 0 4.5px; flex: none; }

.side-foot { padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.storage { padding: 0 6px; font-size: 12px; color: var(--muted); }
.storage .bar { height: 5px; border-radius: 3px; background: var(--hover); margin-top: 6px; overflow: hidden; }
.storage .bar span { display: block; height: 100%; background: var(--grad); border-radius: inherit; }
.theme { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.theme button { display: flex; align-items: center; justify-content: center; gap: 8px; height: 34px; border-radius: 9px; color: var(--muted); font-weight: 500; font-size: 13px; }
.theme button[aria-pressed="true"] { background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
.theme svg.i { width: 16px; height: 16px; }
.sair { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; border-radius: 10px; color: var(--muted); font-weight: 500; font-size: 13px; }
.sair:hover { background: var(--hover); color: var(--text); }
.sair svg.i { width: 16px; height: 16px; }

/* ---------- Lista ---------- */
.list {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--panel); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden;
}
.list-head { padding: 18px 18px 12px; display: flex; flex-direction: column; gap: 14px; border-bottom: 1px solid var(--line); }
.list-top { display: flex; align-items: center; gap: 8px; }
.list-top .menu-btn { display: none; }
.list-title { font-family: var(--display); font-weight: 800; font-stretch: 112%; font-size: 23px; line-height: 1.1; letter-spacing: -.015em; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-sub { color: var(--muted); font-size: 13px; margin-left: auto; white-space: nowrap; }
.search {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: 12px; margin: 0;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--faint);
}
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; color: var(--text); }
.search input::placeholder { color: var(--faint); }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chip { height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; }
.chip:hover { color: var(--text); background: var(--hover); }
.chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

.banner { margin: 12px 14px 0; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); border: 1px dashed var(--line); color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 10px; }
.banner button { margin-left: auto; color: var(--danger); font-weight: 600; white-space: nowrap; }

.items { flex: 1; overflow-y: auto; padding: 6px 8px 12px; min-height: 0; }
.carregando { padding: 40px 16px; text-align: center; color: var(--faint); }
.group { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); font-weight: 500; padding: 16px 10px 6px; display: flex; align-items: center; gap: 6px; }
.group svg.i { width: 13px; height: 13px; }
.item {
  position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px;
  width: 100%; text-align: left; padding: 12px 10px; border-radius: 14px;
}
.item:hover { background: var(--hover); }
.item[aria-current="true"] { background: var(--sel); }
.item.unread::before { content: ""; position: absolute; left: 2px; top: 26px; width: 7px; height: 7px; border-radius: 50%; background: var(--grad); }
.av {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 600; font-size: 14px; color: #fff; flex: none; letter-spacing: .02em;
}
.row1 { display: flex; align-items: baseline; gap: 8px; }
.from { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item.unread .from, .item.unread .subj { font-weight: 700; }
.time { margin-left: auto; font-size: 12px; color: var(--faint); white-space: nowrap; }
.subj { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.row3 { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.prev { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.row3 svg.i { width: 15px; height: 15px; color: var(--faint); }
.row3 .star-on { color: var(--star); fill: var(--star); }
.tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.mais { display: block; margin: 10px auto 4px; height: 36px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: 13px; }
.mais:hover { background: var(--hover); color: var(--text); }

.empty { display: grid; place-items: center; text-align: center; padding: 56px 24px; color: var(--muted); gap: 8px; }
.empty svg.i { width: 34px; height: 34px; color: var(--faint); stroke-width: 1.4; }
.empty strong { color: var(--text); font-weight: 600; }

/* ---------- Leitura ---------- */
.reader {
  display: flex; flex-direction: column; min-height: 0; min-width: 0;
  background: var(--panel); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden;
}
.toolbar { display: flex; align-items: center; gap: 2px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tb { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); position: relative; flex: none; }
.tb:hover { background: var(--hover); color: var(--text); }
.tb.danger:hover { color: var(--danger); }
.tb.on { color: var(--star); }
.tb.on svg.i { fill: var(--star); }
.tb.pin-on { color: var(--accent); }
.tb.pin-on svg.i { fill: var(--accent-soft); }
.tb-sep { width: 1px; height: 22px; background: var(--line); margin: 0 8px; }
.tb-text { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); font-weight: 600; font-size: 13px; }
.tb-text:hover { background: var(--hover); }
.tb-right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.back { display: none; }

.tip { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--text); color: var(--panel); font-size: 12px; font-weight: 500; padding: 4px 8px; border-radius: 6px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s; z-index: 5; }
.tb:hover .tip, .tb:focus-visible .tip { opacity: 1; }
.comp-foot .tip { top: auto; bottom: calc(100% + 6px); }

.menu-pop { position: absolute; top: calc(100% + 6px); left: 0; min-width: 210px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 6px; z-index: 20; display: none; }
.menu-pop.dir { left: auto; right: 0; }
.menu-pop.open { display: block; }
.menu-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px; color: var(--text); text-align: left; font-size: 13px; }
.menu-pop button:hover { background: var(--hover); }
.menu-pop svg.i { width: 16px; height: 16px; color: var(--muted); }

.msg { flex: 1; overflow-y: auto; padding: 28px 36px 24px; min-height: 0; }
.msg-inner { max-width: 760px; }
.msg-subj { font-family: var(--display); font-size: 25px; line-height: 1.2; font-weight: 750; font-stretch: 106%; margin: 0 0 10px; letter-spacing: -.015em; overflow-wrap: anywhere; }
.msg-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.sender { display: flex; align-items: center; gap: 12px; padding: 14px 0 18px; border-bottom: 1px solid var(--line); }
.sender .av { width: 44px; height: 44px; }
.sender-name { font-weight: 600; }
.sender-mail { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.sender-date { margin-left: auto; color: var(--faint); font-size: 13px; text-align: right; white-space: nowrap; }
.aviso-img { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.aviso-img button { margin-left: auto; font-weight: 600; color: var(--text); white-space: nowrap; }
.corpo { display: block; width: 100%; border: 0; margin-top: 18px; min-height: 120px; background: transparent; }
.files { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.file { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border: 1px solid var(--line); border-radius: 12px; min-width: 220px; max-width: 100%; color: var(--text); text-decoration: none; }
.file:hover { background: var(--hover); }
.file-ico { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.file-name { display: block; font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.file-size { color: var(--faint); font-size: 12px; }
.file .dl { margin-left: auto; color: var(--faint); }

.quick { padding: 14px 36px 20px; border-top: 1px solid var(--line); }
.quick button { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 760px; height: 48px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel-2); color: var(--faint); text-align: left; }
.quick button:hover { border-color: var(--accent); color: var(--muted); }

.reader-empty { flex: 1; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 24px; }
.reader-empty img { width: 72px; height: auto; margin: 0 auto 16px; }
.reader-empty strong { display: block; font-family: var(--display); font-size: 22px; font-weight: 800; font-stretch: 112%; letter-spacing: -.01em; color: var(--text); margin-bottom: 4px; }

/* ---------- Escrever ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); display: none; z-index: 40; }
.scrim.open { display: block; }
.composer {
  position: fixed; right: 28px; bottom: 28px; width: min(640px, calc(100vw - 32px)); max-height: calc(100dvh - 56px);
  background: var(--panel); border-radius: 18px; box-shadow: var(--shadow-pop); border: 1px solid var(--line);
  display: none; flex-direction: column; z-index: 50; overflow: hidden;
}
.composer.open { display: flex; animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.comp-head { display: flex; align-items: center; padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--line); }
.comp-head h2 { margin: 0; font-family: var(--display); font-weight: 800; font-stretch: 112%; font-size: 20px; letter-spacing: -.01em; }
.comp-head .tb { margin-left: auto; }
.field { display: flex; align-items: center; gap: 12px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.field label { color: var(--faint); width: 56px; font-size: 13px; flex: none; }
.field input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; height: 44px; }
.cc-toggle { color: var(--faint); font-size: 12px; font-weight: 600; }
.cc-toggle:hover { color: var(--text); }
.comp-body { flex: 1; min-height: 220px; overflow-y: auto; outline: none; padding: 16px 20px; line-height: 1.6; overflow-wrap: anywhere; }
.comp-body:empty::before { content: "Escreva a sua mensagem"; color: var(--faint); }
.comp-body blockquote { margin: 8px 0 0; padding-left: 12px; border-left: 3px solid var(--line); color: var(--muted); }
.comp-body a { color: var(--accent); }
.comp-files { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 20px; }
.comp-files:not(:empty) { padding-bottom: 10px; }
.comp-file { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 6px 0 10px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); font-size: 12px; max-width: 100%; }
.comp-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.comp-file button { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: var(--faint); }
.comp-file button:hover { color: var(--danger); background: var(--hover); }
.comp-file svg.i { width: 14px; height: 14px; }
.comp-foot { display: flex; align-items: center; gap: 4px; padding: 12px 14px; border-top: 1px solid var(--line); }
.send { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 12px; background: var(--btn-bg); color: var(--on-btn); font-weight: 600; margin-right: 8px; box-shadow: 0 6px 18px var(--brilho); }
.send:hover { background: var(--btn-bg-hover); }

/* ---------- Aviso ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 24px);
  background: var(--text); color: var(--panel); padding: 12px 14px 12px 18px; border-radius: 12px; box-shadow: var(--shadow-pop);
  display: flex; align-items: center; gap: 16px; font-weight: 500; opacity: 0; pointer-events: none; transition: .2s ease; z-index: 60; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { color: var(--toast-btn); font-weight: 700; padding: 4px 8px; border-radius: 6px; }

/* ---------- Login ---------- */
.tela-login {
  overflow: auto; display: grid; place-items: center; min-height: 100vh; padding: 24px 16px; position: relative;
  background:
    radial-gradient(70vmax 60vmax at 100% 0%, var(--luz-1), transparent 62%),
    radial-gradient(60vmax 55vmax at 0% 100%, var(--luz-2), transparent 62%),
    var(--bg);
}
.login { position: relative; z-index: 1; width: min(400px, 100%); background: var(--panel); border-radius: 20px; box-shadow: var(--shadow); padding: 36px 44px 28px 32px; }
/* a mesma película do menu, na borda direita do cartão */
.login::after {
  content: ""; position: absolute; top: 16px; bottom: 16px; right: 12px; width: 8px;
  background: var(--hole);
  -webkit-mask: var(--furos) repeat-y;
          mask: var(--furos) repeat-y;
}
.login-marca { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 22px; }
.login-marca img { width: 112px; height: auto; }
.login-marca span { font-size: 11px; font-weight: 600; letter-spacing: .38em; text-transform: uppercase; color: var(--accent); padding-left: .38em; }
.login h1 { font-family: var(--display); font-weight: 800; font-stretch: 112%; font-size: 23px; letter-spacing: -.015em; text-align: center; margin: 0 0 6px; }
.login-sub { color: var(--muted); margin: 0 0 22px; text-align: center; font-size: 13px; }
.login-erro { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); padding: 10px 12px; border-radius: 10px; font-weight: 600; margin: 0 0 16px; }
.login form { display: flex; flex-direction: column; gap: 14px; }
.login label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.login input { height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); outline: none; font-size: 15px; }
.login input:focus { border-color: var(--accent); }
.login-btn { height: 48px; margin-top: 6px; border-radius: 12px; background: var(--btn-bg); color: var(--on-btn); font-weight: 700; font-size: 15px; box-shadow: 0 8px 22px var(--brilho); }
.login-btn:hover { background: var(--btn-bg-hover); }
.login-rodape { color: var(--faint); font-size: 12px; margin: 20px 0 0; text-align: center; }

/* ---------- Responsivo ---------- */
@media (max-width: 1240px) {
  .app { grid-template-columns: 84px 360px minmax(0, 1fr); }
  .side { padding: 18px 22px 16px 10px; }
  .side::after { right: 6px; }
  .nav { margin-right: -16px; padding-right: 16px; }
  .nav-item[aria-current="page"]::after { right: -16px; }
  .brand { justify-content: center; padding: 0 0 14px; }
  .brand-name, .nav-item > span:not(.count):not(.dot), .nav-title, .storage, .compose-btn span, .theme span, .sair span, .account { display: none !important; }
  .nav-item, .sair { justify-content: center; padding: 0; }
  .nav-item .count { position: absolute; top: 2px; right: 2px; margin: 0; }
  .nav-item .count:not(.hot) { display: none; }
  .theme { grid-template-columns: 1fr; }
  .list-title { font-size: 20px; font-stretch: 100%; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); padding: 0; gap: 0; }
  .list, .reader { border-radius: 0; box-shadow: none; }
  .reader { display: none; }
  .app.reading .list { display: none; }
  .app.reading .reader { display: flex; }
  .toolbar .back, .list-top .menu-btn { display: grid; }
  .side {
    position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 45; border-radius: 0 18px 18px 0;
    transform: translateX(-105%); transition: transform .22s ease; padding: 18px 26px 16px 14px;
  }
  .side.open { transform: none; }
  .side .brand { justify-content: flex-start; padding: 0 4px 10px; }
  .side .brand-name { display: block !important; }
  .side::after { right: 8px; }
  .side .nav { margin-right: -18px; padding-right: 18px; }
  .side .nav-item[aria-current="page"]::after { right: -18px; }
  .side .nav-item > span:not(.count):not(.dot), .side .nav-title, .side .storage, .side .compose-btn span, .side .theme span, .side .sair span { display: revert !important; }
  .side .account { display: block !important; }
  .side .nav-item, .side .sair { justify-content: flex-start; padding: 0 12px; }
  .side .nav-item .count { position: static; margin-left: auto; }
  .side .nav-item .count:not(.hot) { display: revert; }
  .side .theme { grid-template-columns: 1fr 1fr; }
  .msg { padding: 20px 16px; }
  .quick { padding: 12px 16px 16px; }
  .composer { right: 0; bottom: 0; width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .sender-date { display: none; }
  .list-title { font-size: 19px; }
  .list-sub { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Impressão: só a mensagem aberta ---------- */
@media print {
  body { overflow: visible; background: #fff; }
  .side, .list, .toolbar, .quick, .composer, .toast, .scrim, #avisoImg { display: none !important; }
  .app { display: block; height: auto; padding: 0; }
  .reader { display: block !important; box-shadow: none; border-radius: 0; overflow: visible; }
  .msg { overflow: visible; padding: 0; }
}
