* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    overflow: hidden;
    height: 100vh;
}

.container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 15px;
}

/* Barra de progresso */
.progress-bar-container {
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 20px;
    backdrop-filter: blur(10px);
}

.progress-info {
    text-align: center;
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    gap: 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
}

header h1 {
    font-size: 3em;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5), 0 0 10px rgba(0, 0, 0, 0.3);
    margin: 0;
    -webkit-text-stroke: 1px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

/* Estatísticas compactas ao lado do título */
.estatisticas-compactas {
    display: flex;
    gap: 15px;
    align-items: center;
}

.stat-compacta {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    min-width: 80px;
}

.stat-number-compacta {
    font-size: 1.8em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1;
    margin-bottom: 3px;
}

.stat-label-compacta {
    font-size: 0.75em;
    opacity: 0.9;
    text-align: center;
}

.header-right {
    display: flex;
    align-items: center;
}

.data-hora-card {
    background: rgba(255, 255, 255, 0.15);
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    backdrop-filter: blur(5px);
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow: hidden;
}

/* Estatísticas antigas removidas - agora estão no header */

/* Layout principal com sidebar */
.main-content {
    flex: 1;
    display: flex;
    gap: 15px;
    overflow: hidden;
}

/* Sidebar com lista de tarefas */
.sidebar-tarefas {
    width: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    backdrop-filter: blur(10px);
    overflow-y: auto;
    max-height: 100%;
}

.sidebar-tarefas h3 {
    font-size: 1.3em;
    margin-bottom: 15px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.lista-tarefas-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.item-tarefa-sidebar {
    padding: 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    border-left: 4px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.item-tarefa-sidebar:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(5px);
}

.item-tarefa-sidebar.ativa {
    background: rgba(255, 255, 255, 0.3);
    border-left-color: #ffc107;
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.5);
}

.item-tarefa-sidebar.urgente {
    border-left-color: #dc3545;
}

.item-tarefa-sidebar.alta {
    border-left-color: #ffc107;
}

.item-tarefa-sidebar.media {
    border-left-color: #17a2b8;
}

.item-tarefa-sidebar.baixa {
    border-left-color: #28a745;
}

.item-tarefa-sidebar.atrasada {
    background: rgba(220, 53, 69, 0.2);
    border-left-color: #dc3545;
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0%, 100% { border-left-width: 4px; }
    50% { border-left-width: 8px; }
}

.titulo-sidebar {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 1.1em;
}

.info-sidebar {
    font-size: 0.85em;
    opacity: 0.8;
}

/* Tarefa principal */
.tarefa-principal {
    flex: 1;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.3);
    min-height: 400px;
    transition: opacity 0.8s ease, transform 0.8s ease;
    position: relative;
    overflow: hidden;
}

.tarefa-principal.fade-in {
    animation: fadeIn 0.8s ease;
}

.tarefa-principal.fade-out {
    animation: fadeOut 0.8s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.tarefa-principal.pendente-urgente {
    background: rgba(220, 53, 69, 0.4);
    border-color: #dc3545;
    animation: breathing 2s ease-in-out infinite, glow-pulse 2s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(220, 53, 69, 0.6);
    position: relative;
    overflow: hidden;
}

.tarefa-principal.pendente-urgente::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: light-sweep 3s linear infinite;
    pointer-events: none;
}

.tarefa-principal.pendente-alta {
    background: rgba(255, 193, 7, 0.3);
    border-color: #ffc107;
}

.tarefa-principal.pendente-media {
    background: rgba(23, 162, 184, 0.3);
    border-color: #17a2b8;
}

.tarefa-principal.pendente-baixa {
    background: rgba(40, 167, 69, 0.3);
    border-color: #28a745;
}

.tarefa-principal.atrasada {
    background: rgba(220, 53, 69, 0.5) !important;
    border-color: #dc3545 !important;
    border-width: 5px !important;
    animation: breathing-intense 1.5s ease-in-out infinite, glow-pulse-intense 1.5s ease-in-out infinite;
    box-shadow: 0 0 50px rgba(220, 53, 69, 0.9), 0 0 100px rgba(220, 53, 69, 0.5);
    position: relative;
    overflow: hidden;
}

.tarefa-principal.atrasada::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: light-sweep-fast 2s linear infinite;
    pointer-events: none;
    z-index: 0;
}

/* Animação de respiração (breathing) - expansão e contração suave */
@keyframes breathing {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.03);
    }
}

/* Animação de respiração intensa para tarefas atrasadas */
@keyframes breathing-intense {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Glow pulsante - brilho que pulsa */
@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 30px rgba(220, 53, 69, 0.6),
                    0 0 60px rgba(220, 53, 69, 0.3);
    }
    50% {
        box-shadow: 0 0 50px rgba(220, 53, 69, 0.9),
                    0 0 100px rgba(220, 53, 69, 0.5);
    }
}

/* Glow pulsante intenso */
@keyframes glow-pulse-intense {
    0%, 100% {
        box-shadow: 0 0 50px rgba(220, 53, 69, 0.9),
                    0 0 100px rgba(220, 53, 69, 0.5),
                    0 0 150px rgba(220, 53, 69, 0.3);
    }
    50% {
        box-shadow: 0 0 70px rgba(220, 53, 69, 1),
                    0 0 140px rgba(220, 53, 69, 0.7),
                    0 0 200px rgba(220, 53, 69, 0.4);
    }
}

