/* Estilos específicos para o Painel de Chamadas (TV) */

body.tv-mode {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    background: #000;
    color: white;
    height: 100vh;
    overflow: hidden;
}

/* Temas */
.theme-dark {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
}

.theme-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #333;
}

.theme-blue {
    background: linear-gradient(135deg, #0f2027 0%, #203a43 100%);
    color: white;
}

.theme-green {
    background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 100%);
    color: white;
}

/* Container Principal */
.painel-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

/* Header do Painel */
.painel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.painel-logo h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(45deg, #4a6cf7, #6a11cb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.painel-time {
    font-size: 48px;
    font-weight: 700;
    margin-top: 5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    background: linear-gradient(45deg, #00b4db, #0083b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.painel-info {
    display: flex;
    gap: 30px;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.info-label {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 5px;
}

.info-value {
    font-size: 20px;
    font-weight: 600;
}

/* Conteúdo Principal */
.painel-main {
    flex: 1;
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 2fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Seções */
.called-tickets-section {
    grid-column: 1;
    grid-row: 1 / span 2;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.serving-tickets-section {
    grid-column: 2;
    grid-row: 1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.next-tickets-section {
    grid-column: 2;
    grid-row: 2;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.messages-section {
    grid-column: 1 / span 2;
    grid-row: 3;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Cabeçalhos das Seções */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.section-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #4a6cf7;
}

.queue-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.queue-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 14px;
    min-width: 150px;
}

.queue-select:focus {
    outline: none;
    border-color: #4a6cf7;
}

/* Grid de Senhas Chamadas */
.tickets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 15px;
    height: calc(100% - 60px);
}

.ticket-card {
    background: linear-gradient(135deg, rgba(74, 108, 247, 0.2), rgba(106, 17, 203, 0.2));
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px solid rgba(74, 108, 247, 0.3);
    transition: all 0.3s;
    animation: pulse 2s infinite;
}

.ticket-card.called {
    animation: called-pulse 1s infinite;
}

@keyframes called-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(74, 108, 247, 0.5);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 40px rgba(74, 108, 247, 0.8);
        transform: scale(1.02);
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(74, 108, 247, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(74, 108, 247, 0.5);
    }
}

.ticket-number {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #4a6cf7;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.ticket-info {
    text-align: center;
    margin-bottom: 10px;
}

.ticket-queue {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.ticket-time {
    font-size: 14px;
    opacity: 0.8;
}

.ticket-counter {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* Lista de Atendimento */
.serving-list {
    height: calc(100% - 60px);
    overflow-y: auto;
}

.serving-ticket {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    border-left: 4px solid #4a6cf7;
}

.serving-number {
    font-size: 32px;
    font-weight: 700;
    color: #4a6cf7;
    margin-right: 15px;
    min-width: 80px;
}

.serving-info {
    flex: 1;
}

.serving-queue {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 5px;
}

.serving-counter {
    font-size: 16px;
    font-weight: 600;
}

.serving-time {
    font-size: 12px;
    opacity: 0.7;
}

.empty-serving {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    font-size: 18px;
    opacity: 0.5;
}

/* Lista de Próximas Senhas */
.next-list {
    height: calc(100% - 60px);
    overflow-y: auto;
}

.next-ticket-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    transition: all 0.3s;
}

.next-ticket-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.next-position {
    width: 40px;
    height: 40px;
    background: rgba(74, 108, 247, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 15px;
}

.next-number {
    font-size: 24px;
    font-weight: 600;
    color: #4a6cf7;
    margin-right: 15px;
    min-width: 80px;
}

.next-info {
    flex: 1;
}

.next-queue {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 5px;
}

.next-estimate {
    font-size: 12px;
    opacity: 0.7;
}

.empty-next {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    font-size: 18px;
    opacity: 0.5;
}

/* Mensagens */
.message-slider {
    height: 100%;
    position: relative;
    overflow: hidden;
}

.message {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.5s;
    background: linear-gradient(45deg, #4a6cf7, #6a11cb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.message.active {
    opacity: 1;
}

/* Footer */
.painel-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-stats {
    display: flex;
    gap: 30px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.8;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #4a6cf7;
}

.footer-actions {
    display: flex;
    gap: 10px;
}

.btn-painel {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-painel:hover {
    background: rgba(74, 108, 247, 0.3);
    border-color: #4a6cf7;
    transform: translateY(-2px);
}

.btn-painel.btn-primary {
    background: linear-gradient(45deg, #4a6cf7, #6a11cb);
    border: none;
}

/* Modal de Configurações */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 15px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-header h3 {
    margin: 0;
    color: #4a6cf7;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    opacity: 0.7;
}

.modal-close:hover {
    opacity: 1;
}

.modal-body {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-input, .form-select {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 16px;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #4a6cf7;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-check input {
    width: 18px;
    height: 18px;
}

/* Estados Vazios */
.empty-ticket {
    grid-column: 1 / span 3;
    grid-row: 1 / span 2;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    opacity: 0.5;
}

/* Responsividade para TV */
@media (max-width: 1920px) {
    .ticket-number {
        font-size: 42px;
    }
    
    .painel-time {
        font-size: 42px;
    }
}

@media (max-width: 1366px) {
    .painel-main {
        grid-template-columns: 1.5fr 1fr;
    }
    
    .ticket-number {
        font-size: 36px;
    }
    
    .painel-time {
        font-size: 36px;
    }
}

@media (max-width: 1024px) {
    .painel-main {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    
    .called-tickets-section {
        grid-column: 1;
        grid-row: 1;
    }
    
    .serving-tickets-section {
        grid-column: 1;
        grid-row: 2;
    }
    
    .next-tickets-section {
        grid-column: 1;
        grid-row: 3;
    }
    
    .messages-section {
        grid-column: 1;
        grid-row: 4;
    }
    
    .tickets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .painel-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .painel-info {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .info-item {
        align-items: center;
    }
    
    .footer-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .tickets-grid {
        grid-template-columns: 1fr;
    }
}

/* Estilos para impressão */
@media print {
    body.tv-mode {
        background: white;
        color: black;
    }
    
    .painel-container {
        padding: 0;
    }
    
    .btn-painel, .modal, .queue-selector {
        display: none !important;
    }
}