/* Painel de atendimento — primeiro para celular, depois telas maiores. */
:root {
  --cor: #0f766e;
  --cor-escura: #115e59;
  --cor-clara: #ccfbf1;
  --fundo: #f4f6f8;
  --cartao: #ffffff;
  --texto: #1f2937;
  --suave: #6b7280;
  --borda: #e5e7eb;
  --erro: #b91c1c;
  --erro-fundo: #fef2f2;
  --ok: #166534;
  --ok-fundo: #f0fdf4;
  --raio: 14px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--fundo);
  color: var(--texto);
  font-size: 16px;
  line-height: 1.45;
  min-height: 100vh;
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}
[hidden] { display: none !important; }

/* topo */
.topo {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top));
  background: var(--cor); color: #fff;
}
.topo-info { display: flex; flex-direction: column; min-width: 0; }
.topo-info strong { font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topo-info span { font-size: .82rem; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-sair {
  background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px; padding: 8px 16px; font: inherit; font-size: .9rem; cursor: pointer; min-height: 40px;
}

/* conteúdo */
main { padding: 16px; max-width: 640px; margin: 0 auto; }
.carregando { text-align: center; color: var(--suave); padding: 40px 0; }

.cartao {
  background: var(--cartao); border-radius: var(--raio); padding: 20px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 16px;
}
.cartao h1, .cartao h2 { margin: 0 0 12px; }
.cartao h2 { font-size: 1.15rem; }
.sub { color: var(--suave); margin: 0 0 16px; }

.cartao-login { margin-top: 8vh; text-align: center; }
.cartao-login form { text-align: left; }
.logo {
  width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 18px;
  background: var(--cor) url("/icone.svg") center / cover no-repeat;
}

form { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; font-weight: 600; }
input, select {
  font: inherit; font-weight: 400; padding: 12px; border: 1px solid var(--borda); border-radius: 10px;
  background: #fff; color: var(--texto); min-height: 48px; width: 100%;
}
input:focus, select:focus { outline: 2px solid var(--cor); outline-offset: 1px; border-color: var(--cor); }
.linha { display: flex; gap: 8px; }
.linha input { flex: 1; }

.btn {
  font: inherit; font-weight: 600; border: 0; border-radius: 10px; padding: 12px 18px; min-height: 48px;
  background: var(--cor); color: #fff; cursor: pointer;
}
.btn:hover { background: var(--cor-escura); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-secundario { background: var(--cor-clara); color: var(--cor-escura); }
.btn-secundario:hover { background: #99f6e4; }
.btn-link { background: none; border: 0; font: inherit; font-size: .9rem; color: var(--cor); cursor: pointer; padding: 8px 4px; min-height: 40px; }
.btn-link.perigo { color: var(--erro); }

.aviso { padding: 10px 12px; border-radius: 10px; font-size: .92rem; margin: 0 0 12px; text-align: left; }
.aviso-erro { background: var(--erro-fundo); color: var(--erro); }
.aviso-ok { background: var(--ok-fundo); color: var(--ok); }
.dica { color: var(--suave); font-size: .85rem; margin: 0; }

.chave { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.chave input { width: 22px; min-height: 22px; height: 22px; accent-color: var(--cor); }

/* início vazio */
.vazio { text-align: center; padding: 40px 16px; }
.vazio p { color: var(--suave); margin: 0; }
.vazio-icone {
  width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--cor-clara) url("/icone.svg") center / 44px no-repeat;
}

/* equipe */
.lista-pessoas { list-style: none; margin: 0; padding: 0; }
.pessoa { display: flex; flex-direction: column; gap: 8px; padding: 14px 0; border-top: 1px solid var(--borda); }
.pessoa:first-child { border-top: 0; }
.pessoa.inativa { opacity: .55; }
.pessoa-info { display: flex; flex-direction: column; min-width: 0; }
.pessoa-info span { color: var(--suave); font-size: .9rem; overflow-wrap: anywhere; }
.pessoa-acoes { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.etiquetas { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.etiqueta { background: var(--cor-clara); color: var(--cor-escura) !important; font-size: .75rem !important; padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.etiqueta-cinza { background: var(--borda); color: var(--suave) !important; }

/* abas de baixo (polegar alcança fácil no celular) */
.abas {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  display: flex; background: #fff; border-top: 1px solid var(--borda);
  padding-bottom: env(safe-area-inset-bottom);
}
.abas a {
  flex: 1; text-align: center; padding: 14px 8px; color: var(--suave); text-decoration: none; font-weight: 600; min-height: 56px;
}
.abas a.ativa { color: var(--cor); box-shadow: inset 0 3px 0 var(--cor); }

/* telas maiores */
@media (min-width: 720px) {
  main { padding: 24px; }
  .pessoa { flex-direction: row; align-items: center; justify-content: space-between; }
  .pessoa-acoes { justify-content: flex-end; }
}
