/* Ajustes visuais globais do TomZap, aplicados por cima dos estilos do index.html. */

body {
  font-family: "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, -apple-system, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Menu lateral fixo, com rolagem própria: a página não "anda" junto com o menu. */
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin; }
.nav { font-weight: 550; transition: background .15s, color .15s; }
.brand .mark img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* Cabeçalho */
.top h1 { font-weight: 700; }
#todayLabel::first-letter { text-transform: uppercase; }

/* Cartões e botões das telas de módulos */
.module-card { box-shadow: 0 1px 2px #0f172a0d; transition: box-shadow .15s, border-color .15s; }
.module-card:hover { box-shadow: 0 6px 18px #0f172a12; }
.module-action { border-radius: 8px; transition: filter .15s; }
.module-action:hover { filter: brightness(1.05); }
.module-form input, .module-form select, .module-form textarea { border-radius: 8px; }

/* Foco visível e barras de rolagem discretas */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #94a3b866; border-radius: var(--tz-r-md); border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #64748b99; background-clip: padding-box; border: 2px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }

/* Menu da conta: avatar do topo e nome no rodapé do menu lateral (app/conta.js) */
.top-actions > .avatar, .side .me { cursor: pointer; }
.side .me { border-radius: var(--tz-r-md); transition: background .15s; }
.side .me:hover { background: var(--blue2); }
.tzm-menu-name { padding: 8px 10px 4px; font-weight: 700; font-size: 12.5px; }

/* Caixas de marcar nas janelas de cadastro: uma regra antiga esticava o campo em 100% de largura. */
.standard-crud-check { display: flex !important; align-items: center; gap: 10px; justify-content: flex-start !important; }
.standard-crud-check input[type="checkbox"] { width: 18px !important; height: 18px !important; min-width: 18px; flex: 0 0 auto; margin: 0; accent-color: var(--blue); }

/* Equipe: quem ainda não criou a senha (app/conta.js) */
.tzm-pending { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 20px; background: var(--amber2, #fff3d7); color: var(--amber, #b97608); font-size: 10.5px; font-weight: 700; font-style: normal; }
.crud-list-actions .tzm-invite-button { margin-right: 6px; }

/* Janela "Minha conta" (app/conta.js) */
.tzm-back { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 16px; background: #0f172a66; }
.tzm-modal { width: min(420px, 100%); display: grid; gap: 10px; padding: 20px; border-radius: var(--tz-r-md); background: var(--surface, #fff); color: var(--ink); box-shadow: 0 24px 60px #0f172a40; }
.tzm-modal h3 { margin: 0; font-size: 18px; }
.tzm-modal p, .tzm-modal small { margin: 0; color: var(--muted); font-size: 12.5px; }
.tzm-modal label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.tzm-modal label span { font-weight: 400; }
.tzm-modal input { height: 36px; padding: 0 10px; border: 1px solid var(--tz-outline-control); border-radius: var(--tz-r-sm); background: var(--panel, #f7f9fc); color: var(--ink); font: inherit; font-size: 14px; }
.tzm-modal input:focus { outline: 0; border-color: var(--blue); background: var(--surface, #fff); }
.tzm-error { padding: 8px 10px; border-radius: 8px; background: #fde2e2; color: #b83232; font-size: 13px; }
.tzm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.tzm-actions button { height: 34px; padding: 0 14px; border: 1px solid var(--tz-outline-control); border-radius: var(--tz-r-sm); background: var(--surface, #fff); color: var(--ink); font-weight: 600; }
.tzm-actions .tzm-primary { border: 0; background: var(--blue); color: #fff; }
.tzm-actions .tzm-primary:disabled { opacity: .6; }
/* O nome .tzm-actions também é usado pela barra de ações das mensagens (app/conversas.css, escondida); dentro da janela "Minha conta" a linha de botões precisa aparecer */
.tzm-modal .tzm-actions { position: static; display: flex; padding: 0; border: 0; border-radius: 0; background: transparent; gap: 8px; box-shadow: none; opacity: 1; width: auto; }
.tzm-modal .tzm-actions button { width: auto; height: 34px; padding: 0 14px; border: 1px solid var(--tz-outline-control); border-radius: var(--tz-r-sm); background: var(--surface, #fff); }
.tzm-modal .tzm-actions .tzm-primary { border: 0; background: var(--blue); color: #fff; }

/* Enquanto tenta o login único pela Cloudflare, não pisca a tela de login. */

/* Etapa do código por e-mail no login (app/login.js) */
.tz-code-card p { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.tz-code-card #tzLoginCode { font-size: 22px; letter-spacing: 8px; text-align: center; font-weight: 700; }
.tz-trust { display: flex; align-items: center; gap: 8px; margin: 4px 0 14px; font-size: 13px; color: var(--ink); cursor: pointer; }
.tz-code-links { display: flex; justify-content: space-between; margin-top: 12px; }
.tz-code-links button { border: 0; background: transparent; padding: 0; color: var(--blue); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.tz-code-links button:disabled { opacity: .5; cursor: default; }
.tz-forgot { display: block; margin: 14px auto 0; border: 0; background: transparent; padding: 0; color: var(--blue); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.tz-forgot:hover { text-decoration: underline; }
.tz-forgot-highlight { padding: 6px 10px; border-radius: 8px; background: var(--blue2); }
.tz-code-hint { display: block; margin-top: 12px; color: var(--muted); font-size: 11.5px; line-height: 1.4; }

/* Tela de login */
.auth-brand .mark img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* Faixa "Instale o TomZap no celular" (app/instalar.js) — fica acima da barra de baixo do celular */
.tzi-banner { position: fixed; left: 10px; right: 10px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 3000; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; max-width: 560px; margin: 0 auto; padding: 12px; border-radius: var(--tz-r-md); background: #1e2433; color: #fff; box-shadow: 0 12px 30px #0f172a55; font-size: 13px; line-height: 1.4; }
.tzi-banner img { width: 40px; height: 40px; border-radius: var(--tz-r-md); flex: none; }
.tzi-banner > div:nth-child(2) { flex: 1; min-width: 180px; }
.tzi-banner b { display: inline; }
.tzi-banner > div:nth-child(2) > b:first-child { display: block; margin-bottom: 2px; font-size: 14px; }
.tzi-banner span { color: #cbd5e1; }
.tzi-actions { display: flex; gap: 8px; margin-left: auto; }
.tzi-banner button { padding: 8px 14px; border: 0; border-radius: 8px; background: #fff; color: #1e2433; font-weight: 800; cursor: pointer; }
.tzi-banner button.ghost { background: transparent; color: #cbd5e1; border: 1px solid #475569; font-weight: 600; }
/* Com a conversa aberta a faixa ficava em cima da caixa de mensagem e não dava para escrever (revisão de 21/10/2026):
   some enquanto a conversa está aberta e volta ao fechar. */
body.open .tzi-banner { display: none; }

/* Título da agenda: "Setembro de 2026" (o capitalize do CSS antigo fazia "De"). */
.agenda-toolbar > strong { text-transform: none !important; }
.agenda-toolbar > strong::first-letter { text-transform: uppercase; }

/* Aviso rápido (toast) no centro de baixo, no computador: no canto direito ele caía sobre o campo de mensagem e o botão de enviar da
   conversa aberta (revisão visual de 15/10/2026). No celular vale o app/celular.css. */
@media (min-width: 761px) {
  .toast { left: 0 !important; right: 0 !important; margin-inline: auto; width: max-content; max-width: min(560px, calc(100vw - 32px)); bottom: 24px; }
}
