/* Controle Clínica — componentes próprios (carregado depois de estilo.css) */

.marca-login { font-size: 26px; font-weight: 800; color: var(--grafite); text-align: center; letter-spacing: -.02em; width: auto; margin-bottom: 0; }
.marca-login small { display: block; font-size: 13px; font-weight: 600; color: var(--texto-fraco); letter-spacing: 0; }
.perfis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 18px; }
.perfis button { border: 2px solid var(--linha); background: var(--papel); border-radius: 14px; padding: 14px 6px;
  font: inherit; font-weight: 800; color: var(--grafite); cursor: pointer; display: flex; flex-direction: column;
  align-items: center; gap: 6px; }
.perfis button .avatar { width: 46px; height: 46px; }
.perfis button.ativa { border-color: var(--magenta); background: var(--magenta-claro); }
.cartao-login .campo { margin-bottom: 12px; }

#cabecalho .quem-sou { font-size: 12px; font-weight: 800; background: var(--magenta-claro); color: var(--magenta-esc);
  border-radius: 999px; padding: 5px 11px; white-space: nowrap; }

.segmento { display: flex; gap: 6px; flex-wrap: wrap; }
.segmento button { flex: 1; min-width: 0; border: 1.5px solid var(--linha); background: var(--papel); border-radius: 10px;
  padding: 10px 6px; font: inherit; font-size: 14px; font-weight: 700; color: var(--texto-fraco); cursor: pointer; }
.segmento button.ativa { border-color: var(--magenta); background: var(--magenta-claro); color: var(--magenta-esc); }

.botao-campo { width: 100%; text-align: left; font: inherit; font-size: 16px; background: var(--papel);
  border: 1.5px solid var(--linha); border-radius: 10px; padding: 11px 12px; min-height: 46px; cursor: pointer;
  color: var(--texto); display: flex; align-items: center; gap: 8px; }
