* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000000;
    height: 100vh;
    color: #ffffff;
    overflow: hidden; /* Sem scroll na TV */
    transition: background 1s ease;
}

body.reuniao-ativa {
    background: radial-gradient(circle, #1a0000 0%, #000000 100%);
}

.container {
    width: 100vw;
    height: 100vh;
    padding: 15px 25px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

body.reuniao-ativa .container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 4px solid #dc3545;
    pointer-events: none;
    animation: borderPulse 2s infinite;
    border-radius: 0;
    z-index: 100;
}

@keyframes borderPulse {
    0% { opacity: 0.3; }
    50% { opacity: 0.8; }
    100% { opacity: 0.3; }
}

header {
    margin-bottom: 15px;
    flex-shrink: 0;
    z-index: 110;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    width: 100%;
}

/* Nova Zona de Alerta no Header */
.agendamento-atual-header-zone {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: linear-gradient(90deg, rgba(220, 53, 69, 0) 0%, rgba(220, 53, 69, 0.8) 50%, rgba(220, 53, 69, 0) 100%);
    padding: 12px 25px;
    border-radius: 12px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.agendamento-atual-info-compact {
    text-align: center;
}

.agendamento-atual-info-compact h3 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.agendamento-atual-meta {
    font-size: 1.1rem;
    color: #FFD700;
    font-weight: 700;
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.separador {
    color: rgba(255, 255, 255, 0.4);
}

.tempo-destaque {
    background: #ffffff;
    color: #dc3545;
    padding: 2px 12px;
    border-radius: 5px;
    font-weight: 800;
}

.badge-em-andamento {
    background: #ffffff;
    color: #dc3545;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: 2px;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.logo-container {
    display: flex;
    align-items: center;
    min-width: 180px;
}

.logo {
    max-height: 70px;
    width: auto;
}

.sala-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    min-width: 280px;
}

.sala-nome {
    font-size: 2rem;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
    color: #ffffff;
    margin: 0;
}

.data-hora {
    text-align: right;
}

.data {
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 0;
    opacity: 0.9;
    color: #cccccc;
}

.hora {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    color: #FFD700;
    line-height: 1.1;
}

.status-container {
    margin-bottom: 15px;
    text-align: center;
    flex-shrink: 0;
}

body.reuniao-ativa .status-container {
    display: none;
}

main {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.agendamentos-container {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.columns-container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 25px;
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

.column {
    flex: 1 !important;
    min-width: 0 !important; /* Força a coluna a encolher se necessário em vez de quebrar */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 215, 0, 0.15);
}

.column-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #FFD700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #FFD700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.agendamentos-column-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    flex: 1;
    padding-right: 8px;
    align-items: stretch;
    scrollbar-width: none; /* Firefox */
}

/* Esconder scrollbar para Chrome, Safari e Opera */
.agendamentos-column-grid::-webkit-scrollbar {
    display: none;
}

.agendamento-card {
    width: 100%;
    background: rgba(40, 40, 40, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    height: fit-content;
    flex-shrink: 0;
}

.agendamento-card.em-andamento {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.3);
}

.agendamento-card.proximo {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.2);
}

.agendamento-horario {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #FFD700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.agendamento-titulo {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1.2;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agendamento-responsavel {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #bbbbbb;
}

.agendamento-descricao {
    display: block;
    font-size: 0.8rem;
    font-weight: 300;
    color: #999999;
    line-height: 1.2;
    margin-top: 5px;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-indicator {
    display: inline-block;
    padding: 8px 25px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.status-indicator.disponivel {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000000;
}

.status-indicator.ocupado {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #ffffff;
}

.status-indicator.proximo {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000000;
}

.loading, .vazio {
    text-align: center;
    font-size: 1.2rem;
    padding: 40px;
    color: #888888;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.15);
}

/* TV Vertical */
@media (orientation: portrait) {
    .columns-container {
        grid-template-columns: 1fr;
    }
    .sala-nome { font-size: 2.5rem; }
    .hora { font-size: 3.5rem; }
}

/* Forçar lado a lado em telas horizontais (TV deitada) */
@media (orientation: landscape) {
    .columns-container {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
    }
    .column {
        width: 50% !important;
        flex: 0 0 50% !important;
    }
}
