/* Ritmo. Cores, fontes e medidas vêm só das variáveis --rt-* de tema.css (gerado por
   ritmo/tema.py a partir de design/tema_ritmo.json). Identidade herdada do painel Villa Alferes:
   Montserrat variável local, barra lateral escura no estilo do Home Assistant, aço como acento,
   cartões brancos com borda fina sobre página branca. */

@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fontes/montserrat-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url("../fontes/montserrat-latin-wght-italic.woff2") format("woff2"); }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--rt-branco); color: var(--rt-texto);
  font-family: var(--rt-fonte-texto); font-size: var(--rt-tam-texto); font-weight: 450; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  --rt-altura-hora: 44px;
}
b, strong { font-weight: 700; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.rt-icone { flex: 0 0 auto; vertical-align: middle; }
:focus-visible { outline: 2px solid var(--rt-aco); outline-offset: 2px; }

/* --- página e barra lateral ------------------------------------------------------ */
.rt-pagina { display: flex; min-height: 100vh; }
.rt-barra {
  width: var(--rt-largura-barra); flex: 0 0 var(--rt-largura-barra);
  background: linear-gradient(180deg, var(--rt-barra-lateral) 0%, color-mix(in srgb, var(--rt-barra-lateral) 82%, var(--rt-marinho)) 100%);
  color: rgba(255, 255, 255, .86); border-right: 1px solid rgba(255, 255, 255, .06);
  display: flex; flex-direction: column; padding: 20px 12px 16px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
}
.rt-barra::-webkit-scrollbar { display: none; }
.rt-marca { display: flex; align-items: center; gap: 12px; padding: 4px 10px 18px; }
.rt-marca b, .rt-entrada-marca b { display: block; font-size: 19px; font-weight: 700; letter-spacing: -.01em; color: var(--rt-branco); }
.rt-marca span, .rt-entrada-marca span {
  display: block; font-size: 9.5px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--rt-aco-claro);
}
.rt-busca { padding: 0 2px 14px; }
.rt-busca input {
  width: 100%; height: 36px; padding: 0 12px; border-radius: var(--rt-raio-pequeno);
  border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .06); color: var(--rt-branco);
}
.rt-busca input::placeholder { color: rgba(255, 255, 255, .45); }
.rt-busca input:focus { outline: none; border-color: var(--rt-aco-claro); }
.rt-menu { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.rt-secao {
  font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(255, 255, 255, .42); margin: 12px 0 4px; padding: 14px 14px 0; border-top: 1px solid rgba(255, 255, 255, .08);
}
.rt-item {
  display: flex; gap: 14px; align-items: center; min-height: 44px; padding: 10px 12px; border-radius: var(--rt-raio-menu);
  text-decoration: none; font-size: 13.5px; font-weight: 500; line-height: 1.3; color: rgba(255, 255, 255, .76);
  border: 0; border-left: 3px solid transparent; background: none; text-align: left; width: 100%;
  transition: background .15s, color .15s;
}
.rt-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-item em { font-style: normal; font-size: 11.5px; font-weight: 600; color: rgba(255, 255, 255, .5); }
.rt-item .rt-icone { color: rgba(255, 255, 255, .55); transition: color .15s; }
.rt-item[class*="cor-cat"] .rt-icone { color: color-mix(in srgb, var(--cor-fundo) 70%, var(--cor)); }
.rt-item:hover { background: rgba(255, 255, 255, .06); color: var(--rt-branco); }
.rt-item:hover .rt-icone { color: var(--rt-branco); }
.rt-item:focus-visible { outline: 2px solid var(--rt-aco-claro); outline-offset: -2px; }
.rt-item.ativo {
  background: color-mix(in srgb, var(--rt-aco-claro) 15%, transparent);
  color: var(--rt-branco); font-weight: 600; border-left-color: var(--rt-aco-claro);
}
.rt-item.ativo .rt-icone { color: var(--rt-aco-claro); }
.rt-nova-lista { color: rgba(255, 255, 255, .6); }
.rt-rodape {
  display: flex; gap: 12px; align-items: center; margin-top: 18px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .07); border-radius: var(--rt-raio-pequeno); padding: 12px;
}
.rt-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 34px; display: grid; place-items: center;
  background: var(--rt-aco); color: var(--rt-branco); font-size: 11.5px; font-weight: 700;
}
.rt-rodape-nome { color: var(--rt-branco); font-weight: 600; font-size: 13px; }
.rt-link-claro { border: 0; background: none; padding: 0; color: rgba(255, 255, 255, .6); font-size: 11.5px; text-decoration: underline; }
.rt-link-claro:hover { color: var(--rt-branco); }
.rt-separador { margin: 0 6px; color: rgba(255, 255, 255, .35); font-size: 11.5px; }
.rt-topo-movel, .rt-veu { display: none; }