.botao-campo.vazio-campo { color: #9AA19E; }
.botao-campo .texto { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.botao-campo::after { content: "\203A"; color: var(--texto-fraco); font-size: 20px; }

.fichas { display: flex; gap: 8px; flex-wrap: wrap; }
.ficha { border: 1.5px solid var(--linha); background: var(--papel); border-radius: 999px; padding: 8px 14px;
  font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.ficha.ativa { border-color: var(--magenta); background: var(--magenta-claro); color: var(--magenta-esc); }
.ficha.nova { border-style: dashed; color: var(--texto-fraco); }

.item-card { border: 1.5px solid var(--linha); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: var(--papel); }
.item-card .topo { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.item-card .topo .botao-campo { flex: 1; min-width: 0; }
.item-card .remover { border: 0; background: var(--vermelho-claro); color: var(--vermelho); width: 40px; height: 46px;
  border-radius: 10px; font-size: 18px; cursor: pointer; flex-shrink: 0; }
.item-card .comissao { margin-top: 10px; font-size: 13.5px; color: var(--texto-fraco); display: flex; justify-content: space-between; gap: 8px; }
.item-card .comissao b { color: var(--verde); font-size: 15px; }

.barra-total { position: sticky; bottom: calc(var(--rodape) + env(safe-area-inset-bottom) + 8px); z-index: 10;
  background: var(--grafite); color: #fff; border-radius: 16px; padding: 12px 16px; display: flex; gap: 12px;
  align-items: center; box-shadow: var(--sombra); margin-top: 14px; }
.barra-total .parte { flex: 1; min-width: 0; }
.barra-total .rot { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; opacity: .7; font-weight: 800; }
.barra-total .val { font-size: 16px; font-weight: 800; white-space: nowrap; }
.barra-total .val.verde { color: #7FE0B0; }
.barra-total .btn { flex-shrink: 0; }

.filtros { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.filtros .inteiro { grid-column: 1 / -1; }
.filtros select, .filtros input { min-height: 42px; padding: 8px 10px; font-size: 15px; }

.faixa-resumo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.faixa-resumo > div { background: var(--papel); border-radius: 12px; padding: 10px 6px; box-shadow: var(--sombra); text-align: center; min-width: 0; }
.faixa-resumo .rot { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--texto-fraco); }
.faixa-resumo .val { font-size: 14.5px; font-weight: 800; color: var(--grafite); overflow: hidden; text-overflow: ellipsis; }
.faixa-resumo .val.verde { color: var(--verde); }
.faixa-resumo .val.ambar { color: var(--ambar); }
@media (max-width: 420px) { .faixa-resumo .val { font-size: 12.5px; } }

.visita { background: var(--papel); border-radius: var(--raio); box-shadow: var(--sombra); margin-bottom: 10px;
  overflow: hidden; width: 100%; text-align: left; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; display: block; }
.visita:active { background: #FAF8F7; }
.visita .cab { display: flex; gap: 10px; align-items: baseline; padding: 12px 14px 4px; }
.visita .cab .quem { flex: 1; min-width: 0; font-weight: 800; color: var(--grafite); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visita .cab .quem span { font-weight: 600; color: var(--texto-fraco); }
.visita .cab .dt { font-size: 12.5px; color: var(--texto-fraco); font-weight: 700; white-space: nowrap; }
.visita .linhas { padding: 2px 14px 6px; }
.visita .l { display: flex; gap: 8px; font-size: 13.5px; padding: 2px 0; }
.visita .l .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visita .l .t i { font-style: normal; color: var(--texto-fraco); }
.visita .l .v { white-space: nowrap; font-weight: 700; }
.visita .rodape-v { display: flex; gap: 8px; align-items: center; padding: 8px 14px 10px; border-top: 1px solid var(--linha);
  font-size: 12.5px; color: var(--texto-fraco); background: #FCFBFA; }
.visita .rodape-v .esp { flex: 1; }
.visita .rodape-v b { color: var(--verde); font-size: 14px; }

.selo.canino { background: #FBEFD9; color: #8A5A00; }
.selo.felino { background: #EAE6F8; color: #50408F; }

.tabela-rolavel { overflow-x: auto; margin: 0 -2px; }
table.resumo { border-collapse: collapse; width: 100%; font-size: 12.5px; min-width: 640px; }
table.resumo th, table.resumo td { padding: 7px 8px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--linha); }
table.resumo th:first-child, table.resumo td:first-child { text-align: left; position: sticky; left: 0; background: var(--papel); font-weight: 700; }
table.resumo th { font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--texto-fraco); }
table.resumo tr.total td { font-weight: 800; border-top: 2px solid var(--grafite); border-bottom: 0; }
table.resumo td.zero { color: #B9BEBC; }

.colunas.alto { height: 170px; }
.duas { display: flex; width: 100%; align-items: flex-end; gap: 2px; height: 100%; }
.duas i { flex: 1; display: block; min-height: 2px; border-radius: 4px 4px 0 0; }
.duas i.antes { background: #B8D8D4; }
.duas i.agora { background: var(--magenta); }
.legenda { display: flex; gap: 14px; font-size: 12px; color: var(--texto-fraco); margin-top: 8px; }
.legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

.rank { display: flex; flex-direction: column; gap: 9px; }
.rank .r { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 14px; }
.rank .r .n { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--grafite); }
.rank .r .n small { color: var(--texto-fraco); font-weight: 600; }
.rank .r .v { font-weight: 800; color: var(--grafite); }
.rank .r .barra-fundo { grid-column: 1 / -1; margin-top: 0; }

.busca-seletor { position: sticky; top: -16px; background: var(--fundo); padding-bottom: 8px; z-index: 2; }
.lista-seletor { background: var(--papel); border-radius: 12px; overflow: hidden; box-shadow: var(--sombra); }
.lista-seletor .linha-item .tit { white-space: normal; }
.item-novo .tit { color: var(--magenta-esc); }

.progresso { width: 100%; max-width: 360px; text-align: center; }
.progresso h2 { margin: 0 0 6px; color: var(--grafite); font-size: 19px; }
.progresso p { margin: 0 0 16px; color: var(--texto-fraco); font-size: 14px; }
.progresso .barra-fundo { height: 12px; }

.nota-pequena { font-size: 12.5px; color: var(--texto-fraco); margin: 8px 0 0; }
.linha-botoes { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.linha-botoes .btn { flex: 1; min-width: 140px; }
.titulo-pagina { font-size: 20px; font-weight: 800; color: var(--grafite); margin: 0 0 12px; letter-spacing: -.02em; }
@media (min-width: 900px) { #conteudo { max-width: 920px; } }
