/* NOTEAPI — layout nos tokens de tokens.css. Usabilidade do Gmail: 3 colunas, lista densa, leitura em página, compose flutuante.
   O .shell ocupa a janela inteira e não rola (só .list/.thread rolam), então tudo que flutua é absolute dentro dele. */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100vh; }
body { background: var(--bg); color: var(--text); font-family: var(--fonte); font-size: var(--texto-lg); line-height: 1.4; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea { font: inherit; color: inherit; }
a { color: var(--azul-300); }
.ic { display: inline-flex; width: 20px; height: 20px; flex: none; }
.ic svg { flex: 1; min-width: 0; align-self: stretch; }
.ibtn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--radius-full); color: var(--text-2); flex: none; }
.ibtn:hover { background: var(--tint); color: var(--text-forte); }
.ibtn[disabled] { opacity: .35; cursor: default; background: none; }
.ibtn:focus-visible, .btn:focus-visible, input:focus-visible, textarea:focus-visible, .row:focus-visible { outline: none; box-shadow: var(--foco); }

/* ---- login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 600px at 70% -10%, rgba(255,0,80,.14), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(41,112,255,.16), transparent 60%), var(--bg); }
.login-card { width: 380px; max-width: calc(100vw - 48px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 32px 28px; box-shadow: var(--elev); display: flex; flex-direction: column; }
.wordmark { font-family: var(--fonte-display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; color: var(--text-forte); display: inline-flex; align-items: center; gap: 8px; text-decoration: none; align-self: flex-start; }
.wordmark b { color: var(--brand); font-weight: 800; }
.wordmark .ic { width: 26px; height: 26px; color: var(--brand); }
.login h1 { font: 600 var(--texto-2xl)/1.2 var(--fonte-display); margin: 18px 0 4px; color: var(--text-forte); }
.login p { margin: 0 0 20px; color: var(--muted); font-size: var(--texto-md); }
.field { display: flex; flex-direction: column; margin-bottom: 12px; }
.field span { font-size: var(--texto-sm); color: var(--text-2); margin-bottom: 6px; }
.field input { align-self: stretch; height: 42px; padding: 0 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-full); color: var(--text-forte); }
.field input:focus { border-color: var(--brand-2); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 20px; border-radius: var(--radius-full); font-weight: 600; }
.btn-primary { background: var(--acao); color: var(--acao-texto); box-shadow: var(--acao-sombra); }
.btn-primary:hover { filter: brightness(1.08); }
.btn[disabled] { opacity: .6; cursor: wait; }
.btn-ghost { border: 1px solid var(--border-forte); color: var(--text); }
.btn-ghost:hover { background: var(--tint); color: var(--text-forte); }
.login .btn { align-self: stretch; margin-top: 6px; }
.err { background: var(--danger-suave); border: 1px solid var(--danger-borda); color: var(--danger-ink); padding: 10px 12px; border-radius: var(--radius); font-size: var(--texto-md); margin-bottom: 12px; }

/* ---- shell */
.shell { position: relative; overflow: hidden; height: 100vh; height: 100dvh; display: grid; grid-template-rows: 56px 1fr; grid-template-columns: 248px 1fr; grid-template-areas: "top top" "side main"; }
.top { grid-area: top; display: flex; align-items: center; gap: 12px; padding: 0 16px 0 12px; border-bottom: 1px solid var(--border); background: var(--surface-alta); }
.top .menu { display: none; }
.search { flex: 1; max-width: 720px; margin: 0 auto; position: relative; display: flex; }
.search input { flex: 1; min-width: 0; height: 40px; padding: 0 40px 0 44px; background: var(--surface-2); border: 1px solid transparent; border-radius: var(--radius-full); color: var(--text-forte); }
.search input::placeholder { color: var(--muted); }
.search input:focus { background: var(--preto-900); border-color: var(--brand-2); }
.search > .ic { position: absolute; left: 14px; top: 10px; color: var(--muted); pointer-events: none; }
.search .clear { position: absolute; right: 6px; top: 4px; width: 32px; height: 32px; }
.search input:placeholder-shown + .clear { display: none; }
.account { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: var(--texto-md); }
.account .av { width: 32px; height: 32px; font-size: 14px; background: var(--grad-logo); }