/* --- conteúdo e cabeçalho -------------------------------------------------------- */
.rt-conteudo { flex: 1; min-width: 0; padding: 0 var(--rt-margem) 32px; display: flex; flex-direction: column; gap: var(--rt-intervalo); outline: none; }
.rt-cabecalho {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 84px;
  margin: 0 calc(-1 * var(--rt-margem)); padding: 18px var(--rt-margem);
  background: var(--rt-branco); border-bottom: 1px solid var(--rt-borda);
}
.rt-cabecalho h1 {
  display: flex; align-items: center; gap: 12px; margin: 0;
  font-family: var(--rt-fonte-titulo); font-weight: 700; letter-spacing: -.02em; font-size: var(--rt-tam-titulo-pagina);
  color: var(--rt-marinho); line-height: 1.2;
}
.rt-cabecalho h1 .rt-icone { color: var(--rt-aco); }
.rt-subtitulo { font-size: var(--rt-tam-subtitulo); font-weight: 500; color: var(--rt-texto-secundario); margin-top: 3px; }
.rt-acoes { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

/* botões, grupo de opções, chips */
.rt-botao {
  display: inline-flex; gap: 6px; align-items: center; justify-content: center; height: 34px; padding: 0 14px;
  border: 1px solid var(--rt-borda); border-radius: var(--rt-raio-pequeno); background: var(--rt-branco);
  font-size: 12.5px; font-weight: 600; color: var(--rt-texto); text-decoration: none; white-space: nowrap;
  transition: border-color .15s, background .15s;
}
.rt-botao:hover { border-color: var(--rt-marinho); }
.rt-botao.principal { background: var(--rt-marinho); border-color: var(--rt-marinho); color: var(--rt-branco); }
.rt-botao.principal:hover { background: color-mix(in srgb, var(--rt-marinho) 85%, var(--rt-branco)); }
.rt-botao.perigo { color: var(--rt-terracota); }
.rt-botao.perigo:hover { border-color: var(--rt-terracota); background: var(--rt-fundo-alerta); }
.rt-botao.largo { width: 100%; height: 42px; }
.rt-segmentado {
  display: inline-flex; align-items: center; gap: 2px; height: 34px; padding: 2px;
  background: var(--rt-fundo-leitura); border: 1px solid var(--rt-borda); border-radius: var(--rt-raio-pequeno);
}
.rt-segmento {
  display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: var(--rt-raio-menu);
  font-size: 12px; font-weight: 600; text-decoration: none; color: var(--rt-texto-secundario);
}
.rt-segmento:hover { background: var(--rt-branco); color: var(--rt-marinho); }
.rt-chip {
  height: 28px; padding: 0 10px; border: 1px solid var(--rt-borda); border-radius: var(--rt-raio-menu);
  background: var(--rt-branco); font-size: 11.5px; font-weight: 600; color: var(--rt-texto-secundario);
}
.rt-chip:hover { border-color: var(--rt-aco); color: var(--rt-marinho); }
.rt-icone-botao {
  display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: var(--rt-raio-pequeno); background: none; color: var(--rt-texto-terciario);
}
.rt-icone-botao:hover { background: var(--rt-fundo-leitura); color: var(--rt-marinho); }
.rt-icone-botao.perigo:hover { background: var(--rt-fundo-alerta); color: var(--rt-terracota); }
.rt-link { border: 0; background: none; color: var(--rt-aco); font-weight: 600; text-decoration: underline; padding: 6px 0; }
.rt-cartao { background: var(--rt-branco); border: 1px solid var(--rt-borda); border-radius: var(--rt-raio); box-shadow: var(--rt-sombra); }
.rt-vazio { color: var(--rt-texto-terciario); font-size: 12.5px; padding: 18px 4px; margin: 0; }

/* --- tarefas --------------------------------------------------------------------- */
.rt-nova-tarefa {
  display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 16px;
  background: var(--rt-branco); border: 1px solid var(--rt-borda); border-radius: var(--rt-raio); box-shadow: var(--rt-sombra);
}
.rt-nova-tarefa .rt-circulo { color: var(--rt-aco); display: grid; place-items: center; width: 22px; }
.rt-nova-tarefa input { flex: 1; height: 100%; border: 0; background: none; outline: none; font-size: 14px; font-weight: 500; }
.rt-nova-tarefa input::placeholder { color: var(--rt-aco); }
.rt-nova-tarefa:focus-within { border-color: var(--rt-aco); }
.rt-lista-tarefas { display: flex; flex-direction: column; gap: 6px; }
.rt-tarefa {
  display: flex; align-items: center; gap: 4px; min-height: 52px; padding: 4px 8px 4px 12px;
  background: var(--rt-branco); border: 1px solid var(--rt-borda); border-radius: var(--rt-raio-pequeno);
  transition: border-color .15s, background .15s;
}
.rt-tarefa:hover { border-color: var(--rt-borda-forte); background: color-mix(in srgb, var(--rt-fundo-leitura) 50%, var(--rt-branco)); }
.rt-tarefa.aberta { border-color: var(--rt-aco); background: var(--rt-fundo-leitura); }
.rt-tarefa-corpo {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
  padding: 8px 6px; border: 0; background: none; text-align: left;
}
.rt-tarefa-titulo { font-size: 13.5px; font-weight: 500; color: var(--rt-texto); overflow-wrap: anywhere; }
.rt-tarefa-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 11.5px; color: var(--rt-texto-secundario); }
.rt-tarefa-meta span { display: inline-flex; gap: 4px; align-items: center; }
.rt-tarefa-meta i { font-style: normal; color: var(--rt-texto-terciario); }
.rt-tarefa-meta .rt-icone { margin-right: 3px; }
.rt-atrasada { color: var(--rt-terracota); font-weight: 600; }
.rt-tarefa.feita .rt-tarefa-titulo { text-decoration: line-through; color: var(--rt-texto-terciario); }
/* círculo de concluir: vazio, mostra o ✓ ao passar o mouse, cheio quando concluída */
.rt-marcar {
  display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px; padding: 0;
  border: 1.6px solid var(--rt-aco); border-radius: 50%; background: var(--rt-branco); color: transparent;
  transition: background .15s, color .15s;
}
.rt-marcar:hover { color: var(--rt-aco); }
.rt-marcar[aria-checked="true"] { background: var(--rt-aco); color: var(--rt-branco); }
.rt-marcar.grande { width: 26px; height: 26px; flex-basis: 26px; }
.rt-marcar.pequeno { width: 17px; height: 17px; flex-basis: 17px; }
.rt-estrela { display: grid; place-items: center; width: 36px; height: 36px; border: 0; background: none; color: var(--rt-texto-terciario); padding: 0; }
.rt-estrela:hover { color: var(--rt-marinho); }
.rt-estrela.ligada { color: var(--rt-marinho); }
.rt-estrela.ligada svg { fill: currentColor; }
.rt-grupo-botao {
  display: inline-flex; align-items: center; gap: 8px; margin: 10px 0 8px; padding: 6px 10px;
  border: 0; border-radius: var(--rt-raio-pequeno); background: var(--rt-fundo-leitura);
  font-size: 12.5px; font-weight: 600; color: var(--rt-marinho);
}
.rt-grupo-botao em { font-style: normal; color: var(--rt-texto-secundario); }

