/* Dolce Vita Mail — layout do esboço da Hager com a identidade do Resort Dolce Vita Pet.
   Fonte da identidade: Manual de Marca Dolce Vita (azul-marinho #151E34, ouro #E1AC55 / #F2DB72 / #F8EE7F,
   apoio verde #89C697 e turquesa #94D1D0; títulos em Mories, texto em Noto Serif).
   Toda a cor do webmail vem destes tokens (claro, escuro e escuro automático). */

/* ---------- Tokens ---------- */
:root {
  --marinho: #151E34;
  --gold: #E1AC55;

  --bg: #F2EFE7;
  --panel: #FFFFFF;
  --panel-2: #FAF8F3;
  --hover: #F5F1E6;
  --sel: #F0E7CE;
  --line: #E6E0D0;
  --text: #151E34;
  --muted: #55607A;
  --faint: #6F788E;
  --accent: #946512;
  --accent-soft: rgba(225, 172, 85, .2);
  --primary: #151E34;
  --on-primary: #F2DB72;
  --primary-hover: #232F52;
  --btn-bg: #151E34;
  --btn-bg-hover: #232F52;
  --danger: #B4372E;
  --star: #C48A1E;
  --toast-btn: #F2DB72;
  --scrim: rgba(21, 30, 52, .5);
  --arco-opacidade: .55;
  --shadow: 0 1px 2px rgba(21, 30, 52, .05), 0 10px 28px rgba(21, 30, 52, .07);
  --shadow-pop: 0 24px 64px rgba(21, 30, 52, .26);

  /* Mories é fonte licenciada: enquanto o arquivo não vem do cliente, entra a Cormorant Garamond */
  --font: "Noto Serif", Georgia, "Times New Roman", serif;
  --display: "Mories", "Cormorant Garamond", Georgia, serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0C1120;
  --panel: #151E34;
  --panel-2: #1A2540;
  --hover: #202C4A;
  --sel: #2A3961;
  --line: rgba(242, 219, 114, .13);
  --text: #F5F2EA;
  --muted: #AEB6CA;
  --faint: #8892AE;
  --accent: #E1AC55;
  --accent-soft: rgba(225, 172, 85, .16);
  --primary: #E1AC55;
  --on-primary: #151E34;
  --primary-hover: #F2DB72;
  --btn-bg: linear-gradient(180deg, #F2DB72 0%, #E1AC55 100%);
  --btn-bg-hover: linear-gradient(180deg, #F8EE7F 0%, #EBB95F 100%);
  --danger: #F28B7D;
  --star: #F2DB72;
  --toast-btn: #151E34;
  --scrim: rgba(5, 8, 18, .62);
  --arco-opacidade: .9;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px rgba(0, 0, 0, .32);
  --shadow-pop: 0 24px 64px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C1120;
    --panel: #151E34;
    --panel-2: #1A2540;
    --hover: #202C4A;
    --sel: #2A3961;
    --line: rgba(242, 219, 114, .13);
    --text: #F5F2EA;
    --muted: #AEB6CA;
    --faint: #8892AE;
    --accent: #E1AC55;
    --accent-soft: rgba(225, 172, 85, .16);
    --primary: #E1AC55;
    --on-primary: #151E34;
    --primary-hover: #F2DB72;
    --btn-bg: linear-gradient(180deg, #F2DB72 0%, #E1AC55 100%);
    --btn-bg-hover: linear-gradient(180deg, #F8EE7F 0%, #EBB95F 100%);
    --danger: #F28B7D;
    --star: #F2DB72;
    --toast-btn: #151E34;
    --scrim: rgba(5, 8, 18, .62);
    --arco-opacidade: .9;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px rgba(0, 0, 0, .32);
    --shadow-pop: 0 24px 64px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

/* logo certo para cada tema */
.logo-escuro { display: none !important; }
:root[data-theme="dark"] .logo-claro { display: none !important; }
:root[data-theme="dark"] .logo-escuro { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-claro { display: none !important; }
  :root:not([data-theme="light"]) .logo-escuro { display: block !important; }
}

/* ---------- 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: 20px 14px 16px;
  min-height: 0;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 2px 10px; min-height: 54px; }
.brand-mini { display: none; }
.brand-mini img { width: 48px; height: auto; }
.brand-name { display: flex; align-items: flex-end; gap: 8px; }
.brand-name img { width: 204px; max-width: 100%; height: auto; display: block; }
.account { font-size: 12px; color: var(--muted); padding: 2px 6px 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-primary); font-weight: 600; font-size: 15px;
  transition: transform .15s ease, background .15s ease;
}
.compose-btn:hover { background: var(--btn-bg-hover); transform: translateY(-1px); }
.compose-btn:active { transform: translateY(0); }

.nav { margin-top: 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); }
/* linha de voo: um traço fino marca a pasta aberta */
.nav-item[aria-current="page"]::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 3px; height: 20px; margin-top: -10px; border-radius: 0 3px 3px 0;
  background: var(--gold);
}
.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(--primary); color: var(--on-primary); }
.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(--gold); 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: 600; font-size: 21px; line-height: 1.1; letter-spacing: .04em; text-transform: uppercase; 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(--gold); }
.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: 31px; line-height: 1.15; font-weight: 600; margin: 0 0 10px; letter-spacing: .005em; 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: 104px; height: auto; margin: 0 auto 18px; }
.reader-empty strong { display: block; font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; 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: 600; font-size: 22px; letter-spacing: .06em; text-transform: uppercase; }
.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-primary); font-weight: 600; margin-right: 8px; }
.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; }
.tela-login::before, .tela-login::after { content: ""; position: fixed; background: url(arco.svg) center / contain no-repeat; opacity: var(--arco-opacidade); pointer-events: none; }
.tela-login::before { width: min(92vmin, 780px); aspect-ratio: 1; right: -16vmin; top: -20vmin; }
.tela-login::after { width: min(56vmin, 460px); aspect-ratio: 1; left: -14vmin; bottom: -18vmin; transform: rotate(150deg); }
.login { position: relative; z-index: 1; }
.login { width: min(400px, 100%); background: var(--panel); border-radius: 20px; box-shadow: var(--shadow); padding: 36px 32px 28px; }
.login-marca { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 22px; }
.login-marca img { width: 170px; 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: 600; font-size: 24px; letter-spacing: .04em; text-transform: uppercase; 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-primary); font-weight: 700; font-size: 15px; }
.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 10px 16px; }
  .brand { justify-content: center; padding: 0 0 14px; }
  .brand-mini { display: block; }
  .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; }
}
@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: 20px 14px 16px;
  }
  .side.open { transform: none; }
  .side .brand { justify-content: flex-start; padding: 0 6px 8px; }
  .side .brand-mini { display: none !important; }
  .side .brand-name { display: flex !important; }
  .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; }
}