.side { grid-area: side; padding: 12px 8px 12px 12px; overflow: auto; border-right: 1px solid var(--border); background: var(--surface-alta); }
.compose-btn { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 22px 0 18px; border-radius: var(--radius-full); background: var(--acao); color: var(--acao-texto); font-weight: 600; box-shadow: var(--acao-sombra); margin: 4px 0 14px 4px; }
.compose-btn:hover { filter: brightness(1.08); }
.nav a { display: flex; align-items: center; gap: 12px; height: 34px; padding: 0 14px; border-radius: 0 var(--radius-full) var(--radius-full) 0; color: var(--text-2); text-decoration: none; }
.nav a:hover { background: var(--tint); color: var(--text-forte); }
.nav a.active { background: var(--brand-tenue); color: var(--rosa-400); font-weight: 600; }
.nav a .ic { width: 18px; height: 18px; }
.nav a .n { margin-left: auto; font-size: var(--texto-sm); font-family: var(--fonte-mono); color: var(--muted); }
.nav a.has .n { color: var(--text-forte); font-weight: 600; }
.nav a.active .n { color: inherit; }
.nav .sep { height: 1px; background: var(--border); margin: 10px 14px 10px 0; }
.nav .cap { font-size: var(--texto-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; padding: 6px 14px; }
.side .atalhos { margin: 20px 14px 0; font-size: var(--texto-xs); color: var(--muted); line-height: 1.9; }
.side .atalhos kbd { font-family: var(--fonte-mono); background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; color: var(--text-2); }

.main { grid-area: main; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.toolbar { display: flex; align-items: center; gap: 4px; height: 48px; padding: 0 8px 0 14px; border-bottom: 1px solid var(--border); flex: none; }
.toolbar .grow { flex: 1; }
.toolbar .count { color: var(--muted); font-size: var(--texto-sm); font-family: var(--fonte-mono); margin-right: 4px; white-space: nowrap; }
.toolbar .titulo { color: var(--text-2); font-size: var(--texto-md); margin-left: 6px; }
.chk { width: 18px; height: 18px; accent-color: var(--brand-2); margin: 0; cursor: pointer; }
.toolbar .sepv { width: 1px; height: 20px; background: var(--border-forte); margin: 0 8px 0 6px; }

/* ---- lista */
.list { flex: 1; overflow: auto; }
.row { display: grid; grid-template-columns: 40px 32px 190px 1fr auto 84px; align-items: center; height: 40px; padding: 0 12px 0 8px; border-bottom: 1px solid var(--border); color: var(--text-2); cursor: pointer; position: relative; }
.row:hover { background: var(--tint); box-shadow: inset 0 1px 0 var(--border-forte), inset 0 -1px 0 var(--border-forte); z-index: 1; }
.row.unread { color: var(--text-forte); background: var(--surface); }
.row.unread .row-from, .row.unread .subj { font-weight: 600; }
.row.sel { background: var(--brand-2-tenue); }
.row.cur::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand); }
.row-check { display: flex; align-items: center; justify-content: center; align-self: stretch; }
.row-star { color: var(--cinza-500); display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 50%; }
.row-star:hover { color: var(--text-forte); background: var(--preto-700); }
.row-star.on { color: var(--amarelo-400); }
.row-star .ic { width: 18px; height: 18px; }
.row-from { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 12px; }
.row-n { color: var(--muted); font-weight: 400; font-size: var(--texto-sm); font-family: var(--fonte-mono); margin-left: 4px; }
.row-draft { color: var(--rosa-400); font-weight: 500; margin-left: 6px; }
.row-subj { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.snip { color: var(--muted); font-weight: 400; }
.row-attach { color: var(--muted); width: 16px; height: 16px; margin: 0 8px; }
.row-date { text-align: right; font-size: var(--texto-sm); white-space: nowrap; font-family: var(--fonte-mono); }
.row.unread .row-date { font-weight: 600; }
.row-acts { display: none; position: absolute; right: 8px; top: 2px; gap: 2px; }
.row:hover .row-acts { display: flex; }
.row:hover .row-date { visibility: hidden; }
.row-acts .ibtn { width: 34px; height: 34px; }
.row-acts .ibtn .ic { width: 18px; height: 18px; }

.empty { display: grid; place-items: center; text-align: center; padding: 80px 24px; color: var(--muted); gap: 6px; }
.empty .ic { width: 48px; height: 48px; color: var(--cinza-500); margin-bottom: 6px; }
.empty b { color: var(--text-2); font-weight: 500; font-size: var(--texto-xl); }
.skel { height: 40px; border-bottom: 1px solid var(--border); position: relative; overflow: hidden; }
.skel::after { content: ""; position: absolute; inset: 12px 20% 12px 56px; border-radius: 6px; background: linear-gradient(90deg, var(--surface) 0%, var(--tint) 50%, var(--surface) 99%); background-size: 200% auto; animation: shimmer 1.2s infinite; }
@keyframes shimmer { from { background-position: 200% 0 } to { background-position: -200% 0 } }
.banner { margin: 12px; padding: 10px 14px; border-radius: var(--radius); background: var(--danger-suave); border: 1px solid var(--danger-borda); color: var(--danger-ink); display: flex; gap: 12px; align-items: center; }
.banner .grow { flex: 1; }

/* ---- conversa */
.thread { flex: 1; overflow: auto; padding: 0 0 140px; }
.thread-head { display: flex; align-items: center; gap: 4px; height: 48px; padding: 0 8px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg); z-index: 2; }
.thread h1 { font: 500 var(--texto-2xl)/1.3 var(--fonte-display); margin: 20px 72px 8px; color: var(--text-forte); letter-spacing: -0.01em; }
.thread h1 .chip { font: 500 var(--texto-xs)/18px var(--fonte); vertical-align: middle; margin-left: 10px; padding: 0 8px; border-radius: var(--radius-sm); background: var(--tint); color: var(--text-2); letter-spacing: 0; }
.msg { margin: 8px 72px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--elev); }
.msg.unread { border-color: var(--border-forte); }
.msg-head { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; cursor: pointer; }
.msg.open .msg-head { cursor: default; }
.av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; color: #fff; flex: none; font-size: 16px; text-transform: uppercase; }
.msg-who { flex: 1; min-width: 0; }
.msg-who .name { color: var(--text-forte); font-weight: 600; }
.msg-who .addr { color: var(--muted); font-size: var(--texto-sm); margin-left: 6px; }
.msg-who .to { color: var(--muted); font-size: var(--texto-sm); }
.msg-who .to button { color: var(--muted); margin-left: 4px; }
.msg-who .to button:hover { color: var(--text-forte); }
.msg-who .prev { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: var(--texto-md); }
.msg-meta { display: flex; align-items: center; gap: 2px; color: var(--muted); font-size: var(--texto-sm); white-space: nowrap; position: relative; }
.msg-meta .data { margin-right: 6px; }
.msg-meta .ibtn { width: 32px; height: 32px; }
.msg-meta .ibtn .ic { width: 18px; height: 18px; }
.msg-meta .star.on { color: var(--amarelo-400); }
.msg-details { font-size: var(--texto-sm); color: var(--text-2); padding: 0 16px 10px 68px; display: grid; grid-template-columns: 64px 1fr; gap: 2px 8px; }
.msg-details span:nth-child(odd) { color: var(--muted); }
.msg-body { padding: 4px 16px 16px 68px; display: flex; }
iframe.body { flex: 1; min-width: 0; border: 0; border-radius: 8px; background: #fff; min-height: 60px; display: block; }
.atts { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 16px 68px; }
.att { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius); border: 1px solid var(--border-forte); background: var(--surface-2); color: var(--text); text-decoration: none; font-size: var(--texto-md); max-width: 320px; }
.att:hover { border-color: var(--brand-2); color: var(--text-forte); }
.att .ic { width: 16px; height: 16px; color: var(--muted); }
.att .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att small { color: var(--muted); }
.reply-bar { display: flex; gap: 10px; margin: 16px 72px; }
.reply-slot { margin: 8px 72px; }
.menu-pop { position: absolute; right: 8px; top: 40px; z-index: 5; background: var(--preto-700); border: 1px solid var(--border-forte); border-radius: var(--radius); box-shadow: var(--shadow-modal); padding: 6px; min-width: 200px; display: flex; flex-direction: column; }
.menu-pop button { display: flex; align-self: stretch; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; text-align: left; color: var(--text); }
.menu-pop button:hover { background: var(--tint); color: var(--text-forte); }