/* painel de detalhes */
.rt-detalhe {
  width: var(--rt-largura-detalhe); flex: 0 0 var(--rt-largura-detalhe);
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--rt-fundo-leitura); border-left: 1px solid var(--rt-borda);
  display: flex; flex-direction: column; gap: 10px; padding: 18px 16px 0;
}
.rt-detalhe-topo, .rt-etapas, .rt-detalhe-bloco {
  background: var(--rt-branco); border: 1px solid var(--rt-borda); border-radius: var(--rt-raio-pequeno);
}
.rt-detalhe-topo { display: flex; align-items: flex-start; gap: 10px; padding: 14px 8px 14px 14px; }
.rt-detalhe-topo .rt-marcar { margin-top: 3px; }
.rt-detalhe-titulo {
  flex: 1; border: 0; resize: none; background: none; font-size: 16px; font-weight: 700; color: var(--rt-marinho);
  line-height: 1.35; field-sizing: content; min-height: 1.4em; padding: 2px 0; outline: none;
}
.rt-etapas { padding: 4px 8px 4px 14px; border-top: 0; margin-top: -10px; border-radius: 0 0 var(--rt-raio-pequeno) var(--rt-raio-pequeno); }
.rt-etapa { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 13px; border-bottom: 1px solid var(--rt-borda); }
.rt-etapa span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rt-etapa.feita span { text-decoration: line-through; color: var(--rt-texto-terciario); }
.rt-nova-etapa { display: flex; align-items: center; gap: 10px; min-height: 40px; color: var(--rt-aco); }
.rt-nova-etapa input { flex: 1; border: 0; outline: none; background: none; font-size: 13px; }
.rt-nova-etapa input::placeholder { color: var(--rt-aco); }
.rt-detalhe-bloco { display: flex; flex-direction: column; }
.rt-opcao {
  display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px; width: 100%;
  border: 0; border-bottom: 1px solid var(--rt-borda); background: none; text-align: left; font-size: 13px; color: var(--rt-texto-secundario);
}
.rt-detalhe-bloco > .rt-opcao:last-child { border-bottom: 0; }
.rt-opcao span { flex: 1; }
.rt-opcao.ligada { color: var(--rt-aco); font-weight: 600; }
.rt-opcao input, .rt-opcao select { border: 0; background: none; max-width: 52%; font-size: 12.5px; color: var(--rt-marinho); font-weight: 600; }
.rt-atalhos-data { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 14px; border-bottom: 1px solid var(--rt-borda); }
.rt-detalhe-nota {
  border: 1px solid var(--rt-borda); border-radius: var(--rt-raio-pequeno); background: var(--rt-branco);
  padding: 12px 14px; resize: vertical; font-size: 13px; min-height: 110px;
}
.rt-detalhe-rodape {
  position: sticky; bottom: 0; margin: auto -16px 0; padding: 8px 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--rt-fundo-leitura); border-top: 1px solid var(--rt-borda); font-size: 11.5px; color: var(--rt-texto-secundario);
}

