body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    background: #f4f6f9;
    color: #222;
}

.container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 20px;
}

.topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

h1 {
    margin: 0;
    font-size: 28px;
}

.subtitulo {
    color: #666;
    margin-top: 6px;
    font-size: 14px;
}

.acoes-topo {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.botao-topo {
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.botao-topo.secundario {
    background: #4b5563;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,.12);
}

.card.ativo {
    outline: 3px solid #2563eb;
    outline-offset: 0;
}

.card .icone {
    font-size: 26px;
    line-height: 1;
    margin-bottom: 8px;
}

.card h2 {
    margin: 0 0 8px 0;
    font-size: 15px;
    color: #666;
}

.card .numero {
    font-size: 32px;
    font-weight: bold;
}

.ok { border-left: 6px solid #1f9d55; }
.atrasado { border-left: 6px solid #d9822b; }
.sem-status { border-left: 6px solid #6b7280; }
.erro { border-left: 6px solid #dc2626; }
.total { border-left: 6px solid #2563eb; }

.filtros {
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    margin-bottom: 20px;
}

.filtros form {
    display: grid;
    grid-template-columns: 1fr 220px 140px 140px 160px;
    gap: 10px;
}

.filtros input,
.filtros select,
.filtros button,
.filtros a {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
    text-decoration: none;
    box-sizing: border-box;
}

.filtros button {
    background: #2563eb;
    color: #fff;
    border: none;
    cursor: pointer;
}

.filtros a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    color: #111;
}

.tabela-box {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1200px;
}

th, td {
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
    text-align: left;
    vertical-align: top;
    font-size: 14px;
}

th {
    background: #f9fafb;
    position: sticky;
    top: 0;
    z-index: 1;
}

.status-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
}

.status-ok { background: #1f9d55; }
.status-atrasado { background: #d9822b; }
.status-sem-status { background: #6b7280; }
.status-erro { background: #dc2626; }

.linha-ok td { background: #f0fdf4; }
.linha-atrasado td { background: #fff7ed; }
.linha-sem-status td { background: #f9fafb; }
.linha-erro td { background: #fef2f2; }

.mensagem {
    max-width: 380px;
    white-space: normal;
    word-break: break-word;
}

.rodape {
    margin-top: 12px;
    color: #666;
    font-size: 13px;
}

@media (max-width: 900px) {
    .filtros form {
        grid-template-columns: 1fr;
    }

    .acoes-topo {
        width: 100%;
    }

    .botao-topo {
        width: 100%;
    }
}