/* Estilo comum dos painéis e do site de agendamento. A cor da marca entra pela variável --cor. */
:root {
  --cor: #2f5fd0;
  --cor-texto: #fff;
  --fundo: #f5f5f4;
  --cartao: #ffffff;
  --linha: #e7e5e4;
  --texto: #1c1917;
  --suave: #78716c;
  --ok: #15803d;
  --alerta: #b45309;
  --erro: #b91c1c;
  --raio: 14px;
  --sombra: 0 1px 2px rgba(0, 0, 0, 0.05), 0 4px 16px rgba(0, 0, 0, 0.05);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--texto);
  background: var(--fundo);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; line-height: 1.45; font-size: 16px; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.4em; letter-spacing: -0.01em; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 0.8em; }
small, .suave { color: var(--suave); }
.oculto { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--cor) 60%, white); outline-offset: 2px; }

/* ---------- botões e campos ---------- */
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45em;
  background: var(--cor); color: var(--cor-texto); border: 0; border-radius: 10px;
  padding: 0.7em 1.15em; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: filter 0.15s, transform 0.05s; min-height: 44px;
}
.botao svg { width: 1.25em; height: 1.25em; flex: none; }
.botao:hover { filter: brightness(1.08); }
.botao:active { transform: translateY(1px); }
.botao[disabled] { opacity: 0.5; cursor: not-allowed; }
.botao.secundario { background: var(--cartao); color: var(--texto); border: 1px solid var(--linha); }
.botao.perigo { background: var(--erro); color: #fff; }
.botao.verde { background: #16a34a; color: #fff; }
.botao.pequeno { padding: 0.35em 0.75em; min-height: 34px; font-size: 0.9rem; border-radius: 8px; }
.botao.largo { width: 100%; }
.link-botao { background: none; border: 0; padding: 0; color: var(--cor); font: inherit; cursor: pointer; text-decoration: underline; }

label { display: block; font-weight: 600; font-size: 0.92rem; margin: 0 0 0.35em; }
.campo { margin-bottom: 1rem; }
.campo small { display: block; font-weight: 400; margin-top: 0.3em; }
input, select, textarea {
  width: 100%; font: inherit; padding: 0.65em 0.8em; border: 1px solid #d6d3d1; border-radius: 10px;
  background: #fff; color: var(--texto); min-height: 44px;
}
textarea { min-height: 90px; resize: vertical; }
input[type='color'] { padding: 0.2em; height: 44px; width: 70px; }
input[type='checkbox'], input[type='radio'] { width: auto; min-height: 0; accent-color: var(--cor); }
.marcar { display: flex; gap: 0.55em; align-items: flex-start; font-weight: 400; }
.marcar input { margin-top: 0.25em; }
.linha-campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 1rem; }

/* ---------- avisos ---------- */
.aviso { padding: 0.8em 1em; border-radius: 10px; margin-bottom: 1rem; border: 1px solid; }
.aviso.ok { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.aviso.erro { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.aviso.info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.aviso.atencao { background: #fffbeb; border-color: #fde68a; color: #78350f; }

/* ---------- cartões e tabelas ---------- */
.cartao { background: var(--cartao); border-radius: var(--raio); box-shadow: var(--sombra); padding: 1.25rem; margin-bottom: 1rem; }
.cartao > h2:first-child, .cartao > h3:first-child { margin-top: 0; }
.grade { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.numero-grande { font-size: 1.8rem; font-weight: 700; letter-spacing: -0.02em; }
.tabela { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.tabela th, .tabela td { text-align: left; padding: 0.6em 0.5em; border-bottom: 1px solid var(--linha); vertical-align: top; }
.tabela th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--suave); font-weight: 600; }
.tabela-rolagem { overflow-x: auto; }
.tabela td:not(:first-child) { white-space: nowrap; }
.etiqueta { display: inline-block; font-size: 0.78rem; font-weight: 600; padding: 0.15em 0.6em; border-radius: 99px; background: #f5f5f4; color: #44403c; white-space: nowrap; }
.etiqueta.marcado { background: #eff6ff; color: #1d4ed8; }
.etiqueta.confirmado { background: #f0fdf4; color: #15803d; }
.etiqueta.concluido { background: #f5f5f4; color: #44403c; }
.etiqueta.faltou { background: #fffbeb; color: #b45309; }
.etiqueta.cancelado { background: #fef2f2; color: #b91c1c; text-decoration: line-through; }
.etiqueta.atrasado { background: #fef2f2; color: #b91c1c; }
.etiqueta.em-dia { background: #f0fdf4; color: #15803d; }
.vazio { text-align: center; color: var(--suave); padding: 2rem 1rem; }
.acoes { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.entre { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