/* ---- compose (janelas flutuantes no canto, como no Gmail) */
#composers { position: absolute; right: 16px; bottom: 0; display: flex; flex-direction: row-reverse; gap: 12px; align-items: flex-end; z-index: 20; pointer-events: none; }
#composers > * { pointer-events: auto; }
.compose { width: 560px; max-width: calc(100vw - 32px); height: 540px; max-height: calc(100vh - 80px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border-forte); border-bottom: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; box-shadow: var(--shadow-modal); }
.compose.min { height: 44px; overflow: hidden; width: 300px; }
.compose.inline { width: auto; max-width: none; height: auto; max-height: none; border-bottom: 1px solid var(--border-forte); border-radius: var(--radius-lg); box-shadow: var(--elev); }
.c-head { display: flex; align-items: center; height: 44px; padding: 0 8px 0 16px; background: var(--preto-900); border-radius: var(--radius-lg) var(--radius-lg) 0 0; border-bottom: 1px solid var(--border); cursor: pointer; flex: none; }
.compose.inline .c-head { cursor: default; }
.c-title { font-weight: 600; color: var(--text-forte); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-head .ibtn { width: 30px; height: 30px; }
.c-head .ibtn .ic { width: 16px; height: 16px; }
.c-row { display: flex; align-items: center; gap: 8px; padding: 0 16px; border-bottom: 1px solid var(--border); min-height: 40px; flex: none; }
.c-row label { color: var(--muted); font-size: var(--texto-md); min-width: 28px; }
.c-in { flex: 1; min-width: 0; background: none; border: 0; outline: none; height: 40px; color: var(--text-forte); }
.c-in::placeholder { color: var(--muted); }
.c-link { color: var(--muted); font-size: var(--texto-sm); }
.c-link:hover { color: var(--text-forte); }
.c-body { flex: 1; min-height: 140px; resize: none; background: none; border: 0; outline: none; padding: 12px 16px; color: var(--text-forte); line-height: 1.5; }
.compose.inline .c-body { min-height: 180px; }
.c-files { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px 4px 10px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); font-size: var(--texto-sm); }
.chip .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.chip small { color: var(--muted); }
.chip-x { color: var(--muted); font-size: 16px; line-height: 1; padding: 0 2px; }
.chip-x:hover { color: var(--danger-ink); }
.c-foot { display: flex; align-items: center; gap: 6px; padding: 10px 12px 12px 16px; border-top: 1px solid var(--border); flex: none; }
.c-grow { flex: 1; }
.c-hint { color: var(--muted); font-size: var(--texto-xs); }
.btn-send { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 22px; border-radius: var(--radius-full); background: var(--acao); color: var(--acao-texto); font-weight: 600; box-shadow: var(--acao-sombra); }
.btn-send[disabled] { opacity: .6; cursor: wait; }

