/* Sorrisus — visual no padrão Material (cabeçalho azul, menu lateral claro, cartões brancos). */
/* Roboto hospedada no próprio app (Apache 2.0), sem depender do Google Fonts. */
@font-face { font-family: Roboto; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/fontes/roboto-latin.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: Roboto; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/fontes/roboto-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --marca: #2196f3;
  --marca-escura: #1976d2;
  --marca-clara: #e3f2fd;
  --acao: #43a047;
  --acao-escura: #388e3c;
  --texto: #212121;
  --texto-2: #757575;
  --borda: #e0e0e0;
  --borda-forte: #bdbdbd;
  --fundo: #fafafa;
  --branco: #fff;
  --perigo: #e53935;
  --alerta: #fb8c00;
  --raio: 8px;
  --sombra: 0 2px 4px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.12);
  --sombra-leve: 0 1px 3px rgba(0,0,0,.12);
  --slot: 36px;
  font-family: Roboto, "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color: var(--texto);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--fundo); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--marca-escura); }

/* ---------- estrutura ---------- */
.layout { display: grid; grid-template-columns: 225px 1fr; grid-template-rows: 49px 1fr; height: 100vh; }
.layout.menu-compacto { grid-template-columns: 64px 1fr; }
.layout.menu-compacto .menu span { display: none; }
/* Faixa azul com padrão discreto de ícones odontológicos (desenho próprio). */
.topo { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 14px; color: #fff; z-index: 6;
  background: var(--marca) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='49' fill='none' stroke='%23fff' stroke-opacity='.08' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 9c-3 0-5 2-5 5 0 4 2 5 2.5 10 .3 2 2 2 2.3 0l.7-4h1l.7 4c.3 2 2 2 2.3 0C17 19 19 18 19 14c0-3-2-5-5-5-1 0-1 .5-2 .5S13 9 12 9z'/%3E%3Cpath d='M38 30l6-6M41 33l6-6M36 32l3 3M58 8v8M54 12h8'/%3E%3Ccircle cx='80' cy='34' r='5'/%3E%3Cpath d='M76 34h8M98 10l10 10M108 10L98 20M90 40h6M93 37v6'/%3E%3C/svg%3E") 0 0 / 120px 49px; }
.btn-topo { border: 0; background: transparent; color: #fff; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.btn-topo:hover { background: rgba(255,255,255,.15); }
.btn-topo svg { width: 22px; height: 22px; }
.topo .marca { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-size: 18px; font-weight: 400; letter-spacing: .2px; }
.topo .marca img { width: 24px; height: 24px; }
.trilha-sep { opacity: .8; font-size: 20px; }
.trilha { font-weight: 500; font-size: 16px; }
.topo .espaco { flex: 1; }
.clinica-topo { font-size: 13px; opacity: .85; margin-right: 8px; }
.usuario { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; letter-spacing: .3px; }
.menu { background: var(--branco); border-right: 1px solid #eeeeee; padding: 8px 8px 0; display: flex; flex-direction: column; justify-content: space-between; overflow: auto; }
.menu-lista, .menu-rodape { display: flex; flex-direction: column; gap: 7px; }
.menu-rodape { border-top: 1px solid var(--borda); padding: 8px 0; margin: 8px -8px 0; padding-left: 8px; padding-right: 8px; }
.menu a { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 8px; color: #424242; text-decoration: none; font-size: 16px; white-space: nowrap; }
.menu a svg { width: 21px; height: 21px; flex: none; color: #616161; stroke-width: 1.5; }
.menu a:hover { background: #f5f5f5; }
.menu a.ativo { background: #e8f2fd; color: var(--marca-escura); }
.menu a.ativo svg { color: var(--marca-escura); }
.conteudo { overflow: auto; min-width: 0; background: #eeeeee; }
.conteudo > .agenda { background: var(--fundo); }
.pagina { padding: 24px 32px; max-width: 1340px; }
.pagina h1 { font-size: 24px; font-weight: 400; margin: 0 0 16px; color: #212121; }
/* Cartão de página no padrão da referência: título dentro do cartão branco, sombra leve, raio 4 px. */
.cartao-pagina { background: var(--branco); border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 1px rgba(0,0,0,.06); padding: 16px 16px 8px; }
/* Faixa branca de abas no topo da página (Financeiro, Ajustes, ficha). */
.faixa-abas { background: var(--branco); display: flex; gap: 0; padding: 0 32px; border-bottom: 1px solid #e0e0e0; overflow-x: auto; }
.faixa-abas a, .faixa-abas button { padding: 15px 24px 13px; font-size: 14px; font-weight: 500; text-transform: uppercase; color: #616161; text-decoration: none; border: 0; background: none; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.faixa-abas .ativo { color: var(--marca); border-bottom-color: var(--marca); }

/* ---------- botões e formulários ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--borda-forte); background: var(--branco); border-radius: 4px; padding: 7px 14px; cursor: pointer;
  font-size: 13px; font-weight: 500; letter-spacing: .4px; text-transform: uppercase; white-space: nowrap; color: #424242; text-decoration: none; min-height: 34px; }
.btn:hover { background: #f5f5f5; }
.btn.primario { background: var(--acao); border-color: var(--acao); color: #fff; box-shadow: var(--sombra-leve); }
.btn.primario:hover { background: var(--acao-escura); }
.btn.azul { background: var(--marca); border-color: var(--marca); color: #fff; }
.btn.perigo { color: var(--perigo); border-color: #ef9a9a; }
.btn.perigo-cheio { background: var(--perigo); border-color: var(--perigo); color: #fff; }
.btn.fantasma { border-color: transparent; background: transparent; }
.btn.fantasma:hover { background: rgba(0,0,0,.05); }
.btn.texto { border-color: transparent; background: transparent; color: #424242; }
.btn.icone { padding: 6px; min-width: 34px; }
.btn.quadrado { background: #e7e7e7; border-color: transparent; border-radius: 4px; padding: 6px; width: 36px; height: 36px; position: relative; color: #424242; }
.btn.quadrado:hover { background: #dcdcdc; }
.btn.quadrado svg { width: 20px; height: 20px; }
.btn.quadrado .selo { position: absolute; top: -5px; right: -5px; }
.btn svg { width: 18px; height: 18px; }
.btn[disabled] { opacity: .5; cursor: default; }
.selo { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--perigo); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; text-transform: none; letter-spacing: 0; }
.link-acao { background: none; border: 0; color: var(--marca-escura); font-size: 12px; cursor: pointer; padding: 2px 0; }
.link-acao:hover { text-decoration: underline; }
.campo { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--texto-2); position: relative; }
.campo input, .campo select, .campo textarea, .entrada { border: 1px solid var(--borda-forte); border-radius: 4px; padding: 9px 11px; background: var(--branco); font-size: 14px; color: var(--texto); width: 100%; }
.campo textarea { resize: vertical; min-height: 64px; }
.campo input:focus, .campo select:focus, .campo textarea:focus, .entrada:focus { outline: none; border-color: var(--marca); box-shadow: 0 0 0 1px var(--marca); }
.campo:focus-within { color: var(--marca-escura); }
.contador { align-self: flex-end; font-size: 11px; color: var(--texto-2); }
.grade-form { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px 14px; }
.c2 { grid-column: span 2; } .c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c6 { grid-column: 1 / -1; }
.chave { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--texto); cursor: pointer; }
.chave input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--marca); }
/* interruptor (toggle) */
.interruptor { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--texto); cursor: pointer; }
.interruptor input { appearance: none; width: 34px; height: 14px; border-radius: 7px; background: #bdbdbd; position: relative; cursor: pointer; flex: none; margin: 0; }
.interruptor input::after { content: ""; position: absolute; top: -3px; left: -2px; width: 20px; height: 20px; border-radius: 50%; background: #fafafa; box-shadow: 0 1px 3px rgba(0,0,0,.4); transition: left .15s; }
.interruptor input:checked { background: #90caf9; }
.interruptor input:checked::after { left: 16px; background: var(--marca); }
.secao-titulo { color: var(--marca-escura); font-size: 14px; font-weight: 500; border-top: 1px solid var(--borda); padding-top: 12px; }
.extras { background: #f5f5f5; border-radius: 6px; }
.extras summary { cursor: pointer; padding: 12px 14px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.extras summary::-webkit-details-marker { display: none; }
.extras summary b { color: var(--marca-escura); font-weight: 500; font-size: 14px; display: block; }
.extras summary small { color: var(--texto-2); font-size: 12px; }
.extras summary::after { content: "⌄"; color: var(--texto-2); font-size: 18px; }
.extras[open] summary::after { content: "⌃"; }
.extras .corpo-extras { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.cartao { background: var(--branco); border: 1px solid var(--borda); border-radius: var(--raio); padding: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.cartao + .cartao { margin-top: 16px; }
.cartao h2 { font-size: 16px; font-weight: 500; margin: 0 0 12px; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, var(--marca) 0 38%, var(--fundo) 38%); }
.login form { width: 360px; display: flex; flex-direction: column; gap: 14px; padding: 28px; box-shadow: var(--sombra); }
.login .marca { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 26px; font-weight: 500; margin-bottom: 4px; color: var(--marca-escura); }
.login .marca img { width: 44px; height: 44px; }
.erro { color: var(--perigo); font-size: 13px; min-height: 18px; }
.dica { font-size: 12px; color: var(--texto-2); text-align: center; }

/* ---------- agenda ---------- */
.agenda { display: flex; flex-direction: column; height: 100%; padding: 15px 16px 0; }
.barra { display: flex; align-items: center; gap: 12px; padding: 0 0 20px; flex-wrap: wrap; }
.barra .espaco { flex: 1; }
.barra .btn-hoje { margin-right: 4px; }
.chip-prof { display: inline-flex; align-items: center; gap: 8px; height: 36px; background: #efefef; border: 0; border-radius: 4px; padding: 0 14px 0 16px; cursor: pointer; font-size: 14px; color: #757575; min-width: 208px; text-transform: uppercase; }
.chip-prof:hover { background: #e0e0e0; }
.chip-prof .avatar { width: 24px; height: 24px; border-radius: 50%; background: #5c6bc0; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 500; flex: none; }
.chip-prof .nome { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mes-campo { position: relative; display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; height: 36px; background: #efefef; border-radius: 4px; padding: 0 10px 0 16px; min-width: 229px; font-size: 14px; color: #757575; cursor: pointer; }
.mes-campo:first-letter { text-transform: uppercase; }
.mes-campo input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.mes-campo svg { width: 18px; height: 18px; color: #616161; }
.seletor-visao { height: 36px; background: #efefef; border: 0; border-radius: 4px; padding: 0 10px 0 14px; font-size: 14px; color: #757575; cursor: pointer; }
.btn-hoje { border: 0; background: transparent; font-size: 14px; font-weight: 500; color: #616161; cursor: pointer; padding: 8px 10px; border-radius: 4px; }
.btn-hoje:hover, .seta:hover { background: rgba(0,0,0,.06); }
.seta { border: 0; background: transparent; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; color: #616161; }
.seta svg { width: 20px; height: 20px; }
.resumo-dia { display: flex; gap: 6px; padding: 0 0 10px; flex-wrap: wrap; font-size: 12px; }
.pilula { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: #eeeeee; color: #616161; }
.pilula i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.calendario { flex: 1; overflow: auto; position: relative; background: var(--branco); }
.cal-cabecalho { display: grid; position: sticky; top: 0; z-index: 5; background: var(--branco); border-bottom: 1px solid var(--borda); }
.cal-cabecalho .canto { display: flex; justify-content: center; padding: 8px 0; }
.fab { width: 38px; height: 38px; border-radius: 50%; background: #50ae54; color: #fff; border: 0; display: grid; place-items: center; cursor: pointer; box-shadow: 0 3px 5px -1px rgba(0,0,0,.2), 0 6px 10px rgba(0,0,0,.14); }
.fab:hover { background: var(--acao-escura); }
.fab svg { width: 22px; height: 22px; }
.cal-cabecalho .col { min-height: 70px; padding: 9px 8px 8px; border-left: 1px solid var(--borda); min-width: 0; }
.cal-cabecalho .dia-semana { font-size: 12px; color: #616161; }
.cal-cabecalho .dia-num { font-size: 24px; font-weight: 400; color: #424242; line-height: 1.2; margin-top: 2px; }
.cal-cabecalho .dia-num small { font-size: 14px; color: #9e9e9e; margin-left: 3px; }
.cal-cabecalho .hoje .dia-num { font-weight: 500; color: #212121; }
.cal-cabecalho .prof-titulo { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal-cabecalho .prof-titulo i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dia-inteiro { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.dia-inteiro:empty { display: none; }
.dia-inteiro div { font-size: 11px; background: #eceff1; border-left: 3px solid #90a4ae; border-radius: 3px; padding: 2px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.cal-corpo { display: grid; position: relative; }
.horas { border-right: 1px solid var(--borda); }
.horas div { height: var(--slot); font-size: 12px; font-weight: 500; color: #424242; padding: 10px 0 0 14px; }
.coluna { position: relative; border-left: 1px solid var(--borda); cursor: cell; }
.coluna.fechado { background: repeating-linear-gradient(135deg, #e9e9e9 0 4px, #e2e2e2 4px 8px); }
.coluna.hoje { background: #eef5fd; }
.coluna .linha { height: var(--slot); border-bottom: 1px dashed #e8e8e8; }
.coluna .linha.hora-cheia { border-bottom: 1px solid #e0e0e0; }
.coluna.alvo { background: var(--marca-clara); }
.agora { position: absolute; left: 0; right: 0; height: 2px; background: var(--marca); z-index: 3; pointer-events: none; }
.agora::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--marca); }
.evento { position: absolute; border-radius: 4px; padding: 3px 6px; font-size: 12px; line-height: 1.25; overflow: hidden; cursor: pointer; color: #fff; z-index: 2; box-shadow: var(--sombra-leve); border-left: 4px solid rgba(0,0,0,.25); }
.evento:hover { filter: brightness(1.07); z-index: 4; }
.evento b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evento span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .92; }
.evento .etiqueta { display: inline-block; margin-top: 2px; padding: 0 5px; border-radius: 3px; background: rgba(255,255,255,.92); font-size: 10px; font-weight: 600; }
.evento.cancelada { text-decoration: line-through; opacity: .75; }
.evento.passado { opacity: .55; }
.evento.compromisso { background: repeating-linear-gradient(135deg, #eceff1 0 6px, #e3e7ea 6px 12px); color: var(--texto); border-left-color: #90a4ae; }
.evento.compromisso.livre { border-style: dashed; opacity: .85; }
.evento.arrastando { opacity: .4; }
.compacta { --slot: 22px; }
.compacta .evento { padding: 1px 5px; font-size: 11px; }
.compacta .evento span:not(:first-of-type) { display: none; }

/* ---------- camadas: modal, popover, gaveta ---------- */
.fundo-modal { position: fixed; inset: 0; background: rgba(0,0,0,.32); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { background: var(--branco); border-radius: 6px; width: min(640px, 100%); max-height: calc(100vh - 40px); overflow: auto; box-shadow: 0 11px 15px -7px rgba(0,0,0,.2), 0 24px 38px 3px rgba(0,0,0,.14); }
.modal header { display: flex; align-items: center; gap: 10px; padding: 18px 22px 0; }
.modal header h2 { font-size: 19px; font-weight: 500; margin: 0; flex: 1; }
.modal .corpo { padding: 16px 22px; }
.modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 22px 18px; align-items: center; }
.modal footer .espaco { flex: 1; }
.abas { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.abas button { border: 0; background: #eeeeee; padding: 7px 16px; border-radius: 999px; cursor: pointer; font-size: 14px; color: #424242; }
.abas button.ativo { background: var(--marca); color: #fff; }
.abas-linha { display: flex; gap: 4px; border-bottom: 1px solid var(--borda); margin-bottom: 16px; overflow-x: auto; }
.abas-linha a, .abas-linha button { padding: 11px 16px; color: var(--texto-2); text-decoration: none; font-size: 13px; font-weight: 500; letter-spacing: .4px; text-transform: uppercase; border: 0; background: none; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.abas-linha .ativo { color: var(--marca-escura); border-bottom-color: var(--marca); }
.aviso-conflito { background: #fff3e0; border: 1px solid #ffcc80; color: #8a4b00; border-radius: 6px; padding: 10px 12px; font-size: 13px; }
.aviso-conflito ul { margin: 4px 0 0; padding-left: 18px; }
.sugestoes { display: flex; flex-wrap: wrap; gap: 6px; }
.sugestoes:empty { display: none; }
.sugestoes button { border: 1px solid var(--marca); color: var(--marca-escura); background: var(--marca-clara); border-radius: 999px; padding: 4px 10px; font-size: 13px; cursor: pointer; }
.btn-livre { width: 100%; height: 100%; min-height: 42px; border: 1px solid var(--borda-forte); background: var(--branco); color: var(--marca-escura); border-radius: 4px; font-weight: 500; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; }
.btn-livre:hover { background: var(--marca-clara); }
.busca-paciente { position: relative; }
.lista-sugestao { position: absolute; left: 0; right: 0; top: 100%; background: var(--branco); border: 1px solid var(--borda); border-radius: 4px; box-shadow: var(--sombra); z-index: 10; max-height: 220px; overflow: auto; }
.lista-sugestao button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; cursor: pointer; font-size: 14px; }
.lista-sugestao button:hover { background: var(--marca-clara); }
.lista-sugestao small { color: var(--texto-2); }
.escolhido { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--marca); background: var(--marca-clara); border-radius: 4px; padding: 6px 10px; font-size: 14px; color: var(--texto); }

.popover { position: fixed; z-index: 40; background: var(--branco); border-radius: 8px; box-shadow: var(--sombra); width: 330px; padding: 14px 16px; border: 1px solid var(--borda); }
.popover h3 { margin: 0 0 6px; font-size: 16px; font-weight: 500; }
.popover .linha-info { font-size: 13px; color: var(--texto-2); margin: 4px 0; display: flex; gap: 6px; align-items: center; }
.popover .acoes { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.popover select { margin-top: 4px; }

.gaveta { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--branco); z-index: 45; box-shadow: var(--sombra); display: flex; flex-direction: column; }
.gaveta header { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--borda); background: var(--marca); color: #fff; }
.gaveta header h2 { flex: 1; margin: 0; font-size: 17px; font-weight: 500; }
.gaveta header .btn { color: #fff; }
.gaveta .corpo { flex: 1; overflow: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; }
.item-lista { border: 1px solid var(--borda); border-radius: 6px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.item-lista .nome { font-weight: 500; }
.item-lista .meta, .meta { font-size: 13px; color: var(--texto-2); }
.item-lista .acoes { display: flex; gap: 6px; margin-top: 4px; }
.vazio { color: var(--texto-2); text-align: center; padding: 30px 10px; font-size: 14px; }
.menu-flutuante { position: fixed; z-index: 40; background: var(--branco); border: 1px solid var(--borda); border-radius: 6px; box-shadow: var(--sombra); padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; width: 290px; }
.menu-flutuante h4 { margin: 0; font-size: 14px; font-weight: 500; }
.menu-flutuante .rotulo-secao { font-size: 11px; color: var(--texto-2); letter-spacing: .5px; text-transform: uppercase; border-top: 1px solid var(--borda); padding-top: 10px; }
.menu-flutuante .interruptor { justify-content: space-between; flex-direction: row-reverse; }

/* ---------- tabelas e indicadores ---------- */
.tabela { width: 100%; border-collapse: collapse; background: var(--branco); border: 1px solid var(--borda); border-radius: var(--raio); overflow: hidden; }
.tabela th, .tabela td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--borda); font-size: 14px; }
.tabela th { background: #fafafa; color: var(--texto-2); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.tabela tr:last-child td { border-bottom: 0; }
.tabela tr.clicavel { cursor: pointer; }
.tabela tr.clicavel:hover td { background: #f5faff; }
.tabela .num { text-align: right; font-variant-numeric: tabular-nums; }
.status-tag { display: inline-block; padding: 2px 9px; border-radius: 999px; color: #fff; font-size: 12px; font-weight: 500; }
.cabeca-pagina { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.cabeca-pagina h1 { margin: 0; flex: 1; }
.cor-bolinha { width: 12px; height: 12px; border-radius: 50%; display: inline-block; vertical-align: middle; flex: none; }
.duas-colunas { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--branco); border: 1px solid var(--borda); border-radius: var(--raio); padding: 14px 16px; }
.kpi small { display: block; color: var(--texto-2); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.kpi b { display: block; font-size: 24px; font-weight: 400; margin-top: 6px; }
.positivo { color: var(--acao-escura); } .negativo { color: var(--perigo); }
@media (max-width: 900px) {
  .duas-colunas { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 64px 1fr; }
  .menu span, .clinica-topo { display: none; }
}

/* ---------- avisos ---------- */
#avisos { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.aviso { background: #323232; color: #fff; padding: 12px 18px; border-radius: 4px; font-size: 14px; box-shadow: var(--sombra); }
.aviso.erro-aviso { background: var(--perigo); }

@media print { .layout > .topo, .menu { display: none; } }