/* --- semana ---------------------------------------------------------------------- */
.rt-semana { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--rt-intervalo); align-items: start; }
.rt-grade-cartao { padding: 12px 0 0; overflow: hidden; }
.rt-legenda { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 12px; border-bottom: 1px solid var(--rt-borda); }
.rt-legenda-item {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: var(--rt-raio-menu);
  background: var(--cor-fundo); color: var(--cor); font-size: 11px; font-weight: 600;
}
.rt-grade-rolagem { max-height: calc(100vh - 190px); overflow: auto; overscroll-behavior: contain; }
.rt-grade {
  display: grid; grid-template-columns: 56px repeat(7, minmax(108px, 1fr));
  grid-template-rows: auto calc(24 * var(--rt-altura-hora)); min-width: 812px;
}
.rt-grade-canto, .rt-grade-dia { position: sticky; top: 0; z-index: 3; background: var(--rt-branco); border-bottom: 1px solid var(--rt-borda); }
.rt-grade-canto { left: 0; z-index: 4; }
.rt-grade-dia { display: flex; flex-direction: column; align-items: center; padding: 8px 0; font-size: 11px; color: var(--rt-texto-secundario); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.rt-grade-dia b { font-size: 18px; letter-spacing: -.01em; color: var(--rt-marinho); }
.rt-grade-dia.hoje b {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--rt-marinho); color: var(--rt-branco);
}
.rt-grade-horas { position: sticky; left: 0; z-index: 2; background: var(--rt-branco); display: flex; flex-direction: column; border-right: 1px solid var(--rt-borda); }
.rt-grade-horas span { height: var(--rt-altura-hora); flex: none; font-size: 10.5px; color: var(--rt-texto-terciario); text-align: right; padding: 2px 8px 0 0; font-weight: 500; }
.rt-grade-coluna {
  position: relative; border-right: 1px solid var(--rt-borda); cursor: copy;
  background-image: linear-gradient(to bottom, var(--rt-borda) 1px, transparent 1px);
  background-size: 100% var(--rt-altura-hora);
}
.rt-grade-coluna.hoje { background-color: color-mix(in srgb, var(--rt-fundo-leitura) 60%, transparent); }
.rt-bloco {
  position: absolute; left: 3px; right: 3px; display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 4px 7px; overflow: hidden; text-align: left; cursor: pointer;
  border: 0; border-left: 3px solid var(--cor, var(--rt-aco)); border-radius: var(--rt-raio-menu);
  background: var(--cor-fundo, var(--rt-fundo-leitura)); color: var(--cor, var(--rt-marinho));
  transition: box-shadow .15s, transform .15s;
}
.rt-bloco:hover { box-shadow: 0 3px 10px color-mix(in srgb, var(--rt-barra-lateral) 18%, transparent); z-index: 1; }
.rt-bloco b { font-size: 11.5px; font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; }
.rt-bloco span { font-size: 10px; font-weight: 500; opacity: .85; }
/* bloco de 1 hora: só o título (o horário já está na régua e na dica ao passar o mouse) */
.rt-bloco.curto { justify-content: center; }
.rt-bloco.curto b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.rt-bloco.curto span { display: none; }
.rt-metas { padding: 16px; position: sticky; top: 16px; }
.rt-metas h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 13.5px; color: var(--rt-marinho); }
.rt-metas h2 .rt-icone { color: var(--rt-aco); }
.rt-metas h3 { margin: 14px 0 2px; font-size: var(--rt-tam-rotulo); letter-spacing: .16em; text-transform: uppercase; color: var(--rt-texto-secundario); }
.rt-nova-meta { margin-top: 14px; }
.rt-categoria-linha { align-items: center; }
.rt-amostra { width: 18px; height: 18px; flex: 0 0 18px; border-radius: var(--rt-raio-menu); background: var(--cor-fundo); border-left: 3px solid var(--cor); }
.rt-amostra.vazia { background: none; border: 1px dashed var(--rt-borda-forte); }