/* ---- toast */
.toast { position: absolute; left: 24px; bottom: 24px; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 12px 18px; border-radius: var(--radius); background: var(--preto-700); color: var(--text-forte); box-shadow: var(--shadow-modal); font-size: var(--texto-md); animation: up .18s ease-out; max-width: calc(100vw - 48px); }
.toast button { color: var(--azul-300); font-weight: 600; white-space: nowrap; }
.toast.erro { border: 1px solid var(--danger-borda); }
@keyframes up { from { transform: translateY(8px); opacity: 0 } }

.scrim { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; grid-template-areas: "top" "main"; }
  .top .menu { display: inline-flex; }
  .top { padding-left: 8px; gap: 8px; }
  .side { position: absolute; top: 56px; bottom: 0; left: 0; width: 260px; transform: translateX(-101%); transition: transform .18s; z-index: 15; }
  .shell.side-open .side { transform: none; }
  .shell.side-open .scrim { display: block; position: absolute; inset: 56px 0 0; background: var(--scrim); z-index: 14; }
  .account span { display: none; }
  .wordmark span { display: none; }
  .row { grid-template-columns: 32px 1fr 70px; grid-template-rows: 20px 20px; height: 66px; padding: 8px 12px 8px 4px; row-gap: 2px; }
  .row-check { display: none; }
  .row-star { grid-row: 1 / 3; }
  .row-from { grid-column: 2; grid-row: 1; padding: 0; }
  .row-date { grid-column: 3; grid-row: 1; }
  .row-subj { grid-column: 2 / 4; grid-row: 2; }
  .row-attach { display: none; }
  .row-acts { display: none !important; }
  .row:hover .row-date { visibility: visible; }
  .thread h1, .msg, .reply-bar, .reply-slot { margin-left: 12px; margin-right: 12px; }
  .msg-body, .atts, .msg-details { padding-left: 16px; }
  .msg-who .addr { display: none; }
  #composers { right: 0; }
  .compose { width: 100vw; max-width: 100vw; height: calc(100vh - 56px); max-height: none; border-radius: 0; }
  .compose.min { width: 100vw; }
  .toolbar .count { font-size: var(--texto-xs); }
}

