/* Hiperlink Mail — visual 2026-11 (névoa azulada + cartões flutuantes; cores da marca Hiperlink) */
@font-face {
  font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("fonts/figtree-latin-wght.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("fonts/figtree-latin-ext-wght.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --azul: #0E3A5B; --ciano: #0099C1; --verde: #4FA83D;
  --bg: #EAF1F6; --surface: #FFFFFF; --surface-2: #F2F6F9; --hover: #E6EEF4; --line: #DCE6ED;
  --text: #10283A; --muted: #587082; --link: #00789A;
  --accent: #0E3A5B; --accent-text: #FFFFFF;
  --compose: #C9EAF5; --compose-text: #0B3350;
  --sel: #D3ECF6; --nav-active: #CFE6F2; --nav-active-text: #0B3350;
  --unread: #0B1F2E; --dot: #4FA83D;
  --danger: #B3261E; --danger-bg: #FCE8E6; --ok: #2F7D32; --star: #E0A100; --focus: #0099C1;
  --shadow-card: 0 1px 2px rgba(16, 40, 58, .06), 0 1px 3px rgba(16, 40, 58, .04);
  --shadow-pop: 0 12px 32px rgba(16, 40, 58, .18), 0 2px 6px rgba(16, 40, 58, .08);
  --r-card: 18px; --r-ctl: 12px; --chip: transparent;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="claro"]) {
    --bg: #0C1822; --surface: #13212D; --surface-2: #182A38; --hover: #1D3243; --line: #243A4C;
    --text: #E4EDF3; --muted: #93A9B9; --link: #62C9EA;
    --accent: #3DB5DC; --accent-text: #052030;
    --compose: #1E4A62; --compose-text: #E4F5FC;
    --sel: #1B3A4E; --nav-active: #1E4258; --nav-active-text: #E4F5FC;
    --unread: #FFFFFF; --dot: #7BCB66;
    --danger: #FF8A80; --danger-bg: #3A1A1A; --ok: #7BCB66; --star: #F5C342; --focus: #62C9EA;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, .35); --shadow-pop: 0 14px 36px rgba(0, 0, 0, .55); --chip: #FFFFFF;
    color-scheme: dark;
  }
}
:root[data-theme="escuro"] {
  --bg: #0C1822; --surface: #13212D; --surface-2: #182A38; --hover: #1D3243; --line: #243A4C;
  --text: #E4EDF3; --muted: #93A9B9; --link: #62C9EA;
  --accent: #3DB5DC; --accent-text: #052030;
  --compose: #1E4A62; --compose-text: #E4F5FC;
  --sel: #1B3A4E; --nav-active: #1E4258; --nav-active-text: #E4F5FC;
  --unread: #FFFFFF; --dot: #7BCB66;
  --danger: #FF8A80; --danger-bg: #3A1A1A; --ok: #7BCB66; --star: #F5C342; --focus: #62C9EA;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .35); --shadow-pop: 0 14px 36px rgba(0, 0, 0, .55); --chip: #FFFFFF;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 0;
}
a { color: var(--link); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { display: block; flex: none; }

/* botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; white-space: nowrap; font-weight: 600; font-size: 14px;
}
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.1); box-shadow: var(--shadow-card); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 60%, transparent); background: transparent; }
.btn.danger.solid { background: var(--danger); color: #fff; border-color: transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none;
  border: 0; background: transparent; border-radius: 50%; cursor: pointer; color: var(--muted);
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn.xs { width: 26px; height: 26px; }
.icon-btn.on { color: var(--star); }
.icon-btn.on svg { fill: currentColor; }

input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], textarea, select {
  width: 100%; min-height: 44px; padding: 9px 14px; border: 1px solid var(--line); border-radius: var(--r-ctl);
  background: var(--surface); color: var(--text);
}
input:focus, textarea:focus, select:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: 14px; }
.hint { color: var(--muted); font-size: 13px; }
.error { color: var(--danger); background: var(--danger-bg); padding: 10px 14px; border-radius: var(--r-ctl); margin: 10px 0; font-size: 14px; }

/* avatar com inicial */
.avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--ciano); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 16px; flex: none; user-select: none;
}
.avatar.sm { width: 34px; height: 34px; font-size: 14px; }
.avatar.lg { width: 44px; height: 44px; font-size: 18px; }