/* Efeito de luz percorrendo a borda */
@keyframes light-sweep {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Luz percorrendo rápida para tarefas atrasadas */
@keyframes light-sweep-fast {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.tarefa-info {
    text-align: center;
    width: 100%;
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.2);
    padding: 30px;
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

.setor {
    font-size: 3em;
    font-weight: bold;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 0, 0, 0.3);
    -webkit-text-stroke: 1px rgba(0, 0, 0, 0.2);
}

.setor.padaria {
    color: #ffc107;
}

.setor.hortifruti {
    color: #28a745;
}

.setor.frigorífico {
    color: #17a2b8;
}

.titulo-tarefa {
    font-size: 3.5em;
    font-weight: bold;
    margin-bottom: 30px;
    line-height: 1.2;
    text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 0, 0, 0.4);
    -webkit-text-stroke: 1.5px rgba(0, 0, 0, 0.3);
}

.encarregado {
    font-size: 2.2em;
    margin-bottom: 20px;
    opacity: 0.95;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.encarregado::before {
    content: '👤';
    font-size: 1.2em;
}

.data-execucao {
    font-size: 2em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.data-execucao::before {
    content: '📅';
    font-size: 1.2em;
}

.data-execucao.atrasada {
    color: #ff6b6b;
    font-weight: bold;
    font-size: 2.3em;
    animation: blink-text 1s infinite;
}

.data-execucao.atrasada::before {
    content: '⚠️';
    font-size: 1.3em;
}

@keyframes blink-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.alerta-atrasado {
    background: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 20px 40px;
    border-radius: 15px;
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 3px;
    animation: pulse-alert 1s infinite;
    box-shadow: 0 0 30px rgba(220, 53, 69, 0.8);
}

@keyframes pulse-alert {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.prioridade-badge {
    display: inline-block;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.8em;
    font-weight: bold;
    margin-top: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.prioridade-urgente {
    background: #dc3545;
    animation: blink-intense 0.8s infinite;
}

.prioridade-alta {
    background: #ffc107;
    color: #000;
}

.prioridade-media {
    background: #17a2b8;
}

.prioridade-baixa {
    background: #28a745;
}

@keyframes blink-intense {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

/* Contador regressivo */
.contador-regressivo {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    backdrop-filter: blur(10px);
}

.contador-regressivo span {
    color: #ffc107;
    font-size: 1.3em;
}

.tarefas-concluidas {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    backdrop-filter: blur(10px);
    max-height: 120px;
    overflow: hidden;
}

.tarefas-concluidas h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
    text-align: center;
}

.lista-concluidas {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 5px;
}

.item-concluida {
    background: rgba(40, 167, 69, 0.3);
    padding: 8px 15px;
    border-radius: 10px;
    font-size: 0.9em;
    white-space: nowrap;
    border: 1px solid rgba(40, 167, 69, 0.5);
}

.loading {
    font-size: 2em;
    text-align: center;
}

.sem-tarefas {
    font-size: 2.5em;
    text-align: center;
    opacity: 0.7;
}

/* Responsividade */
@media (max-width: 1920px) {
    .titulo-tarefa {
        font-size: 3em;
    }
    .setor {
        font-size: 2.5em;
    }
    .sidebar-tarefas {
        width: 250px;
    }
    header h1 {
        font-size: 2.5em;
    }
    .stat-number-compacta {
        font-size: 1.5em;
    }
    .data-hora-card {
        font-size: 1em;
    }
}

@media (max-width: 1366px) {
    .titulo-tarefa {
        font-size: 2.5em;
    }
    .setor {
        font-size: 2em;
    }
    header h1 {
        font-size: 2em;
    }
    .sidebar-tarefas {
        width: 200px;
    }
    .stat-number-compacta {
        font-size: 1.3em;
    }
    .stat-label-compacta {
        font-size: 0.65em;
    }
    .data-hora-card {
        font-size: 0.9em;
        padding: 10px 15px;
    }
    .estatisticas-compactas {
        gap: 10px;
    }
    .stat-compacta {
        min-width: 70px;
        padding: 6px 12px;
    }
}

@media (max-width: 1024px) {
    header {
        flex-direction: column;
        gap: 10px;
    }
    .header-left {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    .estatisticas-compactas {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 1024px) {
    .sidebar-tarefas {
        display: none;
    }
    .main-content {
        flex-direction: column;
    }
}

/* Aviso de Licença */
.aviso-licenca {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.5s;
}

.aviso-licenca.oculto {
    display: none;
}

.aviso-conteudo {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    padding: 60px;
    border-radius: 20px;
    text-align: center;
    max-width: 800px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: pulse 2s infinite;
}

.aviso-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: shake 0.5s infinite;
}

.aviso-conteudo h2 {
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
}

.aviso-conteudo p {
    font-size: 1.8em;
    margin-bottom: 20px;
    line-height: 1.6;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.aviso-detalhes {
    font-size: 1.4em;
    margin-top: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.oculto {
    display: none !important;
}
