body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
    direction: ltr;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px;
}

header {
    text-align: center;
    margin-bottom: 24px;
}

header h1 {
    font-size: 1.8em;
    color: #333;
    margin: 0 0 8px 0;
}

header p {
    color: #666;
    font-size: 1em;
    margin: 0;
}

/* Layout principal */
.main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 40px;
}

.left-column {
    flex: 1 1 100%;   /* Em mobile: ocupa toda a largura */
    max-width: none;
    order: 1;         /* Aparece primeiro no mobile */
}

.right-column {
    flex: 1 1 100%;   /* Em mobile: ocupa toda a largura */
    max-width: none;
    order: 2;         /* Aparece depois do formulário */
}

/* Estilos do formulário (esquerda) */
.options h2 {
    font-size: 1.6em;
    margin-bottom: 16px;
    color: #333;
}

.options form {
    display: flex;
    flex-direction: column;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.options input,
.options select {
    margin-bottom: 16px;
    padding: 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1.1em;
}

.options button {
    padding: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 10px;
}

.options button[type="submit"] {
    background-color: #28a745;
    color: white;
}

.options button[type="button"] {
    background-color: #6c757d;
    color: white;
}

/* Agenda (direita) */
.agenda h2 {
    font-size: 1.6em;
    color: #333;
    margin-bottom: 12px;
}

.search input {
    width: 100%;
    padding: 14px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1.1em;
    box-sizing: border-box;
}

.tasks {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
}

.tasks table {
    width: 100%;
    border-collapse: collapse;
}

.tasks th,
.tasks td {
    padding: 14px 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.tasks th {
    background-color: #f0f0f0;
    font-weight: bold;
    color: #333;
    font-size: 0.95em;
}

.tasks td {
    font-size: 1em;
}

/* Ajuste de colunas em telas grandes */
@media (min-width: 900px) {
    .left-column {
        flex: 1 1 32%;
        max-width: 450px;
    }
    
    .right-column {
        flex: 2 1 65%;
    }

    /* Tamanhos ideais no desktop */
    .tasks th:nth-child(1), .tasks td:nth-child(1) { width: 14%; }
    .tasks th:nth-child(2), .tasks td:nth-child(2) { width: 12%; }
    .tasks th:nth-child(3), .tasks td:nth-child(3) { width: 38%; }
    .tasks th:nth-child(4), .tasks td:nth-child(4) { width: 12%; }
    .tasks th:nth-child(5), .tasks td:nth-child(5) { width: 12%; }
    .tasks th:nth-child(6), .tasks td:nth-child(6) { width: 12%; text-align: center; }
}

/* Responsividade para celular: tabela com rolagem horizontal suave */
@media (max-width: 899px) {
    .tasks {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tasks table {
        min-width: 600px; /* Força largura mínima para manter colunas legíveis */
    }

    .tasks th,
    .tasks td {
        font-size: 0.95em;
        padding: 12px 8px;
    }

    .tasks button {
        padding: 8px 12px;
        font-size: 0.9em;
    }
}

.tasks button {
    padding: 8px 14px;
    margin: 0 4px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.tasks button:first-child {
    background-color: #007bff;
    color: white;
}

.tasks button:last-child {
    background-color: #dc3545;
    color: white;
}

/* Seção de visualizações filtradas */
.filtered-views {
    margin-top: 50px;
}

.filtered-views h2 {
    font-size: 1.6em;
    color: #333;
    margin-bottom: 15px;
}

.filtered-views select {
    width: 100%;
    max-width: 100%;
    padding: 14px;
    margin-bottom: 25px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1.1em;
    background-color: white;
}

/* Mensagem de nenhuma tarefa */
#no-tasks-message,
#no-filtered-tasks-message {
    padding: 30px;
    font-size: 1.1em;
    color: #888;
}