/* ---- ajustes da 1ª conferência visual (07/10) */
.shell { grid-template-columns: 248px minmax(0, 1fr); }
.search { min-width: 0; }
.search input { width: 0; }
.side .atalhos, .c-hint { font-size: var(--texto-sm); }
.c-head .ibtn { width: 32px; height: 32px; }
.c-link { display: inline-flex; align-items: center; min-height: 32px; padding: 0 8px; border-radius: var(--radius-sm); }
.c-link:hover { background: var(--tint); }
.c-in:focus-visible, .c-body:focus-visible { box-shadow: none; }
.toast button { min-width: 32px; min-height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.msg-who .to button { padding: 2px 8px; min-height: 24px; }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .search input { padding-right: 36px; }
  .search input { text-overflow: ellipsis; }
}

/* ---- 2ª conferência (07/10): celular — cabeçalho da mensagem e saída */
.msg-who .quando { display: none; color: var(--muted); font-size: var(--texto-sm); margin-top: 2px; }
.so-celular { display: none; }
@media (max-width: 900px) {
  .account .ibtn { display: none; }
  .so-celular { display: block; }
  .msg-meta .data { display: none; }
  .msg-who .quando { display: block; }
  .msg-who .to { white-space: nowrap; }
}

/* ---- 3ª conferência (07/10): barra de resposta no celular */
.reply-bar { flex-wrap: wrap; }
.reply-bar .btn { white-space: nowrap; }
@media (max-width: 900px) { .reply-bar .btn { padding: 0 14px; height: 36px; } }

/* ---- figura hairline (caixas de correio nos postes), nas cores dos tokens */
.figura { width: 340px; max-width: calc(100vw - 110px); margin: 0 auto; --hairline-plate: var(--surface); --hairline-edge: var(--cinza-100); --hairline-mid: var(--cinza-300); --hairline-lo: var(--cinza-500); --hairline-hi: var(--rosa-400); }
.figura-leitura { width: 340px; max-width: calc(100vw - 110px); margin: -6px auto 8px; text-align: right; font: var(--texto-sm)/1 var(--fonte-mono); color: var(--muted); }
.login-card .figura-slot { display: flex; flex-direction: column; margin-top: 4px; }
.empty .figura { width: 320px; --hairline-plate: var(--bg); }
.empty .figura-leitura { width: 320px; margin-bottom: 4px; }
/* o quadro 5:4 da figura tem faixa vazia em cima e embaixo: recorta pelo contêiner, sem tocar na figura */
.login-card .figura-slot { overflow: hidden; height: 212px; }
.login-card .figura { margin-top: -30px; }
/* estados vazios: as figuras de pasta (lixeira, placa) são altas e usam o quadro inteiro, então ali não recorta */
.empty .figura-wrap { margin: 0 auto 4px; }
.empty .figura { width: 300px; }

/* ---- estados com figura do pacote hairline (5:4; recorte das faixas vazias) */
.empty .btn { margin-top: 14px; }
.figura-leitura { display: none; }

