/* Terminal da portaria (portaria-terminal.php): login da portaria, espera da liberacao e lista de porteiros. */
.terminal-pagina { min-height: 100vh; background: var(--paper); }
.terminal-topo { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 28px; border-bottom: 1px solid var(--line); background: var(--surface); }
.terminal-topo img { height: 34px; }
.terminal-topo .logo-dark { display: none; }
:root[data-theme="dark"] .terminal-topo .logo-light { display: none; }
:root[data-theme="dark"] .terminal-topo .logo-dark { display: block; }
.terminal-relogio { color: var(--muted); font-size: 14px; }
.terminal-relogio::first-letter { text-transform: uppercase; }
.terminal-conteudo { display: grid; place-items: start center; padding: 48px 20px; }
.terminal-cartao { width: min(100%, 460px); padding: 34px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-md); }
.terminal-cartao h1, .terminal-porteiros h1 { margin: 6px 0 10px; font-family: 'Space Grotesk', sans-serif; font-size: 28px; }
.terminal-texto { margin: 0 0 20px; color: var(--muted); line-height: 1.6; }
.terminal-form { display: grid; gap: 8px; }
.terminal-form button { margin-top: 12px; }
.terminal-rodape { margin: 20px 0 0; font-size: 13px; text-align: center; }
.terminal-rodape a { color: var(--muted); }
.terminal-acoes { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.terminal-acoes button, .terminal-acoes a { width: auto; }
.terminal-espera { text-align: center; }
.terminal-espera form { display: flex; justify-content: center; margin-top: 8px; }
.terminal-detalhe { margin: 0 0 18px; font-size: 13px; color: var(--muted); }
.terminal-pulso { position: relative; width: 72px; height: 72px; margin: 18px auto 8px; }
.terminal-pulso::before, .terminal-pulso span { position: absolute; inset: 0; border-radius: 50%; content: ''; }
.terminal-pulso::before { background: var(--athos); animation: terminal-pulso 1.8s ease-out infinite; }
.terminal-pulso span { inset: 18px; background: var(--athos-dark); }
@keyframes terminal-pulso { from { opacity: .55; transform: scale(.45); } to { opacity: 0; transform: scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .terminal-pulso::before { animation: none; opacity: .3; } }

.terminal-porteiros { width: min(100%, 1100px); }
.terminal-porteiros-topo { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.terminal-porteiros-topo .terminal-texto { margin: 0; }
.terminal-porteiros-topo button { width: auto; }
.terminal-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.terminal-pessoa { display: grid; justify-items: center; gap: 6px; width: 100%; height: 100%; padding: 26px 16px 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); text-align: center; box-shadow: var(--shadow-sm); }
.terminal-pessoa:hover, .terminal-pessoa:focus-visible { border-color: var(--athos); background: var(--surface); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.terminal-pessoa strong { font-size: 16px; line-height: 1.3; }
.terminal-pessoa small { color: var(--muted); font-size: 12px; font-weight: 400; }
.terminal-foto { display: grid; place-items: center; width: 112px; height: 112px; margin-bottom: 8px; overflow: hidden; border-radius: 50%; background: var(--athos-soft); color: var(--athos-dark); font-family: 'Space Grotesk', sans-serif; font-size: 42px; font-weight: 600; }
.terminal-foto img { width: 100%; height: 100%; object-fit: cover; }

.terminal-senha { border-top-color: var(--athos); text-align: center; }
.terminal-senha form { display: grid; justify-items: stretch; gap: 8px; text-align: left; }
.terminal-senha .terminal-foto { justify-self: center; width: 96px; height: 96px; font-size: 36px; }
.terminal-senha h2 { text-align: center; }
.terminal-senha .terminal-acoes { justify-content: space-between; }

@media (max-width: 560px) {
    .terminal-topo { padding: 14px 16px; }
    .terminal-conteudo { padding: 24px 16px; }
    .terminal-cartao { padding: 24px; }
    .terminal-grade { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .terminal-foto { width: 84px; height: 84px; font-size: 32px; }
}

/* Tela do gestor (portaria-terminais.php) */
.terminal-seletor { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 18px; }
.terminal-seletor select { width: auto; min-width: 260px; }
.terminal-ocorrencias span { display: block; }
.portas-leitora small { color: var(--muted); font-weight: 400; }
