* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    color: #f8fafc;
    display: flex;
    flex-direction: column;
}
.tv-layout {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.tv-header {
    padding: 12px 24px;
    min-height: 60px;
}
.logo-clinica {
    max-height: 48px;
    max-width: 200px;
    object-fit: contain;
}
.tv-main {
    flex: 1;
    display: flex;
    min-height: 0;
}
.sidebar-ultimas {
    width: 280px;
    flex-shrink: 0;
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-right: 1px solid rgba(255,255,255,0.1);
}
.sidebar-ultimas.oculto { display: none; }
.sidebar-ultimas h3 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: #94a3b8;
}
.sidebar-ultimas ul { list-style: none; }
.sidebar-ultimas li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 0.95rem;
}
.sidebar-ultimas li.vazio { color: #64748b; }
.tv-centro {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    min-width: 0;
}
.aviso-chamada {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    padding: 48px 64px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(5, 150, 105, 0.4);
    animation: pulsar 2s ease-in-out infinite;
    text-align: center;
}
@keyframes pulsar {
    0%, 100% { transform: scale(1); box-shadow: 0 20px 60px rgba(5, 150, 105, 0.4); }
    50% { transform: scale(1.02); box-shadow: 0 25px 70px rgba(5, 150, 105, 0.5); }
}
body.modo-chamada .aviso-chamada {
    padding: 64px 96px;
}
body.modo-chamada .titulo-chamada { font-size: 2.5rem; }
body.modo-chamada .nome-paciente { font-size: 5rem; }
body.modo-chamada .consultorio-numero { font-size: 3.5rem; }
.titulo-chamada {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.nome-paciente {
    font-size: 4rem;
    font-weight: 800;
    margin: 24px 0;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.consultorio-numero {
    font-size: 3rem;
    font-weight: 700;
    margin-top: 16px;
    padding: 20px 40px;
    background: rgba(0,0,0,0.2);
    border-radius: 16px;
    display: inline-block;
}
.box-video {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.box-video iframe {
    width: 100%;
    height: 100%;
    border: none;
}
.tv-centro { position: relative; }
.aguardando, .aviso-chamada { position: relative; z-index: 1; }
.aguardando {
    font-size: 1.5rem;
    color: #94a3b8;
    text-align: center;
}
.tv-rodape {
    padding: 8px 24px;
    background: rgba(0,0,0,0.3);
    font-size: 0.85rem;
    color: #94a3b8;
}
.btn-testar-som {
    position: fixed;
    bottom: 16px;
    right: 16px;
    padding: 10px 20px;
    background: #475569;
    color: #f8fafc;
    border: 1px solid #64748b;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    opacity: 0.7;
    z-index: 100;
}
.btn-testar-som:hover { opacity: 1; background: #64748b; }