/* ---- código de dois fatores (ativação, código, reserva) */
/* a tall card must scroll from its top, never get centred off the screen */
.login { place-items: safe center; }
.login-card a.btn { text-decoration: none; }
.mfa-ativar ol, .login-card .mfa-reserva { margin: 0 0 10px; padding-left: 20px; color: var(--text-2); font-size: var(--texto-md); line-height: 1.5; }
.mfa-chave { display: block; margin: 0 0 10px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); font: var(--texto-md)/1.5 var(--fonte-mono); color: var(--text-forte); letter-spacing: .04em; overflow-wrap: anywhere; user-select: all; }
.mfa-acoes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.mfa-acoes .btn { flex: 1 1 auto; justify-content: center; }
.mfa-ativar p { color: var(--text-2); font-size: var(--texto-md); margin: 0 0 8px; }
.login-card .mfa-reserva { columns: 2; padding-left: 26px; }
.mfa-reserva code { font-family: var(--fonte-mono); color: var(--text-forte); }

/* ---- segurança */
.seg { padding: 24px 28px 40px; max-width: 760px; }
.seg section { padding: 0 0 26px; margin-bottom: 26px; border-bottom: 1px solid var(--border); }
.seg section:last-child { border-bottom: 0; }
.seg h2 { font: 600 var(--texto-lg)/1.3 var(--fonte-display); color: var(--text-forte); margin: 0 0 8px; }
.seg p { color: var(--text-2); font-size: var(--texto-md); margin: 0 0 10px; max-width: 60ch; }
.seg .seg-nota { color: var(--muted); font-size: var(--texto-sm); }
.seg-acessos { width: 100%; border-collapse: collapse; margin: 4px 0 12px; font-size: var(--texto-md); }
.seg-acessos th { text-align: left; color: var(--muted); font-weight: 500; font-size: var(--texto-sm); padding: 6px 12px 6px 0; border-bottom: 1px solid var(--border); }
.seg-acessos td { padding: 8px 12px 8px 0; color: var(--text); border-bottom: 1px solid var(--border); vertical-align: top; }
.seg-acessos .mono { font-family: var(--fonte-mono); font-size: var(--texto-sm); color: var(--text-2); }
.seg-agora { color: var(--ok-ink); font-size: var(--texto-sm); }
.seg-sair.armado { border-color: var(--danger-borda); color: var(--danger-ink); background: var(--danger-suave); }
@media (max-width: 600px) { .seg { padding: 18px 16px 32px; } .seg-acessos th:nth-child(3), .seg-acessos td:nth-child(3) { display: none; } }

/* ---- regras */
.regras .r-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.regras .r-col { flex-direction: column; align-items: stretch; max-width: 520px; }
.regras .r-col .btn { align-self: flex-start; }
.regras .r-col .r-in { flex: none; } /* em coluna, a base flexível virava altura */
.r-in { height: 38px; padding: 0 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-forte); font-size: var(--texto-md); min-width: 0; flex: 1 1 160px; }
.r-in:focus { border-color: var(--brand-2); outline: none; }
.r-txt { height: auto; padding: 10px 12px; resize: vertical; font: inherit; }
.r-check, .r-linha { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: var(--texto-md); }
.r-linha .r-in { flex: 0 1 180px; }
.r-lista { list-style: none; margin: 8px 0 0; padding: 0; }
.r-lista li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); color: var(--text); font-size: var(--texto-md); }
.r-lista b { color: var(--text-forte); font-weight: 500; }
.r-lista .mono { font-family: var(--fonte-mono); font-size: var(--texto-sm); }
.r-x { color: var(--muted); font-size: var(--texto-sm); padding: 4px 8px; border-radius: 6px; flex: none; }
.r-x:hover { color: var(--danger-ink); background: var(--danger-suave); }

