* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    min-height: 100vh;
    padding-bottom: 20px;
}

.tela {
    min-height: 100vh;
}

.oculto {
    display: none !important;
}

/* Tela de Login */
.login-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo h1 {
    font-size: 2em;
    color: #667eea;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-primary:active {
    transform: scale(0.98);
}

.erro {
    color: #dc3545;
    margin-top: 10px;
    padding: 10px;
    background: #f8d7da;
    border-radius: 5px;
    display: none;
}

.erro.mostrar {
    display: block;
}

/* Tela Principal */
.header-mobile {
    background: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-mobile h2 {
    color: #667eea;
    font-size: 1.5em;
}

.btn-logout {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.usuario-info {
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    text-align: center;
    font-weight: 600;
    color: #667eea;
}

.container-tarefas {
    padding: 20px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: white;
    font-size: 1.2em;
}

.lista-tarefas {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.card-tarefa {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s;
}

.card-tarefa:active {
    transform: scale(0.98);
}

.card-tarefa.urgente {
    border-left: 5px solid #dc3545;
}

.card-tarefa.alta {
    border-left: 5px solid #ffc107;
}

.card-tarefa.media {
    border-left: 5px solid #17a2b8;
}

.card-tarefa.baixa {
    border-left: 5px solid #28a745;
}

.card-tarefa.concluida {
    opacity: 0.7;
    background: #f8f9fa;
    border-left: 5px solid #28a745;
}

.card-tarefa.concluida .card-tarefa-titulo,
.card-tarefa.concluida .card-tarefa-info,
.card-tarefa.concluida .card-tarefa-data {
    text-decoration: line-through;
    color: #6c757d;
}

.badge-concluida {
    background: #28a745 !important;
    color: white !important;
}

.card-tarefa-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.card-tarefa-titulo {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    flex: 1;
}

.badge-prioridade {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
}

.badge-urgente {
    background: #dc3545;
    color: white;
}

.badge-alta {
    background: #ffc107;
    color: #000;
}

.badge-media {
    background: #17a2b8;
    color: white;
}

.badge-baixa {
    background: #28a745;
    color: white;
}

.card-tarefa-info {
    color: #666;
    font-size: 0.9em;
    margin-top: 8px;
}

.card-tarefa-data {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    color: #999;
    font-size: 0.85em;
    line-height: 1.6;
}

.card-tarefa-data.atrasada {
    color: #dc3545;
    font-weight: bold;
}

.card-tarefa-data strong {
    color: #555;
}

.card-tarefa.concluida .card-tarefa-data {
    color: #6c757d;
}

.sem-tarefas {
    text-align: center;
    padding: 40px;
    color: white;
    font-size: 1.2em;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #667eea;
    font-size: 1.3em;
}

.btn-fechar {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 20px;
}

.info-tarefa {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.info-tarefa p {
    margin-bottom: 8px;
    color: #555;
}

.midia-container {
    margin: 20px 0;
}

.midia-item {
    margin-bottom: 15px;
}

.btn-midia {
    display: block;
    width: 100%;
    padding: 12px;
    background: #f8f9fa;
    border: 2px dashed #ccc;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-midia:active {
    background: #e9ecef;
}

.btn-midia input[type="file"] {
    display: none;
}

.preview-midia {
    margin-top: 10px;
}

.preview-midia img,
.preview-midia video {
    width: 100%;
    border-radius: 10px;
    max-height: 200px;
    object-fit: cover;
}

.btn-enviar {
    margin-top: 20px;
}

/* Aviso de Licença */
.aviso-licenca {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.5s;
}

.aviso-licenca.oculto {
    display: none;
}

.aviso-conteudo {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: pulse 2s infinite;
    color: white;
}

.aviso-icon {
    font-size: 60px;
    margin-bottom: 20px;
    animation: shake 0.5s infinite;
}

.aviso-conteudo h2 {
    font-size: 1.8em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.aviso-conteudo p {
    font-size: 1.2em;
    margin-bottom: 15px;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.aviso-detalhes {
    font-size: 1em;
    margin-top: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsividade */
@media (max-width: 480px) {
    .login-container {
        margin: 20px;
        padding: 20px;
    }
    
    .modal-content {
        margin: 10px;
    }
    
    .aviso-conteudo {
        padding: 30px 20px;
    }
    
    .aviso-conteudo h2 {
        font-size: 1.5em;
    }
    
    .aviso-conteudo p {
        font-size: 1em;
    }
}