/* login */
.login-wrap {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px;
  background:
    radial-gradient(900px 500px at 85% -10%, color-mix(in srgb, var(--verde) 35%, transparent), transparent 60%),
    radial-gradient(800px 600px at -10% 110%, color-mix(in srgb, var(--ciano) 55%, transparent), transparent 60%),
    linear-gradient(160deg, #0E3A5B 0%, #0A2C46 100%);
}
.login-card {
  width: 100%; max-width: 400px; background: var(--surface); border-radius: 24px; padding: 32px 28px 28px;
  box-shadow: 0 24px 60px rgba(3, 18, 30, .45);
}
.logo-chip { background: #fff; border-radius: 14px; padding: 6px 10px; display: inline-flex; }
.login-card .logo-chip { display: flex; justify-content: center; margin: 0 auto 10px; width: fit-content; }
.login-card .logo-chip img { width: 168px; height: auto; display: block; }
.login-card h1 { font-size: 24px; letter-spacing: -.01em; text-align: center; margin: 4px 0 2px; font-weight: 750; }
.login-card p.sub { text-align: center; color: var(--muted); margin: 0 0 14px; font-size: 14px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; margin: 16px 0; }
.check input { width: 20px; height: 20px; accent-color: var(--ciano); }
.login-card .btn.primary { width: 100%; min-height: 48px; margin-top: 4px; font-size: 15px; }

/* layout principal: menu sobre a névoa + cartões flutuando */
.shell {
  display: grid; grid-template-columns: 256px minmax(320px, 420px) 1fr; gap: 12px;
  height: 100vh; height: 100dvh; padding: 12px 12px 12px 0;
}
.shell.wide { grid-template-columns: 256px 1fr; }
.side { display: flex; flex-direction: column; min-height: 0; padding-left: 12px; }
.side .brand { padding: 6px 12px 14px; }
.side .brand .logo-chip { padding: 4px 6px; background: var(--chip); }
.side .brand img { width: 112px; display: block; }
.side .compose {
  display: inline-flex; align-items: center; gap: 12px; align-self: flex-start;
  min-height: 56px; padding: 0 26px 0 20px; margin: 0 0 14px; border: 0; border-radius: 18px;
  background: var(--compose); color: var(--compose-text); font-weight: 700; font-size: 15px; cursor: pointer;
  box-shadow: var(--shadow-card);
}
.side .compose:hover { box-shadow: var(--shadow-pop); }
.side nav { overflow-y: auto; flex: 1; padding: 0 0 8px; }
.nav-item {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 40px; padding: 0 16px; border: 0;
  background: transparent; border-radius: 999px; cursor: pointer; text-align: left; color: var(--text); font-size: 14.5px;
}
.nav-item .lbl { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .ico { color: var(--muted); display: inline-flex; }
.nav-item:hover { background: var(--hover); }
.nav-item.active { background: var(--nav-active); color: var(--nav-active-text); font-weight: 700; }
.nav-item.active .ico { color: var(--nav-active-text); }
.nav-item .count { font-size: 12px; font-weight: 700; color: inherit; }
.nav-item.active .count, .nav-item .count { min-width: 22px; text-align: right; }
.nav-sep { height: 1px; background: var(--line); margin: 10px 16px; }
.side .me {
  display: flex; align-items: center; gap: 10px; padding: 10px 6px 4px 10px; margin-top: 6px; border-top: 1px solid var(--line);
}
.side .me .me-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.side .me .me-txt b, .side .me .me-txt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .me .me-txt b { font-size: 14px; font-weight: 650; }
.side .me .me-txt small { font-size: 12px; color: var(--muted); }

/* cartão da lista */
.list-pane {
  display: flex; flex-direction: column; min-height: 0; background: var(--surface);
  border-radius: var(--r-card); box-shadow: var(--shadow-card); overflow: hidden;
}
.list-head { padding: 14px 14px 10px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line); }
.list-head .row { display: flex; align-items: center; gap: 6px; }
.list-head h2 { font-size: 20px; letter-spacing: -.01em; margin: 0 0 0 4px; flex: 1; font-weight: 750; }
.search {
  display: flex; align-items: center; gap: 10px; padding: 0 16px; min-height: 44px;
  background: var(--surface-2); border-radius: 999px; color: var(--muted); border: 1px solid transparent;
}
.search:focus-within { background: var(--surface); border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent); }
.search input.bare { border: 0; background: transparent; min-height: 42px; padding: 0; box-shadow: none; flex: 1; }
.search input.bare::-webkit-search-cancel-button { cursor: pointer; }
.list-head .all { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 0 0 0 6px; }
.list-head .all input { accent-color: var(--ciano); width: 16px; height: 16px; }
.msgs { overflow-y: auto; flex: 1; padding: 6px; }
.msg {
  position: relative; display: grid; grid-template-columns: 40px 1fr auto; gap: 0 12px; align-items: center;
  width: 100%; padding: 10px 12px 10px 14px; border: 0; border-radius: 14px; margin: 0 0 2px;
  background: transparent; cursor: pointer; text-align: left;
}
.msg .avatar { grid-row: 1 / span 3; align-self: start; margin-top: 2px; }
.msg-row { position: relative; }
.quick { display: none; }
@media (hover: hover) and (pointer: fine) {
  .quick {
    position: absolute; top: 6px; right: 8px; display: flex; gap: 0; padding: 0 2px;
    border-radius: 999px; background: var(--hover); opacity: 0; pointer-events: none;
  }
  .msg-row:has(.msg.sel) .quick { background: var(--sel); }
  .msg-row:hover .quick, .msg-row:focus-within .quick { opacity: 1; pointer-events: auto; }
  .msg-row:hover .msg .date, .msg-row:focus-within .msg .date { visibility: hidden; }
  .msg-row:hover .msg { background: var(--hover); }
  .msg-row:hover .msg.sel { background: var(--sel); }
  .quick .icon-btn { width: 34px; height: 34px; }
  .quick .icon-btn:hover { background: color-mix(in srgb, var(--text) 10%, transparent); }
}
.msg:hover { background: var(--hover); }
.msg.sel { background: var(--sel); }
.msg .from { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.msg .date { color: var(--muted); font-size: 12px; white-space: nowrap; font-weight: 500; }
.msg .subj { grid-column: 2 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.msg .prev { grid-column: 2 / -1; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.msg .flags { display: inline-flex; gap: 4px; align-items: center; flex: none; }
.msg .flags:empty { display: none; }
.msg .flags .star { color: var(--star); }
.msg .flags .clip { display: inline-flex; color: var(--muted); }
.msg.unread .from, .msg.unread .subj { font-weight: 750; color: var(--unread); }
.msg.unread .date { color: var(--link); font-weight: 700; }
.msg.unread::before {
  content: ""; position: absolute; left: 4px; top: 50%; width: 6px; height: 6px; margin-top: -3px;
  border-radius: 50%; background: var(--dot);
}
.empty { padding: 56px 24px; text-align: center; color: var(--muted); }
.more { padding: 12px; text-align: center; color: var(--muted); font-size: 13px; }

/* cartão de leitura */
.reader {
  display: flex; flex-direction: column; min-height: 0; background: var(--surface);
  border-radius: var(--r-card); box-shadow: var(--shadow-card); overflow: hidden;
}
.reader-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 8px 12px; align-items: center; border-bottom: 1px solid var(--line); }
.reader-bar .grow { flex: 1; }
.reader-bar .btn { min-height: 36px; padding: 0 14px; }
.reader-bar select.move { width: auto; min-height: 36px; padding: 4px 34px 4px 14px; border-radius: 999px; font-size: 14px; margin-left: 4px; }
.reader-body { overflow-y: auto; flex: 1; padding: 22px 28px 32px; }
.reader h1 { font-size: 24px; line-height: 1.25; letter-spacing: -.01em; margin: 0 0 18px; overflow-wrap: anywhere; font-weight: 700; }
.meta { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.meta .who { flex: 1; min-width: 0; font-size: 14px; line-height: 1.4; }
.meta .who b { font-size: 15px; font-weight: 700; }
.meta .who .addr, .meta .who .to { color: var(--muted); overflow-wrap: anywhere; }
.meta .when { color: var(--muted); font-size: 13px; white-space: nowrap; }
.notice {
  background: var(--surface-2); border-radius: var(--r-ctl); padding: 10px 14px; display: flex; gap: 10px;
  align-items: center; flex-wrap: wrap; font-size: 14px; margin-bottom: 12px;
}
.notice .btn { min-height: 34px; }
.frame-wrap { background: #fff; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; }
.frame-wrap iframe { width: 100%; border: 0; display: block; min-height: 120px; }
.atts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.att {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--surface); color: var(--text); text-decoration: none; font-size: 14px; max-width: 100%;
}
.att:hover { background: var(--hover); }
.att .att-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--sel); color: var(--link); flex: none; }
.att span:not(.att-ico) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.att small { color: var(--muted); }
.reader .placeholder { margin: auto; color: var(--muted); text-align: center; padding: 40px; }
.reader .placeholder .logo-chip { opacity: .85; }
.reader .placeholder img { width: 132px; }
.reader .placeholder p { margin: 14px 0 0; }

/* páginas (contatos, configurações, gerência) */
.page {
  overflow-y: auto; height: 100%; padding: 26px 32px 40px; background: var(--surface);
  border-radius: var(--r-card); box-shadow: var(--shadow-card);
}
.page h2 { margin: 0 0 18px; font-size: 24px; letter-spacing: -.01em; font-weight: 750; }
.page h3 { margin: 26px 0 10px; font-size: 17px; font-weight: 700; }
.card { background: var(--surface-2); border-radius: var(--r-card); padding: 18px 20px; max-width: 760px; margin-bottom: 16px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; max-width: 980px; }
.toolbar input { flex: 1; min-width: 160px; border-radius: 999px; }
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; max-width: 980px; }
table.grid th, table.grid td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; font-size: 14px; }
table.grid tr:last-child td { border-bottom: 0; }
table.grid th { background: var(--surface-2); font-size: 13px; color: var(--muted); font-weight: 600; }
table.grid td.actions { white-space: nowrap; text-align: right; }
.badge { display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 999px; font-weight: 650; }
.badge.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.badge.off { background: var(--danger-bg); color: var(--danger); }
.badge.mgr { background: color-mix(in srgb, var(--ciano) 16%, transparent); color: var(--link); }
.bar { height: 6px; background: var(--hover); border-radius: 3px; overflow: hidden; margin-top: 4px; width: 120px; }
.bar i { display: block; height: 100%; background: var(--ciano); border-radius: 3px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.creds { background: var(--surface-2); border: 1px dashed var(--line); border-radius: var(--r-ctl); padding: 12px 14px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 0 16px; cursor: pointer; min-height: 36px; border-radius: 999px; font-weight: 600; font-size: 14px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-card); }