/* ---- autocompletar, respostas prontas, marcadores, prévia, cancelar inscrição */
.sug { position: fixed; z-index: 60; background: var(--preto-700); border: 1px solid var(--border-forte); border-radius: var(--radius); box-shadow: var(--shadow-modal); padding: 4px; max-height: 280px; overflow: auto; }
.sug-i { display: flex; flex-direction: column; gap: 1px; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: var(--texto-md); }
.sug-i b { color: var(--text-forte); font-weight: 500; }
.sug-i span { color: var(--text-2); font-size: var(--texto-sm); }
.sug-i.sel, .sug-i:hover { background: var(--tint); }
.c-modelos { height: 32px; max-width: 170px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-full); color: var(--text-2); padding: 0 10px; font-size: var(--texto-sm); }
.lbl-wrap { position: relative; display: inline-flex; }
.lbl-pop { top: 36px; left: 0; right: auto; }
.lbl-vazio { color: var(--muted); font-size: var(--texto-sm); padding: 8px 10px; }
.lbl-novo { display: flex; gap: 6px; padding: 6px 4px 2px; border-top: 1px solid var(--border); margin-top: 4px; }
.lbl-novo input { flex: 1; min-width: 0; height: 32px; padding: 0 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; color: var(--text-forte); }
.lbl-novo button { padding: 0 10px; border-radius: 8px; color: var(--text); }
.lbl-novo button:hover { background: var(--tint); }
.btn-sm { height: 32px; padding: 0 12px; font-size: var(--texto-sm); }
.unsub { margin-top: 4px; font-size: var(--texto-sm); }
.r-curto { flex: 0 1 200px; }
.previa { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.82); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 16px 16px; }
.previa img { max-width: 100%; max-height: calc(100vh - 90px); object-fit: contain; border-radius: 6px; background: #fff; }
.previa-top { position: fixed; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: var(--text-forte); }
.previa-top .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- imprimir: só a conversa, em papel branco */
@media print {
  .side, .top, .thread-head, .reply-bar, .reply-slot, .composers, #toast-slot, .msg-meta, .menu-pop, .unsub { display: none !important; }
  html, body, .shell, .main, .thread { background: #fff !important; color: #000 !important; height: auto !important; overflow: visible !important; display: block !important; }
  .thread h1, .msg .name, .msg .to, .msg .quando { color: #000 !important; }
  .msg { break-inside: avoid; border-color: #ccc !important; }
}

.c-de { background: transparent; border: 0; color: var(--text); }

/* ---- agenda: horários, lembrete */
.quando-pop { top: 36px; left: 0; right: auto; min-width: 230px; }
.compose .quando-pop { top: auto; bottom: 40px; }
.quando-pop .lbl-novo input { color-scheme: dark; }
.lembrar-row { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; color: var(--text); font-size: var(--texto-sm); }
.lembrar-row > span:first-child { display: flex; align-items: center; gap: 8px; }
.lembrar-row > span:last-child { display: flex; gap: 6px; }
.lembrar-row button { padding: 4px 10px; border: 1px solid var(--border-forte); border-radius: var(--radius-full); color: var(--text); }
.lembrar-row button:hover { background: var(--tint); }

.imp-status { margin: 4px 0 14px; }
.imp-status p { margin: 0 0 6px; }
.regras details { color: var(--muted); }
.regras details .r-in { margin-top: 6px; width: 100%; }

/* ---- Face ID e troca de senha (Segurança) */
.login-card .btn-passkey { width: 100%; justify-content: center; gap: 8px; margin-bottom: 14px; }
.btn-passkey .ic, .seg .btn .ic { width: 18px; height: 18px; }
.seg-form { max-width: 420px; }
.seg-campo { display: flex; flex-direction: column; gap: 6px; margin: 0 0 12px; color: var(--text-2); font-size: var(--texto-sm); }
.seg-in { height: 40px; padding: 0 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-forte); font: inherit; font-size: var(--texto-md); }
.seg-in:focus { outline: 2px solid var(--brand-2, var(--brand)); outline-offset: 1px; }
.seg-codigo { max-width: 160px; font-family: var(--fonte-mono); letter-spacing: .1em; }
.seg-pks { list-style: none; margin: 0 0 14px; padding: 0; }
.seg-pks li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: var(--texto-md); }
.seg-pks li > span { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.seg-pks .ic { width: 18px; height: 18px; color: var(--text-2); }
.seg-x { min-height: 32px; padding: 0 12px; }
.seg-msg { color: var(--danger-ink); font-size: var(--texto-sm); margin: 4px 0 0; min-height: 1em; }
.seg-msg:empty { display: none; }
/* the header hides the wordmark's text on phones; the login card keeps the whole brand */
@media (max-width: 900px) { .login-card .wordmark span { display: inline-flex; } }