/* --- formulários e diálogo ------------------------------------------------------- */
.rt-form { display: flex; flex-direction: column; gap: 12px; }
.rt-form h2 { margin: 0 0 4px; font-size: 17px; color: var(--rt-marinho); }
.rt-form label { display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--rt-texto-secundario); flex: 1; }
.rt-form input:not([type=checkbox]), .rt-form select, .rt-form textarea {
  width: 100%; min-height: 38px; padding: 8px 11px; border: 1px solid var(--rt-borda); border-radius: var(--rt-raio-pequeno);
  background: var(--rt-branco); font-size: 13px; font-weight: 500; color: var(--rt-texto);
}
.rt-form input:focus, .rt-form select:focus, .rt-form textarea:focus { outline: none; border-color: var(--rt-aco); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rt-aco) 18%, transparent); }
.rt-linha-form { display: flex; gap: 10px; align-items: flex-end; }
.rt-linha-form > input { flex: 1; }
.rt-form label.rt-check { flex-direction: row; align-items: center; gap: 6px; flex: none; font-weight: 500; }
.rt-erro { margin: 0; padding: 10px 12px; border-radius: var(--rt-raio-pequeno); background: var(--rt-fundo-alerta); color: var(--rt-terracota); font-weight: 600; font-size: 12.5px; }
.rt-dialogo {
  width: min(480px, calc(100vw - 32px)); padding: 22px; border: 1px solid var(--rt-borda); border-radius: var(--rt-raio);
  box-shadow: 0 20px 60px -12px color-mix(in srgb, var(--rt-barra-lateral) 45%, transparent); color: var(--rt-texto);
}
.rt-dialogo::backdrop { background: color-mix(in srgb, var(--rt-barra-lateral) 45%, transparent); }
.rt-dialogo-texto { margin: 0; font-size: 14px; }
.rt-dialogo-botoes { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }
.rt-espaco { flex: 1; }
.rt-form-categorias { max-height: 75vh; overflow-y: auto; }