/* diálogos */
dialog { border: 0; padding: 0; border-radius: 20px; box-shadow: var(--shadow-pop); background: var(--surface); color: var(--text); max-width: calc(100vw - 32px); }
dialog::backdrop { background: rgba(8, 24, 36, .4); }
.confirm-dlg { width: 420px; padding: 24px; }
.confirm-dlg h2 { margin: 0 0 8px; font-size: 19px; font-weight: 700; }
.confirm-dlg p { color: var(--muted); margin: 0; }
.confirm-dlg .acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* escrever: janela flutuante no canto, como nos webmails modernos */
.compose-dlg { width: 600px; height: min(78vh, 680px); margin: auto 24px 0 auto; border-radius: 16px 16px 0 0; overflow: hidden; }
.compose-dlg::backdrop { background: rgba(8, 24, 36, .14); }
.compose-dlg[open] { display: flex; flex-direction: column; }
@media (prefers-reduced-motion: no-preference) {
  .compose-dlg[open] { animation: rise .18s ease-out; }
  @keyframes rise { from { transform: translateY(24px); opacity: .4; } to { transform: none; opacity: 1; } }
}
.dlg-head { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 18px; background: var(--azul); color: #fff; }
.dlg-head h2 { font-size: 15px; margin: 0; flex: 1; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlg-head .icon-btn { color: #fff; width: 36px; height: 36px; }
.dlg-head .icon-btn:hover { background: rgba(255, 255, 255, .16); }
.cfield { display: flex; align-items: flex-start; gap: 8px; padding: 2px 16px; border-bottom: 1px solid var(--line); position: relative; }
.cfield > span.lbl { width: 56px; color: var(--muted); font-size: 14px; padding-top: 10px; flex: none; }
.cfield input.bare { border: 0; min-height: 40px; padding: 6px 4px; background: transparent; flex: 1; min-width: 120px; width: auto; box-shadow: none; border-radius: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 1; min-width: 0; padding: 4px 0; }
.chip { display: inline-flex; align-items: center; gap: 2px; background: var(--sel); border-radius: 999px; padding: 2px 2px 2px 12px; font-size: 13px; font-weight: 600; max-width: 100%; }
.chip.bad { background: var(--danger-bg); color: var(--danger); }
.chip button { border: 0; background: transparent; cursor: pointer; width: 24px; height: 24px; border-radius: 50%; color: var(--muted); }
.chip button:hover { background: var(--hover); }
.cc-toggle { border: 0; background: transparent; color: var(--link); cursor: pointer; padding: 10px 4px; font-size: 14px; font-weight: 600; }
.suggest { position: absolute; left: 72px; right: 16px; top: 100%; z-index: 5; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-pop); max-height: 240px; overflow-y: auto; padding: 4px; }
.suggest button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 12px; cursor: pointer; border-radius: 10px; }
.suggest button:hover, .suggest button.hi { background: var(--sel); }
.suggest small { color: var(--muted); }
.fmt { display: flex; gap: 2px; padding: 4px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; align-items: center; }
.fmt button { min-width: 36px; height: 34px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; font-size: 15px; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.fmt button:hover { background: var(--hover); color: var(--text); }
.editor { flex: 1; overflow-y: auto; padding: 14px 18px; outline: none; min-height: 140px; }
.editor:focus-visible { outline: none; }
.editor blockquote { margin: 0 0 0 .8em; padding-left: .8em; border-left: 3px solid var(--line); color: var(--muted); }
.editor .sig { color: var(--muted); }
.drop-hint { box-shadow: inset 0 0 0 2px var(--ciano); border-radius: 8px; }
.c-atts { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 14px; }
.c-atts:empty { display: none; }
.c-att { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border-radius: 12px; padding: 4px 4px 4px 10px; font-size: 13px; max-width: 100%; color: var(--muted); }
.c-att span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; color: var(--text); font-weight: 600; }
.c-att progress { width: 70px; accent-color: var(--ciano); }
.dlg-foot { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); }
.dlg-foot .grow { flex: 1; color: var(--muted); font-size: 13px; }
.dlg-foot .btn.primary { padding: 0 26px; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
#toast .t { background: #10283A; color: #fff; padding: 11px 18px; border-radius: 12px; box-shadow: var(--shadow-pop); font-size: 14px; font-weight: 500; max-width: calc(100vw - 32px); }
#toast .t.err { background: var(--danger); color: #fff; }
#banner { position: fixed; top: 0; left: 0; right: 0; z-index: 60; background: #B3261E; color: #fff; text-align: center; padding: 8px 16px; font-weight: 600; }

.back { display: none; }
.mobile-top { display: none; }
.fab { display: none; }

/* celular / tablet estreito: uma tela por vez, sem cartões flutuando */
@media (max-width: 800px) {
  .shell, .shell.wide { grid-template-columns: 1fr; padding: 0; gap: 0; }
  .side, .list-pane, .reader, .page { display: none; border-radius: 0; box-shadow: none; }
  .shell[data-view="pastas"] .side { display: flex; height: 100dvh; padding: 12px 12px 8px; background: var(--bg); }
  .shell[data-view="lista"] .list-pane { display: flex; height: 100dvh; }
  .shell[data-view="leitura"] .reader { display: flex; height: 100dvh; }
  .shell[data-view="pagina"] .page { display: block; height: 100dvh; padding: 12px 16px 40px; }
  .back { display: inline-flex; }
  .mobile-top { display: flex; align-items: center; gap: 6px; margin: -4px 0 8px -8px; }
  .list-head { padding: 10px 10px 8px; }
  .reader-body { padding: 16px 16px 28px; }
  .reader h1 { font-size: 21px; }
  .meta { flex-wrap: wrap; }
  .meta .when { flex-basis: 100%; padding-left: 56px; margin-top: -8px; }
  .reader-bar { padding: 6px 6px; }
  .compose-dlg { width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh; margin: 0; border-radius: 0; }
  .row2 { grid-template-columns: 1fr; }
  table.grid.resp thead { display: none; }
  table.grid.resp tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  table.grid.resp td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 4px 12px; }
  table.grid.resp td::before { content: attr(data-l); color: var(--muted); font-size: 12px; }
  table.grid.resp td.actions { justify-content: flex-end; flex-wrap: wrap; white-space: normal; }
  table.grid.resp td.actions::before { content: none; }
  .fab {
    display: inline-flex; align-items: center; justify-content: center; position: fixed; right: 16px; bottom: 20px; z-index: 10;
    width: 60px; height: 60px; border: 0; border-radius: 20px; background: var(--compose); color: var(--compose-text);
    box-shadow: var(--shadow-pop); cursor: pointer;
  }
  .shell[data-view="pastas"] .fab { display: none; } /* a tela de pastas já tem "Escrever"; o FAB cobria o "Sair" */
}
@media (prefers-reduced-motion: no-preference) { .msg, .nav-item, .btn, .icon-btn, .side .compose { transition: background-color .12s, box-shadow .15s; } }