/* aviso no rodapé */
.rt-aviso {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; max-width: calc(100vw - 32px);
  padding: 11px 18px; border-radius: var(--rt-raio-pequeno); background: var(--rt-marinho); color: var(--rt-branco);
  font-weight: 600; font-size: 12.5px; box-shadow: var(--rt-sombra);
}
.rt-aviso[data-tipo="erro"] { background: var(--rt-terracota); }

/* --- entrada --------------------------------------------------------------------- */
.rt-entrada {
  min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: linear-gradient(160deg, var(--rt-barra-lateral) 0%, var(--rt-marinho) 100%);
}
.rt-entrada-cartao {
  width: min(400px, 100%); background: var(--rt-branco); border-radius: var(--rt-raio); padding: 28px;
  box-shadow: 0 24px 60px -16px rgba(0, 0, 0, .5); display: flex; flex-direction: column; gap: 14px;
}
.rt-entrada-marca { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin: -8px -8px 4px; border-radius: var(--rt-raio-pequeno); background: var(--rt-barra-lateral); }
.rt-entrada-cartao h1 { margin: 0; font-size: 20px; color: var(--rt-marinho); }

/* --- celular (até 860 px): barra do topo, menu em gaveta, detalhes em folha -------- */
@media (max-width: 860px) {
  .rt-pagina { flex-direction: column; }
  .rt-topo-movel {
    display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 10px;
    position: sticky; top: 0; z-index: 20; height: 56px; padding: 0 8px 0 6px; padding-top: env(safe-area-inset-top);
    color: var(--rt-branco); background: var(--rt-barra-lateral);
  }
  .rt-abrir-menu { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--rt-raio-pequeno); background: none; color: var(--rt-branco); }
  .rt-topo-nome { display: flex; flex-direction: column; align-items: flex-end; text-align: right; gap: 2px; line-height: 1.15; min-width: 0; }
  .rt-topo-nome b { font-size: 15px; }
  .rt-topo-nome span { font-size: 9.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--rt-aco-claro); }
  .rt-topo-marca { justify-self: end; }
  .rt-barra {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 40; height: 100dvh; width: min(300px, 86vw); flex: none;
    transform: translateX(-102%); visibility: hidden;
    transition: transform .25s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .25s;
  }
  .rt-veu {
    display: block; position: fixed; inset: 0; z-index: 30; opacity: 0; pointer-events: none;
    background: color-mix(in srgb, var(--rt-barra-lateral) 50%, transparent); transition: opacity .25s;
  }
  body.rt-menu-aberto { overflow: hidden; }
  body.rt-menu-aberto .rt-barra { transform: none; visibility: visible; transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
  body.rt-menu-aberto .rt-veu { opacity: 1; pointer-events: auto; }
  .rt-conteudo { padding: 0 16px 24px; }
  .rt-cabecalho { flex-direction: column; align-items: stretch; min-height: 0; margin: 0 -16px; padding: 16px; }
  .rt-acoes { justify-content: flex-start; }
  .rt-detalhe {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 45; width: 100%; height: auto; max-height: 88dvh;
    border-left: 0; border-radius: var(--rt-raio) var(--rt-raio) 0 0; box-shadow: 0 -12px 40px -8px rgba(0, 0, 0, .35);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .rt-semana { grid-template-columns: minmax(0, 1fr); }
  .rt-metas { position: static; }
  .rt-grade-rolagem { max-height: 70vh; }
  .rt-linha-form { flex-wrap: wrap; }
}
@media (max-width: 860px) and (prefers-reduced-motion: reduce) {
  .rt-barra, .rt-veu, body.rt-menu-aberto .rt-barra { transition: none; }
}
@media print {
  .rt-barra, .rt-topo-movel, .rt-detalhe, .rt-acoes, .rt-nova-tarefa { display: none !important; }
  .rt-grade-rolagem { max-height: none; overflow: visible; }
}
